diff --git a/docs/backlog.md b/docs/backlog.md index ff571c677..7bc68df17 100644 --- a/docs/backlog.md +++ b/docs/backlog.md @@ -2,7 +2,7 @@ > Generated by `tools/backlog.py render` from `.run/backlog.jsonl`. These are functions the Phase-21 automation got **close** on but did NOT byte-match. The whole-binary byte-gate is the sole arbiter (G3/P9): **byte-matches bank and are NOT listed here** — only genuine near-misses/blockers are. Ranked by hand-session priority: **reach** (×N propagation leverage) → **closeness** (match_one mismatch count, lower = closer) → **size**. Each row's `best_draft` is the closest C the machine reached — resume from there. -**Open near-misses:** 1352 · by status {'near': 1294, 'failed': 58} · by class {'struct': 22, 'schedule': 16, 'regalloc-order': 21, 'plumbing': 12, 'other': 6, 'PINS': 4, 'WAVE': 8, 'remat': 2, 'STUB': 1, 'O0': 1, 'O1': 1, 'iv-combine': 1, None: 1254, 'loose-typing': 2, 'STRUCT': 1} +**Open near-misses:** 1351 · by status {'near': 1294, 'failed': 57} · by class {'struct': 22, 'schedule': 16, 'regalloc-order': 21, 'plumbing': 11, 'other': 6, 'PINS': 4, 'WAVE': 8, 'remat': 2, 'STUB': 1, 'O0': 1, 'O1': 1, 'iv-combine': 1, None: 1254, 'loose-typing': 2, 'STRUCT': 1} | # | addr | reach | class | nins | status | closeness | where it stuck | best draft | |--:|------|------:|-------|-----:|--------|----------:|----------------|------------| @@ -1355,6 +1355,5 @@ | 1347 | func_800D24A0 | None | | None | failed | | won't compile standalone (loose-typing / missing decl) | `.run/backlog_drafts/func_800D24A0.c` | | 1348 | func_8018457C | None | regalloc-order | None | failed | | none — MATCH (160 ins). case1-tail needed a $a0 pin on the state temp | `.run/backlog_drafts/func_8018457C.c` | | 1349 | func_8018D870 | None | regalloc-order | None | failed | | none — MATCH (match_one 380/380, relocation-masked). Levers: &&-DeMorgan for the mult block layout; lhu-corrected reads; split temps (t=func_8012C658 ret->v1, d8p=d8 load-temp->a0, s60/amt pinned $v1/$a1 for the mult chain); accumulate-in-place for the 0xe add; unsigned-short store for ori 0x8800; d8-load-via-temp to force the addu s3,a0 copy (fixes -1 length drift). | `.run/backlog_drafts/func_8018D870.c` | -| 1350 | func_80142B2C | None | plumbing | None | failed | | none — MATCH | `.run/backlog_drafts/func_80142B2C.c` | -| 1351 | func_80144B9C | None | | None | failed | | won't compile standalone (loose-typing / missing decl) | `.run/backlog_drafts/func_80144B9C.c` | -| 1352 | func_8013DD68 | None | | None | failed | | won't compile standalone (loose-typing / missing decl) | `.run/backlog_drafts/func_8013DD68.c` | +| 1350 | func_80144B9C | None | | None | failed | | won't compile standalone (loose-typing / missing decl) | `.run/backlog_drafts/func_80144B9C.c` | +| 1351 | func_8013DD68 | None | | None | failed | | won't compile standalone (loose-typing / missing decl) | `.run/backlog_drafts/func_8013DD68.c` | diff --git a/docs/matching-cookbook.md b/docs/matching-cookbook.md index d9342a70a..820039844 100644 --- a/docs/matching-cookbook.md +++ b/docs/matching-cookbook.md @@ -8050,3 +8050,26 @@ lever reads as ineffective. Anchor on something unique to the path — the hseq **Blast radius: 0** beyond this family (74 further families re-swept, none moved). Like §118 and unlike §117, this is a **targeted** lever — a path-reachability gap, not a logic defect. + +## §121 — Synthesise externs for macro-DEFINED callees from the macro's own definition head (Phase 29 T95) + +`gather_externs` carries a referenced symbol's declaration by copying a file-scope `extern` line out +of the exemplar TU. A shared engine function **defined by a `DEFINE_func_X()` macro** has no such +line anywhere — the macro *defines* it. The member TU instantiates that macro too, but frequently +**below** the splice point, so a draft that uses the symbol as a **value** (a cast call site, +`((void(*)(void))func_80142C84)()`) fails with `undeclared (first use this function)`. + +**Guessing the type is worse than not declaring it.** A no-prototype `extern s32 func_80142C84();` +turns the error into `conflicting types` against the macro's real `void func_80142C84(s32 a0)` — a +*different* error, which is the useful signal that the guess (not the diagnosis) was wrong. + +**The fix:** `macro_def_sig_map()` parses the `#define DEFINE_func_X() \ func_X() {` +heads in `engine_core.h` (**1,878 signatures**) and the sweep prepends +`extern func_X();` for any referenced macro-defined callee the draft does not already +declare. Byte-verified on `func_80142B2C`: `undeclared` -> (bad guess) `conflicting types` -> +**MATCH (34 ins)** -> **136/136 banked.** + +Note this is the complement of `header_sig_map()`, which reads the `extern` decls a macro emits *for +its own callees*. Two different macro-derived signature sources; a symbol in neither is a real gap. + +**Blast radius: 0** beyond this family — like §118 and §120, and unlike §117, a **targeted** lever. diff --git a/docs/progress.fleet.md b/docs/progress.fleet.md index 15e7fbdc8..e95ad31b9 100644 --- a/docs/progress.fleet.md +++ b/docs/progress.fleet.md @@ -4,16 +4,16 @@ # cross-binary collapsible-byte leverage: docs/duplicates.cross.md. # THREE progress metrics (all matter — see the labels): -FLEET fn-count byte-ident: 325143 / 353720 = 91.92% (REAL+LINKED+empties; FUNCTION-count, ×134-inflated — one crack counts per overlay) -FLEET instr-weighted : 11486355 / 13141652 = 87.4% (shipped .text across main + resident + 138 overlays; the decomp.dev-DISPLAY number) +FLEET fn-count byte-ident: 325279 / 353720 = 91.96% (REAL+LINKED+empties; FUNCTION-count, ×134-inflated — one crack counts per overlay) +FLEET instr-weighted : 11490979 / 13141652 = 87.4% (shipped .text across main + resident + 138 overlays; the decomp.dev-DISPLAY number) FLEET distinct-code(uniq): 4395820 / 5634875 = 78.0% (69744/87459 unique fns; the DISTINCT-RE number) MAIN game-code weighted : 436 / 60201 = 0.7% (INCLUDED in the fleet numbers above since 2026-07-22 — roadmap §1 metrics contract; LINKED-excluding Ghidra sig dated 2026-06-14; caveat is R34: no independent second oracle for a PS-X EXE, NOT drift) - (fleet EXCLUDING main, for continuity with pre-2026-07-22 readings: 11485919 / 13081451 = 87.8%) + (fleet EXCLUDING main, for continuity with pre-2026-07-22 readings: 11490543 / 13081451 = 87.8%) -FLEET REAL substantive : 323288 (of which dedup-shared 239530 via 1886 groups / 239604 instances) +FLEET REAL substantive : 323424 (of which dedup-shared 239530 via 1886 groups / 239604 instances) FLEET LINKED PsyQ objs : 959 FLEET NON_MATCHING : 7 (0 in any default build — G4) -FLEET INCLUDE_ASM stubs : 28570 +FLEET INCLUDE_ASM stubs : 28434 FLEET matchable : 353720 | binary | REAL | shared | LINKED | byte-ident | matchable | byte-ident % | @@ -21,140 +21,140 @@ FLEET matchable : 353720 | main | 54 | 2 | 959 | 1055 | 2096 | 50.3% | | resident | 129 | 0 | 0 | 131 | 145 | 90.3% | | ov_SC01_000 | 2310 | 1742 | 0 | 2310 | 2403 | 96.1% | -| ov_SC01_001 | 2316 | 1743 | 0 | 2318 | 2466 | 94.0% | -| ov_SC01_004 | 2307 | 1734 | 0 | 2308 | 2414 | 95.6% | -| ov_SC01_005 | 2338 | 1757 | 0 | 2338 | 2503 | 93.4% | -| ov_SC01_006 | 2338 | 1757 | 0 | 2338 | 2503 | 93.4% | -| ov_SC01_008 | 2307 | 1734 | 0 | 2309 | 2426 | 95.2% | -| ov_SC01_009 | 2332 | 1735 | 0 | 2333 | 2507 | 93.1% | -| ov_SC01_074 | 2313 | 1735 | 0 | 2315 | 2425 | 95.5% | +| ov_SC01_001 | 2317 | 1743 | 0 | 2319 | 2466 | 94.0% | +| ov_SC01_004 | 2308 | 1734 | 0 | 2309 | 2414 | 95.7% | +| ov_SC01_005 | 2339 | 1757 | 0 | 2339 | 2503 | 93.4% | +| ov_SC01_006 | 2339 | 1757 | 0 | 2339 | 2503 | 93.4% | +| ov_SC01_008 | 2308 | 1734 | 0 | 2310 | 2426 | 95.2% | +| ov_SC01_009 | 2333 | 1735 | 0 | 2334 | 2507 | 93.1% | +| ov_SC01_074 | 2314 | 1735 | 0 | 2316 | 2425 | 95.5% | | ov_SC01_077 | 2481 | 1702 | 0 | 2483 | 2585 | 96.1% | -| ov_SC01_080 | 2347 | 1738 | 0 | 2347 | 2512 | 93.4% | -| ov_SC01_084 | 2356 | 1738 | 0 | 2361 | 2579 | 91.5% | -| ov_SC02_000 | 2410 | 1773 | 0 | 2410 | 2683 | 89.8% | -| ov_SC02_003 | 2410 | 1773 | 0 | 2410 | 2683 | 89.8% | -| ov_SC02_004 | 2312 | 1738 | 0 | 2312 | 2401 | 96.3% | -| ov_SC02_005 | 2435 | 1734 | 0 | 2445 | 2927 | 83.5% | -| ov_SC02_011 | 2443 | 1741 | 0 | 2454 | 2893 | 84.8% | -| ov_SC02_015 | 2317 | 1740 | 0 | 2317 | 2414 | 96.0% | -| ov_SC02_016 | 2355 | 1740 | 0 | 2358 | 2545 | 92.7% | -| ov_SC02_017 | 2404 | 1740 | 0 | 2412 | 2732 | 88.3% | -| ov_SC02_021 | 2322 | 1740 | 0 | 2322 | 2437 | 95.3% | -| ov_SC02_026 | 2337 | 1738 | 0 | 2343 | 2572 | 91.1% | -| ov_SC02_027 | 2361 | 1738 | 0 | 2370 | 2692 | 88.0% | -| ov_SC02_028 | 2363 | 1738 | 0 | 2373 | 2701 | 87.9% | -| ov_SC02_031 | 2350 | 1739 | 0 | 2355 | 2562 | 91.9% | -| ov_SC02_035 | 2323 | 1738 | 0 | 2326 | 2520 | 92.3% | -| ov_SC02_039 | 2308 | 1738 | 0 | 2308 | 2416 | 95.5% | -| ov_SC02_041 | 2351 | 1738 | 0 | 2354 | 2561 | 91.9% | -| ov_SC03_001 | 2452 | 1739 | 0 | 2469 | 2869 | 86.1% | -| ov_SC03_002 | 2370 | 1743 | 0 | 2385 | 2631 | 90.6% | -| ov_SC03_003 | 2318 | 1738 | 0 | 2319 | 2423 | 95.7% | -| ov_SC03_006 | 2392 | 1744 | 0 | 2401 | 2767 | 86.8% | -| ov_SC03_007 | 2369 | 1738 | 0 | 2373 | 2623 | 90.5% | -| ov_SC03_010 | 2327 | 1738 | 0 | 2327 | 2471 | 94.2% | -| ov_SC03_011 | 2334 | 1738 | 0 | 2340 | 2527 | 92.6% | -| ov_SC03_012 | 2309 | 1738 | 0 | 2310 | 2406 | 96.0% | -| ov_SC03_013 | 2333 | 1738 | 0 | 2333 | 2493 | 93.6% | -| ov_SC03_014 | 2394 | 1763 | 0 | 2394 | 2685 | 89.2% | -| ov_SC03_015 | 2396 | 1763 | 0 | 2396 | 2685 | 89.2% | -| ov_SC03_023 | 2320 | 1738 | 0 | 2321 | 2435 | 95.3% | -| ov_SC03_024 | 2385 | 1743 | 0 | 2392 | 2641 | 90.6% | -| ov_SC03_028 | 2354 | 1738 | 0 | 2358 | 2664 | 88.5% | -| ov_SC03_029 | 2365 | 1740 | 0 | 2375 | 2644 | 89.8% | -| ov_SC03_030 | 2331 | 1743 | 0 | 2333 | 2495 | 93.5% | -| ov_SC03_031 | 2327 | 1738 | 0 | 2330 | 2514 | 92.7% | -| ov_SC03_089 | 2343 | 1738 | 0 | 2350 | 2581 | 91.0% | -| ov_SC03_090 | 2346 | 1738 | 0 | 2354 | 2625 | 89.7% | -| ov_SC03_091 | 2348 | 1738 | 0 | 2356 | 2640 | 89.2% | -| ov_SC03_092 | 2364 | 1738 | 0 | 2376 | 2587 | 91.8% | -| ov_SC03_093 | 2335 | 1738 | 0 | 2339 | 2563 | 91.3% | -| ov_SC03_094 | 2330 | 1738 | 0 | 2336 | 2577 | 90.6% | -| ov_SC03_095 | 2319 | 1738 | 0 | 2322 | 2474 | 93.9% | -| ov_SC03_096 | 2320 | 1738 | 0 | 2323 | 2465 | 94.2% | -| ov_SC03_097 | 2356 | 1738 | 0 | 2363 | 2603 | 90.8% | -| ov_SC03_098 | 2327 | 1738 | 0 | 2330 | 2541 | 91.7% | -| ov_SC03_099 | 2320 | 1738 | 0 | 2323 | 2504 | 92.8% | -| ov_SC03_100 | 2330 | 1738 | 0 | 2334 | 2539 | 91.9% | -| ov_SC03_101 | 2333 | 1738 | 0 | 2337 | 2528 | 92.4% | -| ov_SC03_102 | 2321 | 1738 | 0 | 2324 | 2492 | 93.3% | -| ov_SC03_103 | 2326 | 1740 | 0 | 2329 | 2510 | 92.8% | -| ov_SC03_104 | 2350 | 1738 | 0 | 2357 | 2616 | 90.1% | -| ov_SC03_105 | 2345 | 1738 | 0 | 2352 | 2597 | 90.6% | -| ov_SC03_108 | 2311 | 1738 | 0 | 2311 | 2443 | 94.6% | -| ov_SC03_109 | 2316 | 1738 | 0 | 2318 | 2424 | 95.6% | -| ov_SC03_110 | 2318 | 1738 | 0 | 2318 | 2468 | 93.9% | -| ov_SC03_111 | 2329 | 1738 | 0 | 2332 | 2510 | 92.9% | -| ov_SC03_112 | 2326 | 1740 | 0 | 2328 | 2526 | 92.2% | -| ov_SC03_113 | 2319 | 1740 | 0 | 2322 | 2468 | 94.1% | -| ov_SC03_114 | 2307 | 1738 | 0 | 2309 | 2415 | 95.6% | -| ov_SC03_115 | 2326 | 1738 | 0 | 2328 | 2472 | 94.2% | -| ov_SC03_116 | 2315 | 1738 | 0 | 2318 | 2438 | 95.1% | -| ov_SC03_117 | 2349 | 1738 | 0 | 2355 | 2557 | 92.1% | -| ov_SC03_118 | 2397 | 1762 | 0 | 2398 | 2685 | 89.3% | -| ov_SC03_119 | 2393 | 1762 | 0 | 2394 | 2685 | 89.2% | -| ov_SC03_121 | 2323 | 1738 | 0 | 2326 | 2459 | 94.6% | -| ov_SC03_124 | 2414 | 1734 | 0 | 2434 | 2741 | 88.8% | -| ov_SC03_125 | 2357 | 1738 | 0 | 2369 | 2588 | 91.5% | -| ov_SC03_126 | 2320 | 1740 | 0 | 2320 | 2423 | 95.7% | -| ov_SC04_000 | 2340 | 1742 | 0 | 2349 | 2546 | 92.3% | -| ov_SC04_002 | 2362 | 1738 | 0 | 2366 | 2636 | 89.8% | -| ov_SC04_003 | 2333 | 1738 | 0 | 2337 | 2502 | 93.4% | -| ov_SC04_004 | 2342 | 1738 | 0 | 2344 | 2558 | 91.6% | -| ov_SC04_005 | 2352 | 1738 | 0 | 2358 | 2612 | 90.3% | -| ov_SC04_006 | 2319 | 1738 | 0 | 2321 | 2454 | 94.6% | -| ov_SC04_007 | 2346 | 1738 | 0 | 2350 | 2569 | 91.5% | -| ov_SC04_008 | 2312 | 1738 | 0 | 2312 | 2415 | 95.7% | -| ov_SC04_009 | 2326 | 1738 | 0 | 2329 | 2441 | 95.4% | -| ov_SC04_010 | 2316 | 1738 | 0 | 2317 | 2419 | 95.8% | -| ov_SC04_011 | 2375 | 1738 | 0 | 2381 | 2803 | 84.9% | -| ov_SC04_012 | 2314 | 1738 | 0 | 2315 | 2420 | 95.7% | -| ov_SC04_015 | 2384 | 1739 | 0 | 2395 | 2611 | 91.7% | -| ov_SC04_016 | 2316 | 1738 | 0 | 2318 | 2440 | 95.0% | -| ov_SC04_018 | 2450 | 1773 | 0 | 2450 | 2857 | 85.8% | -| ov_SC04_019 | 2450 | 1773 | 0 | 2450 | 2857 | 85.8% | -| ov_SC04_020 | 2345 | 1738 | 0 | 2357 | 2567 | 91.8% | -| ov_SC04_021 | 2320 | 1740 | 0 | 2320 | 2423 | 95.7% | -| ov_SC05_000 | 2318 | 1742 | 0 | 2321 | 2422 | 95.8% | -| ov_SC05_001 | 2340 | 1738 | 0 | 2345 | 2574 | 91.1% | -| ov_SC05_002 | 2324 | 1738 | 0 | 2327 | 2442 | 95.3% | -| ov_SC05_003 | 2320 | 1738 | 0 | 2321 | 2481 | 93.6% | -| ov_SC05_004 | 2316 | 1738 | 0 | 2318 | 2464 | 94.1% | -| ov_SC05_005 | 2320 | 1738 | 0 | 2321 | 2491 | 93.2% | -| ov_SC05_006 | 2314 | 1738 | 0 | 2314 | 2430 | 95.2% | -| ov_SC05_007 | 2324 | 1738 | 0 | 2329 | 2482 | 93.8% | -| ov_SC05_008 | 2345 | 1738 | 0 | 2347 | 2543 | 92.3% | -| ov_SC05_009 | 2319 | 1738 | 0 | 2323 | 2438 | 95.3% | -| ov_SC05_010 | 2347 | 1738 | 0 | 2351 | 2588 | 90.8% | -| ov_SC05_011 | 2315 | 1738 | 0 | 2316 | 2409 | 96.1% | -| ov_SC05_017 | 2437 | 1735 | 0 | 2448 | 2842 | 86.1% | -| ov_SC05_018 | 2376 | 1738 | 0 | 2389 | 2673 | 89.4% | -| ov_SC05_019 | 2320 | 1740 | 0 | 2320 | 2423 | 95.7% | -| ov_SC06_000 | 2396 | 1747 | 0 | 2399 | 2691 | 89.1% | -| ov_SC06_006 | 2339 | 1738 | 0 | 2340 | 2511 | 93.2% | -| ov_SC06_008 | 2360 | 1740 | 0 | 2366 | 2542 | 93.1% | -| ov_SC06_010 | 2339 | 1738 | 0 | 2344 | 2517 | 93.1% | -| ov_SC06_011 | 2324 | 1738 | 0 | 2328 | 2468 | 94.3% | -| ov_SC06_013 | 2318 | 1738 | 0 | 2319 | 2425 | 95.6% | -| ov_SC06_014 | 2325 | 1738 | 0 | 2327 | 2453 | 94.9% | -| ov_SC06_015 | 2323 | 1738 | 0 | 2323 | 2421 | 96.0% | -| ov_SC06_016 | 2339 | 1738 | 0 | 2341 | 2549 | 91.8% | -| ov_SC06_018 | 2353 | 1740 | 0 | 2360 | 2665 | 88.6% | -| ov_SC06_020 | 2328 | 1740 | 0 | 2329 | 2518 | 92.5% | -| ov_SC06_022 | 2353 | 1738 | 0 | 2361 | 2642 | 89.4% | -| ov_SC06_024 | 2361 | 1738 | 0 | 2367 | 2667 | 88.8% | -| ov_SC06_025 | 2347 | 1738 | 0 | 2352 | 2572 | 91.4% | -| ov_SC06_027 | 2307 | 1738 | 0 | 2308 | 2408 | 95.8% | -| ov_SC06_029 | 2368 | 1738 | 0 | 2380 | 2662 | 89.4% | -| ov_SC06_030 | 2322 | 1738 | 0 | 2322 | 2456 | 94.5% | -| ov_SC06_032 | 2348 | 1739 | 0 | 2355 | 2658 | 88.6% | -| ov_SC06_033 | 2349 | 1739 | 0 | 2356 | 2631 | 89.5% | -| ov_SC07_000 | 2335 | 1742 | 0 | 2337 | 2521 | 92.7% | -| ov_SC07_001 | 2319 | 1738 | 0 | 2321 | 2454 | 94.6% | -| ov_SC07_002 | 2346 | 1738 | 0 | 2350 | 2579 | 91.1% | -| ov_SC07_006 | 2209 | 1555 | 0 | 2289 | 2456 | 93.2% | -| ov_SC07_007 | 2228 | 1586 | 0 | 2312 | 2613 | 88.5% | -| ov_SC07_008 | 2304 | 1738 | 0 | 2304 | 2386 | 96.6% | -| ov_SC07_009 | 2314 | 1738 | 0 | 2316 | 2430 | 95.3% | -| ov_SC07_010 | 2231 | 1608 | 0 | 2314 | 2524 | 91.7% | -| ov_SC07_011 | 2228 | 1585 | 0 | 2308 | 2449 | 94.2% | +| ov_SC01_080 | 2348 | 1738 | 0 | 2348 | 2512 | 93.5% | +| ov_SC01_084 | 2357 | 1738 | 0 | 2362 | 2579 | 91.6% | +| ov_SC02_000 | 2411 | 1773 | 0 | 2411 | 2683 | 89.9% | +| ov_SC02_003 | 2411 | 1773 | 0 | 2411 | 2683 | 89.9% | +| ov_SC02_004 | 2313 | 1738 | 0 | 2313 | 2401 | 96.3% | +| ov_SC02_005 | 2436 | 1734 | 0 | 2446 | 2927 | 83.6% | +| ov_SC02_011 | 2444 | 1741 | 0 | 2455 | 2893 | 84.9% | +| ov_SC02_015 | 2318 | 1740 | 0 | 2318 | 2414 | 96.0% | +| ov_SC02_016 | 2356 | 1740 | 0 | 2359 | 2545 | 92.7% | +| ov_SC02_017 | 2405 | 1740 | 0 | 2413 | 2732 | 88.3% | +| ov_SC02_021 | 2323 | 1740 | 0 | 2323 | 2437 | 95.3% | +| ov_SC02_026 | 2338 | 1738 | 0 | 2344 | 2572 | 91.1% | +| ov_SC02_027 | 2362 | 1738 | 0 | 2371 | 2692 | 88.1% | +| ov_SC02_028 | 2364 | 1738 | 0 | 2374 | 2701 | 87.9% | +| ov_SC02_031 | 2351 | 1739 | 0 | 2356 | 2562 | 92.0% | +| ov_SC02_035 | 2324 | 1738 | 0 | 2327 | 2520 | 92.3% | +| ov_SC02_039 | 2309 | 1738 | 0 | 2309 | 2416 | 95.6% | +| ov_SC02_041 | 2352 | 1738 | 0 | 2355 | 2561 | 92.0% | +| ov_SC03_001 | 2453 | 1739 | 0 | 2470 | 2869 | 86.1% | +| ov_SC03_002 | 2371 | 1743 | 0 | 2386 | 2631 | 90.7% | +| ov_SC03_003 | 2319 | 1738 | 0 | 2320 | 2423 | 95.7% | +| ov_SC03_006 | 2393 | 1744 | 0 | 2402 | 2767 | 86.8% | +| ov_SC03_007 | 2370 | 1738 | 0 | 2374 | 2623 | 90.5% | +| ov_SC03_010 | 2328 | 1738 | 0 | 2328 | 2471 | 94.2% | +| ov_SC03_011 | 2335 | 1738 | 0 | 2341 | 2527 | 92.6% | +| ov_SC03_012 | 2310 | 1738 | 0 | 2311 | 2406 | 96.1% | +| ov_SC03_013 | 2334 | 1738 | 0 | 2334 | 2493 | 93.6% | +| ov_SC03_014 | 2395 | 1763 | 0 | 2395 | 2685 | 89.2% | +| ov_SC03_015 | 2397 | 1763 | 0 | 2397 | 2685 | 89.3% | +| ov_SC03_023 | 2321 | 1738 | 0 | 2322 | 2435 | 95.4% | +| ov_SC03_024 | 2386 | 1743 | 0 | 2393 | 2641 | 90.6% | +| ov_SC03_028 | 2355 | 1738 | 0 | 2359 | 2664 | 88.6% | +| ov_SC03_029 | 2366 | 1740 | 0 | 2376 | 2644 | 89.9% | +| ov_SC03_030 | 2332 | 1743 | 0 | 2334 | 2495 | 93.5% | +| ov_SC03_031 | 2328 | 1738 | 0 | 2331 | 2514 | 92.7% | +| ov_SC03_089 | 2344 | 1738 | 0 | 2351 | 2581 | 91.1% | +| ov_SC03_090 | 2347 | 1738 | 0 | 2355 | 2625 | 89.7% | +| ov_SC03_091 | 2349 | 1738 | 0 | 2357 | 2640 | 89.3% | +| ov_SC03_092 | 2365 | 1738 | 0 | 2377 | 2587 | 91.9% | +| ov_SC03_093 | 2336 | 1738 | 0 | 2340 | 2563 | 91.3% | +| ov_SC03_094 | 2331 | 1738 | 0 | 2337 | 2577 | 90.7% | +| ov_SC03_095 | 2320 | 1738 | 0 | 2323 | 2474 | 93.9% | +| ov_SC03_096 | 2321 | 1738 | 0 | 2324 | 2465 | 94.3% | +| ov_SC03_097 | 2357 | 1738 | 0 | 2364 | 2603 | 90.8% | +| ov_SC03_098 | 2328 | 1738 | 0 | 2331 | 2541 | 91.7% | +| ov_SC03_099 | 2321 | 1738 | 0 | 2324 | 2504 | 92.8% | +| ov_SC03_100 | 2331 | 1738 | 0 | 2335 | 2539 | 92.0% | +| ov_SC03_101 | 2334 | 1738 | 0 | 2338 | 2528 | 92.5% | +| ov_SC03_102 | 2322 | 1738 | 0 | 2325 | 2492 | 93.3% | +| ov_SC03_103 | 2327 | 1740 | 0 | 2330 | 2510 | 92.8% | +| ov_SC03_104 | 2351 | 1738 | 0 | 2358 | 2616 | 90.1% | +| ov_SC03_105 | 2346 | 1738 | 0 | 2353 | 2597 | 90.6% | +| ov_SC03_108 | 2312 | 1738 | 0 | 2312 | 2443 | 94.6% | +| ov_SC03_109 | 2317 | 1738 | 0 | 2319 | 2424 | 95.7% | +| ov_SC03_110 | 2319 | 1738 | 0 | 2319 | 2468 | 94.0% | +| ov_SC03_111 | 2330 | 1738 | 0 | 2333 | 2510 | 92.9% | +| ov_SC03_112 | 2327 | 1740 | 0 | 2329 | 2526 | 92.2% | +| ov_SC03_113 | 2320 | 1740 | 0 | 2323 | 2468 | 94.1% | +| ov_SC03_114 | 2308 | 1738 | 0 | 2310 | 2415 | 95.7% | +| ov_SC03_115 | 2327 | 1738 | 0 | 2329 | 2472 | 94.2% | +| ov_SC03_116 | 2316 | 1738 | 0 | 2319 | 2438 | 95.1% | +| ov_SC03_117 | 2350 | 1738 | 0 | 2356 | 2557 | 92.1% | +| ov_SC03_118 | 2398 | 1762 | 0 | 2399 | 2685 | 89.3% | +| ov_SC03_119 | 2394 | 1762 | 0 | 2395 | 2685 | 89.2% | +| ov_SC03_121 | 2324 | 1738 | 0 | 2327 | 2459 | 94.6% | +| ov_SC03_124 | 2415 | 1734 | 0 | 2435 | 2741 | 88.8% | +| ov_SC03_125 | 2358 | 1738 | 0 | 2370 | 2588 | 91.6% | +| ov_SC03_126 | 2321 | 1740 | 0 | 2321 | 2423 | 95.8% | +| ov_SC04_000 | 2341 | 1742 | 0 | 2350 | 2546 | 92.3% | +| ov_SC04_002 | 2363 | 1738 | 0 | 2367 | 2636 | 89.8% | +| ov_SC04_003 | 2334 | 1738 | 0 | 2338 | 2502 | 93.4% | +| ov_SC04_004 | 2343 | 1738 | 0 | 2345 | 2558 | 91.7% | +| ov_SC04_005 | 2353 | 1738 | 0 | 2359 | 2612 | 90.3% | +| ov_SC04_006 | 2320 | 1738 | 0 | 2322 | 2454 | 94.6% | +| ov_SC04_007 | 2347 | 1738 | 0 | 2351 | 2569 | 91.5% | +| ov_SC04_008 | 2313 | 1738 | 0 | 2313 | 2415 | 95.8% | +| ov_SC04_009 | 2327 | 1738 | 0 | 2330 | 2441 | 95.5% | +| ov_SC04_010 | 2317 | 1738 | 0 | 2318 | 2419 | 95.8% | +| ov_SC04_011 | 2376 | 1738 | 0 | 2382 | 2803 | 85.0% | +| ov_SC04_012 | 2315 | 1738 | 0 | 2316 | 2420 | 95.7% | +| ov_SC04_015 | 2385 | 1739 | 0 | 2396 | 2611 | 91.8% | +| ov_SC04_016 | 2317 | 1738 | 0 | 2319 | 2440 | 95.0% | +| ov_SC04_018 | 2451 | 1773 | 0 | 2451 | 2857 | 85.8% | +| ov_SC04_019 | 2451 | 1773 | 0 | 2451 | 2857 | 85.8% | +| ov_SC04_020 | 2346 | 1738 | 0 | 2358 | 2567 | 91.9% | +| ov_SC04_021 | 2321 | 1740 | 0 | 2321 | 2423 | 95.8% | +| ov_SC05_000 | 2319 | 1742 | 0 | 2322 | 2422 | 95.9% | +| ov_SC05_001 | 2341 | 1738 | 0 | 2346 | 2574 | 91.1% | +| ov_SC05_002 | 2325 | 1738 | 0 | 2328 | 2442 | 95.3% | +| ov_SC05_003 | 2321 | 1738 | 0 | 2322 | 2481 | 93.6% | +| ov_SC05_004 | 2317 | 1738 | 0 | 2319 | 2464 | 94.1% | +| ov_SC05_005 | 2321 | 1738 | 0 | 2322 | 2491 | 93.2% | +| ov_SC05_006 | 2315 | 1738 | 0 | 2315 | 2430 | 95.3% | +| ov_SC05_007 | 2325 | 1738 | 0 | 2330 | 2482 | 93.9% | +| ov_SC05_008 | 2346 | 1738 | 0 | 2348 | 2543 | 92.3% | +| ov_SC05_009 | 2320 | 1738 | 0 | 2324 | 2438 | 95.3% | +| ov_SC05_010 | 2348 | 1738 | 0 | 2352 | 2588 | 90.9% | +| ov_SC05_011 | 2316 | 1738 | 0 | 2317 | 2409 | 96.2% | +| ov_SC05_017 | 2438 | 1735 | 0 | 2449 | 2842 | 86.2% | +| ov_SC05_018 | 2377 | 1738 | 0 | 2390 | 2673 | 89.4% | +| ov_SC05_019 | 2321 | 1740 | 0 | 2321 | 2423 | 95.8% | +| ov_SC06_000 | 2397 | 1747 | 0 | 2400 | 2691 | 89.2% | +| ov_SC06_006 | 2340 | 1738 | 0 | 2341 | 2511 | 93.2% | +| ov_SC06_008 | 2361 | 1740 | 0 | 2367 | 2542 | 93.1% | +| ov_SC06_010 | 2340 | 1738 | 0 | 2345 | 2517 | 93.2% | +| ov_SC06_011 | 2325 | 1738 | 0 | 2329 | 2468 | 94.4% | +| ov_SC06_013 | 2319 | 1738 | 0 | 2320 | 2425 | 95.7% | +| ov_SC06_014 | 2326 | 1738 | 0 | 2328 | 2453 | 94.9% | +| ov_SC06_015 | 2324 | 1738 | 0 | 2324 | 2421 | 96.0% | +| ov_SC06_016 | 2340 | 1738 | 0 | 2342 | 2549 | 91.9% | +| ov_SC06_018 | 2354 | 1740 | 0 | 2361 | 2665 | 88.6% | +| ov_SC06_020 | 2329 | 1740 | 0 | 2330 | 2518 | 92.5% | +| ov_SC06_022 | 2354 | 1738 | 0 | 2362 | 2642 | 89.4% | +| ov_SC06_024 | 2362 | 1738 | 0 | 2368 | 2667 | 88.8% | +| ov_SC06_025 | 2348 | 1738 | 0 | 2353 | 2572 | 91.5% | +| ov_SC06_027 | 2308 | 1738 | 0 | 2309 | 2408 | 95.9% | +| ov_SC06_029 | 2369 | 1738 | 0 | 2381 | 2662 | 89.4% | +| ov_SC06_030 | 2323 | 1738 | 0 | 2323 | 2456 | 94.6% | +| ov_SC06_032 | 2349 | 1739 | 0 | 2356 | 2658 | 88.6% | +| ov_SC06_033 | 2350 | 1739 | 0 | 2357 | 2631 | 89.6% | +| ov_SC07_000 | 2336 | 1742 | 0 | 2338 | 2521 | 92.7% | +| ov_SC07_001 | 2320 | 1738 | 0 | 2322 | 2454 | 94.6% | +| ov_SC07_002 | 2347 | 1738 | 0 | 2351 | 2579 | 91.2% | +| ov_SC07_006 | 2210 | 1555 | 0 | 2290 | 2456 | 93.2% | +| ov_SC07_007 | 2229 | 1586 | 0 | 2313 | 2613 | 88.5% | +| ov_SC07_008 | 2305 | 1738 | 0 | 2305 | 2386 | 96.6% | +| ov_SC07_009 | 2315 | 1738 | 0 | 2317 | 2430 | 95.3% | +| ov_SC07_010 | 2232 | 1608 | 0 | 2315 | 2524 | 91.7% | +| ov_SC07_011 | 2229 | 1585 | 0 | 2309 | 2449 | 94.3% | diff --git a/phase-ends/CURRENT_PHASE.md b/phase-ends/CURRENT_PHASE.md index 8f96562c2..91bf8f30f 100644 --- a/phase-ends/CURRENT_PHASE.md +++ b/phase-ends/CURRENT_PHASE.md @@ -9921,3 +9921,45 @@ R22 clean-fleet **140 passed, 0 failed of 140** · dedup **1886/0** · **0 NON_M | fn-count | 91.88% | **91.92%** | 325,006 → 325,143 = **+137** (exact) | | instr-weighted | 87.3% | **87.4%** | +7,672 ins | | distinct-code | 78.0% | **78.0%** | 69,744 → 69,744 = **+0** (byte-identical family — §111 predicted exactly this) | + +## ✅ T95/T96 — `func_80142B2C` **136/136** (§121): the last byte-identical straggler + +Same recipe as T93, different gap. The draft calls `((void(*)(void))func_80142C84)()` but nothing +declares that symbol above the splice: it is **defined by `DEFINE_func_80142C84()`** in +`engine_core.h`, so there is no `extern` line for `gather_externs` to harvest, and the member TU +instantiates the macro **below** our function. + +**The wrong guess was the useful step.** Adding a no-prototype `extern s32 func_80142C84();` turned +`undeclared` into `conflicting types` — a *different* error, which proved the diagnosis right and the +*type* wrong. Synthesised from the macro's own definition head (`void func_80142C84(s32 a0)`): +`rtu_match` **MATCH (34 ins)**, then **136/136 banked, 0 failed**. + +New `macro_def_sig_map()` (**1,878 signatures**) is the complement of `header_sig_map()` — the latter +reads the `extern`s a macro emits *for its callees*, the former the signature a macro *defines*. +→ cookbook **§121**. **Blast radius 0** (74 further families re-swept, none moved). + +### 🏁 ALL THREE BYTE-IDENTICAL STRAGGLERS ARE NOW CLOSED +Carried since the SESSION-24 checkpoint as "diagnose the 3 remaining byte-identical families": +`func_80146750` **137/137** (T84) · `func_801759D8` **137/137** (T93) · `func_80142B2C` **136/136** +(T95). **410 members**, and not one was a compiler wall — a signedness-wrong header decl, a type-name +collision, and a missing extern for a macro-defined callee. + +### GATES +R22 clean-fleet **140 passed, 0 failed of 140** · dedup **1886/0** · **0 NON_MATCHING** (G4). + +### METRICS +| | before T93 | after T95 | delta | +|---|---|---|---| +| fn-count | 91.88% | **91.96%** | 325,006 → 325,279 = **+273** (exact) | +| instr-weighted | 87.3% | **87.4%** | +12,296 ins | +| distinct-code | 78.0% | **78.0%** | **+0** — both families are byte-identical (§111 predicted it) | + +### THE BLAST-RADIUS PATTERN, NOW FOUR DATA POINTS +| lever | members | kind | +|---|---|---| +| **§117** symbol-kind | **1,209** | wrong LOGIC — applied fleet-wide | +| §118 ordinal immediates | 158 | targeted | +| §120 type-uniquify | 137 | targeted (path-reachability) | +| §121 macro-defined callee extern | 136 | targeted (path-reachability) | +**Only the logic defect generalised.** The three path-reachability gaps were each worth ~one family. +Useful prior for pricing the next fix *before* building it. diff --git a/src/ov_SC01_001/ov_SC01_001_jr_80140608.c b/src/ov_SC01_001/ov_SC01_001_jr_80140608.c index d1345b55b..932028763 100644 --- a/src/ov_SC01_001/ov_SC01_001_jr_80140608.c +++ b/src/ov_SC01_001/ov_SC01_001_jr_80140608.c @@ -1860,7 +1860,25 @@ void func_80142A80(void) } -INCLUDE_ASM("asm/ov_SC01_001/nonmatchings/ov_SC01_001_jr_80140608", func_80142B2C); +extern void func_80142C84(s32 a0); +extern void func_80143994(s32 a0, s32 a1); +extern s32 func_8012AD50(void *a0); + +void func_80142B2C(void *arg0) { + *(s32 *)((u8 *)arg0 + 0x1c) = 0x180; + *(s16 *)((u8 *)arg0 + 0x5c) = 0x100; + *(u16 *)((u8 *)arg0 + 0x100) = *(u16 *)((u8 *)arg0 + 0x70) & 0x100; + *(u16 *)((u8 *)arg0 + 0x70) = *(u16 *)((u8 *)arg0 + 0x70) & 3; + *(u16 *)((u8 *)arg0 + 0x72) = *(u16 *)((u8 *)arg0 + 0x72) | 0x1000; + if (*(s16 *)((u8 *)arg0 + 0x100) == 0) { + ((void (*)(void))func_80142C84)(); + } + *(s32 *)((u8 *)arg0 + 0xcc) = + ((s32 (*)(s32, s32))func_80143994)( + (s32)arg0, (s32)*(s16 *)(*(s32 *)((u8 *)arg0 + 0x20) + 0x18)); + func_8012AD50(arg0); +} + DEFINE_func_80142BB4() /* dedup: shared engine-core @0x80142BB4 (src/shared) */ diff --git a/src/ov_SC01_004/ov_SC01_004_jr_80140608.c b/src/ov_SC01_004/ov_SC01_004_jr_80140608.c index 0812c7ce4..915873dc1 100644 --- a/src/ov_SC01_004/ov_SC01_004_jr_80140608.c +++ b/src/ov_SC01_004/ov_SC01_004_jr_80140608.c @@ -1844,7 +1844,25 @@ void func_80142A80(void) } -INCLUDE_ASM("asm/ov_SC01_004/nonmatchings/ov_SC01_004_jr_80140608", func_80142B2C); +extern void func_80142C84(s32 a0); +extern void func_80143994(s32 a0, s32 a1); +extern s32 func_8012AD50(void *a0); + +void func_80142B2C(void *arg0) { + *(s32 *)((u8 *)arg0 + 0x1c) = 0x180; + *(s16 *)((u8 *)arg0 + 0x5c) = 0x100; + *(u16 *)((u8 *)arg0 + 0x100) = *(u16 *)((u8 *)arg0 + 0x70) & 0x100; + *(u16 *)((u8 *)arg0 + 0x70) = *(u16 *)((u8 *)arg0 + 0x70) & 3; + *(u16 *)((u8 *)arg0 + 0x72) = *(u16 *)((u8 *)arg0 + 0x72) | 0x1000; + if (*(s16 *)((u8 *)arg0 + 0x100) == 0) { + ((void (*)(void))func_80142C84)(); + } + *(s32 *)((u8 *)arg0 + 0xcc) = + ((s32 (*)(s32, s32))func_80143994)( + (s32)arg0, (s32)*(s16 *)(*(s32 *)((u8 *)arg0 + 0x20) + 0x18)); + func_8012AD50(arg0); +} + DEFINE_func_80142BB4() /* dedup: shared engine-core @0x80142BB4 (src/shared) */ diff --git a/src/ov_SC01_005/ov_SC01_005_jr_80140608.c b/src/ov_SC01_005/ov_SC01_005_jr_80140608.c index 791ae292d..f8a0717ef 100644 --- a/src/ov_SC01_005/ov_SC01_005_jr_80140608.c +++ b/src/ov_SC01_005/ov_SC01_005_jr_80140608.c @@ -1845,7 +1845,25 @@ void func_80142A80(void) } -INCLUDE_ASM("asm/ov_SC01_005/nonmatchings/ov_SC01_005_jr_80140608", func_80142B2C); +extern void func_80142C84(s32 a0); +extern void func_80143994(s32 a0, s32 a1); +extern s32 func_8012AD50(void *a0); + +void func_80142B2C(void *arg0) { + *(s32 *)((u8 *)arg0 + 0x1c) = 0x180; + *(s16 *)((u8 *)arg0 + 0x5c) = 0x100; + *(u16 *)((u8 *)arg0 + 0x100) = *(u16 *)((u8 *)arg0 + 0x70) & 0x100; + *(u16 *)((u8 *)arg0 + 0x70) = *(u16 *)((u8 *)arg0 + 0x70) & 3; + *(u16 *)((u8 *)arg0 + 0x72) = *(u16 *)((u8 *)arg0 + 0x72) | 0x1000; + if (*(s16 *)((u8 *)arg0 + 0x100) == 0) { + ((void (*)(void))func_80142C84)(); + } + *(s32 *)((u8 *)arg0 + 0xcc) = + ((s32 (*)(s32, s32))func_80143994)( + (s32)arg0, (s32)*(s16 *)(*(s32 *)((u8 *)arg0 + 0x20) + 0x18)); + func_8012AD50(arg0); +} + DEFINE_func_80142BB4() /* dedup: shared engine-core @0x80142BB4 (src/shared) */ diff --git a/src/ov_SC01_006/ov_SC01_006_jr_80140608.c b/src/ov_SC01_006/ov_SC01_006_jr_80140608.c index 0d8d69f44..f4f690c7c 100644 --- a/src/ov_SC01_006/ov_SC01_006_jr_80140608.c +++ b/src/ov_SC01_006/ov_SC01_006_jr_80140608.c @@ -1845,7 +1845,25 @@ void func_80142A80(void) } -INCLUDE_ASM("asm/ov_SC01_006/nonmatchings/ov_SC01_006_jr_80140608", func_80142B2C); +extern void func_80142C84(s32 a0); +extern void func_80143994(s32 a0, s32 a1); +extern s32 func_8012AD50(void *a0); + +void func_80142B2C(void *arg0) { + *(s32 *)((u8 *)arg0 + 0x1c) = 0x180; + *(s16 *)((u8 *)arg0 + 0x5c) = 0x100; + *(u16 *)((u8 *)arg0 + 0x100) = *(u16 *)((u8 *)arg0 + 0x70) & 0x100; + *(u16 *)((u8 *)arg0 + 0x70) = *(u16 *)((u8 *)arg0 + 0x70) & 3; + *(u16 *)((u8 *)arg0 + 0x72) = *(u16 *)((u8 *)arg0 + 0x72) | 0x1000; + if (*(s16 *)((u8 *)arg0 + 0x100) == 0) { + ((void (*)(void))func_80142C84)(); + } + *(s32 *)((u8 *)arg0 + 0xcc) = + ((s32 (*)(s32, s32))func_80143994)( + (s32)arg0, (s32)*(s16 *)(*(s32 *)((u8 *)arg0 + 0x20) + 0x18)); + func_8012AD50(arg0); +} + DEFINE_func_80142BB4() /* dedup: shared engine-core @0x80142BB4 (src/shared) */ diff --git a/src/ov_SC01_008/ov_SC01_008_jr_80140608.c b/src/ov_SC01_008/ov_SC01_008_jr_80140608.c index bf82ab8c5..4f563d620 100644 --- a/src/ov_SC01_008/ov_SC01_008_jr_80140608.c +++ b/src/ov_SC01_008/ov_SC01_008_jr_80140608.c @@ -1844,7 +1844,25 @@ void func_80142A80(void) } -INCLUDE_ASM("asm/ov_SC01_008/nonmatchings/ov_SC01_008_jr_80140608", func_80142B2C); +extern void func_80142C84(s32 a0); +extern void func_80143994(s32 a0, s32 a1); +extern s32 func_8012AD50(void *a0); + +void func_80142B2C(void *arg0) { + *(s32 *)((u8 *)arg0 + 0x1c) = 0x180; + *(s16 *)((u8 *)arg0 + 0x5c) = 0x100; + *(u16 *)((u8 *)arg0 + 0x100) = *(u16 *)((u8 *)arg0 + 0x70) & 0x100; + *(u16 *)((u8 *)arg0 + 0x70) = *(u16 *)((u8 *)arg0 + 0x70) & 3; + *(u16 *)((u8 *)arg0 + 0x72) = *(u16 *)((u8 *)arg0 + 0x72) | 0x1000; + if (*(s16 *)((u8 *)arg0 + 0x100) == 0) { + ((void (*)(void))func_80142C84)(); + } + *(s32 *)((u8 *)arg0 + 0xcc) = + ((s32 (*)(s32, s32))func_80143994)( + (s32)arg0, (s32)*(s16 *)(*(s32 *)((u8 *)arg0 + 0x20) + 0x18)); + func_8012AD50(arg0); +} + DEFINE_func_80142BB4() /* dedup: shared engine-core @0x80142BB4 (src/shared) */ diff --git a/src/ov_SC01_009/ov_SC01_009_jr_80140608.c b/src/ov_SC01_009/ov_SC01_009_jr_80140608.c index 1ca1eb86d..b6955344f 100644 --- a/src/ov_SC01_009/ov_SC01_009_jr_80140608.c +++ b/src/ov_SC01_009/ov_SC01_009_jr_80140608.c @@ -1844,7 +1844,25 @@ void func_80142A80(void) } -INCLUDE_ASM("asm/ov_SC01_009/nonmatchings/ov_SC01_009_jr_80140608", func_80142B2C); +extern void func_80142C84(s32 a0); +extern void func_80143994(s32 a0, s32 a1); +extern s32 func_8012AD50(void *a0); + +void func_80142B2C(void *arg0) { + *(s32 *)((u8 *)arg0 + 0x1c) = 0x180; + *(s16 *)((u8 *)arg0 + 0x5c) = 0x100; + *(u16 *)((u8 *)arg0 + 0x100) = *(u16 *)((u8 *)arg0 + 0x70) & 0x100; + *(u16 *)((u8 *)arg0 + 0x70) = *(u16 *)((u8 *)arg0 + 0x70) & 3; + *(u16 *)((u8 *)arg0 + 0x72) = *(u16 *)((u8 *)arg0 + 0x72) | 0x1000; + if (*(s16 *)((u8 *)arg0 + 0x100) == 0) { + ((void (*)(void))func_80142C84)(); + } + *(s32 *)((u8 *)arg0 + 0xcc) = + ((s32 (*)(s32, s32))func_80143994)( + (s32)arg0, (s32)*(s16 *)(*(s32 *)((u8 *)arg0 + 0x20) + 0x18)); + func_8012AD50(arg0); +} + DEFINE_func_80142BB4() /* dedup: shared engine-core @0x80142BB4 (src/shared) */ diff --git a/src/ov_SC01_074/ov_SC01_074_jr_80140608.c b/src/ov_SC01_074/ov_SC01_074_jr_80140608.c index 3f2e5fa87..ba52d625d 100644 --- a/src/ov_SC01_074/ov_SC01_074_jr_80140608.c +++ b/src/ov_SC01_074/ov_SC01_074_jr_80140608.c @@ -1845,7 +1845,25 @@ void func_80142A80(void) } -INCLUDE_ASM("asm/ov_SC01_074/nonmatchings/ov_SC01_074_jr_80140608", func_80142B2C); +extern void func_80142C84(s32 a0); +extern void func_80143994(s32 a0, s32 a1); +extern s32 func_8012AD50(void *a0); + +void func_80142B2C(void *arg0) { + *(s32 *)((u8 *)arg0 + 0x1c) = 0x180; + *(s16 *)((u8 *)arg0 + 0x5c) = 0x100; + *(u16 *)((u8 *)arg0 + 0x100) = *(u16 *)((u8 *)arg0 + 0x70) & 0x100; + *(u16 *)((u8 *)arg0 + 0x70) = *(u16 *)((u8 *)arg0 + 0x70) & 3; + *(u16 *)((u8 *)arg0 + 0x72) = *(u16 *)((u8 *)arg0 + 0x72) | 0x1000; + if (*(s16 *)((u8 *)arg0 + 0x100) == 0) { + ((void (*)(void))func_80142C84)(); + } + *(s32 *)((u8 *)arg0 + 0xcc) = + ((s32 (*)(s32, s32))func_80143994)( + (s32)arg0, (s32)*(s16 *)(*(s32 *)((u8 *)arg0 + 0x20) + 0x18)); + func_8012AD50(arg0); +} + DEFINE_func_80142BB4() /* dedup: shared engine-core @0x80142BB4 (src/shared) */ diff --git a/src/ov_SC01_080/ov_SC01_080_jr_80140608.c b/src/ov_SC01_080/ov_SC01_080_jr_80140608.c index 5ebc73b8c..863e377c5 100644 --- a/src/ov_SC01_080/ov_SC01_080_jr_80140608.c +++ b/src/ov_SC01_080/ov_SC01_080_jr_80140608.c @@ -1861,7 +1861,25 @@ void func_80142A80(void) } -INCLUDE_ASM("asm/ov_SC01_080/nonmatchings/ov_SC01_080_jr_80140608", func_80142B2C); +extern void func_80142C84(s32 a0); +extern void func_80143994(s32 a0, s32 a1); +extern s32 func_8012AD50(void *a0); + +void func_80142B2C(void *arg0) { + *(s32 *)((u8 *)arg0 + 0x1c) = 0x180; + *(s16 *)((u8 *)arg0 + 0x5c) = 0x100; + *(u16 *)((u8 *)arg0 + 0x100) = *(u16 *)((u8 *)arg0 + 0x70) & 0x100; + *(u16 *)((u8 *)arg0 + 0x70) = *(u16 *)((u8 *)arg0 + 0x70) & 3; + *(u16 *)((u8 *)arg0 + 0x72) = *(u16 *)((u8 *)arg0 + 0x72) | 0x1000; + if (*(s16 *)((u8 *)arg0 + 0x100) == 0) { + ((void (*)(void))func_80142C84)(); + } + *(s32 *)((u8 *)arg0 + 0xcc) = + ((s32 (*)(s32, s32))func_80143994)( + (s32)arg0, (s32)*(s16 *)(*(s32 *)((u8 *)arg0 + 0x20) + 0x18)); + func_8012AD50(arg0); +} + DEFINE_func_80142BB4() /* dedup: shared engine-core @0x80142BB4 (src/shared) */ diff --git a/src/ov_SC01_084/ov_SC01_084_jr_80140608.c b/src/ov_SC01_084/ov_SC01_084_jr_80140608.c index f69703c11..ba34cfb21 100644 --- a/src/ov_SC01_084/ov_SC01_084_jr_80140608.c +++ b/src/ov_SC01_084/ov_SC01_084_jr_80140608.c @@ -1845,7 +1845,25 @@ void func_80142A80(void) } -INCLUDE_ASM("asm/ov_SC01_084/nonmatchings/ov_SC01_084_jr_80140608", func_80142B2C); +extern void func_80142C84(s32 a0); +extern void func_80143994(s32 a0, s32 a1); +extern s32 func_8012AD50(void *a0); + +void func_80142B2C(void *arg0) { + *(s32 *)((u8 *)arg0 + 0x1c) = 0x180; + *(s16 *)((u8 *)arg0 + 0x5c) = 0x100; + *(u16 *)((u8 *)arg0 + 0x100) = *(u16 *)((u8 *)arg0 + 0x70) & 0x100; + *(u16 *)((u8 *)arg0 + 0x70) = *(u16 *)((u8 *)arg0 + 0x70) & 3; + *(u16 *)((u8 *)arg0 + 0x72) = *(u16 *)((u8 *)arg0 + 0x72) | 0x1000; + if (*(s16 *)((u8 *)arg0 + 0x100) == 0) { + ((void (*)(void))func_80142C84)(); + } + *(s32 *)((u8 *)arg0 + 0xcc) = + ((s32 (*)(s32, s32))func_80143994)( + (s32)arg0, (s32)*(s16 *)(*(s32 *)((u8 *)arg0 + 0x20) + 0x18)); + func_8012AD50(arg0); +} + DEFINE_func_80142BB4() /* dedup: shared engine-core @0x80142BB4 (src/shared) */ diff --git a/src/ov_SC02_000/ov_SC02_000_jr_80140608.c b/src/ov_SC02_000/ov_SC02_000_jr_80140608.c index c66bf83da..9b901b462 100644 --- a/src/ov_SC02_000/ov_SC02_000_jr_80140608.c +++ b/src/ov_SC02_000/ov_SC02_000_jr_80140608.c @@ -1860,7 +1860,25 @@ void func_80142A80(void) } -INCLUDE_ASM("asm/ov_SC02_000/nonmatchings/ov_SC02_000_jr_80140608", func_80142B2C); +extern void func_80142C84(s32 a0); +extern void func_80143994(s32 a0, s32 a1); +extern s32 func_8012AD50(void *a0); + +void func_80142B2C(void *arg0) { + *(s32 *)((u8 *)arg0 + 0x1c) = 0x180; + *(s16 *)((u8 *)arg0 + 0x5c) = 0x100; + *(u16 *)((u8 *)arg0 + 0x100) = *(u16 *)((u8 *)arg0 + 0x70) & 0x100; + *(u16 *)((u8 *)arg0 + 0x70) = *(u16 *)((u8 *)arg0 + 0x70) & 3; + *(u16 *)((u8 *)arg0 + 0x72) = *(u16 *)((u8 *)arg0 + 0x72) | 0x1000; + if (*(s16 *)((u8 *)arg0 + 0x100) == 0) { + ((void (*)(void))func_80142C84)(); + } + *(s32 *)((u8 *)arg0 + 0xcc) = + ((s32 (*)(s32, s32))func_80143994)( + (s32)arg0, (s32)*(s16 *)(*(s32 *)((u8 *)arg0 + 0x20) + 0x18)); + func_8012AD50(arg0); +} + DEFINE_func_80142BB4() /* dedup: shared engine-core @0x80142BB4 (src/shared) */ diff --git a/src/ov_SC02_003/ov_SC02_003_jr_80140608.c b/src/ov_SC02_003/ov_SC02_003_jr_80140608.c index ebdb724ec..5c1b6265f 100644 --- a/src/ov_SC02_003/ov_SC02_003_jr_80140608.c +++ b/src/ov_SC02_003/ov_SC02_003_jr_80140608.c @@ -1860,7 +1860,25 @@ void func_80142A80(void) } -INCLUDE_ASM("asm/ov_SC02_003/nonmatchings/ov_SC02_003_jr_80140608", func_80142B2C); +extern void func_80142C84(s32 a0); +extern void func_80143994(s32 a0, s32 a1); +extern s32 func_8012AD50(void *a0); + +void func_80142B2C(void *arg0) { + *(s32 *)((u8 *)arg0 + 0x1c) = 0x180; + *(s16 *)((u8 *)arg0 + 0x5c) = 0x100; + *(u16 *)((u8 *)arg0 + 0x100) = *(u16 *)((u8 *)arg0 + 0x70) & 0x100; + *(u16 *)((u8 *)arg0 + 0x70) = *(u16 *)((u8 *)arg0 + 0x70) & 3; + *(u16 *)((u8 *)arg0 + 0x72) = *(u16 *)((u8 *)arg0 + 0x72) | 0x1000; + if (*(s16 *)((u8 *)arg0 + 0x100) == 0) { + ((void (*)(void))func_80142C84)(); + } + *(s32 *)((u8 *)arg0 + 0xcc) = + ((s32 (*)(s32, s32))func_80143994)( + (s32)arg0, (s32)*(s16 *)(*(s32 *)((u8 *)arg0 + 0x20) + 0x18)); + func_8012AD50(arg0); +} + DEFINE_func_80142BB4() /* dedup: shared engine-core @0x80142BB4 (src/shared) */ diff --git a/src/ov_SC02_004/ov_SC02_004_jr_80140608.c b/src/ov_SC02_004/ov_SC02_004_jr_80140608.c index 93408948b..17d6f94a7 100644 --- a/src/ov_SC02_004/ov_SC02_004_jr_80140608.c +++ b/src/ov_SC02_004/ov_SC02_004_jr_80140608.c @@ -1845,7 +1845,25 @@ void func_80142A80(void) } -INCLUDE_ASM("asm/ov_SC02_004/nonmatchings/ov_SC02_004_jr_80140608", func_80142B2C); +extern void func_80142C84(s32 a0); +extern void func_80143994(s32 a0, s32 a1); +extern s32 func_8012AD50(void *a0); + +void func_80142B2C(void *arg0) { + *(s32 *)((u8 *)arg0 + 0x1c) = 0x180; + *(s16 *)((u8 *)arg0 + 0x5c) = 0x100; + *(u16 *)((u8 *)arg0 + 0x100) = *(u16 *)((u8 *)arg0 + 0x70) & 0x100; + *(u16 *)((u8 *)arg0 + 0x70) = *(u16 *)((u8 *)arg0 + 0x70) & 3; + *(u16 *)((u8 *)arg0 + 0x72) = *(u16 *)((u8 *)arg0 + 0x72) | 0x1000; + if (*(s16 *)((u8 *)arg0 + 0x100) == 0) { + ((void (*)(void))func_80142C84)(); + } + *(s32 *)((u8 *)arg0 + 0xcc) = + ((s32 (*)(s32, s32))func_80143994)( + (s32)arg0, (s32)*(s16 *)(*(s32 *)((u8 *)arg0 + 0x20) + 0x18)); + func_8012AD50(arg0); +} + DEFINE_func_80142BB4() /* dedup: shared engine-core @0x80142BB4 (src/shared) */ diff --git a/src/ov_SC02_005/ov_SC02_005_jr_80140608.c b/src/ov_SC02_005/ov_SC02_005_jr_80140608.c index 94817c5cc..1bac75bcb 100644 --- a/src/ov_SC02_005/ov_SC02_005_jr_80140608.c +++ b/src/ov_SC02_005/ov_SC02_005_jr_80140608.c @@ -1845,7 +1845,25 @@ void func_80142A80(void) } -INCLUDE_ASM("asm/ov_SC02_005/nonmatchings/ov_SC02_005_jr_80140608", func_80142B2C); +extern void func_80142C84(s32 a0); +extern void func_80143994(s32 a0, s32 a1); +extern s32 func_8012AD50(void *a0); + +void func_80142B2C(void *arg0) { + *(s32 *)((u8 *)arg0 + 0x1c) = 0x180; + *(s16 *)((u8 *)arg0 + 0x5c) = 0x100; + *(u16 *)((u8 *)arg0 + 0x100) = *(u16 *)((u8 *)arg0 + 0x70) & 0x100; + *(u16 *)((u8 *)arg0 + 0x70) = *(u16 *)((u8 *)arg0 + 0x70) & 3; + *(u16 *)((u8 *)arg0 + 0x72) = *(u16 *)((u8 *)arg0 + 0x72) | 0x1000; + if (*(s16 *)((u8 *)arg0 + 0x100) == 0) { + ((void (*)(void))func_80142C84)(); + } + *(s32 *)((u8 *)arg0 + 0xcc) = + ((s32 (*)(s32, s32))func_80143994)( + (s32)arg0, (s32)*(s16 *)(*(s32 *)((u8 *)arg0 + 0x20) + 0x18)); + func_8012AD50(arg0); +} + DEFINE_func_80142BB4() /* dedup: shared engine-core @0x80142BB4 (src/shared) */ diff --git a/src/ov_SC02_011/ov_SC02_011_jr_80140608.c b/src/ov_SC02_011/ov_SC02_011_jr_80140608.c index fd2642686..86e5d177f 100644 --- a/src/ov_SC02_011/ov_SC02_011_jr_80140608.c +++ b/src/ov_SC02_011/ov_SC02_011_jr_80140608.c @@ -1861,7 +1861,25 @@ void func_80142A80(void) } -INCLUDE_ASM("asm/ov_SC02_011/nonmatchings/ov_SC02_011_jr_80140608", func_80142B2C); +extern void func_80142C84(s32 a0); +extern void func_80143994(s32 a0, s32 a1); +extern s32 func_8012AD50(void *a0); + +void func_80142B2C(void *arg0) { + *(s32 *)((u8 *)arg0 + 0x1c) = 0x180; + *(s16 *)((u8 *)arg0 + 0x5c) = 0x100; + *(u16 *)((u8 *)arg0 + 0x100) = *(u16 *)((u8 *)arg0 + 0x70) & 0x100; + *(u16 *)((u8 *)arg0 + 0x70) = *(u16 *)((u8 *)arg0 + 0x70) & 3; + *(u16 *)((u8 *)arg0 + 0x72) = *(u16 *)((u8 *)arg0 + 0x72) | 0x1000; + if (*(s16 *)((u8 *)arg0 + 0x100) == 0) { + ((void (*)(void))func_80142C84)(); + } + *(s32 *)((u8 *)arg0 + 0xcc) = + ((s32 (*)(s32, s32))func_80143994)( + (s32)arg0, (s32)*(s16 *)(*(s32 *)((u8 *)arg0 + 0x20) + 0x18)); + func_8012AD50(arg0); +} + DEFINE_func_80142BB4() /* dedup: shared engine-core @0x80142BB4 (src/shared) */ diff --git a/src/ov_SC02_015/ov_SC02_015_jr_80140608.c b/src/ov_SC02_015/ov_SC02_015_jr_80140608.c index 33f35f7b0..6c05f5e38 100644 --- a/src/ov_SC02_015/ov_SC02_015_jr_80140608.c +++ b/src/ov_SC02_015/ov_SC02_015_jr_80140608.c @@ -1845,7 +1845,25 @@ void func_80142A80(void) } -INCLUDE_ASM("asm/ov_SC02_015/nonmatchings/ov_SC02_015_jr_80140608", func_80142B2C); +extern void func_80142C84(s32 a0); +extern void func_80143994(s32 a0, s32 a1); +extern s32 func_8012AD50(void *a0); + +void func_80142B2C(void *arg0) { + *(s32 *)((u8 *)arg0 + 0x1c) = 0x180; + *(s16 *)((u8 *)arg0 + 0x5c) = 0x100; + *(u16 *)((u8 *)arg0 + 0x100) = *(u16 *)((u8 *)arg0 + 0x70) & 0x100; + *(u16 *)((u8 *)arg0 + 0x70) = *(u16 *)((u8 *)arg0 + 0x70) & 3; + *(u16 *)((u8 *)arg0 + 0x72) = *(u16 *)((u8 *)arg0 + 0x72) | 0x1000; + if (*(s16 *)((u8 *)arg0 + 0x100) == 0) { + ((void (*)(void))func_80142C84)(); + } + *(s32 *)((u8 *)arg0 + 0xcc) = + ((s32 (*)(s32, s32))func_80143994)( + (s32)arg0, (s32)*(s16 *)(*(s32 *)((u8 *)arg0 + 0x20) + 0x18)); + func_8012AD50(arg0); +} + DEFINE_func_80142BB4() /* dedup: shared engine-core @0x80142BB4 (src/shared) */ diff --git a/src/ov_SC02_016/ov_SC02_016_jr_80140608.c b/src/ov_SC02_016/ov_SC02_016_jr_80140608.c index d4a0f968f..f4a2ea7e0 100644 --- a/src/ov_SC02_016/ov_SC02_016_jr_80140608.c +++ b/src/ov_SC02_016/ov_SC02_016_jr_80140608.c @@ -1861,7 +1861,25 @@ void func_80142A80(void) } -INCLUDE_ASM("asm/ov_SC02_016/nonmatchings/ov_SC02_016_jr_80140608", func_80142B2C); +extern void func_80142C84(s32 a0); +extern void func_80143994(s32 a0, s32 a1); +extern s32 func_8012AD50(void *a0); + +void func_80142B2C(void *arg0) { + *(s32 *)((u8 *)arg0 + 0x1c) = 0x180; + *(s16 *)((u8 *)arg0 + 0x5c) = 0x100; + *(u16 *)((u8 *)arg0 + 0x100) = *(u16 *)((u8 *)arg0 + 0x70) & 0x100; + *(u16 *)((u8 *)arg0 + 0x70) = *(u16 *)((u8 *)arg0 + 0x70) & 3; + *(u16 *)((u8 *)arg0 + 0x72) = *(u16 *)((u8 *)arg0 + 0x72) | 0x1000; + if (*(s16 *)((u8 *)arg0 + 0x100) == 0) { + ((void (*)(void))func_80142C84)(); + } + *(s32 *)((u8 *)arg0 + 0xcc) = + ((s32 (*)(s32, s32))func_80143994)( + (s32)arg0, (s32)*(s16 *)(*(s32 *)((u8 *)arg0 + 0x20) + 0x18)); + func_8012AD50(arg0); +} + DEFINE_func_80142BB4() /* dedup: shared engine-core @0x80142BB4 (src/shared) */ diff --git a/src/ov_SC02_017/ov_SC02_017_jr_80140608.c b/src/ov_SC02_017/ov_SC02_017_jr_80140608.c index 086744d70..89355885c 100644 --- a/src/ov_SC02_017/ov_SC02_017_jr_80140608.c +++ b/src/ov_SC02_017/ov_SC02_017_jr_80140608.c @@ -1861,7 +1861,25 @@ void func_80142A80(void) } -INCLUDE_ASM("asm/ov_SC02_017/nonmatchings/ov_SC02_017_jr_80140608", func_80142B2C); +extern void func_80142C84(s32 a0); +extern void func_80143994(s32 a0, s32 a1); +extern s32 func_8012AD50(void *a0); + +void func_80142B2C(void *arg0) { + *(s32 *)((u8 *)arg0 + 0x1c) = 0x180; + *(s16 *)((u8 *)arg0 + 0x5c) = 0x100; + *(u16 *)((u8 *)arg0 + 0x100) = *(u16 *)((u8 *)arg0 + 0x70) & 0x100; + *(u16 *)((u8 *)arg0 + 0x70) = *(u16 *)((u8 *)arg0 + 0x70) & 3; + *(u16 *)((u8 *)arg0 + 0x72) = *(u16 *)((u8 *)arg0 + 0x72) | 0x1000; + if (*(s16 *)((u8 *)arg0 + 0x100) == 0) { + ((void (*)(void))func_80142C84)(); + } + *(s32 *)((u8 *)arg0 + 0xcc) = + ((s32 (*)(s32, s32))func_80143994)( + (s32)arg0, (s32)*(s16 *)(*(s32 *)((u8 *)arg0 + 0x20) + 0x18)); + func_8012AD50(arg0); +} + DEFINE_func_80142BB4() /* dedup: shared engine-core @0x80142BB4 (src/shared) */ diff --git a/src/ov_SC02_021/ov_SC02_021_jr_80140608.c b/src/ov_SC02_021/ov_SC02_021_jr_80140608.c index 42f3109d1..f09ad5a53 100644 --- a/src/ov_SC02_021/ov_SC02_021_jr_80140608.c +++ b/src/ov_SC02_021/ov_SC02_021_jr_80140608.c @@ -1845,7 +1845,25 @@ void func_80142A80(void) } -INCLUDE_ASM("asm/ov_SC02_021/nonmatchings/ov_SC02_021_jr_80140608", func_80142B2C); +extern void func_80142C84(s32 a0); +extern void func_80143994(s32 a0, s32 a1); +extern s32 func_8012AD50(void *a0); + +void func_80142B2C(void *arg0) { + *(s32 *)((u8 *)arg0 + 0x1c) = 0x180; + *(s16 *)((u8 *)arg0 + 0x5c) = 0x100; + *(u16 *)((u8 *)arg0 + 0x100) = *(u16 *)((u8 *)arg0 + 0x70) & 0x100; + *(u16 *)((u8 *)arg0 + 0x70) = *(u16 *)((u8 *)arg0 + 0x70) & 3; + *(u16 *)((u8 *)arg0 + 0x72) = *(u16 *)((u8 *)arg0 + 0x72) | 0x1000; + if (*(s16 *)((u8 *)arg0 + 0x100) == 0) { + ((void (*)(void))func_80142C84)(); + } + *(s32 *)((u8 *)arg0 + 0xcc) = + ((s32 (*)(s32, s32))func_80143994)( + (s32)arg0, (s32)*(s16 *)(*(s32 *)((u8 *)arg0 + 0x20) + 0x18)); + func_8012AD50(arg0); +} + DEFINE_func_80142BB4() /* dedup: shared engine-core @0x80142BB4 (src/shared) */ diff --git a/src/ov_SC02_026/ov_SC02_026_jr_80140608.c b/src/ov_SC02_026/ov_SC02_026_jr_80140608.c index 8e08eb6c9..aec3d4874 100644 --- a/src/ov_SC02_026/ov_SC02_026_jr_80140608.c +++ b/src/ov_SC02_026/ov_SC02_026_jr_80140608.c @@ -1845,7 +1845,25 @@ void func_80142A80(void) } -INCLUDE_ASM("asm/ov_SC02_026/nonmatchings/ov_SC02_026_jr_80140608", func_80142B2C); +extern void func_80142C84(s32 a0); +extern void func_80143994(s32 a0, s32 a1); +extern s32 func_8012AD50(void *a0); + +void func_80142B2C(void *arg0) { + *(s32 *)((u8 *)arg0 + 0x1c) = 0x180; + *(s16 *)((u8 *)arg0 + 0x5c) = 0x100; + *(u16 *)((u8 *)arg0 + 0x100) = *(u16 *)((u8 *)arg0 + 0x70) & 0x100; + *(u16 *)((u8 *)arg0 + 0x70) = *(u16 *)((u8 *)arg0 + 0x70) & 3; + *(u16 *)((u8 *)arg0 + 0x72) = *(u16 *)((u8 *)arg0 + 0x72) | 0x1000; + if (*(s16 *)((u8 *)arg0 + 0x100) == 0) { + ((void (*)(void))func_80142C84)(); + } + *(s32 *)((u8 *)arg0 + 0xcc) = + ((s32 (*)(s32, s32))func_80143994)( + (s32)arg0, (s32)*(s16 *)(*(s32 *)((u8 *)arg0 + 0x20) + 0x18)); + func_8012AD50(arg0); +} + DEFINE_func_80142BB4() /* dedup: shared engine-core @0x80142BB4 (src/shared) */ diff --git a/src/ov_SC02_027/ov_SC02_027_jr_80140608.c b/src/ov_SC02_027/ov_SC02_027_jr_80140608.c index a3a497a9e..11317afbb 100644 --- a/src/ov_SC02_027/ov_SC02_027_jr_80140608.c +++ b/src/ov_SC02_027/ov_SC02_027_jr_80140608.c @@ -1845,7 +1845,25 @@ void func_80142A80(void) } -INCLUDE_ASM("asm/ov_SC02_027/nonmatchings/ov_SC02_027_jr_80140608", func_80142B2C); +extern void func_80142C84(s32 a0); +extern void func_80143994(s32 a0, s32 a1); +extern s32 func_8012AD50(void *a0); + +void func_80142B2C(void *arg0) { + *(s32 *)((u8 *)arg0 + 0x1c) = 0x180; + *(s16 *)((u8 *)arg0 + 0x5c) = 0x100; + *(u16 *)((u8 *)arg0 + 0x100) = *(u16 *)((u8 *)arg0 + 0x70) & 0x100; + *(u16 *)((u8 *)arg0 + 0x70) = *(u16 *)((u8 *)arg0 + 0x70) & 3; + *(u16 *)((u8 *)arg0 + 0x72) = *(u16 *)((u8 *)arg0 + 0x72) | 0x1000; + if (*(s16 *)((u8 *)arg0 + 0x100) == 0) { + ((void (*)(void))func_80142C84)(); + } + *(s32 *)((u8 *)arg0 + 0xcc) = + ((s32 (*)(s32, s32))func_80143994)( + (s32)arg0, (s32)*(s16 *)(*(s32 *)((u8 *)arg0 + 0x20) + 0x18)); + func_8012AD50(arg0); +} + DEFINE_func_80142BB4() /* dedup: shared engine-core @0x80142BB4 (src/shared) */ diff --git a/src/ov_SC02_028/ov_SC02_028_jr_80140608.c b/src/ov_SC02_028/ov_SC02_028_jr_80140608.c index 8cd4b95e8..c484d3d2e 100644 --- a/src/ov_SC02_028/ov_SC02_028_jr_80140608.c +++ b/src/ov_SC02_028/ov_SC02_028_jr_80140608.c @@ -1845,7 +1845,25 @@ void func_80142A80(void) } -INCLUDE_ASM("asm/ov_SC02_028/nonmatchings/ov_SC02_028_jr_80140608", func_80142B2C); +extern void func_80142C84(s32 a0); +extern void func_80143994(s32 a0, s32 a1); +extern s32 func_8012AD50(void *a0); + +void func_80142B2C(void *arg0) { + *(s32 *)((u8 *)arg0 + 0x1c) = 0x180; + *(s16 *)((u8 *)arg0 + 0x5c) = 0x100; + *(u16 *)((u8 *)arg0 + 0x100) = *(u16 *)((u8 *)arg0 + 0x70) & 0x100; + *(u16 *)((u8 *)arg0 + 0x70) = *(u16 *)((u8 *)arg0 + 0x70) & 3; + *(u16 *)((u8 *)arg0 + 0x72) = *(u16 *)((u8 *)arg0 + 0x72) | 0x1000; + if (*(s16 *)((u8 *)arg0 + 0x100) == 0) { + ((void (*)(void))func_80142C84)(); + } + *(s32 *)((u8 *)arg0 + 0xcc) = + ((s32 (*)(s32, s32))func_80143994)( + (s32)arg0, (s32)*(s16 *)(*(s32 *)((u8 *)arg0 + 0x20) + 0x18)); + func_8012AD50(arg0); +} + DEFINE_func_80142BB4() /* dedup: shared engine-core @0x80142BB4 (src/shared) */ diff --git a/src/ov_SC02_031/ov_SC02_031_jr_80140608.c b/src/ov_SC02_031/ov_SC02_031_jr_80140608.c index 1362bf99a..d7e58bfd0 100644 --- a/src/ov_SC02_031/ov_SC02_031_jr_80140608.c +++ b/src/ov_SC02_031/ov_SC02_031_jr_80140608.c @@ -1845,7 +1845,25 @@ void func_80142A80(void) } -INCLUDE_ASM("asm/ov_SC02_031/nonmatchings/ov_SC02_031_jr_80140608", func_80142B2C); +extern void func_80142C84(s32 a0); +extern void func_80143994(s32 a0, s32 a1); +extern s32 func_8012AD50(void *a0); + +void func_80142B2C(void *arg0) { + *(s32 *)((u8 *)arg0 + 0x1c) = 0x180; + *(s16 *)((u8 *)arg0 + 0x5c) = 0x100; + *(u16 *)((u8 *)arg0 + 0x100) = *(u16 *)((u8 *)arg0 + 0x70) & 0x100; + *(u16 *)((u8 *)arg0 + 0x70) = *(u16 *)((u8 *)arg0 + 0x70) & 3; + *(u16 *)((u8 *)arg0 + 0x72) = *(u16 *)((u8 *)arg0 + 0x72) | 0x1000; + if (*(s16 *)((u8 *)arg0 + 0x100) == 0) { + ((void (*)(void))func_80142C84)(); + } + *(s32 *)((u8 *)arg0 + 0xcc) = + ((s32 (*)(s32, s32))func_80143994)( + (s32)arg0, (s32)*(s16 *)(*(s32 *)((u8 *)arg0 + 0x20) + 0x18)); + func_8012AD50(arg0); +} + DEFINE_func_80142BB4() /* dedup: shared engine-core @0x80142BB4 (src/shared) */ diff --git a/src/ov_SC02_035/ov_SC02_035_jr_80140608.c b/src/ov_SC02_035/ov_SC02_035_jr_80140608.c index 68d5c295f..2685761da 100644 --- a/src/ov_SC02_035/ov_SC02_035_jr_80140608.c +++ b/src/ov_SC02_035/ov_SC02_035_jr_80140608.c @@ -1845,7 +1845,25 @@ void func_80142A80(void) } -INCLUDE_ASM("asm/ov_SC02_035/nonmatchings/ov_SC02_035_jr_80140608", func_80142B2C); +extern void func_80142C84(s32 a0); +extern void func_80143994(s32 a0, s32 a1); +extern s32 func_8012AD50(void *a0); + +void func_80142B2C(void *arg0) { + *(s32 *)((u8 *)arg0 + 0x1c) = 0x180; + *(s16 *)((u8 *)arg0 + 0x5c) = 0x100; + *(u16 *)((u8 *)arg0 + 0x100) = *(u16 *)((u8 *)arg0 + 0x70) & 0x100; + *(u16 *)((u8 *)arg0 + 0x70) = *(u16 *)((u8 *)arg0 + 0x70) & 3; + *(u16 *)((u8 *)arg0 + 0x72) = *(u16 *)((u8 *)arg0 + 0x72) | 0x1000; + if (*(s16 *)((u8 *)arg0 + 0x100) == 0) { + ((void (*)(void))func_80142C84)(); + } + *(s32 *)((u8 *)arg0 + 0xcc) = + ((s32 (*)(s32, s32))func_80143994)( + (s32)arg0, (s32)*(s16 *)(*(s32 *)((u8 *)arg0 + 0x20) + 0x18)); + func_8012AD50(arg0); +} + DEFINE_func_80142BB4() /* dedup: shared engine-core @0x80142BB4 (src/shared) */ diff --git a/src/ov_SC02_039/ov_SC02_039_jr_80140608.c b/src/ov_SC02_039/ov_SC02_039_jr_80140608.c index 93a12eccb..cf91c9a7a 100644 --- a/src/ov_SC02_039/ov_SC02_039_jr_80140608.c +++ b/src/ov_SC02_039/ov_SC02_039_jr_80140608.c @@ -1842,7 +1842,25 @@ void func_80142A80(void) } -INCLUDE_ASM("asm/ov_SC02_039/nonmatchings/ov_SC02_039_jr_80140608", func_80142B2C); +extern void func_80142C84(s32 a0); +extern void func_80143994(s32 a0, s32 a1); +extern s32 func_8012AD50(void *a0); + +void func_80142B2C(void *arg0) { + *(s32 *)((u8 *)arg0 + 0x1c) = 0x180; + *(s16 *)((u8 *)arg0 + 0x5c) = 0x100; + *(u16 *)((u8 *)arg0 + 0x100) = *(u16 *)((u8 *)arg0 + 0x70) & 0x100; + *(u16 *)((u8 *)arg0 + 0x70) = *(u16 *)((u8 *)arg0 + 0x70) & 3; + *(u16 *)((u8 *)arg0 + 0x72) = *(u16 *)((u8 *)arg0 + 0x72) | 0x1000; + if (*(s16 *)((u8 *)arg0 + 0x100) == 0) { + ((void (*)(void))func_80142C84)(); + } + *(s32 *)((u8 *)arg0 + 0xcc) = + ((s32 (*)(s32, s32))func_80143994)( + (s32)arg0, (s32)*(s16 *)(*(s32 *)((u8 *)arg0 + 0x20) + 0x18)); + func_8012AD50(arg0); +} + DEFINE_func_80142BB4() /* dedup: shared engine-core @0x80142BB4 (src/shared) */ diff --git a/src/ov_SC02_041/ov_SC02_041_jr_80140608.c b/src/ov_SC02_041/ov_SC02_041_jr_80140608.c index 47b7f26d8..d5244f91b 100644 --- a/src/ov_SC02_041/ov_SC02_041_jr_80140608.c +++ b/src/ov_SC02_041/ov_SC02_041_jr_80140608.c @@ -1842,7 +1842,25 @@ void func_80142A80(void) } -INCLUDE_ASM("asm/ov_SC02_041/nonmatchings/ov_SC02_041_jr_80140608", func_80142B2C); +extern void func_80142C84(s32 a0); +extern void func_80143994(s32 a0, s32 a1); +extern s32 func_8012AD50(void *a0); + +void func_80142B2C(void *arg0) { + *(s32 *)((u8 *)arg0 + 0x1c) = 0x180; + *(s16 *)((u8 *)arg0 + 0x5c) = 0x100; + *(u16 *)((u8 *)arg0 + 0x100) = *(u16 *)((u8 *)arg0 + 0x70) & 0x100; + *(u16 *)((u8 *)arg0 + 0x70) = *(u16 *)((u8 *)arg0 + 0x70) & 3; + *(u16 *)((u8 *)arg0 + 0x72) = *(u16 *)((u8 *)arg0 + 0x72) | 0x1000; + if (*(s16 *)((u8 *)arg0 + 0x100) == 0) { + ((void (*)(void))func_80142C84)(); + } + *(s32 *)((u8 *)arg0 + 0xcc) = + ((s32 (*)(s32, s32))func_80143994)( + (s32)arg0, (s32)*(s16 *)(*(s32 *)((u8 *)arg0 + 0x20) + 0x18)); + func_8012AD50(arg0); +} + DEFINE_func_80142BB4() /* dedup: shared engine-core @0x80142BB4 (src/shared) */ diff --git a/src/ov_SC03_001/ov_SC03_001_jr_80140608.c b/src/ov_SC03_001/ov_SC03_001_jr_80140608.c index fbccf044f..60730df14 100644 --- a/src/ov_SC03_001/ov_SC03_001_jr_80140608.c +++ b/src/ov_SC03_001/ov_SC03_001_jr_80140608.c @@ -1860,7 +1860,25 @@ void func_80142A80(void) } -INCLUDE_ASM("asm/ov_SC03_001/nonmatchings/ov_SC03_001_jr_80140608", func_80142B2C); +extern void func_80142C84(s32 a0); +extern void func_80143994(s32 a0, s32 a1); +extern s32 func_8012AD50(void *a0); + +void func_80142B2C(void *arg0) { + *(s32 *)((u8 *)arg0 + 0x1c) = 0x180; + *(s16 *)((u8 *)arg0 + 0x5c) = 0x100; + *(u16 *)((u8 *)arg0 + 0x100) = *(u16 *)((u8 *)arg0 + 0x70) & 0x100; + *(u16 *)((u8 *)arg0 + 0x70) = *(u16 *)((u8 *)arg0 + 0x70) & 3; + *(u16 *)((u8 *)arg0 + 0x72) = *(u16 *)((u8 *)arg0 + 0x72) | 0x1000; + if (*(s16 *)((u8 *)arg0 + 0x100) == 0) { + ((void (*)(void))func_80142C84)(); + } + *(s32 *)((u8 *)arg0 + 0xcc) = + ((s32 (*)(s32, s32))func_80143994)( + (s32)arg0, (s32)*(s16 *)(*(s32 *)((u8 *)arg0 + 0x20) + 0x18)); + func_8012AD50(arg0); +} + DEFINE_func_80142BB4() /* dedup: shared engine-core @0x80142BB4 (src/shared) */ diff --git a/src/ov_SC03_002/ov_SC03_002_jr_80140608.c b/src/ov_SC03_002/ov_SC03_002_jr_80140608.c index d63982f0b..b1a56f6b1 100644 --- a/src/ov_SC03_002/ov_SC03_002_jr_80140608.c +++ b/src/ov_SC03_002/ov_SC03_002_jr_80140608.c @@ -1844,7 +1844,25 @@ void func_80142A80(void) } -INCLUDE_ASM("asm/ov_SC03_002/nonmatchings/ov_SC03_002_jr_80140608", func_80142B2C); +extern void func_80142C84(s32 a0); +extern void func_80143994(s32 a0, s32 a1); +extern s32 func_8012AD50(void *a0); + +void func_80142B2C(void *arg0) { + *(s32 *)((u8 *)arg0 + 0x1c) = 0x180; + *(s16 *)((u8 *)arg0 + 0x5c) = 0x100; + *(u16 *)((u8 *)arg0 + 0x100) = *(u16 *)((u8 *)arg0 + 0x70) & 0x100; + *(u16 *)((u8 *)arg0 + 0x70) = *(u16 *)((u8 *)arg0 + 0x70) & 3; + *(u16 *)((u8 *)arg0 + 0x72) = *(u16 *)((u8 *)arg0 + 0x72) | 0x1000; + if (*(s16 *)((u8 *)arg0 + 0x100) == 0) { + ((void (*)(void))func_80142C84)(); + } + *(s32 *)((u8 *)arg0 + 0xcc) = + ((s32 (*)(s32, s32))func_80143994)( + (s32)arg0, (s32)*(s16 *)(*(s32 *)((u8 *)arg0 + 0x20) + 0x18)); + func_8012AD50(arg0); +} + DEFINE_func_80142BB4() /* dedup: shared engine-core @0x80142BB4 (src/shared) */ diff --git a/src/ov_SC03_003/ov_SC03_003_jr_80140608.c b/src/ov_SC03_003/ov_SC03_003_jr_80140608.c index 8cea1b0f4..430ac7088 100644 --- a/src/ov_SC03_003/ov_SC03_003_jr_80140608.c +++ b/src/ov_SC03_003/ov_SC03_003_jr_80140608.c @@ -1842,7 +1842,25 @@ void func_80142A80(void) } -INCLUDE_ASM("asm/ov_SC03_003/nonmatchings/ov_SC03_003_jr_80140608", func_80142B2C); +extern void func_80142C84(s32 a0); +extern void func_80143994(s32 a0, s32 a1); +extern s32 func_8012AD50(void *a0); + +void func_80142B2C(void *arg0) { + *(s32 *)((u8 *)arg0 + 0x1c) = 0x180; + *(s16 *)((u8 *)arg0 + 0x5c) = 0x100; + *(u16 *)((u8 *)arg0 + 0x100) = *(u16 *)((u8 *)arg0 + 0x70) & 0x100; + *(u16 *)((u8 *)arg0 + 0x70) = *(u16 *)((u8 *)arg0 + 0x70) & 3; + *(u16 *)((u8 *)arg0 + 0x72) = *(u16 *)((u8 *)arg0 + 0x72) | 0x1000; + if (*(s16 *)((u8 *)arg0 + 0x100) == 0) { + ((void (*)(void))func_80142C84)(); + } + *(s32 *)((u8 *)arg0 + 0xcc) = + ((s32 (*)(s32, s32))func_80143994)( + (s32)arg0, (s32)*(s16 *)(*(s32 *)((u8 *)arg0 + 0x20) + 0x18)); + func_8012AD50(arg0); +} + DEFINE_func_80142BB4() /* dedup: shared engine-core @0x80142BB4 (src/shared) */ diff --git a/src/ov_SC03_006/ov_SC03_006_jr_80140608.c b/src/ov_SC03_006/ov_SC03_006_jr_80140608.c index a5331ffd9..d87334e18 100644 --- a/src/ov_SC03_006/ov_SC03_006_jr_80140608.c +++ b/src/ov_SC03_006/ov_SC03_006_jr_80140608.c @@ -1860,7 +1860,25 @@ void func_80142A80(void) } -INCLUDE_ASM("asm/ov_SC03_006/nonmatchings/ov_SC03_006_jr_80140608", func_80142B2C); +extern void func_80142C84(s32 a0); +extern void func_80143994(s32 a0, s32 a1); +extern s32 func_8012AD50(void *a0); + +void func_80142B2C(void *arg0) { + *(s32 *)((u8 *)arg0 + 0x1c) = 0x180; + *(s16 *)((u8 *)arg0 + 0x5c) = 0x100; + *(u16 *)((u8 *)arg0 + 0x100) = *(u16 *)((u8 *)arg0 + 0x70) & 0x100; + *(u16 *)((u8 *)arg0 + 0x70) = *(u16 *)((u8 *)arg0 + 0x70) & 3; + *(u16 *)((u8 *)arg0 + 0x72) = *(u16 *)((u8 *)arg0 + 0x72) | 0x1000; + if (*(s16 *)((u8 *)arg0 + 0x100) == 0) { + ((void (*)(void))func_80142C84)(); + } + *(s32 *)((u8 *)arg0 + 0xcc) = + ((s32 (*)(s32, s32))func_80143994)( + (s32)arg0, (s32)*(s16 *)(*(s32 *)((u8 *)arg0 + 0x20) + 0x18)); + func_8012AD50(arg0); +} + DEFINE_func_80142BB4() /* dedup: shared engine-core @0x80142BB4 (src/shared) */ diff --git a/src/ov_SC03_007/ov_SC03_007_jr_80140608.c b/src/ov_SC03_007/ov_SC03_007_jr_80140608.c index d8e216af9..6b53ff685 100644 --- a/src/ov_SC03_007/ov_SC03_007_jr_80140608.c +++ b/src/ov_SC03_007/ov_SC03_007_jr_80140608.c @@ -1858,7 +1858,25 @@ void func_80142A80(void) } -INCLUDE_ASM("asm/ov_SC03_007/nonmatchings/ov_SC03_007_jr_80140608", func_80142B2C); +extern void func_80142C84(s32 a0); +extern void func_80143994(s32 a0, s32 a1); +extern s32 func_8012AD50(void *a0); + +void func_80142B2C(void *arg0) { + *(s32 *)((u8 *)arg0 + 0x1c) = 0x180; + *(s16 *)((u8 *)arg0 + 0x5c) = 0x100; + *(u16 *)((u8 *)arg0 + 0x100) = *(u16 *)((u8 *)arg0 + 0x70) & 0x100; + *(u16 *)((u8 *)arg0 + 0x70) = *(u16 *)((u8 *)arg0 + 0x70) & 3; + *(u16 *)((u8 *)arg0 + 0x72) = *(u16 *)((u8 *)arg0 + 0x72) | 0x1000; + if (*(s16 *)((u8 *)arg0 + 0x100) == 0) { + ((void (*)(void))func_80142C84)(); + } + *(s32 *)((u8 *)arg0 + 0xcc) = + ((s32 (*)(s32, s32))func_80143994)( + (s32)arg0, (s32)*(s16 *)(*(s32 *)((u8 *)arg0 + 0x20) + 0x18)); + func_8012AD50(arg0); +} + DEFINE_func_80142BB4() /* dedup: shared engine-core @0x80142BB4 (src/shared) */ diff --git a/src/ov_SC03_010/ov_SC03_010_jr_80140608.c b/src/ov_SC03_010/ov_SC03_010_jr_80140608.c index 9dd04a2a4..82690ef0b 100644 --- a/src/ov_SC03_010/ov_SC03_010_jr_80140608.c +++ b/src/ov_SC03_010/ov_SC03_010_jr_80140608.c @@ -1842,7 +1842,25 @@ void func_80142A80(void) } -INCLUDE_ASM("asm/ov_SC03_010/nonmatchings/ov_SC03_010_jr_80140608", func_80142B2C); +extern void func_80142C84(s32 a0); +extern void func_80143994(s32 a0, s32 a1); +extern s32 func_8012AD50(void *a0); + +void func_80142B2C(void *arg0) { + *(s32 *)((u8 *)arg0 + 0x1c) = 0x180; + *(s16 *)((u8 *)arg0 + 0x5c) = 0x100; + *(u16 *)((u8 *)arg0 + 0x100) = *(u16 *)((u8 *)arg0 + 0x70) & 0x100; + *(u16 *)((u8 *)arg0 + 0x70) = *(u16 *)((u8 *)arg0 + 0x70) & 3; + *(u16 *)((u8 *)arg0 + 0x72) = *(u16 *)((u8 *)arg0 + 0x72) | 0x1000; + if (*(s16 *)((u8 *)arg0 + 0x100) == 0) { + ((void (*)(void))func_80142C84)(); + } + *(s32 *)((u8 *)arg0 + 0xcc) = + ((s32 (*)(s32, s32))func_80143994)( + (s32)arg0, (s32)*(s16 *)(*(s32 *)((u8 *)arg0 + 0x20) + 0x18)); + func_8012AD50(arg0); +} + DEFINE_func_80142BB4() /* dedup: shared engine-core @0x80142BB4 (src/shared) */ diff --git a/src/ov_SC03_011/ov_SC03_011_jr_80140608.c b/src/ov_SC03_011/ov_SC03_011_jr_80140608.c index ee968e5c2..c91307648 100644 --- a/src/ov_SC03_011/ov_SC03_011_jr_80140608.c +++ b/src/ov_SC03_011/ov_SC03_011_jr_80140608.c @@ -1876,7 +1876,25 @@ void func_80142A80(void) } -INCLUDE_ASM("asm/ov_SC03_011/nonmatchings/ov_SC03_011_jr_80140608", func_80142B2C); +extern void func_80142C84(s32 a0); +extern void func_80143994(s32 a0, s32 a1); +extern s32 func_8012AD50(void *a0); + +void func_80142B2C(void *arg0) { + *(s32 *)((u8 *)arg0 + 0x1c) = 0x180; + *(s16 *)((u8 *)arg0 + 0x5c) = 0x100; + *(u16 *)((u8 *)arg0 + 0x100) = *(u16 *)((u8 *)arg0 + 0x70) & 0x100; + *(u16 *)((u8 *)arg0 + 0x70) = *(u16 *)((u8 *)arg0 + 0x70) & 3; + *(u16 *)((u8 *)arg0 + 0x72) = *(u16 *)((u8 *)arg0 + 0x72) | 0x1000; + if (*(s16 *)((u8 *)arg0 + 0x100) == 0) { + ((void (*)(void))func_80142C84)(); + } + *(s32 *)((u8 *)arg0 + 0xcc) = + ((s32 (*)(s32, s32))func_80143994)( + (s32)arg0, (s32)*(s16 *)(*(s32 *)((u8 *)arg0 + 0x20) + 0x18)); + func_8012AD50(arg0); +} + DEFINE_func_80142BB4() /* dedup: shared engine-core @0x80142BB4 (src/shared) */ diff --git a/src/ov_SC03_012/ov_SC03_012_jr_80140608.c b/src/ov_SC03_012/ov_SC03_012_jr_80140608.c index 855cc15b5..c49b68903 100644 --- a/src/ov_SC03_012/ov_SC03_012_jr_80140608.c +++ b/src/ov_SC03_012/ov_SC03_012_jr_80140608.c @@ -1842,7 +1842,25 @@ void func_80142A80(void) } -INCLUDE_ASM("asm/ov_SC03_012/nonmatchings/ov_SC03_012_jr_80140608", func_80142B2C); +extern void func_80142C84(s32 a0); +extern void func_80143994(s32 a0, s32 a1); +extern s32 func_8012AD50(void *a0); + +void func_80142B2C(void *arg0) { + *(s32 *)((u8 *)arg0 + 0x1c) = 0x180; + *(s16 *)((u8 *)arg0 + 0x5c) = 0x100; + *(u16 *)((u8 *)arg0 + 0x100) = *(u16 *)((u8 *)arg0 + 0x70) & 0x100; + *(u16 *)((u8 *)arg0 + 0x70) = *(u16 *)((u8 *)arg0 + 0x70) & 3; + *(u16 *)((u8 *)arg0 + 0x72) = *(u16 *)((u8 *)arg0 + 0x72) | 0x1000; + if (*(s16 *)((u8 *)arg0 + 0x100) == 0) { + ((void (*)(void))func_80142C84)(); + } + *(s32 *)((u8 *)arg0 + 0xcc) = + ((s32 (*)(s32, s32))func_80143994)( + (s32)arg0, (s32)*(s16 *)(*(s32 *)((u8 *)arg0 + 0x20) + 0x18)); + func_8012AD50(arg0); +} + DEFINE_func_80142BB4() /* dedup: shared engine-core @0x80142BB4 (src/shared) */ diff --git a/src/ov_SC03_013/ov_SC03_013_jr_80140608.c b/src/ov_SC03_013/ov_SC03_013_jr_80140608.c index b109a8bd8..19087f33e 100644 --- a/src/ov_SC03_013/ov_SC03_013_jr_80140608.c +++ b/src/ov_SC03_013/ov_SC03_013_jr_80140608.c @@ -1842,7 +1842,25 @@ void func_80142A80(void) } -INCLUDE_ASM("asm/ov_SC03_013/nonmatchings/ov_SC03_013_jr_80140608", func_80142B2C); +extern void func_80142C84(s32 a0); +extern void func_80143994(s32 a0, s32 a1); +extern s32 func_8012AD50(void *a0); + +void func_80142B2C(void *arg0) { + *(s32 *)((u8 *)arg0 + 0x1c) = 0x180; + *(s16 *)((u8 *)arg0 + 0x5c) = 0x100; + *(u16 *)((u8 *)arg0 + 0x100) = *(u16 *)((u8 *)arg0 + 0x70) & 0x100; + *(u16 *)((u8 *)arg0 + 0x70) = *(u16 *)((u8 *)arg0 + 0x70) & 3; + *(u16 *)((u8 *)arg0 + 0x72) = *(u16 *)((u8 *)arg0 + 0x72) | 0x1000; + if (*(s16 *)((u8 *)arg0 + 0x100) == 0) { + ((void (*)(void))func_80142C84)(); + } + *(s32 *)((u8 *)arg0 + 0xcc) = + ((s32 (*)(s32, s32))func_80143994)( + (s32)arg0, (s32)*(s16 *)(*(s32 *)((u8 *)arg0 + 0x20) + 0x18)); + func_8012AD50(arg0); +} + DEFINE_func_80142BB4() /* dedup: shared engine-core @0x80142BB4 (src/shared) */ diff --git a/src/ov_SC03_014/ov_SC03_014_jr_80140608.c b/src/ov_SC03_014/ov_SC03_014_jr_80140608.c index 2eb3b0175..9378826b1 100644 --- a/src/ov_SC03_014/ov_SC03_014_jr_80140608.c +++ b/src/ov_SC03_014/ov_SC03_014_jr_80140608.c @@ -1843,7 +1843,25 @@ void func_80142A80(void) } -INCLUDE_ASM("asm/ov_SC03_014/nonmatchings/ov_SC03_014_jr_80140608", func_80142B2C); +extern void func_80142C84(s32 a0); +extern void func_80143994(s32 a0, s32 a1); +extern s32 func_8012AD50(void *a0); + +void func_80142B2C(void *arg0) { + *(s32 *)((u8 *)arg0 + 0x1c) = 0x180; + *(s16 *)((u8 *)arg0 + 0x5c) = 0x100; + *(u16 *)((u8 *)arg0 + 0x100) = *(u16 *)((u8 *)arg0 + 0x70) & 0x100; + *(u16 *)((u8 *)arg0 + 0x70) = *(u16 *)((u8 *)arg0 + 0x70) & 3; + *(u16 *)((u8 *)arg0 + 0x72) = *(u16 *)((u8 *)arg0 + 0x72) | 0x1000; + if (*(s16 *)((u8 *)arg0 + 0x100) == 0) { + ((void (*)(void))func_80142C84)(); + } + *(s32 *)((u8 *)arg0 + 0xcc) = + ((s32 (*)(s32, s32))func_80143994)( + (s32)arg0, (s32)*(s16 *)(*(s32 *)((u8 *)arg0 + 0x20) + 0x18)); + func_8012AD50(arg0); +} + DEFINE_func_80142BB4() /* dedup: shared engine-core @0x80142BB4 (src/shared) */ diff --git a/src/ov_SC03_015/ov_SC03_015_jr_80140608.c b/src/ov_SC03_015/ov_SC03_015_jr_80140608.c index a03043ec6..c0b481d00 100644 --- a/src/ov_SC03_015/ov_SC03_015_jr_80140608.c +++ b/src/ov_SC03_015/ov_SC03_015_jr_80140608.c @@ -1842,7 +1842,25 @@ void func_80142A80(void) } -INCLUDE_ASM("asm/ov_SC03_015/nonmatchings/ov_SC03_015_jr_80140608", func_80142B2C); +extern void func_80142C84(s32 a0); +extern void func_80143994(s32 a0, s32 a1); +extern s32 func_8012AD50(void *a0); + +void func_80142B2C(void *arg0) { + *(s32 *)((u8 *)arg0 + 0x1c) = 0x180; + *(s16 *)((u8 *)arg0 + 0x5c) = 0x100; + *(u16 *)((u8 *)arg0 + 0x100) = *(u16 *)((u8 *)arg0 + 0x70) & 0x100; + *(u16 *)((u8 *)arg0 + 0x70) = *(u16 *)((u8 *)arg0 + 0x70) & 3; + *(u16 *)((u8 *)arg0 + 0x72) = *(u16 *)((u8 *)arg0 + 0x72) | 0x1000; + if (*(s16 *)((u8 *)arg0 + 0x100) == 0) { + ((void (*)(void))func_80142C84)(); + } + *(s32 *)((u8 *)arg0 + 0xcc) = + ((s32 (*)(s32, s32))func_80143994)( + (s32)arg0, (s32)*(s16 *)(*(s32 *)((u8 *)arg0 + 0x20) + 0x18)); + func_8012AD50(arg0); +} + DEFINE_func_80142BB4() /* dedup: shared engine-core @0x80142BB4 (src/shared) */ diff --git a/src/ov_SC03_023/ov_SC03_023_jr_80140608.c b/src/ov_SC03_023/ov_SC03_023_jr_80140608.c index 22bc4d1e7..6c4a15f84 100644 --- a/src/ov_SC03_023/ov_SC03_023_jr_80140608.c +++ b/src/ov_SC03_023/ov_SC03_023_jr_80140608.c @@ -1842,7 +1842,25 @@ void func_80142A80(void) } -INCLUDE_ASM("asm/ov_SC03_023/nonmatchings/ov_SC03_023_jr_80140608", func_80142B2C); +extern void func_80142C84(s32 a0); +extern void func_80143994(s32 a0, s32 a1); +extern s32 func_8012AD50(void *a0); + +void func_80142B2C(void *arg0) { + *(s32 *)((u8 *)arg0 + 0x1c) = 0x180; + *(s16 *)((u8 *)arg0 + 0x5c) = 0x100; + *(u16 *)((u8 *)arg0 + 0x100) = *(u16 *)((u8 *)arg0 + 0x70) & 0x100; + *(u16 *)((u8 *)arg0 + 0x70) = *(u16 *)((u8 *)arg0 + 0x70) & 3; + *(u16 *)((u8 *)arg0 + 0x72) = *(u16 *)((u8 *)arg0 + 0x72) | 0x1000; + if (*(s16 *)((u8 *)arg0 + 0x100) == 0) { + ((void (*)(void))func_80142C84)(); + } + *(s32 *)((u8 *)arg0 + 0xcc) = + ((s32 (*)(s32, s32))func_80143994)( + (s32)arg0, (s32)*(s16 *)(*(s32 *)((u8 *)arg0 + 0x20) + 0x18)); + func_8012AD50(arg0); +} + DEFINE_func_80142BB4() /* dedup: shared engine-core @0x80142BB4 (src/shared) */ diff --git a/src/ov_SC03_024/ov_SC03_024_jr_80140608.c b/src/ov_SC03_024/ov_SC03_024_jr_80140608.c index 926148009..74f63f04c 100644 --- a/src/ov_SC03_024/ov_SC03_024_jr_80140608.c +++ b/src/ov_SC03_024/ov_SC03_024_jr_80140608.c @@ -1858,7 +1858,25 @@ void func_80142A80(void) } -INCLUDE_ASM("asm/ov_SC03_024/nonmatchings/ov_SC03_024_jr_80140608", func_80142B2C); +extern void func_80142C84(s32 a0); +extern void func_80143994(s32 a0, s32 a1); +extern s32 func_8012AD50(void *a0); + +void func_80142B2C(void *arg0) { + *(s32 *)((u8 *)arg0 + 0x1c) = 0x180; + *(s16 *)((u8 *)arg0 + 0x5c) = 0x100; + *(u16 *)((u8 *)arg0 + 0x100) = *(u16 *)((u8 *)arg0 + 0x70) & 0x100; + *(u16 *)((u8 *)arg0 + 0x70) = *(u16 *)((u8 *)arg0 + 0x70) & 3; + *(u16 *)((u8 *)arg0 + 0x72) = *(u16 *)((u8 *)arg0 + 0x72) | 0x1000; + if (*(s16 *)((u8 *)arg0 + 0x100) == 0) { + ((void (*)(void))func_80142C84)(); + } + *(s32 *)((u8 *)arg0 + 0xcc) = + ((s32 (*)(s32, s32))func_80143994)( + (s32)arg0, (s32)*(s16 *)(*(s32 *)((u8 *)arg0 + 0x20) + 0x18)); + func_8012AD50(arg0); +} + DEFINE_func_80142BB4() /* dedup: shared engine-core @0x80142BB4 (src/shared) */ diff --git a/src/ov_SC03_028/ov_SC03_028_jr_80140608.c b/src/ov_SC03_028/ov_SC03_028_jr_80140608.c index d8c123d0f..a36c43c03 100644 --- a/src/ov_SC03_028/ov_SC03_028_jr_80140608.c +++ b/src/ov_SC03_028/ov_SC03_028_jr_80140608.c @@ -1842,7 +1842,25 @@ void func_80142A80(void) } -INCLUDE_ASM("asm/ov_SC03_028/nonmatchings/ov_SC03_028_jr_80140608", func_80142B2C); +extern void func_80142C84(s32 a0); +extern void func_80143994(s32 a0, s32 a1); +extern s32 func_8012AD50(void *a0); + +void func_80142B2C(void *arg0) { + *(s32 *)((u8 *)arg0 + 0x1c) = 0x180; + *(s16 *)((u8 *)arg0 + 0x5c) = 0x100; + *(u16 *)((u8 *)arg0 + 0x100) = *(u16 *)((u8 *)arg0 + 0x70) & 0x100; + *(u16 *)((u8 *)arg0 + 0x70) = *(u16 *)((u8 *)arg0 + 0x70) & 3; + *(u16 *)((u8 *)arg0 + 0x72) = *(u16 *)((u8 *)arg0 + 0x72) | 0x1000; + if (*(s16 *)((u8 *)arg0 + 0x100) == 0) { + ((void (*)(void))func_80142C84)(); + } + *(s32 *)((u8 *)arg0 + 0xcc) = + ((s32 (*)(s32, s32))func_80143994)( + (s32)arg0, (s32)*(s16 *)(*(s32 *)((u8 *)arg0 + 0x20) + 0x18)); + func_8012AD50(arg0); +} + DEFINE_func_80142BB4() /* dedup: shared engine-core @0x80142BB4 (src/shared) */ diff --git a/src/ov_SC03_029/ov_SC03_029_jr_80140608.c b/src/ov_SC03_029/ov_SC03_029_jr_80140608.c index f6405016b..c7ec6b957 100644 --- a/src/ov_SC03_029/ov_SC03_029_jr_80140608.c +++ b/src/ov_SC03_029/ov_SC03_029_jr_80140608.c @@ -1842,7 +1842,25 @@ void func_80142A80(void) } -INCLUDE_ASM("asm/ov_SC03_029/nonmatchings/ov_SC03_029_jr_80140608", func_80142B2C); +extern void func_80142C84(s32 a0); +extern void func_80143994(s32 a0, s32 a1); +extern s32 func_8012AD50(void *a0); + +void func_80142B2C(void *arg0) { + *(s32 *)((u8 *)arg0 + 0x1c) = 0x180; + *(s16 *)((u8 *)arg0 + 0x5c) = 0x100; + *(u16 *)((u8 *)arg0 + 0x100) = *(u16 *)((u8 *)arg0 + 0x70) & 0x100; + *(u16 *)((u8 *)arg0 + 0x70) = *(u16 *)((u8 *)arg0 + 0x70) & 3; + *(u16 *)((u8 *)arg0 + 0x72) = *(u16 *)((u8 *)arg0 + 0x72) | 0x1000; + if (*(s16 *)((u8 *)arg0 + 0x100) == 0) { + ((void (*)(void))func_80142C84)(); + } + *(s32 *)((u8 *)arg0 + 0xcc) = + ((s32 (*)(s32, s32))func_80143994)( + (s32)arg0, (s32)*(s16 *)(*(s32 *)((u8 *)arg0 + 0x20) + 0x18)); + func_8012AD50(arg0); +} + DEFINE_func_80142BB4() /* dedup: shared engine-core @0x80142BB4 (src/shared) */ diff --git a/src/ov_SC03_030/ov_SC03_030_jr_80140608.c b/src/ov_SC03_030/ov_SC03_030_jr_80140608.c index 20b7c15da..809bf0d10 100644 --- a/src/ov_SC03_030/ov_SC03_030_jr_80140608.c +++ b/src/ov_SC03_030/ov_SC03_030_jr_80140608.c @@ -1892,7 +1892,25 @@ void func_80142A80(void) } -INCLUDE_ASM("asm/ov_SC03_030/nonmatchings/ov_SC03_030_jr_80140608", func_80142B2C); +extern void func_80142C84(s32 a0); +extern void func_80143994(s32 a0, s32 a1); +extern s32 func_8012AD50(void *a0); + +void func_80142B2C(void *arg0) { + *(s32 *)((u8 *)arg0 + 0x1c) = 0x180; + *(s16 *)((u8 *)arg0 + 0x5c) = 0x100; + *(u16 *)((u8 *)arg0 + 0x100) = *(u16 *)((u8 *)arg0 + 0x70) & 0x100; + *(u16 *)((u8 *)arg0 + 0x70) = *(u16 *)((u8 *)arg0 + 0x70) & 3; + *(u16 *)((u8 *)arg0 + 0x72) = *(u16 *)((u8 *)arg0 + 0x72) | 0x1000; + if (*(s16 *)((u8 *)arg0 + 0x100) == 0) { + ((void (*)(void))func_80142C84)(); + } + *(s32 *)((u8 *)arg0 + 0xcc) = + ((s32 (*)(s32, s32))func_80143994)( + (s32)arg0, (s32)*(s16 *)(*(s32 *)((u8 *)arg0 + 0x20) + 0x18)); + func_8012AD50(arg0); +} + DEFINE_func_80142BB4() /* dedup: shared engine-core @0x80142BB4 (src/shared) */ diff --git a/src/ov_SC03_031/ov_SC03_031_jr_80140608.c b/src/ov_SC03_031/ov_SC03_031_jr_80140608.c index c1a37d085..ba0a5bc53 100644 --- a/src/ov_SC03_031/ov_SC03_031_jr_80140608.c +++ b/src/ov_SC03_031/ov_SC03_031_jr_80140608.c @@ -1842,7 +1842,25 @@ void func_80142A80(void) } -INCLUDE_ASM("asm/ov_SC03_031/nonmatchings/ov_SC03_031_jr_80140608", func_80142B2C); +extern void func_80142C84(s32 a0); +extern void func_80143994(s32 a0, s32 a1); +extern s32 func_8012AD50(void *a0); + +void func_80142B2C(void *arg0) { + *(s32 *)((u8 *)arg0 + 0x1c) = 0x180; + *(s16 *)((u8 *)arg0 + 0x5c) = 0x100; + *(u16 *)((u8 *)arg0 + 0x100) = *(u16 *)((u8 *)arg0 + 0x70) & 0x100; + *(u16 *)((u8 *)arg0 + 0x70) = *(u16 *)((u8 *)arg0 + 0x70) & 3; + *(u16 *)((u8 *)arg0 + 0x72) = *(u16 *)((u8 *)arg0 + 0x72) | 0x1000; + if (*(s16 *)((u8 *)arg0 + 0x100) == 0) { + ((void (*)(void))func_80142C84)(); + } + *(s32 *)((u8 *)arg0 + 0xcc) = + ((s32 (*)(s32, s32))func_80143994)( + (s32)arg0, (s32)*(s16 *)(*(s32 *)((u8 *)arg0 + 0x20) + 0x18)); + func_8012AD50(arg0); +} + DEFINE_func_80142BB4() /* dedup: shared engine-core @0x80142BB4 (src/shared) */ diff --git a/src/ov_SC03_089/ov_SC03_089_jr_80140608.c b/src/ov_SC03_089/ov_SC03_089_jr_80140608.c index 47cc9e82a..e032e64db 100644 --- a/src/ov_SC03_089/ov_SC03_089_jr_80140608.c +++ b/src/ov_SC03_089/ov_SC03_089_jr_80140608.c @@ -1842,7 +1842,25 @@ void func_80142A80(void) } -INCLUDE_ASM("asm/ov_SC03_089/nonmatchings/ov_SC03_089_jr_80140608", func_80142B2C); +extern void func_80142C84(s32 a0); +extern void func_80143994(s32 a0, s32 a1); +extern s32 func_8012AD50(void *a0); + +void func_80142B2C(void *arg0) { + *(s32 *)((u8 *)arg0 + 0x1c) = 0x180; + *(s16 *)((u8 *)arg0 + 0x5c) = 0x100; + *(u16 *)((u8 *)arg0 + 0x100) = *(u16 *)((u8 *)arg0 + 0x70) & 0x100; + *(u16 *)((u8 *)arg0 + 0x70) = *(u16 *)((u8 *)arg0 + 0x70) & 3; + *(u16 *)((u8 *)arg0 + 0x72) = *(u16 *)((u8 *)arg0 + 0x72) | 0x1000; + if (*(s16 *)((u8 *)arg0 + 0x100) == 0) { + ((void (*)(void))func_80142C84)(); + } + *(s32 *)((u8 *)arg0 + 0xcc) = + ((s32 (*)(s32, s32))func_80143994)( + (s32)arg0, (s32)*(s16 *)(*(s32 *)((u8 *)arg0 + 0x20) + 0x18)); + func_8012AD50(arg0); +} + DEFINE_func_80142BB4() /* dedup: shared engine-core @0x80142BB4 (src/shared) */ diff --git a/src/ov_SC03_090/ov_SC03_090_jr_80140608.c b/src/ov_SC03_090/ov_SC03_090_jr_80140608.c index 3292d5a8c..a595f7989 100644 --- a/src/ov_SC03_090/ov_SC03_090_jr_80140608.c +++ b/src/ov_SC03_090/ov_SC03_090_jr_80140608.c @@ -1842,7 +1842,25 @@ void func_80142A80(void) } -INCLUDE_ASM("asm/ov_SC03_090/nonmatchings/ov_SC03_090_jr_80140608", func_80142B2C); +extern void func_80142C84(s32 a0); +extern void func_80143994(s32 a0, s32 a1); +extern s32 func_8012AD50(void *a0); + +void func_80142B2C(void *arg0) { + *(s32 *)((u8 *)arg0 + 0x1c) = 0x180; + *(s16 *)((u8 *)arg0 + 0x5c) = 0x100; + *(u16 *)((u8 *)arg0 + 0x100) = *(u16 *)((u8 *)arg0 + 0x70) & 0x100; + *(u16 *)((u8 *)arg0 + 0x70) = *(u16 *)((u8 *)arg0 + 0x70) & 3; + *(u16 *)((u8 *)arg0 + 0x72) = *(u16 *)((u8 *)arg0 + 0x72) | 0x1000; + if (*(s16 *)((u8 *)arg0 + 0x100) == 0) { + ((void (*)(void))func_80142C84)(); + } + *(s32 *)((u8 *)arg0 + 0xcc) = + ((s32 (*)(s32, s32))func_80143994)( + (s32)arg0, (s32)*(s16 *)(*(s32 *)((u8 *)arg0 + 0x20) + 0x18)); + func_8012AD50(arg0); +} + DEFINE_func_80142BB4() /* dedup: shared engine-core @0x80142BB4 (src/shared) */ diff --git a/src/ov_SC03_091/ov_SC03_091_jr_80140608.c b/src/ov_SC03_091/ov_SC03_091_jr_80140608.c index 3fd12cecc..d6fc7ebb2 100644 --- a/src/ov_SC03_091/ov_SC03_091_jr_80140608.c +++ b/src/ov_SC03_091/ov_SC03_091_jr_80140608.c @@ -1842,7 +1842,25 @@ void func_80142A80(void) } -INCLUDE_ASM("asm/ov_SC03_091/nonmatchings/ov_SC03_091_jr_80140608", func_80142B2C); +extern void func_80142C84(s32 a0); +extern void func_80143994(s32 a0, s32 a1); +extern s32 func_8012AD50(void *a0); + +void func_80142B2C(void *arg0) { + *(s32 *)((u8 *)arg0 + 0x1c) = 0x180; + *(s16 *)((u8 *)arg0 + 0x5c) = 0x100; + *(u16 *)((u8 *)arg0 + 0x100) = *(u16 *)((u8 *)arg0 + 0x70) & 0x100; + *(u16 *)((u8 *)arg0 + 0x70) = *(u16 *)((u8 *)arg0 + 0x70) & 3; + *(u16 *)((u8 *)arg0 + 0x72) = *(u16 *)((u8 *)arg0 + 0x72) | 0x1000; + if (*(s16 *)((u8 *)arg0 + 0x100) == 0) { + ((void (*)(void))func_80142C84)(); + } + *(s32 *)((u8 *)arg0 + 0xcc) = + ((s32 (*)(s32, s32))func_80143994)( + (s32)arg0, (s32)*(s16 *)(*(s32 *)((u8 *)arg0 + 0x20) + 0x18)); + func_8012AD50(arg0); +} + DEFINE_func_80142BB4() /* dedup: shared engine-core @0x80142BB4 (src/shared) */ diff --git a/src/ov_SC03_092/ov_SC03_092_jr_80140608.c b/src/ov_SC03_092/ov_SC03_092_jr_80140608.c index c459a661e..f0b428e9a 100644 --- a/src/ov_SC03_092/ov_SC03_092_jr_80140608.c +++ b/src/ov_SC03_092/ov_SC03_092_jr_80140608.c @@ -1842,7 +1842,25 @@ void func_80142A80(void) } -INCLUDE_ASM("asm/ov_SC03_092/nonmatchings/ov_SC03_092_jr_80140608", func_80142B2C); +extern void func_80142C84(s32 a0); +extern void func_80143994(s32 a0, s32 a1); +extern s32 func_8012AD50(void *a0); + +void func_80142B2C(void *arg0) { + *(s32 *)((u8 *)arg0 + 0x1c) = 0x180; + *(s16 *)((u8 *)arg0 + 0x5c) = 0x100; + *(u16 *)((u8 *)arg0 + 0x100) = *(u16 *)((u8 *)arg0 + 0x70) & 0x100; + *(u16 *)((u8 *)arg0 + 0x70) = *(u16 *)((u8 *)arg0 + 0x70) & 3; + *(u16 *)((u8 *)arg0 + 0x72) = *(u16 *)((u8 *)arg0 + 0x72) | 0x1000; + if (*(s16 *)((u8 *)arg0 + 0x100) == 0) { + ((void (*)(void))func_80142C84)(); + } + *(s32 *)((u8 *)arg0 + 0xcc) = + ((s32 (*)(s32, s32))func_80143994)( + (s32)arg0, (s32)*(s16 *)(*(s32 *)((u8 *)arg0 + 0x20) + 0x18)); + func_8012AD50(arg0); +} + DEFINE_func_80142BB4() /* dedup: shared engine-core @0x80142BB4 (src/shared) */ diff --git a/src/ov_SC03_093/ov_SC03_093_jr_80140608.c b/src/ov_SC03_093/ov_SC03_093_jr_80140608.c index cc8b146dd..91517d296 100644 --- a/src/ov_SC03_093/ov_SC03_093_jr_80140608.c +++ b/src/ov_SC03_093/ov_SC03_093_jr_80140608.c @@ -1842,7 +1842,25 @@ void func_80142A80(void) } -INCLUDE_ASM("asm/ov_SC03_093/nonmatchings/ov_SC03_093_jr_80140608", func_80142B2C); +extern void func_80142C84(s32 a0); +extern void func_80143994(s32 a0, s32 a1); +extern s32 func_8012AD50(void *a0); + +void func_80142B2C(void *arg0) { + *(s32 *)((u8 *)arg0 + 0x1c) = 0x180; + *(s16 *)((u8 *)arg0 + 0x5c) = 0x100; + *(u16 *)((u8 *)arg0 + 0x100) = *(u16 *)((u8 *)arg0 + 0x70) & 0x100; + *(u16 *)((u8 *)arg0 + 0x70) = *(u16 *)((u8 *)arg0 + 0x70) & 3; + *(u16 *)((u8 *)arg0 + 0x72) = *(u16 *)((u8 *)arg0 + 0x72) | 0x1000; + if (*(s16 *)((u8 *)arg0 + 0x100) == 0) { + ((void (*)(void))func_80142C84)(); + } + *(s32 *)((u8 *)arg0 + 0xcc) = + ((s32 (*)(s32, s32))func_80143994)( + (s32)arg0, (s32)*(s16 *)(*(s32 *)((u8 *)arg0 + 0x20) + 0x18)); + func_8012AD50(arg0); +} + DEFINE_func_80142BB4() /* dedup: shared engine-core @0x80142BB4 (src/shared) */ diff --git a/src/ov_SC03_094/ov_SC03_094_jr_80140608.c b/src/ov_SC03_094/ov_SC03_094_jr_80140608.c index b3540a604..6dbde4d0d 100644 --- a/src/ov_SC03_094/ov_SC03_094_jr_80140608.c +++ b/src/ov_SC03_094/ov_SC03_094_jr_80140608.c @@ -1842,7 +1842,25 @@ void func_80142A80(void) } -INCLUDE_ASM("asm/ov_SC03_094/nonmatchings/ov_SC03_094_jr_80140608", func_80142B2C); +extern void func_80142C84(s32 a0); +extern void func_80143994(s32 a0, s32 a1); +extern s32 func_8012AD50(void *a0); + +void func_80142B2C(void *arg0) { + *(s32 *)((u8 *)arg0 + 0x1c) = 0x180; + *(s16 *)((u8 *)arg0 + 0x5c) = 0x100; + *(u16 *)((u8 *)arg0 + 0x100) = *(u16 *)((u8 *)arg0 + 0x70) & 0x100; + *(u16 *)((u8 *)arg0 + 0x70) = *(u16 *)((u8 *)arg0 + 0x70) & 3; + *(u16 *)((u8 *)arg0 + 0x72) = *(u16 *)((u8 *)arg0 + 0x72) | 0x1000; + if (*(s16 *)((u8 *)arg0 + 0x100) == 0) { + ((void (*)(void))func_80142C84)(); + } + *(s32 *)((u8 *)arg0 + 0xcc) = + ((s32 (*)(s32, s32))func_80143994)( + (s32)arg0, (s32)*(s16 *)(*(s32 *)((u8 *)arg0 + 0x20) + 0x18)); + func_8012AD50(arg0); +} + DEFINE_func_80142BB4() /* dedup: shared engine-core @0x80142BB4 (src/shared) */ diff --git a/src/ov_SC03_095/ov_SC03_095_jr_80140608.c b/src/ov_SC03_095/ov_SC03_095_jr_80140608.c index bbe2cd141..f8955c16d 100644 --- a/src/ov_SC03_095/ov_SC03_095_jr_80140608.c +++ b/src/ov_SC03_095/ov_SC03_095_jr_80140608.c @@ -1858,7 +1858,25 @@ void func_80142A80(void) } -INCLUDE_ASM("asm/ov_SC03_095/nonmatchings/ov_SC03_095_jr_80140608", func_80142B2C); +extern void func_80142C84(s32 a0); +extern void func_80143994(s32 a0, s32 a1); +extern s32 func_8012AD50(void *a0); + +void func_80142B2C(void *arg0) { + *(s32 *)((u8 *)arg0 + 0x1c) = 0x180; + *(s16 *)((u8 *)arg0 + 0x5c) = 0x100; + *(u16 *)((u8 *)arg0 + 0x100) = *(u16 *)((u8 *)arg0 + 0x70) & 0x100; + *(u16 *)((u8 *)arg0 + 0x70) = *(u16 *)((u8 *)arg0 + 0x70) & 3; + *(u16 *)((u8 *)arg0 + 0x72) = *(u16 *)((u8 *)arg0 + 0x72) | 0x1000; + if (*(s16 *)((u8 *)arg0 + 0x100) == 0) { + ((void (*)(void))func_80142C84)(); + } + *(s32 *)((u8 *)arg0 + 0xcc) = + ((s32 (*)(s32, s32))func_80143994)( + (s32)arg0, (s32)*(s16 *)(*(s32 *)((u8 *)arg0 + 0x20) + 0x18)); + func_8012AD50(arg0); +} + DEFINE_func_80142BB4() /* dedup: shared engine-core @0x80142BB4 (src/shared) */ diff --git a/src/ov_SC03_096/ov_SC03_096_jr_80140608.c b/src/ov_SC03_096/ov_SC03_096_jr_80140608.c index 947c9702a..24ed1a4b6 100644 --- a/src/ov_SC03_096/ov_SC03_096_jr_80140608.c +++ b/src/ov_SC03_096/ov_SC03_096_jr_80140608.c @@ -1842,7 +1842,25 @@ void func_80142A80(void) } -INCLUDE_ASM("asm/ov_SC03_096/nonmatchings/ov_SC03_096_jr_80140608", func_80142B2C); +extern void func_80142C84(s32 a0); +extern void func_80143994(s32 a0, s32 a1); +extern s32 func_8012AD50(void *a0); + +void func_80142B2C(void *arg0) { + *(s32 *)((u8 *)arg0 + 0x1c) = 0x180; + *(s16 *)((u8 *)arg0 + 0x5c) = 0x100; + *(u16 *)((u8 *)arg0 + 0x100) = *(u16 *)((u8 *)arg0 + 0x70) & 0x100; + *(u16 *)((u8 *)arg0 + 0x70) = *(u16 *)((u8 *)arg0 + 0x70) & 3; + *(u16 *)((u8 *)arg0 + 0x72) = *(u16 *)((u8 *)arg0 + 0x72) | 0x1000; + if (*(s16 *)((u8 *)arg0 + 0x100) == 0) { + ((void (*)(void))func_80142C84)(); + } + *(s32 *)((u8 *)arg0 + 0xcc) = + ((s32 (*)(s32, s32))func_80143994)( + (s32)arg0, (s32)*(s16 *)(*(s32 *)((u8 *)arg0 + 0x20) + 0x18)); + func_8012AD50(arg0); +} + DEFINE_func_80142BB4() /* dedup: shared engine-core @0x80142BB4 (src/shared) */ diff --git a/src/ov_SC03_097/ov_SC03_097_jr_80140608.c b/src/ov_SC03_097/ov_SC03_097_jr_80140608.c index 86b2d17c8..0428ea554 100644 --- a/src/ov_SC03_097/ov_SC03_097_jr_80140608.c +++ b/src/ov_SC03_097/ov_SC03_097_jr_80140608.c @@ -1842,7 +1842,25 @@ void func_80142A80(void) } -INCLUDE_ASM("asm/ov_SC03_097/nonmatchings/ov_SC03_097_jr_80140608", func_80142B2C); +extern void func_80142C84(s32 a0); +extern void func_80143994(s32 a0, s32 a1); +extern s32 func_8012AD50(void *a0); + +void func_80142B2C(void *arg0) { + *(s32 *)((u8 *)arg0 + 0x1c) = 0x180; + *(s16 *)((u8 *)arg0 + 0x5c) = 0x100; + *(u16 *)((u8 *)arg0 + 0x100) = *(u16 *)((u8 *)arg0 + 0x70) & 0x100; + *(u16 *)((u8 *)arg0 + 0x70) = *(u16 *)((u8 *)arg0 + 0x70) & 3; + *(u16 *)((u8 *)arg0 + 0x72) = *(u16 *)((u8 *)arg0 + 0x72) | 0x1000; + if (*(s16 *)((u8 *)arg0 + 0x100) == 0) { + ((void (*)(void))func_80142C84)(); + } + *(s32 *)((u8 *)arg0 + 0xcc) = + ((s32 (*)(s32, s32))func_80143994)( + (s32)arg0, (s32)*(s16 *)(*(s32 *)((u8 *)arg0 + 0x20) + 0x18)); + func_8012AD50(arg0); +} + DEFINE_func_80142BB4() /* dedup: shared engine-core @0x80142BB4 (src/shared) */ diff --git a/src/ov_SC03_098/ov_SC03_098_jr_80140608.c b/src/ov_SC03_098/ov_SC03_098_jr_80140608.c index 6989636a7..eb30bcad0 100644 --- a/src/ov_SC03_098/ov_SC03_098_jr_80140608.c +++ b/src/ov_SC03_098/ov_SC03_098_jr_80140608.c @@ -1842,7 +1842,25 @@ void func_80142A80(void) } -INCLUDE_ASM("asm/ov_SC03_098/nonmatchings/ov_SC03_098_jr_80140608", func_80142B2C); +extern void func_80142C84(s32 a0); +extern void func_80143994(s32 a0, s32 a1); +extern s32 func_8012AD50(void *a0); + +void func_80142B2C(void *arg0) { + *(s32 *)((u8 *)arg0 + 0x1c) = 0x180; + *(s16 *)((u8 *)arg0 + 0x5c) = 0x100; + *(u16 *)((u8 *)arg0 + 0x100) = *(u16 *)((u8 *)arg0 + 0x70) & 0x100; + *(u16 *)((u8 *)arg0 + 0x70) = *(u16 *)((u8 *)arg0 + 0x70) & 3; + *(u16 *)((u8 *)arg0 + 0x72) = *(u16 *)((u8 *)arg0 + 0x72) | 0x1000; + if (*(s16 *)((u8 *)arg0 + 0x100) == 0) { + ((void (*)(void))func_80142C84)(); + } + *(s32 *)((u8 *)arg0 + 0xcc) = + ((s32 (*)(s32, s32))func_80143994)( + (s32)arg0, (s32)*(s16 *)(*(s32 *)((u8 *)arg0 + 0x20) + 0x18)); + func_8012AD50(arg0); +} + DEFINE_func_80142BB4() /* dedup: shared engine-core @0x80142BB4 (src/shared) */ diff --git a/src/ov_SC03_099/ov_SC03_099_jr_80140608.c b/src/ov_SC03_099/ov_SC03_099_jr_80140608.c index 69030c972..b56c12d94 100644 --- a/src/ov_SC03_099/ov_SC03_099_jr_80140608.c +++ b/src/ov_SC03_099/ov_SC03_099_jr_80140608.c @@ -1842,7 +1842,25 @@ void func_80142A80(void) } -INCLUDE_ASM("asm/ov_SC03_099/nonmatchings/ov_SC03_099_jr_80140608", func_80142B2C); +extern void func_80142C84(s32 a0); +extern void func_80143994(s32 a0, s32 a1); +extern s32 func_8012AD50(void *a0); + +void func_80142B2C(void *arg0) { + *(s32 *)((u8 *)arg0 + 0x1c) = 0x180; + *(s16 *)((u8 *)arg0 + 0x5c) = 0x100; + *(u16 *)((u8 *)arg0 + 0x100) = *(u16 *)((u8 *)arg0 + 0x70) & 0x100; + *(u16 *)((u8 *)arg0 + 0x70) = *(u16 *)((u8 *)arg0 + 0x70) & 3; + *(u16 *)((u8 *)arg0 + 0x72) = *(u16 *)((u8 *)arg0 + 0x72) | 0x1000; + if (*(s16 *)((u8 *)arg0 + 0x100) == 0) { + ((void (*)(void))func_80142C84)(); + } + *(s32 *)((u8 *)arg0 + 0xcc) = + ((s32 (*)(s32, s32))func_80143994)( + (s32)arg0, (s32)*(s16 *)(*(s32 *)((u8 *)arg0 + 0x20) + 0x18)); + func_8012AD50(arg0); +} + DEFINE_func_80142BB4() /* dedup: shared engine-core @0x80142BB4 (src/shared) */ diff --git a/src/ov_SC03_100/ov_SC03_100_jr_80140608.c b/src/ov_SC03_100/ov_SC03_100_jr_80140608.c index 5827ecbbb..343423ca3 100644 --- a/src/ov_SC03_100/ov_SC03_100_jr_80140608.c +++ b/src/ov_SC03_100/ov_SC03_100_jr_80140608.c @@ -1842,7 +1842,25 @@ void func_80142A80(void) } -INCLUDE_ASM("asm/ov_SC03_100/nonmatchings/ov_SC03_100_jr_80140608", func_80142B2C); +extern void func_80142C84(s32 a0); +extern void func_80143994(s32 a0, s32 a1); +extern s32 func_8012AD50(void *a0); + +void func_80142B2C(void *arg0) { + *(s32 *)((u8 *)arg0 + 0x1c) = 0x180; + *(s16 *)((u8 *)arg0 + 0x5c) = 0x100; + *(u16 *)((u8 *)arg0 + 0x100) = *(u16 *)((u8 *)arg0 + 0x70) & 0x100; + *(u16 *)((u8 *)arg0 + 0x70) = *(u16 *)((u8 *)arg0 + 0x70) & 3; + *(u16 *)((u8 *)arg0 + 0x72) = *(u16 *)((u8 *)arg0 + 0x72) | 0x1000; + if (*(s16 *)((u8 *)arg0 + 0x100) == 0) { + ((void (*)(void))func_80142C84)(); + } + *(s32 *)((u8 *)arg0 + 0xcc) = + ((s32 (*)(s32, s32))func_80143994)( + (s32)arg0, (s32)*(s16 *)(*(s32 *)((u8 *)arg0 + 0x20) + 0x18)); + func_8012AD50(arg0); +} + DEFINE_func_80142BB4() /* dedup: shared engine-core @0x80142BB4 (src/shared) */ diff --git a/src/ov_SC03_101/ov_SC03_101_jr_80140608.c b/src/ov_SC03_101/ov_SC03_101_jr_80140608.c index fbd4644a3..33ae76378 100644 --- a/src/ov_SC03_101/ov_SC03_101_jr_80140608.c +++ b/src/ov_SC03_101/ov_SC03_101_jr_80140608.c @@ -1842,7 +1842,25 @@ void func_80142A80(void) } -INCLUDE_ASM("asm/ov_SC03_101/nonmatchings/ov_SC03_101_jr_80140608", func_80142B2C); +extern void func_80142C84(s32 a0); +extern void func_80143994(s32 a0, s32 a1); +extern s32 func_8012AD50(void *a0); + +void func_80142B2C(void *arg0) { + *(s32 *)((u8 *)arg0 + 0x1c) = 0x180; + *(s16 *)((u8 *)arg0 + 0x5c) = 0x100; + *(u16 *)((u8 *)arg0 + 0x100) = *(u16 *)((u8 *)arg0 + 0x70) & 0x100; + *(u16 *)((u8 *)arg0 + 0x70) = *(u16 *)((u8 *)arg0 + 0x70) & 3; + *(u16 *)((u8 *)arg0 + 0x72) = *(u16 *)((u8 *)arg0 + 0x72) | 0x1000; + if (*(s16 *)((u8 *)arg0 + 0x100) == 0) { + ((void (*)(void))func_80142C84)(); + } + *(s32 *)((u8 *)arg0 + 0xcc) = + ((s32 (*)(s32, s32))func_80143994)( + (s32)arg0, (s32)*(s16 *)(*(s32 *)((u8 *)arg0 + 0x20) + 0x18)); + func_8012AD50(arg0); +} + DEFINE_func_80142BB4() /* dedup: shared engine-core @0x80142BB4 (src/shared) */ diff --git a/src/ov_SC03_102/ov_SC03_102_jr_80140608.c b/src/ov_SC03_102/ov_SC03_102_jr_80140608.c index c857580eb..6e684d7a9 100644 --- a/src/ov_SC03_102/ov_SC03_102_jr_80140608.c +++ b/src/ov_SC03_102/ov_SC03_102_jr_80140608.c @@ -1842,7 +1842,25 @@ void func_80142A80(void) } -INCLUDE_ASM("asm/ov_SC03_102/nonmatchings/ov_SC03_102_jr_80140608", func_80142B2C); +extern void func_80142C84(s32 a0); +extern void func_80143994(s32 a0, s32 a1); +extern s32 func_8012AD50(void *a0); + +void func_80142B2C(void *arg0) { + *(s32 *)((u8 *)arg0 + 0x1c) = 0x180; + *(s16 *)((u8 *)arg0 + 0x5c) = 0x100; + *(u16 *)((u8 *)arg0 + 0x100) = *(u16 *)((u8 *)arg0 + 0x70) & 0x100; + *(u16 *)((u8 *)arg0 + 0x70) = *(u16 *)((u8 *)arg0 + 0x70) & 3; + *(u16 *)((u8 *)arg0 + 0x72) = *(u16 *)((u8 *)arg0 + 0x72) | 0x1000; + if (*(s16 *)((u8 *)arg0 + 0x100) == 0) { + ((void (*)(void))func_80142C84)(); + } + *(s32 *)((u8 *)arg0 + 0xcc) = + ((s32 (*)(s32, s32))func_80143994)( + (s32)arg0, (s32)*(s16 *)(*(s32 *)((u8 *)arg0 + 0x20) + 0x18)); + func_8012AD50(arg0); +} + DEFINE_func_80142BB4() /* dedup: shared engine-core @0x80142BB4 (src/shared) */ diff --git a/src/ov_SC03_103/ov_SC03_103_jr_80140608.c b/src/ov_SC03_103/ov_SC03_103_jr_80140608.c index 5faf19cd6..0069d3f97 100644 --- a/src/ov_SC03_103/ov_SC03_103_jr_80140608.c +++ b/src/ov_SC03_103/ov_SC03_103_jr_80140608.c @@ -1876,7 +1876,25 @@ void func_80142A80(void) } -INCLUDE_ASM("asm/ov_SC03_103/nonmatchings/ov_SC03_103_jr_80140608", func_80142B2C); +extern void func_80142C84(s32 a0); +extern void func_80143994(s32 a0, s32 a1); +extern s32 func_8012AD50(void *a0); + +void func_80142B2C(void *arg0) { + *(s32 *)((u8 *)arg0 + 0x1c) = 0x180; + *(s16 *)((u8 *)arg0 + 0x5c) = 0x100; + *(u16 *)((u8 *)arg0 + 0x100) = *(u16 *)((u8 *)arg0 + 0x70) & 0x100; + *(u16 *)((u8 *)arg0 + 0x70) = *(u16 *)((u8 *)arg0 + 0x70) & 3; + *(u16 *)((u8 *)arg0 + 0x72) = *(u16 *)((u8 *)arg0 + 0x72) | 0x1000; + if (*(s16 *)((u8 *)arg0 + 0x100) == 0) { + ((void (*)(void))func_80142C84)(); + } + *(s32 *)((u8 *)arg0 + 0xcc) = + ((s32 (*)(s32, s32))func_80143994)( + (s32)arg0, (s32)*(s16 *)(*(s32 *)((u8 *)arg0 + 0x20) + 0x18)); + func_8012AD50(arg0); +} + DEFINE_func_80142BB4() /* dedup: shared engine-core @0x80142BB4 (src/shared) */ diff --git a/src/ov_SC03_104/ov_SC03_104_jr_80140608.c b/src/ov_SC03_104/ov_SC03_104_jr_80140608.c index 9fb2802a1..4ba2731a1 100644 --- a/src/ov_SC03_104/ov_SC03_104_jr_80140608.c +++ b/src/ov_SC03_104/ov_SC03_104_jr_80140608.c @@ -1842,7 +1842,25 @@ void func_80142A80(void) } -INCLUDE_ASM("asm/ov_SC03_104/nonmatchings/ov_SC03_104_jr_80140608", func_80142B2C); +extern void func_80142C84(s32 a0); +extern void func_80143994(s32 a0, s32 a1); +extern s32 func_8012AD50(void *a0); + +void func_80142B2C(void *arg0) { + *(s32 *)((u8 *)arg0 + 0x1c) = 0x180; + *(s16 *)((u8 *)arg0 + 0x5c) = 0x100; + *(u16 *)((u8 *)arg0 + 0x100) = *(u16 *)((u8 *)arg0 + 0x70) & 0x100; + *(u16 *)((u8 *)arg0 + 0x70) = *(u16 *)((u8 *)arg0 + 0x70) & 3; + *(u16 *)((u8 *)arg0 + 0x72) = *(u16 *)((u8 *)arg0 + 0x72) | 0x1000; + if (*(s16 *)((u8 *)arg0 + 0x100) == 0) { + ((void (*)(void))func_80142C84)(); + } + *(s32 *)((u8 *)arg0 + 0xcc) = + ((s32 (*)(s32, s32))func_80143994)( + (s32)arg0, (s32)*(s16 *)(*(s32 *)((u8 *)arg0 + 0x20) + 0x18)); + func_8012AD50(arg0); +} + DEFINE_func_80142BB4() /* dedup: shared engine-core @0x80142BB4 (src/shared) */ diff --git a/src/ov_SC03_105/ov_SC03_105_jr_80140608.c b/src/ov_SC03_105/ov_SC03_105_jr_80140608.c index c6f6392c2..c92c40ab7 100644 --- a/src/ov_SC03_105/ov_SC03_105_jr_80140608.c +++ b/src/ov_SC03_105/ov_SC03_105_jr_80140608.c @@ -1842,7 +1842,25 @@ void func_80142A80(void) } -INCLUDE_ASM("asm/ov_SC03_105/nonmatchings/ov_SC03_105_jr_80140608", func_80142B2C); +extern void func_80142C84(s32 a0); +extern void func_80143994(s32 a0, s32 a1); +extern s32 func_8012AD50(void *a0); + +void func_80142B2C(void *arg0) { + *(s32 *)((u8 *)arg0 + 0x1c) = 0x180; + *(s16 *)((u8 *)arg0 + 0x5c) = 0x100; + *(u16 *)((u8 *)arg0 + 0x100) = *(u16 *)((u8 *)arg0 + 0x70) & 0x100; + *(u16 *)((u8 *)arg0 + 0x70) = *(u16 *)((u8 *)arg0 + 0x70) & 3; + *(u16 *)((u8 *)arg0 + 0x72) = *(u16 *)((u8 *)arg0 + 0x72) | 0x1000; + if (*(s16 *)((u8 *)arg0 + 0x100) == 0) { + ((void (*)(void))func_80142C84)(); + } + *(s32 *)((u8 *)arg0 + 0xcc) = + ((s32 (*)(s32, s32))func_80143994)( + (s32)arg0, (s32)*(s16 *)(*(s32 *)((u8 *)arg0 + 0x20) + 0x18)); + func_8012AD50(arg0); +} + DEFINE_func_80142BB4() /* dedup: shared engine-core @0x80142BB4 (src/shared) */ diff --git a/src/ov_SC03_108/ov_SC03_108_jr_80140608.c b/src/ov_SC03_108/ov_SC03_108_jr_80140608.c index 755122840..782ab5ccd 100644 --- a/src/ov_SC03_108/ov_SC03_108_jr_80140608.c +++ b/src/ov_SC03_108/ov_SC03_108_jr_80140608.c @@ -1842,7 +1842,25 @@ void func_80142A80(void) } -INCLUDE_ASM("asm/ov_SC03_108/nonmatchings/ov_SC03_108_jr_80140608", func_80142B2C); +extern void func_80142C84(s32 a0); +extern void func_80143994(s32 a0, s32 a1); +extern s32 func_8012AD50(void *a0); + +void func_80142B2C(void *arg0) { + *(s32 *)((u8 *)arg0 + 0x1c) = 0x180; + *(s16 *)((u8 *)arg0 + 0x5c) = 0x100; + *(u16 *)((u8 *)arg0 + 0x100) = *(u16 *)((u8 *)arg0 + 0x70) & 0x100; + *(u16 *)((u8 *)arg0 + 0x70) = *(u16 *)((u8 *)arg0 + 0x70) & 3; + *(u16 *)((u8 *)arg0 + 0x72) = *(u16 *)((u8 *)arg0 + 0x72) | 0x1000; + if (*(s16 *)((u8 *)arg0 + 0x100) == 0) { + ((void (*)(void))func_80142C84)(); + } + *(s32 *)((u8 *)arg0 + 0xcc) = + ((s32 (*)(s32, s32))func_80143994)( + (s32)arg0, (s32)*(s16 *)(*(s32 *)((u8 *)arg0 + 0x20) + 0x18)); + func_8012AD50(arg0); +} + DEFINE_func_80142BB4() /* dedup: shared engine-core @0x80142BB4 (src/shared) */ diff --git a/src/ov_SC03_109/ov_SC03_109_jr_80140608.c b/src/ov_SC03_109/ov_SC03_109_jr_80140608.c index 2bf221db7..0eb44d86d 100644 --- a/src/ov_SC03_109/ov_SC03_109_jr_80140608.c +++ b/src/ov_SC03_109/ov_SC03_109_jr_80140608.c @@ -1842,7 +1842,25 @@ void func_80142A80(void) } -INCLUDE_ASM("asm/ov_SC03_109/nonmatchings/ov_SC03_109_jr_80140608", func_80142B2C); +extern void func_80142C84(s32 a0); +extern void func_80143994(s32 a0, s32 a1); +extern s32 func_8012AD50(void *a0); + +void func_80142B2C(void *arg0) { + *(s32 *)((u8 *)arg0 + 0x1c) = 0x180; + *(s16 *)((u8 *)arg0 + 0x5c) = 0x100; + *(u16 *)((u8 *)arg0 + 0x100) = *(u16 *)((u8 *)arg0 + 0x70) & 0x100; + *(u16 *)((u8 *)arg0 + 0x70) = *(u16 *)((u8 *)arg0 + 0x70) & 3; + *(u16 *)((u8 *)arg0 + 0x72) = *(u16 *)((u8 *)arg0 + 0x72) | 0x1000; + if (*(s16 *)((u8 *)arg0 + 0x100) == 0) { + ((void (*)(void))func_80142C84)(); + } + *(s32 *)((u8 *)arg0 + 0xcc) = + ((s32 (*)(s32, s32))func_80143994)( + (s32)arg0, (s32)*(s16 *)(*(s32 *)((u8 *)arg0 + 0x20) + 0x18)); + func_8012AD50(arg0); +} + DEFINE_func_80142BB4() /* dedup: shared engine-core @0x80142BB4 (src/shared) */ diff --git a/src/ov_SC03_110/ov_SC03_110_jr_80140608.c b/src/ov_SC03_110/ov_SC03_110_jr_80140608.c index 057a73694..f28df0470 100644 --- a/src/ov_SC03_110/ov_SC03_110_jr_80140608.c +++ b/src/ov_SC03_110/ov_SC03_110_jr_80140608.c @@ -1842,7 +1842,25 @@ void func_80142A80(void) } -INCLUDE_ASM("asm/ov_SC03_110/nonmatchings/ov_SC03_110_jr_80140608", func_80142B2C); +extern void func_80142C84(s32 a0); +extern void func_80143994(s32 a0, s32 a1); +extern s32 func_8012AD50(void *a0); + +void func_80142B2C(void *arg0) { + *(s32 *)((u8 *)arg0 + 0x1c) = 0x180; + *(s16 *)((u8 *)arg0 + 0x5c) = 0x100; + *(u16 *)((u8 *)arg0 + 0x100) = *(u16 *)((u8 *)arg0 + 0x70) & 0x100; + *(u16 *)((u8 *)arg0 + 0x70) = *(u16 *)((u8 *)arg0 + 0x70) & 3; + *(u16 *)((u8 *)arg0 + 0x72) = *(u16 *)((u8 *)arg0 + 0x72) | 0x1000; + if (*(s16 *)((u8 *)arg0 + 0x100) == 0) { + ((void (*)(void))func_80142C84)(); + } + *(s32 *)((u8 *)arg0 + 0xcc) = + ((s32 (*)(s32, s32))func_80143994)( + (s32)arg0, (s32)*(s16 *)(*(s32 *)((u8 *)arg0 + 0x20) + 0x18)); + func_8012AD50(arg0); +} + DEFINE_func_80142BB4() /* dedup: shared engine-core @0x80142BB4 (src/shared) */ diff --git a/src/ov_SC03_111/ov_SC03_111_jr_80140608.c b/src/ov_SC03_111/ov_SC03_111_jr_80140608.c index 5d158bdfd..d1284fb75 100644 --- a/src/ov_SC03_111/ov_SC03_111_jr_80140608.c +++ b/src/ov_SC03_111/ov_SC03_111_jr_80140608.c @@ -1842,7 +1842,25 @@ void func_80142A80(void) } -INCLUDE_ASM("asm/ov_SC03_111/nonmatchings/ov_SC03_111_jr_80140608", func_80142B2C); +extern void func_80142C84(s32 a0); +extern void func_80143994(s32 a0, s32 a1); +extern s32 func_8012AD50(void *a0); + +void func_80142B2C(void *arg0) { + *(s32 *)((u8 *)arg0 + 0x1c) = 0x180; + *(s16 *)((u8 *)arg0 + 0x5c) = 0x100; + *(u16 *)((u8 *)arg0 + 0x100) = *(u16 *)((u8 *)arg0 + 0x70) & 0x100; + *(u16 *)((u8 *)arg0 + 0x70) = *(u16 *)((u8 *)arg0 + 0x70) & 3; + *(u16 *)((u8 *)arg0 + 0x72) = *(u16 *)((u8 *)arg0 + 0x72) | 0x1000; + if (*(s16 *)((u8 *)arg0 + 0x100) == 0) { + ((void (*)(void))func_80142C84)(); + } + *(s32 *)((u8 *)arg0 + 0xcc) = + ((s32 (*)(s32, s32))func_80143994)( + (s32)arg0, (s32)*(s16 *)(*(s32 *)((u8 *)arg0 + 0x20) + 0x18)); + func_8012AD50(arg0); +} + DEFINE_func_80142BB4() /* dedup: shared engine-core @0x80142BB4 (src/shared) */ diff --git a/src/ov_SC03_112/ov_SC03_112_jr_80140608.c b/src/ov_SC03_112/ov_SC03_112_jr_80140608.c index 46e6a4d60..612e200be 100644 --- a/src/ov_SC03_112/ov_SC03_112_jr_80140608.c +++ b/src/ov_SC03_112/ov_SC03_112_jr_80140608.c @@ -1842,7 +1842,25 @@ void func_80142A80(void) } -INCLUDE_ASM("asm/ov_SC03_112/nonmatchings/ov_SC03_112_jr_80140608", func_80142B2C); +extern void func_80142C84(s32 a0); +extern void func_80143994(s32 a0, s32 a1); +extern s32 func_8012AD50(void *a0); + +void func_80142B2C(void *arg0) { + *(s32 *)((u8 *)arg0 + 0x1c) = 0x180; + *(s16 *)((u8 *)arg0 + 0x5c) = 0x100; + *(u16 *)((u8 *)arg0 + 0x100) = *(u16 *)((u8 *)arg0 + 0x70) & 0x100; + *(u16 *)((u8 *)arg0 + 0x70) = *(u16 *)((u8 *)arg0 + 0x70) & 3; + *(u16 *)((u8 *)arg0 + 0x72) = *(u16 *)((u8 *)arg0 + 0x72) | 0x1000; + if (*(s16 *)((u8 *)arg0 + 0x100) == 0) { + ((void (*)(void))func_80142C84)(); + } + *(s32 *)((u8 *)arg0 + 0xcc) = + ((s32 (*)(s32, s32))func_80143994)( + (s32)arg0, (s32)*(s16 *)(*(s32 *)((u8 *)arg0 + 0x20) + 0x18)); + func_8012AD50(arg0); +} + DEFINE_func_80142BB4() /* dedup: shared engine-core @0x80142BB4 (src/shared) */ diff --git a/src/ov_SC03_113/ov_SC03_113_jr_80140608.c b/src/ov_SC03_113/ov_SC03_113_jr_80140608.c index ebe424647..e93e857f4 100644 --- a/src/ov_SC03_113/ov_SC03_113_jr_80140608.c +++ b/src/ov_SC03_113/ov_SC03_113_jr_80140608.c @@ -1842,7 +1842,25 @@ void func_80142A80(void) } -INCLUDE_ASM("asm/ov_SC03_113/nonmatchings/ov_SC03_113_jr_80140608", func_80142B2C); +extern void func_80142C84(s32 a0); +extern void func_80143994(s32 a0, s32 a1); +extern s32 func_8012AD50(void *a0); + +void func_80142B2C(void *arg0) { + *(s32 *)((u8 *)arg0 + 0x1c) = 0x180; + *(s16 *)((u8 *)arg0 + 0x5c) = 0x100; + *(u16 *)((u8 *)arg0 + 0x100) = *(u16 *)((u8 *)arg0 + 0x70) & 0x100; + *(u16 *)((u8 *)arg0 + 0x70) = *(u16 *)((u8 *)arg0 + 0x70) & 3; + *(u16 *)((u8 *)arg0 + 0x72) = *(u16 *)((u8 *)arg0 + 0x72) | 0x1000; + if (*(s16 *)((u8 *)arg0 + 0x100) == 0) { + ((void (*)(void))func_80142C84)(); + } + *(s32 *)((u8 *)arg0 + 0xcc) = + ((s32 (*)(s32, s32))func_80143994)( + (s32)arg0, (s32)*(s16 *)(*(s32 *)((u8 *)arg0 + 0x20) + 0x18)); + func_8012AD50(arg0); +} + DEFINE_func_80142BB4() /* dedup: shared engine-core @0x80142BB4 (src/shared) */ diff --git a/src/ov_SC03_114/ov_SC03_114_jr_80140608.c b/src/ov_SC03_114/ov_SC03_114_jr_80140608.c index ebe937539..f7bbcc2b0 100644 --- a/src/ov_SC03_114/ov_SC03_114_jr_80140608.c +++ b/src/ov_SC03_114/ov_SC03_114_jr_80140608.c @@ -1842,7 +1842,25 @@ void func_80142A80(void) } -INCLUDE_ASM("asm/ov_SC03_114/nonmatchings/ov_SC03_114_jr_80140608", func_80142B2C); +extern void func_80142C84(s32 a0); +extern void func_80143994(s32 a0, s32 a1); +extern s32 func_8012AD50(void *a0); + +void func_80142B2C(void *arg0) { + *(s32 *)((u8 *)arg0 + 0x1c) = 0x180; + *(s16 *)((u8 *)arg0 + 0x5c) = 0x100; + *(u16 *)((u8 *)arg0 + 0x100) = *(u16 *)((u8 *)arg0 + 0x70) & 0x100; + *(u16 *)((u8 *)arg0 + 0x70) = *(u16 *)((u8 *)arg0 + 0x70) & 3; + *(u16 *)((u8 *)arg0 + 0x72) = *(u16 *)((u8 *)arg0 + 0x72) | 0x1000; + if (*(s16 *)((u8 *)arg0 + 0x100) == 0) { + ((void (*)(void))func_80142C84)(); + } + *(s32 *)((u8 *)arg0 + 0xcc) = + ((s32 (*)(s32, s32))func_80143994)( + (s32)arg0, (s32)*(s16 *)(*(s32 *)((u8 *)arg0 + 0x20) + 0x18)); + func_8012AD50(arg0); +} + DEFINE_func_80142BB4() /* dedup: shared engine-core @0x80142BB4 (src/shared) */ diff --git a/src/ov_SC03_115/ov_SC03_115_jr_80140608.c b/src/ov_SC03_115/ov_SC03_115_jr_80140608.c index 2767994c7..3102a3615 100644 --- a/src/ov_SC03_115/ov_SC03_115_jr_80140608.c +++ b/src/ov_SC03_115/ov_SC03_115_jr_80140608.c @@ -1842,7 +1842,25 @@ void func_80142A80(void) } -INCLUDE_ASM("asm/ov_SC03_115/nonmatchings/ov_SC03_115_jr_80140608", func_80142B2C); +extern void func_80142C84(s32 a0); +extern void func_80143994(s32 a0, s32 a1); +extern s32 func_8012AD50(void *a0); + +void func_80142B2C(void *arg0) { + *(s32 *)((u8 *)arg0 + 0x1c) = 0x180; + *(s16 *)((u8 *)arg0 + 0x5c) = 0x100; + *(u16 *)((u8 *)arg0 + 0x100) = *(u16 *)((u8 *)arg0 + 0x70) & 0x100; + *(u16 *)((u8 *)arg0 + 0x70) = *(u16 *)((u8 *)arg0 + 0x70) & 3; + *(u16 *)((u8 *)arg0 + 0x72) = *(u16 *)((u8 *)arg0 + 0x72) | 0x1000; + if (*(s16 *)((u8 *)arg0 + 0x100) == 0) { + ((void (*)(void))func_80142C84)(); + } + *(s32 *)((u8 *)arg0 + 0xcc) = + ((s32 (*)(s32, s32))func_80143994)( + (s32)arg0, (s32)*(s16 *)(*(s32 *)((u8 *)arg0 + 0x20) + 0x18)); + func_8012AD50(arg0); +} + DEFINE_func_80142BB4() /* dedup: shared engine-core @0x80142BB4 (src/shared) */ diff --git a/src/ov_SC03_116/ov_SC03_116_jr_80140608.c b/src/ov_SC03_116/ov_SC03_116_jr_80140608.c index 0b174f177..96aa40651 100644 --- a/src/ov_SC03_116/ov_SC03_116_jr_80140608.c +++ b/src/ov_SC03_116/ov_SC03_116_jr_80140608.c @@ -1842,7 +1842,25 @@ void func_80142A80(void) } -INCLUDE_ASM("asm/ov_SC03_116/nonmatchings/ov_SC03_116_jr_80140608", func_80142B2C); +extern void func_80142C84(s32 a0); +extern void func_80143994(s32 a0, s32 a1); +extern s32 func_8012AD50(void *a0); + +void func_80142B2C(void *arg0) { + *(s32 *)((u8 *)arg0 + 0x1c) = 0x180; + *(s16 *)((u8 *)arg0 + 0x5c) = 0x100; + *(u16 *)((u8 *)arg0 + 0x100) = *(u16 *)((u8 *)arg0 + 0x70) & 0x100; + *(u16 *)((u8 *)arg0 + 0x70) = *(u16 *)((u8 *)arg0 + 0x70) & 3; + *(u16 *)((u8 *)arg0 + 0x72) = *(u16 *)((u8 *)arg0 + 0x72) | 0x1000; + if (*(s16 *)((u8 *)arg0 + 0x100) == 0) { + ((void (*)(void))func_80142C84)(); + } + *(s32 *)((u8 *)arg0 + 0xcc) = + ((s32 (*)(s32, s32))func_80143994)( + (s32)arg0, (s32)*(s16 *)(*(s32 *)((u8 *)arg0 + 0x20) + 0x18)); + func_8012AD50(arg0); +} + DEFINE_func_80142BB4() /* dedup: shared engine-core @0x80142BB4 (src/shared) */ diff --git a/src/ov_SC03_117/ov_SC03_117_jr_80140608.c b/src/ov_SC03_117/ov_SC03_117_jr_80140608.c index e18f18c41..f60f37c11 100644 --- a/src/ov_SC03_117/ov_SC03_117_jr_80140608.c +++ b/src/ov_SC03_117/ov_SC03_117_jr_80140608.c @@ -1842,7 +1842,25 @@ void func_80142A80(void) } -INCLUDE_ASM("asm/ov_SC03_117/nonmatchings/ov_SC03_117_jr_80140608", func_80142B2C); +extern void func_80142C84(s32 a0); +extern void func_80143994(s32 a0, s32 a1); +extern s32 func_8012AD50(void *a0); + +void func_80142B2C(void *arg0) { + *(s32 *)((u8 *)arg0 + 0x1c) = 0x180; + *(s16 *)((u8 *)arg0 + 0x5c) = 0x100; + *(u16 *)((u8 *)arg0 + 0x100) = *(u16 *)((u8 *)arg0 + 0x70) & 0x100; + *(u16 *)((u8 *)arg0 + 0x70) = *(u16 *)((u8 *)arg0 + 0x70) & 3; + *(u16 *)((u8 *)arg0 + 0x72) = *(u16 *)((u8 *)arg0 + 0x72) | 0x1000; + if (*(s16 *)((u8 *)arg0 + 0x100) == 0) { + ((void (*)(void))func_80142C84)(); + } + *(s32 *)((u8 *)arg0 + 0xcc) = + ((s32 (*)(s32, s32))func_80143994)( + (s32)arg0, (s32)*(s16 *)(*(s32 *)((u8 *)arg0 + 0x20) + 0x18)); + func_8012AD50(arg0); +} + DEFINE_func_80142BB4() /* dedup: shared engine-core @0x80142BB4 (src/shared) */ diff --git a/src/ov_SC03_118/ov_SC03_118_jr_80140608.c b/src/ov_SC03_118/ov_SC03_118_jr_80140608.c index 8ec332d81..e301d9f20 100644 --- a/src/ov_SC03_118/ov_SC03_118_jr_80140608.c +++ b/src/ov_SC03_118/ov_SC03_118_jr_80140608.c @@ -1842,7 +1842,25 @@ void func_80142A80(void) } -INCLUDE_ASM("asm/ov_SC03_118/nonmatchings/ov_SC03_118_jr_80140608", func_80142B2C); +extern void func_80142C84(s32 a0); +extern void func_80143994(s32 a0, s32 a1); +extern s32 func_8012AD50(void *a0); + +void func_80142B2C(void *arg0) { + *(s32 *)((u8 *)arg0 + 0x1c) = 0x180; + *(s16 *)((u8 *)arg0 + 0x5c) = 0x100; + *(u16 *)((u8 *)arg0 + 0x100) = *(u16 *)((u8 *)arg0 + 0x70) & 0x100; + *(u16 *)((u8 *)arg0 + 0x70) = *(u16 *)((u8 *)arg0 + 0x70) & 3; + *(u16 *)((u8 *)arg0 + 0x72) = *(u16 *)((u8 *)arg0 + 0x72) | 0x1000; + if (*(s16 *)((u8 *)arg0 + 0x100) == 0) { + ((void (*)(void))func_80142C84)(); + } + *(s32 *)((u8 *)arg0 + 0xcc) = + ((s32 (*)(s32, s32))func_80143994)( + (s32)arg0, (s32)*(s16 *)(*(s32 *)((u8 *)arg0 + 0x20) + 0x18)); + func_8012AD50(arg0); +} + DEFINE_func_80142BB4() /* dedup: shared engine-core @0x80142BB4 (src/shared) */ diff --git a/src/ov_SC03_119/ov_SC03_119_jr_80140608.c b/src/ov_SC03_119/ov_SC03_119_jr_80140608.c index 5b855ac66..388ebbfa1 100644 --- a/src/ov_SC03_119/ov_SC03_119_jr_80140608.c +++ b/src/ov_SC03_119/ov_SC03_119_jr_80140608.c @@ -1858,7 +1858,25 @@ void func_80142A80(void) } -INCLUDE_ASM("asm/ov_SC03_119/nonmatchings/ov_SC03_119_jr_80140608", func_80142B2C); +extern void func_80142C84(s32 a0); +extern void func_80143994(s32 a0, s32 a1); +extern s32 func_8012AD50(void *a0); + +void func_80142B2C(void *arg0) { + *(s32 *)((u8 *)arg0 + 0x1c) = 0x180; + *(s16 *)((u8 *)arg0 + 0x5c) = 0x100; + *(u16 *)((u8 *)arg0 + 0x100) = *(u16 *)((u8 *)arg0 + 0x70) & 0x100; + *(u16 *)((u8 *)arg0 + 0x70) = *(u16 *)((u8 *)arg0 + 0x70) & 3; + *(u16 *)((u8 *)arg0 + 0x72) = *(u16 *)((u8 *)arg0 + 0x72) | 0x1000; + if (*(s16 *)((u8 *)arg0 + 0x100) == 0) { + ((void (*)(void))func_80142C84)(); + } + *(s32 *)((u8 *)arg0 + 0xcc) = + ((s32 (*)(s32, s32))func_80143994)( + (s32)arg0, (s32)*(s16 *)(*(s32 *)((u8 *)arg0 + 0x20) + 0x18)); + func_8012AD50(arg0); +} + DEFINE_func_80142BB4() /* dedup: shared engine-core @0x80142BB4 (src/shared) */ diff --git a/src/ov_SC03_121/ov_SC03_121_jr_80140608.c b/src/ov_SC03_121/ov_SC03_121_jr_80140608.c index 20c787454..1559daf51 100644 --- a/src/ov_SC03_121/ov_SC03_121_jr_80140608.c +++ b/src/ov_SC03_121/ov_SC03_121_jr_80140608.c @@ -1842,7 +1842,25 @@ void func_80142A80(void) } -INCLUDE_ASM("asm/ov_SC03_121/nonmatchings/ov_SC03_121_jr_80140608", func_80142B2C); +extern void func_80142C84(s32 a0); +extern void func_80143994(s32 a0, s32 a1); +extern s32 func_8012AD50(void *a0); + +void func_80142B2C(void *arg0) { + *(s32 *)((u8 *)arg0 + 0x1c) = 0x180; + *(s16 *)((u8 *)arg0 + 0x5c) = 0x100; + *(u16 *)((u8 *)arg0 + 0x100) = *(u16 *)((u8 *)arg0 + 0x70) & 0x100; + *(u16 *)((u8 *)arg0 + 0x70) = *(u16 *)((u8 *)arg0 + 0x70) & 3; + *(u16 *)((u8 *)arg0 + 0x72) = *(u16 *)((u8 *)arg0 + 0x72) | 0x1000; + if (*(s16 *)((u8 *)arg0 + 0x100) == 0) { + ((void (*)(void))func_80142C84)(); + } + *(s32 *)((u8 *)arg0 + 0xcc) = + ((s32 (*)(s32, s32))func_80143994)( + (s32)arg0, (s32)*(s16 *)(*(s32 *)((u8 *)arg0 + 0x20) + 0x18)); + func_8012AD50(arg0); +} + DEFINE_func_80142BB4() /* dedup: shared engine-core @0x80142BB4 (src/shared) */ diff --git a/src/ov_SC03_124/ov_SC03_124_jr_80140608.c b/src/ov_SC03_124/ov_SC03_124_jr_80140608.c index e11bd24ef..0256b989a 100644 --- a/src/ov_SC03_124/ov_SC03_124_jr_80140608.c +++ b/src/ov_SC03_124/ov_SC03_124_jr_80140608.c @@ -1842,7 +1842,25 @@ void func_80142A80(void) } -INCLUDE_ASM("asm/ov_SC03_124/nonmatchings/ov_SC03_124_jr_80140608", func_80142B2C); +extern void func_80142C84(s32 a0); +extern void func_80143994(s32 a0, s32 a1); +extern s32 func_8012AD50(void *a0); + +void func_80142B2C(void *arg0) { + *(s32 *)((u8 *)arg0 + 0x1c) = 0x180; + *(s16 *)((u8 *)arg0 + 0x5c) = 0x100; + *(u16 *)((u8 *)arg0 + 0x100) = *(u16 *)((u8 *)arg0 + 0x70) & 0x100; + *(u16 *)((u8 *)arg0 + 0x70) = *(u16 *)((u8 *)arg0 + 0x70) & 3; + *(u16 *)((u8 *)arg0 + 0x72) = *(u16 *)((u8 *)arg0 + 0x72) | 0x1000; + if (*(s16 *)((u8 *)arg0 + 0x100) == 0) { + ((void (*)(void))func_80142C84)(); + } + *(s32 *)((u8 *)arg0 + 0xcc) = + ((s32 (*)(s32, s32))func_80143994)( + (s32)arg0, (s32)*(s16 *)(*(s32 *)((u8 *)arg0 + 0x20) + 0x18)); + func_8012AD50(arg0); +} + DEFINE_func_80142BB4() /* dedup: shared engine-core @0x80142BB4 (src/shared) */ diff --git a/src/ov_SC03_125/ov_SC03_125_jr_80140608.c b/src/ov_SC03_125/ov_SC03_125_jr_80140608.c index 5f4e7f380..249b71ed4 100644 --- a/src/ov_SC03_125/ov_SC03_125_jr_80140608.c +++ b/src/ov_SC03_125/ov_SC03_125_jr_80140608.c @@ -1842,7 +1842,25 @@ void func_80142A80(void) } -INCLUDE_ASM("asm/ov_SC03_125/nonmatchings/ov_SC03_125_jr_80140608", func_80142B2C); +extern void func_80142C84(s32 a0); +extern void func_80143994(s32 a0, s32 a1); +extern s32 func_8012AD50(void *a0); + +void func_80142B2C(void *arg0) { + *(s32 *)((u8 *)arg0 + 0x1c) = 0x180; + *(s16 *)((u8 *)arg0 + 0x5c) = 0x100; + *(u16 *)((u8 *)arg0 + 0x100) = *(u16 *)((u8 *)arg0 + 0x70) & 0x100; + *(u16 *)((u8 *)arg0 + 0x70) = *(u16 *)((u8 *)arg0 + 0x70) & 3; + *(u16 *)((u8 *)arg0 + 0x72) = *(u16 *)((u8 *)arg0 + 0x72) | 0x1000; + if (*(s16 *)((u8 *)arg0 + 0x100) == 0) { + ((void (*)(void))func_80142C84)(); + } + *(s32 *)((u8 *)arg0 + 0xcc) = + ((s32 (*)(s32, s32))func_80143994)( + (s32)arg0, (s32)*(s16 *)(*(s32 *)((u8 *)arg0 + 0x20) + 0x18)); + func_8012AD50(arg0); +} + DEFINE_func_80142BB4() /* dedup: shared engine-core @0x80142BB4 (src/shared) */ diff --git a/src/ov_SC03_126/ov_SC03_126_jr_80140608.c b/src/ov_SC03_126/ov_SC03_126_jr_80140608.c index ea79857a2..97d07a83c 100644 --- a/src/ov_SC03_126/ov_SC03_126_jr_80140608.c +++ b/src/ov_SC03_126/ov_SC03_126_jr_80140608.c @@ -1842,7 +1842,25 @@ void func_80142A80(void) } -INCLUDE_ASM("asm/ov_SC03_126/nonmatchings/ov_SC03_126_jr_80140608", func_80142B2C); +extern void func_80142C84(s32 a0); +extern void func_80143994(s32 a0, s32 a1); +extern s32 func_8012AD50(void *a0); + +void func_80142B2C(void *arg0) { + *(s32 *)((u8 *)arg0 + 0x1c) = 0x180; + *(s16 *)((u8 *)arg0 + 0x5c) = 0x100; + *(u16 *)((u8 *)arg0 + 0x100) = *(u16 *)((u8 *)arg0 + 0x70) & 0x100; + *(u16 *)((u8 *)arg0 + 0x70) = *(u16 *)((u8 *)arg0 + 0x70) & 3; + *(u16 *)((u8 *)arg0 + 0x72) = *(u16 *)((u8 *)arg0 + 0x72) | 0x1000; + if (*(s16 *)((u8 *)arg0 + 0x100) == 0) { + ((void (*)(void))func_80142C84)(); + } + *(s32 *)((u8 *)arg0 + 0xcc) = + ((s32 (*)(s32, s32))func_80143994)( + (s32)arg0, (s32)*(s16 *)(*(s32 *)((u8 *)arg0 + 0x20) + 0x18)); + func_8012AD50(arg0); +} + DEFINE_func_80142BB4() /* dedup: shared engine-core @0x80142BB4 (src/shared) */ diff --git a/src/ov_SC04_000/ov_SC04_000_jr_80140608.c b/src/ov_SC04_000/ov_SC04_000_jr_80140608.c index b4ea71193..142cd4d28 100644 --- a/src/ov_SC04_000/ov_SC04_000_jr_80140608.c +++ b/src/ov_SC04_000/ov_SC04_000_jr_80140608.c @@ -1844,7 +1844,25 @@ void func_80142A80(void) } -INCLUDE_ASM("asm/ov_SC04_000/nonmatchings/ov_SC04_000_jr_80140608", func_80142B2C); +extern void func_80142C84(s32 a0); +extern void func_80143994(s32 a0, s32 a1); +extern s32 func_8012AD50(void *a0); + +void func_80142B2C(void *arg0) { + *(s32 *)((u8 *)arg0 + 0x1c) = 0x180; + *(s16 *)((u8 *)arg0 + 0x5c) = 0x100; + *(u16 *)((u8 *)arg0 + 0x100) = *(u16 *)((u8 *)arg0 + 0x70) & 0x100; + *(u16 *)((u8 *)arg0 + 0x70) = *(u16 *)((u8 *)arg0 + 0x70) & 3; + *(u16 *)((u8 *)arg0 + 0x72) = *(u16 *)((u8 *)arg0 + 0x72) | 0x1000; + if (*(s16 *)((u8 *)arg0 + 0x100) == 0) { + ((void (*)(void))func_80142C84)(); + } + *(s32 *)((u8 *)arg0 + 0xcc) = + ((s32 (*)(s32, s32))func_80143994)( + (s32)arg0, (s32)*(s16 *)(*(s32 *)((u8 *)arg0 + 0x20) + 0x18)); + func_8012AD50(arg0); +} + DEFINE_func_80142BB4() /* dedup: shared engine-core @0x80142BB4 (src/shared) */ diff --git a/src/ov_SC04_002/ov_SC04_002_jr_80140608.c b/src/ov_SC04_002/ov_SC04_002_jr_80140608.c index 5246a3011..f37860279 100644 --- a/src/ov_SC04_002/ov_SC04_002_jr_80140608.c +++ b/src/ov_SC04_002/ov_SC04_002_jr_80140608.c @@ -1842,7 +1842,25 @@ void func_80142A80(void) } -INCLUDE_ASM("asm/ov_SC04_002/nonmatchings/ov_SC04_002_jr_80140608", func_80142B2C); +extern void func_80142C84(s32 a0); +extern void func_80143994(s32 a0, s32 a1); +extern s32 func_8012AD50(void *a0); + +void func_80142B2C(void *arg0) { + *(s32 *)((u8 *)arg0 + 0x1c) = 0x180; + *(s16 *)((u8 *)arg0 + 0x5c) = 0x100; + *(u16 *)((u8 *)arg0 + 0x100) = *(u16 *)((u8 *)arg0 + 0x70) & 0x100; + *(u16 *)((u8 *)arg0 + 0x70) = *(u16 *)((u8 *)arg0 + 0x70) & 3; + *(u16 *)((u8 *)arg0 + 0x72) = *(u16 *)((u8 *)arg0 + 0x72) | 0x1000; + if (*(s16 *)((u8 *)arg0 + 0x100) == 0) { + ((void (*)(void))func_80142C84)(); + } + *(s32 *)((u8 *)arg0 + 0xcc) = + ((s32 (*)(s32, s32))func_80143994)( + (s32)arg0, (s32)*(s16 *)(*(s32 *)((u8 *)arg0 + 0x20) + 0x18)); + func_8012AD50(arg0); +} + DEFINE_func_80142BB4() /* dedup: shared engine-core @0x80142BB4 (src/shared) */ diff --git a/src/ov_SC04_003/ov_SC04_003_jr_80140608.c b/src/ov_SC04_003/ov_SC04_003_jr_80140608.c index a701d9159..1b5df6b16 100644 --- a/src/ov_SC04_003/ov_SC04_003_jr_80140608.c +++ b/src/ov_SC04_003/ov_SC04_003_jr_80140608.c @@ -1842,7 +1842,25 @@ void func_80142A80(void) } -INCLUDE_ASM("asm/ov_SC04_003/nonmatchings/ov_SC04_003_jr_80140608", func_80142B2C); +extern void func_80142C84(s32 a0); +extern void func_80143994(s32 a0, s32 a1); +extern s32 func_8012AD50(void *a0); + +void func_80142B2C(void *arg0) { + *(s32 *)((u8 *)arg0 + 0x1c) = 0x180; + *(s16 *)((u8 *)arg0 + 0x5c) = 0x100; + *(u16 *)((u8 *)arg0 + 0x100) = *(u16 *)((u8 *)arg0 + 0x70) & 0x100; + *(u16 *)((u8 *)arg0 + 0x70) = *(u16 *)((u8 *)arg0 + 0x70) & 3; + *(u16 *)((u8 *)arg0 + 0x72) = *(u16 *)((u8 *)arg0 + 0x72) | 0x1000; + if (*(s16 *)((u8 *)arg0 + 0x100) == 0) { + ((void (*)(void))func_80142C84)(); + } + *(s32 *)((u8 *)arg0 + 0xcc) = + ((s32 (*)(s32, s32))func_80143994)( + (s32)arg0, (s32)*(s16 *)(*(s32 *)((u8 *)arg0 + 0x20) + 0x18)); + func_8012AD50(arg0); +} + DEFINE_func_80142BB4() /* dedup: shared engine-core @0x80142BB4 (src/shared) */ diff --git a/src/ov_SC04_004/ov_SC04_004_jr_80140608.c b/src/ov_SC04_004/ov_SC04_004_jr_80140608.c index 792f6a149..6f83cd2d5 100644 --- a/src/ov_SC04_004/ov_SC04_004_jr_80140608.c +++ b/src/ov_SC04_004/ov_SC04_004_jr_80140608.c @@ -1842,7 +1842,25 @@ void func_80142A80(void) } -INCLUDE_ASM("asm/ov_SC04_004/nonmatchings/ov_SC04_004_jr_80140608", func_80142B2C); +extern void func_80142C84(s32 a0); +extern void func_80143994(s32 a0, s32 a1); +extern s32 func_8012AD50(void *a0); + +void func_80142B2C(void *arg0) { + *(s32 *)((u8 *)arg0 + 0x1c) = 0x180; + *(s16 *)((u8 *)arg0 + 0x5c) = 0x100; + *(u16 *)((u8 *)arg0 + 0x100) = *(u16 *)((u8 *)arg0 + 0x70) & 0x100; + *(u16 *)((u8 *)arg0 + 0x70) = *(u16 *)((u8 *)arg0 + 0x70) & 3; + *(u16 *)((u8 *)arg0 + 0x72) = *(u16 *)((u8 *)arg0 + 0x72) | 0x1000; + if (*(s16 *)((u8 *)arg0 + 0x100) == 0) { + ((void (*)(void))func_80142C84)(); + } + *(s32 *)((u8 *)arg0 + 0xcc) = + ((s32 (*)(s32, s32))func_80143994)( + (s32)arg0, (s32)*(s16 *)(*(s32 *)((u8 *)arg0 + 0x20) + 0x18)); + func_8012AD50(arg0); +} + DEFINE_func_80142BB4() /* dedup: shared engine-core @0x80142BB4 (src/shared) */ diff --git a/src/ov_SC04_005/ov_SC04_005_jr_80140608.c b/src/ov_SC04_005/ov_SC04_005_jr_80140608.c index d97a87e8c..cd03f7742 100644 --- a/src/ov_SC04_005/ov_SC04_005_jr_80140608.c +++ b/src/ov_SC04_005/ov_SC04_005_jr_80140608.c @@ -1842,7 +1842,25 @@ void func_80142A80(void) } -INCLUDE_ASM("asm/ov_SC04_005/nonmatchings/ov_SC04_005_jr_80140608", func_80142B2C); +extern void func_80142C84(s32 a0); +extern void func_80143994(s32 a0, s32 a1); +extern s32 func_8012AD50(void *a0); + +void func_80142B2C(void *arg0) { + *(s32 *)((u8 *)arg0 + 0x1c) = 0x180; + *(s16 *)((u8 *)arg0 + 0x5c) = 0x100; + *(u16 *)((u8 *)arg0 + 0x100) = *(u16 *)((u8 *)arg0 + 0x70) & 0x100; + *(u16 *)((u8 *)arg0 + 0x70) = *(u16 *)((u8 *)arg0 + 0x70) & 3; + *(u16 *)((u8 *)arg0 + 0x72) = *(u16 *)((u8 *)arg0 + 0x72) | 0x1000; + if (*(s16 *)((u8 *)arg0 + 0x100) == 0) { + ((void (*)(void))func_80142C84)(); + } + *(s32 *)((u8 *)arg0 + 0xcc) = + ((s32 (*)(s32, s32))func_80143994)( + (s32)arg0, (s32)*(s16 *)(*(s32 *)((u8 *)arg0 + 0x20) + 0x18)); + func_8012AD50(arg0); +} + DEFINE_func_80142BB4() /* dedup: shared engine-core @0x80142BB4 (src/shared) */ diff --git a/src/ov_SC04_006/ov_SC04_006_jr_80140608.c b/src/ov_SC04_006/ov_SC04_006_jr_80140608.c index 3a9e9d901..09f760883 100644 --- a/src/ov_SC04_006/ov_SC04_006_jr_80140608.c +++ b/src/ov_SC04_006/ov_SC04_006_jr_80140608.c @@ -1842,7 +1842,25 @@ void func_80142A80(void) } -INCLUDE_ASM("asm/ov_SC04_006/nonmatchings/ov_SC04_006_jr_80140608", func_80142B2C); +extern void func_80142C84(s32 a0); +extern void func_80143994(s32 a0, s32 a1); +extern s32 func_8012AD50(void *a0); + +void func_80142B2C(void *arg0) { + *(s32 *)((u8 *)arg0 + 0x1c) = 0x180; + *(s16 *)((u8 *)arg0 + 0x5c) = 0x100; + *(u16 *)((u8 *)arg0 + 0x100) = *(u16 *)((u8 *)arg0 + 0x70) & 0x100; + *(u16 *)((u8 *)arg0 + 0x70) = *(u16 *)((u8 *)arg0 + 0x70) & 3; + *(u16 *)((u8 *)arg0 + 0x72) = *(u16 *)((u8 *)arg0 + 0x72) | 0x1000; + if (*(s16 *)((u8 *)arg0 + 0x100) == 0) { + ((void (*)(void))func_80142C84)(); + } + *(s32 *)((u8 *)arg0 + 0xcc) = + ((s32 (*)(s32, s32))func_80143994)( + (s32)arg0, (s32)*(s16 *)(*(s32 *)((u8 *)arg0 + 0x20) + 0x18)); + func_8012AD50(arg0); +} + DEFINE_func_80142BB4() /* dedup: shared engine-core @0x80142BB4 (src/shared) */ diff --git a/src/ov_SC04_007/ov_SC04_007_jr_80140608.c b/src/ov_SC04_007/ov_SC04_007_jr_80140608.c index 4873685cf..4a7a8d55d 100644 --- a/src/ov_SC04_007/ov_SC04_007_jr_80140608.c +++ b/src/ov_SC04_007/ov_SC04_007_jr_80140608.c @@ -1842,7 +1842,25 @@ void func_80142A80(void) } -INCLUDE_ASM("asm/ov_SC04_007/nonmatchings/ov_SC04_007_jr_80140608", func_80142B2C); +extern void func_80142C84(s32 a0); +extern void func_80143994(s32 a0, s32 a1); +extern s32 func_8012AD50(void *a0); + +void func_80142B2C(void *arg0) { + *(s32 *)((u8 *)arg0 + 0x1c) = 0x180; + *(s16 *)((u8 *)arg0 + 0x5c) = 0x100; + *(u16 *)((u8 *)arg0 + 0x100) = *(u16 *)((u8 *)arg0 + 0x70) & 0x100; + *(u16 *)((u8 *)arg0 + 0x70) = *(u16 *)((u8 *)arg0 + 0x70) & 3; + *(u16 *)((u8 *)arg0 + 0x72) = *(u16 *)((u8 *)arg0 + 0x72) | 0x1000; + if (*(s16 *)((u8 *)arg0 + 0x100) == 0) { + ((void (*)(void))func_80142C84)(); + } + *(s32 *)((u8 *)arg0 + 0xcc) = + ((s32 (*)(s32, s32))func_80143994)( + (s32)arg0, (s32)*(s16 *)(*(s32 *)((u8 *)arg0 + 0x20) + 0x18)); + func_8012AD50(arg0); +} + DEFINE_func_80142BB4() /* dedup: shared engine-core @0x80142BB4 (src/shared) */ diff --git a/src/ov_SC04_008/ov_SC04_008_jr_80140608.c b/src/ov_SC04_008/ov_SC04_008_jr_80140608.c index a8d5a46cb..426122739 100644 --- a/src/ov_SC04_008/ov_SC04_008_jr_80140608.c +++ b/src/ov_SC04_008/ov_SC04_008_jr_80140608.c @@ -1842,7 +1842,25 @@ void func_80142A80(void) } -INCLUDE_ASM("asm/ov_SC04_008/nonmatchings/ov_SC04_008_jr_80140608", func_80142B2C); +extern void func_80142C84(s32 a0); +extern void func_80143994(s32 a0, s32 a1); +extern s32 func_8012AD50(void *a0); + +void func_80142B2C(void *arg0) { + *(s32 *)((u8 *)arg0 + 0x1c) = 0x180; + *(s16 *)((u8 *)arg0 + 0x5c) = 0x100; + *(u16 *)((u8 *)arg0 + 0x100) = *(u16 *)((u8 *)arg0 + 0x70) & 0x100; + *(u16 *)((u8 *)arg0 + 0x70) = *(u16 *)((u8 *)arg0 + 0x70) & 3; + *(u16 *)((u8 *)arg0 + 0x72) = *(u16 *)((u8 *)arg0 + 0x72) | 0x1000; + if (*(s16 *)((u8 *)arg0 + 0x100) == 0) { + ((void (*)(void))func_80142C84)(); + } + *(s32 *)((u8 *)arg0 + 0xcc) = + ((s32 (*)(s32, s32))func_80143994)( + (s32)arg0, (s32)*(s16 *)(*(s32 *)((u8 *)arg0 + 0x20) + 0x18)); + func_8012AD50(arg0); +} + DEFINE_func_80142BB4() /* dedup: shared engine-core @0x80142BB4 (src/shared) */ diff --git a/src/ov_SC04_009/ov_SC04_009_jr_80140608.c b/src/ov_SC04_009/ov_SC04_009_jr_80140608.c index 1a8bdedd6..c9d084cad 100644 --- a/src/ov_SC04_009/ov_SC04_009_jr_80140608.c +++ b/src/ov_SC04_009/ov_SC04_009_jr_80140608.c @@ -1842,7 +1842,25 @@ void func_80142A80(void) } -INCLUDE_ASM("asm/ov_SC04_009/nonmatchings/ov_SC04_009_jr_80140608", func_80142B2C); +extern void func_80142C84(s32 a0); +extern void func_80143994(s32 a0, s32 a1); +extern s32 func_8012AD50(void *a0); + +void func_80142B2C(void *arg0) { + *(s32 *)((u8 *)arg0 + 0x1c) = 0x180; + *(s16 *)((u8 *)arg0 + 0x5c) = 0x100; + *(u16 *)((u8 *)arg0 + 0x100) = *(u16 *)((u8 *)arg0 + 0x70) & 0x100; + *(u16 *)((u8 *)arg0 + 0x70) = *(u16 *)((u8 *)arg0 + 0x70) & 3; + *(u16 *)((u8 *)arg0 + 0x72) = *(u16 *)((u8 *)arg0 + 0x72) | 0x1000; + if (*(s16 *)((u8 *)arg0 + 0x100) == 0) { + ((void (*)(void))func_80142C84)(); + } + *(s32 *)((u8 *)arg0 + 0xcc) = + ((s32 (*)(s32, s32))func_80143994)( + (s32)arg0, (s32)*(s16 *)(*(s32 *)((u8 *)arg0 + 0x20) + 0x18)); + func_8012AD50(arg0); +} + DEFINE_func_80142BB4() /* dedup: shared engine-core @0x80142BB4 (src/shared) */ diff --git a/src/ov_SC04_010/ov_SC04_010_jr_80140608.c b/src/ov_SC04_010/ov_SC04_010_jr_80140608.c index 93f4af249..193000cf7 100644 --- a/src/ov_SC04_010/ov_SC04_010_jr_80140608.c +++ b/src/ov_SC04_010/ov_SC04_010_jr_80140608.c @@ -1842,7 +1842,25 @@ void func_80142A80(void) } -INCLUDE_ASM("asm/ov_SC04_010/nonmatchings/ov_SC04_010_jr_80140608", func_80142B2C); +extern void func_80142C84(s32 a0); +extern void func_80143994(s32 a0, s32 a1); +extern s32 func_8012AD50(void *a0); + +void func_80142B2C(void *arg0) { + *(s32 *)((u8 *)arg0 + 0x1c) = 0x180; + *(s16 *)((u8 *)arg0 + 0x5c) = 0x100; + *(u16 *)((u8 *)arg0 + 0x100) = *(u16 *)((u8 *)arg0 + 0x70) & 0x100; + *(u16 *)((u8 *)arg0 + 0x70) = *(u16 *)((u8 *)arg0 + 0x70) & 3; + *(u16 *)((u8 *)arg0 + 0x72) = *(u16 *)((u8 *)arg0 + 0x72) | 0x1000; + if (*(s16 *)((u8 *)arg0 + 0x100) == 0) { + ((void (*)(void))func_80142C84)(); + } + *(s32 *)((u8 *)arg0 + 0xcc) = + ((s32 (*)(s32, s32))func_80143994)( + (s32)arg0, (s32)*(s16 *)(*(s32 *)((u8 *)arg0 + 0x20) + 0x18)); + func_8012AD50(arg0); +} + DEFINE_func_80142BB4() /* dedup: shared engine-core @0x80142BB4 (src/shared) */ diff --git a/src/ov_SC04_011/ov_SC04_011_jr_80140608.c b/src/ov_SC04_011/ov_SC04_011_jr_80140608.c index a5134ec47..b9691b2e0 100644 --- a/src/ov_SC04_011/ov_SC04_011_jr_80140608.c +++ b/src/ov_SC04_011/ov_SC04_011_jr_80140608.c @@ -1842,7 +1842,25 @@ void func_80142A80(void) } -INCLUDE_ASM("asm/ov_SC04_011/nonmatchings/ov_SC04_011_jr_80140608", func_80142B2C); +extern void func_80142C84(s32 a0); +extern void func_80143994(s32 a0, s32 a1); +extern s32 func_8012AD50(void *a0); + +void func_80142B2C(void *arg0) { + *(s32 *)((u8 *)arg0 + 0x1c) = 0x180; + *(s16 *)((u8 *)arg0 + 0x5c) = 0x100; + *(u16 *)((u8 *)arg0 + 0x100) = *(u16 *)((u8 *)arg0 + 0x70) & 0x100; + *(u16 *)((u8 *)arg0 + 0x70) = *(u16 *)((u8 *)arg0 + 0x70) & 3; + *(u16 *)((u8 *)arg0 + 0x72) = *(u16 *)((u8 *)arg0 + 0x72) | 0x1000; + if (*(s16 *)((u8 *)arg0 + 0x100) == 0) { + ((void (*)(void))func_80142C84)(); + } + *(s32 *)((u8 *)arg0 + 0xcc) = + ((s32 (*)(s32, s32))func_80143994)( + (s32)arg0, (s32)*(s16 *)(*(s32 *)((u8 *)arg0 + 0x20) + 0x18)); + func_8012AD50(arg0); +} + DEFINE_func_80142BB4() /* dedup: shared engine-core @0x80142BB4 (src/shared) */ diff --git a/src/ov_SC04_012/ov_SC04_012_jr_80140608.c b/src/ov_SC04_012/ov_SC04_012_jr_80140608.c index a8ae4992d..6cdb88647 100644 --- a/src/ov_SC04_012/ov_SC04_012_jr_80140608.c +++ b/src/ov_SC04_012/ov_SC04_012_jr_80140608.c @@ -1842,7 +1842,25 @@ void func_80142A80(void) } -INCLUDE_ASM("asm/ov_SC04_012/nonmatchings/ov_SC04_012_jr_80140608", func_80142B2C); +extern void func_80142C84(s32 a0); +extern void func_80143994(s32 a0, s32 a1); +extern s32 func_8012AD50(void *a0); + +void func_80142B2C(void *arg0) { + *(s32 *)((u8 *)arg0 + 0x1c) = 0x180; + *(s16 *)((u8 *)arg0 + 0x5c) = 0x100; + *(u16 *)((u8 *)arg0 + 0x100) = *(u16 *)((u8 *)arg0 + 0x70) & 0x100; + *(u16 *)((u8 *)arg0 + 0x70) = *(u16 *)((u8 *)arg0 + 0x70) & 3; + *(u16 *)((u8 *)arg0 + 0x72) = *(u16 *)((u8 *)arg0 + 0x72) | 0x1000; + if (*(s16 *)((u8 *)arg0 + 0x100) == 0) { + ((void (*)(void))func_80142C84)(); + } + *(s32 *)((u8 *)arg0 + 0xcc) = + ((s32 (*)(s32, s32))func_80143994)( + (s32)arg0, (s32)*(s16 *)(*(s32 *)((u8 *)arg0 + 0x20) + 0x18)); + func_8012AD50(arg0); +} + DEFINE_func_80142BB4() /* dedup: shared engine-core @0x80142BB4 (src/shared) */ diff --git a/src/ov_SC04_015/ov_SC04_015_jr_80140608.c b/src/ov_SC04_015/ov_SC04_015_jr_80140608.c index 6c2671463..c7495395c 100644 --- a/src/ov_SC04_015/ov_SC04_015_jr_80140608.c +++ b/src/ov_SC04_015/ov_SC04_015_jr_80140608.c @@ -1858,7 +1858,25 @@ void func_80142A80(void) } -INCLUDE_ASM("asm/ov_SC04_015/nonmatchings/ov_SC04_015_jr_80140608", func_80142B2C); +extern void func_80142C84(s32 a0); +extern void func_80143994(s32 a0, s32 a1); +extern s32 func_8012AD50(void *a0); + +void func_80142B2C(void *arg0) { + *(s32 *)((u8 *)arg0 + 0x1c) = 0x180; + *(s16 *)((u8 *)arg0 + 0x5c) = 0x100; + *(u16 *)((u8 *)arg0 + 0x100) = *(u16 *)((u8 *)arg0 + 0x70) & 0x100; + *(u16 *)((u8 *)arg0 + 0x70) = *(u16 *)((u8 *)arg0 + 0x70) & 3; + *(u16 *)((u8 *)arg0 + 0x72) = *(u16 *)((u8 *)arg0 + 0x72) | 0x1000; + if (*(s16 *)((u8 *)arg0 + 0x100) == 0) { + ((void (*)(void))func_80142C84)(); + } + *(s32 *)((u8 *)arg0 + 0xcc) = + ((s32 (*)(s32, s32))func_80143994)( + (s32)arg0, (s32)*(s16 *)(*(s32 *)((u8 *)arg0 + 0x20) + 0x18)); + func_8012AD50(arg0); +} + DEFINE_func_80142BB4() /* dedup: shared engine-core @0x80142BB4 (src/shared) */ diff --git a/src/ov_SC04_016/ov_SC04_016_jr_80140608.c b/src/ov_SC04_016/ov_SC04_016_jr_80140608.c index 34c1da27d..3247267a9 100644 --- a/src/ov_SC04_016/ov_SC04_016_jr_80140608.c +++ b/src/ov_SC04_016/ov_SC04_016_jr_80140608.c @@ -1842,7 +1842,25 @@ void func_80142A80(void) } -INCLUDE_ASM("asm/ov_SC04_016/nonmatchings/ov_SC04_016_jr_80140608", func_80142B2C); +extern void func_80142C84(s32 a0); +extern void func_80143994(s32 a0, s32 a1); +extern s32 func_8012AD50(void *a0); + +void func_80142B2C(void *arg0) { + *(s32 *)((u8 *)arg0 + 0x1c) = 0x180; + *(s16 *)((u8 *)arg0 + 0x5c) = 0x100; + *(u16 *)((u8 *)arg0 + 0x100) = *(u16 *)((u8 *)arg0 + 0x70) & 0x100; + *(u16 *)((u8 *)arg0 + 0x70) = *(u16 *)((u8 *)arg0 + 0x70) & 3; + *(u16 *)((u8 *)arg0 + 0x72) = *(u16 *)((u8 *)arg0 + 0x72) | 0x1000; + if (*(s16 *)((u8 *)arg0 + 0x100) == 0) { + ((void (*)(void))func_80142C84)(); + } + *(s32 *)((u8 *)arg0 + 0xcc) = + ((s32 (*)(s32, s32))func_80143994)( + (s32)arg0, (s32)*(s16 *)(*(s32 *)((u8 *)arg0 + 0x20) + 0x18)); + func_8012AD50(arg0); +} + DEFINE_func_80142BB4() /* dedup: shared engine-core @0x80142BB4 (src/shared) */ diff --git a/src/ov_SC04_018/ov_SC04_018_jr_80140608.c b/src/ov_SC04_018/ov_SC04_018_jr_80140608.c index 87da649a8..a5de054a2 100644 --- a/src/ov_SC04_018/ov_SC04_018_jr_80140608.c +++ b/src/ov_SC04_018/ov_SC04_018_jr_80140608.c @@ -1844,7 +1844,25 @@ void func_80142A80(void) } -INCLUDE_ASM("asm/ov_SC04_018/nonmatchings/ov_SC04_018_jr_80140608", func_80142B2C); +extern void func_80142C84(s32 a0); +extern void func_80143994(s32 a0, s32 a1); +extern s32 func_8012AD50(void *a0); + +void func_80142B2C(void *arg0) { + *(s32 *)((u8 *)arg0 + 0x1c) = 0x180; + *(s16 *)((u8 *)arg0 + 0x5c) = 0x100; + *(u16 *)((u8 *)arg0 + 0x100) = *(u16 *)((u8 *)arg0 + 0x70) & 0x100; + *(u16 *)((u8 *)arg0 + 0x70) = *(u16 *)((u8 *)arg0 + 0x70) & 3; + *(u16 *)((u8 *)arg0 + 0x72) = *(u16 *)((u8 *)arg0 + 0x72) | 0x1000; + if (*(s16 *)((u8 *)arg0 + 0x100) == 0) { + ((void (*)(void))func_80142C84)(); + } + *(s32 *)((u8 *)arg0 + 0xcc) = + ((s32 (*)(s32, s32))func_80143994)( + (s32)arg0, (s32)*(s16 *)(*(s32 *)((u8 *)arg0 + 0x20) + 0x18)); + func_8012AD50(arg0); +} + DEFINE_func_80142BB4() /* dedup: shared engine-core @0x80142BB4 (src/shared) */ diff --git a/src/ov_SC04_019/ov_SC04_019_jr_80140608.c b/src/ov_SC04_019/ov_SC04_019_jr_80140608.c index 164edf421..8bff31466 100644 --- a/src/ov_SC04_019/ov_SC04_019_jr_80140608.c +++ b/src/ov_SC04_019/ov_SC04_019_jr_80140608.c @@ -1860,7 +1860,25 @@ void func_80142A80(void) } -INCLUDE_ASM("asm/ov_SC04_019/nonmatchings/ov_SC04_019_jr_80140608", func_80142B2C); +extern void func_80142C84(s32 a0); +extern void func_80143994(s32 a0, s32 a1); +extern s32 func_8012AD50(void *a0); + +void func_80142B2C(void *arg0) { + *(s32 *)((u8 *)arg0 + 0x1c) = 0x180; + *(s16 *)((u8 *)arg0 + 0x5c) = 0x100; + *(u16 *)((u8 *)arg0 + 0x100) = *(u16 *)((u8 *)arg0 + 0x70) & 0x100; + *(u16 *)((u8 *)arg0 + 0x70) = *(u16 *)((u8 *)arg0 + 0x70) & 3; + *(u16 *)((u8 *)arg0 + 0x72) = *(u16 *)((u8 *)arg0 + 0x72) | 0x1000; + if (*(s16 *)((u8 *)arg0 + 0x100) == 0) { + ((void (*)(void))func_80142C84)(); + } + *(s32 *)((u8 *)arg0 + 0xcc) = + ((s32 (*)(s32, s32))func_80143994)( + (s32)arg0, (s32)*(s16 *)(*(s32 *)((u8 *)arg0 + 0x20) + 0x18)); + func_8012AD50(arg0); +} + DEFINE_func_80142BB4() /* dedup: shared engine-core @0x80142BB4 (src/shared) */ diff --git a/src/ov_SC04_020/ov_SC04_020_jr_80140608.c b/src/ov_SC04_020/ov_SC04_020_jr_80140608.c index 9e204900d..46db736ef 100644 --- a/src/ov_SC04_020/ov_SC04_020_jr_80140608.c +++ b/src/ov_SC04_020/ov_SC04_020_jr_80140608.c @@ -1842,7 +1842,25 @@ void func_80142A80(void) } -INCLUDE_ASM("asm/ov_SC04_020/nonmatchings/ov_SC04_020_jr_80140608", func_80142B2C); +extern void func_80142C84(s32 a0); +extern void func_80143994(s32 a0, s32 a1); +extern s32 func_8012AD50(void *a0); + +void func_80142B2C(void *arg0) { + *(s32 *)((u8 *)arg0 + 0x1c) = 0x180; + *(s16 *)((u8 *)arg0 + 0x5c) = 0x100; + *(u16 *)((u8 *)arg0 + 0x100) = *(u16 *)((u8 *)arg0 + 0x70) & 0x100; + *(u16 *)((u8 *)arg0 + 0x70) = *(u16 *)((u8 *)arg0 + 0x70) & 3; + *(u16 *)((u8 *)arg0 + 0x72) = *(u16 *)((u8 *)arg0 + 0x72) | 0x1000; + if (*(s16 *)((u8 *)arg0 + 0x100) == 0) { + ((void (*)(void))func_80142C84)(); + } + *(s32 *)((u8 *)arg0 + 0xcc) = + ((s32 (*)(s32, s32))func_80143994)( + (s32)arg0, (s32)*(s16 *)(*(s32 *)((u8 *)arg0 + 0x20) + 0x18)); + func_8012AD50(arg0); +} + DEFINE_func_80142BB4() /* dedup: shared engine-core @0x80142BB4 (src/shared) */ diff --git a/src/ov_SC04_021/ov_SC04_021_jr_80140608.c b/src/ov_SC04_021/ov_SC04_021_jr_80140608.c index 72940d882..4ef28aaaf 100644 --- a/src/ov_SC04_021/ov_SC04_021_jr_80140608.c +++ b/src/ov_SC04_021/ov_SC04_021_jr_80140608.c @@ -1842,7 +1842,25 @@ void func_80142A80(void) } -INCLUDE_ASM("asm/ov_SC04_021/nonmatchings/ov_SC04_021_jr_80140608", func_80142B2C); +extern void func_80142C84(s32 a0); +extern void func_80143994(s32 a0, s32 a1); +extern s32 func_8012AD50(void *a0); + +void func_80142B2C(void *arg0) { + *(s32 *)((u8 *)arg0 + 0x1c) = 0x180; + *(s16 *)((u8 *)arg0 + 0x5c) = 0x100; + *(u16 *)((u8 *)arg0 + 0x100) = *(u16 *)((u8 *)arg0 + 0x70) & 0x100; + *(u16 *)((u8 *)arg0 + 0x70) = *(u16 *)((u8 *)arg0 + 0x70) & 3; + *(u16 *)((u8 *)arg0 + 0x72) = *(u16 *)((u8 *)arg0 + 0x72) | 0x1000; + if (*(s16 *)((u8 *)arg0 + 0x100) == 0) { + ((void (*)(void))func_80142C84)(); + } + *(s32 *)((u8 *)arg0 + 0xcc) = + ((s32 (*)(s32, s32))func_80143994)( + (s32)arg0, (s32)*(s16 *)(*(s32 *)((u8 *)arg0 + 0x20) + 0x18)); + func_8012AD50(arg0); +} + DEFINE_func_80142BB4() /* dedup: shared engine-core @0x80142BB4 (src/shared) */ diff --git a/src/ov_SC05_000/ov_SC05_000_jr_80140608.c b/src/ov_SC05_000/ov_SC05_000_jr_80140608.c index e9707cb0b..60a300057 100644 --- a/src/ov_SC05_000/ov_SC05_000_jr_80140608.c +++ b/src/ov_SC05_000/ov_SC05_000_jr_80140608.c @@ -1844,7 +1844,25 @@ void func_80142A80(void) } -INCLUDE_ASM("asm/ov_SC05_000/nonmatchings/ov_SC05_000_jr_80140608", func_80142B2C); +extern void func_80142C84(s32 a0); +extern void func_80143994(s32 a0, s32 a1); +extern s32 func_8012AD50(void *a0); + +void func_80142B2C(void *arg0) { + *(s32 *)((u8 *)arg0 + 0x1c) = 0x180; + *(s16 *)((u8 *)arg0 + 0x5c) = 0x100; + *(u16 *)((u8 *)arg0 + 0x100) = *(u16 *)((u8 *)arg0 + 0x70) & 0x100; + *(u16 *)((u8 *)arg0 + 0x70) = *(u16 *)((u8 *)arg0 + 0x70) & 3; + *(u16 *)((u8 *)arg0 + 0x72) = *(u16 *)((u8 *)arg0 + 0x72) | 0x1000; + if (*(s16 *)((u8 *)arg0 + 0x100) == 0) { + ((void (*)(void))func_80142C84)(); + } + *(s32 *)((u8 *)arg0 + 0xcc) = + ((s32 (*)(s32, s32))func_80143994)( + (s32)arg0, (s32)*(s16 *)(*(s32 *)((u8 *)arg0 + 0x20) + 0x18)); + func_8012AD50(arg0); +} + DEFINE_func_80142BB4() /* dedup: shared engine-core @0x80142BB4 (src/shared) */ diff --git a/src/ov_SC05_001/ov_SC05_001_jr_80140608.c b/src/ov_SC05_001/ov_SC05_001_jr_80140608.c index e739cf883..f1a89a90d 100644 --- a/src/ov_SC05_001/ov_SC05_001_jr_80140608.c +++ b/src/ov_SC05_001/ov_SC05_001_jr_80140608.c @@ -1842,7 +1842,25 @@ void func_80142A80(void) } -INCLUDE_ASM("asm/ov_SC05_001/nonmatchings/ov_SC05_001_jr_80140608", func_80142B2C); +extern void func_80142C84(s32 a0); +extern void func_80143994(s32 a0, s32 a1); +extern s32 func_8012AD50(void *a0); + +void func_80142B2C(void *arg0) { + *(s32 *)((u8 *)arg0 + 0x1c) = 0x180; + *(s16 *)((u8 *)arg0 + 0x5c) = 0x100; + *(u16 *)((u8 *)arg0 + 0x100) = *(u16 *)((u8 *)arg0 + 0x70) & 0x100; + *(u16 *)((u8 *)arg0 + 0x70) = *(u16 *)((u8 *)arg0 + 0x70) & 3; + *(u16 *)((u8 *)arg0 + 0x72) = *(u16 *)((u8 *)arg0 + 0x72) | 0x1000; + if (*(s16 *)((u8 *)arg0 + 0x100) == 0) { + ((void (*)(void))func_80142C84)(); + } + *(s32 *)((u8 *)arg0 + 0xcc) = + ((s32 (*)(s32, s32))func_80143994)( + (s32)arg0, (s32)*(s16 *)(*(s32 *)((u8 *)arg0 + 0x20) + 0x18)); + func_8012AD50(arg0); +} + DEFINE_func_80142BB4() /* dedup: shared engine-core @0x80142BB4 (src/shared) */ diff --git a/src/ov_SC05_002/ov_SC05_002_jr_80140608.c b/src/ov_SC05_002/ov_SC05_002_jr_80140608.c index 8c59e413c..cb2feb136 100644 --- a/src/ov_SC05_002/ov_SC05_002_jr_80140608.c +++ b/src/ov_SC05_002/ov_SC05_002_jr_80140608.c @@ -1842,7 +1842,25 @@ void func_80142A80(void) } -INCLUDE_ASM("asm/ov_SC05_002/nonmatchings/ov_SC05_002_jr_80140608", func_80142B2C); +extern void func_80142C84(s32 a0); +extern void func_80143994(s32 a0, s32 a1); +extern s32 func_8012AD50(void *a0); + +void func_80142B2C(void *arg0) { + *(s32 *)((u8 *)arg0 + 0x1c) = 0x180; + *(s16 *)((u8 *)arg0 + 0x5c) = 0x100; + *(u16 *)((u8 *)arg0 + 0x100) = *(u16 *)((u8 *)arg0 + 0x70) & 0x100; + *(u16 *)((u8 *)arg0 + 0x70) = *(u16 *)((u8 *)arg0 + 0x70) & 3; + *(u16 *)((u8 *)arg0 + 0x72) = *(u16 *)((u8 *)arg0 + 0x72) | 0x1000; + if (*(s16 *)((u8 *)arg0 + 0x100) == 0) { + ((void (*)(void))func_80142C84)(); + } + *(s32 *)((u8 *)arg0 + 0xcc) = + ((s32 (*)(s32, s32))func_80143994)( + (s32)arg0, (s32)*(s16 *)(*(s32 *)((u8 *)arg0 + 0x20) + 0x18)); + func_8012AD50(arg0); +} + DEFINE_func_80142BB4() /* dedup: shared engine-core @0x80142BB4 (src/shared) */ diff --git a/src/ov_SC05_003/ov_SC05_003_jr_80140608.c b/src/ov_SC05_003/ov_SC05_003_jr_80140608.c index 915e4fa67..a85a3444c 100644 --- a/src/ov_SC05_003/ov_SC05_003_jr_80140608.c +++ b/src/ov_SC05_003/ov_SC05_003_jr_80140608.c @@ -1842,7 +1842,25 @@ void func_80142A80(void) } -INCLUDE_ASM("asm/ov_SC05_003/nonmatchings/ov_SC05_003_jr_80140608", func_80142B2C); +extern void func_80142C84(s32 a0); +extern void func_80143994(s32 a0, s32 a1); +extern s32 func_8012AD50(void *a0); + +void func_80142B2C(void *arg0) { + *(s32 *)((u8 *)arg0 + 0x1c) = 0x180; + *(s16 *)((u8 *)arg0 + 0x5c) = 0x100; + *(u16 *)((u8 *)arg0 + 0x100) = *(u16 *)((u8 *)arg0 + 0x70) & 0x100; + *(u16 *)((u8 *)arg0 + 0x70) = *(u16 *)((u8 *)arg0 + 0x70) & 3; + *(u16 *)((u8 *)arg0 + 0x72) = *(u16 *)((u8 *)arg0 + 0x72) | 0x1000; + if (*(s16 *)((u8 *)arg0 + 0x100) == 0) { + ((void (*)(void))func_80142C84)(); + } + *(s32 *)((u8 *)arg0 + 0xcc) = + ((s32 (*)(s32, s32))func_80143994)( + (s32)arg0, (s32)*(s16 *)(*(s32 *)((u8 *)arg0 + 0x20) + 0x18)); + func_8012AD50(arg0); +} + DEFINE_func_80142BB4() /* dedup: shared engine-core @0x80142BB4 (src/shared) */ diff --git a/src/ov_SC05_004/ov_SC05_004_jr_80140608.c b/src/ov_SC05_004/ov_SC05_004_jr_80140608.c index 8e59060ed..37a7bce93 100644 --- a/src/ov_SC05_004/ov_SC05_004_jr_80140608.c +++ b/src/ov_SC05_004/ov_SC05_004_jr_80140608.c @@ -1876,7 +1876,25 @@ void func_80142A80(void) } -INCLUDE_ASM("asm/ov_SC05_004/nonmatchings/ov_SC05_004_jr_80140608", func_80142B2C); +extern void func_80142C84(s32 a0); +extern void func_80143994(s32 a0, s32 a1); +extern s32 func_8012AD50(void *a0); + +void func_80142B2C(void *arg0) { + *(s32 *)((u8 *)arg0 + 0x1c) = 0x180; + *(s16 *)((u8 *)arg0 + 0x5c) = 0x100; + *(u16 *)((u8 *)arg0 + 0x100) = *(u16 *)((u8 *)arg0 + 0x70) & 0x100; + *(u16 *)((u8 *)arg0 + 0x70) = *(u16 *)((u8 *)arg0 + 0x70) & 3; + *(u16 *)((u8 *)arg0 + 0x72) = *(u16 *)((u8 *)arg0 + 0x72) | 0x1000; + if (*(s16 *)((u8 *)arg0 + 0x100) == 0) { + ((void (*)(void))func_80142C84)(); + } + *(s32 *)((u8 *)arg0 + 0xcc) = + ((s32 (*)(s32, s32))func_80143994)( + (s32)arg0, (s32)*(s16 *)(*(s32 *)((u8 *)arg0 + 0x20) + 0x18)); + func_8012AD50(arg0); +} + DEFINE_func_80142BB4() /* dedup: shared engine-core @0x80142BB4 (src/shared) */ diff --git a/src/ov_SC05_005/ov_SC05_005_jr_80140608.c b/src/ov_SC05_005/ov_SC05_005_jr_80140608.c index 380189c13..44ff548d4 100644 --- a/src/ov_SC05_005/ov_SC05_005_jr_80140608.c +++ b/src/ov_SC05_005/ov_SC05_005_jr_80140608.c @@ -1842,7 +1842,25 @@ void func_80142A80(void) } -INCLUDE_ASM("asm/ov_SC05_005/nonmatchings/ov_SC05_005_jr_80140608", func_80142B2C); +extern void func_80142C84(s32 a0); +extern void func_80143994(s32 a0, s32 a1); +extern s32 func_8012AD50(void *a0); + +void func_80142B2C(void *arg0) { + *(s32 *)((u8 *)arg0 + 0x1c) = 0x180; + *(s16 *)((u8 *)arg0 + 0x5c) = 0x100; + *(u16 *)((u8 *)arg0 + 0x100) = *(u16 *)((u8 *)arg0 + 0x70) & 0x100; + *(u16 *)((u8 *)arg0 + 0x70) = *(u16 *)((u8 *)arg0 + 0x70) & 3; + *(u16 *)((u8 *)arg0 + 0x72) = *(u16 *)((u8 *)arg0 + 0x72) | 0x1000; + if (*(s16 *)((u8 *)arg0 + 0x100) == 0) { + ((void (*)(void))func_80142C84)(); + } + *(s32 *)((u8 *)arg0 + 0xcc) = + ((s32 (*)(s32, s32))func_80143994)( + (s32)arg0, (s32)*(s16 *)(*(s32 *)((u8 *)arg0 + 0x20) + 0x18)); + func_8012AD50(arg0); +} + DEFINE_func_80142BB4() /* dedup: shared engine-core @0x80142BB4 (src/shared) */ diff --git a/src/ov_SC05_006/ov_SC05_006_jr_80140608.c b/src/ov_SC05_006/ov_SC05_006_jr_80140608.c index c36d6147e..691a6a1d4 100644 --- a/src/ov_SC05_006/ov_SC05_006_jr_80140608.c +++ b/src/ov_SC05_006/ov_SC05_006_jr_80140608.c @@ -1842,7 +1842,25 @@ void func_80142A80(void) } -INCLUDE_ASM("asm/ov_SC05_006/nonmatchings/ov_SC05_006_jr_80140608", func_80142B2C); +extern void func_80142C84(s32 a0); +extern void func_80143994(s32 a0, s32 a1); +extern s32 func_8012AD50(void *a0); + +void func_80142B2C(void *arg0) { + *(s32 *)((u8 *)arg0 + 0x1c) = 0x180; + *(s16 *)((u8 *)arg0 + 0x5c) = 0x100; + *(u16 *)((u8 *)arg0 + 0x100) = *(u16 *)((u8 *)arg0 + 0x70) & 0x100; + *(u16 *)((u8 *)arg0 + 0x70) = *(u16 *)((u8 *)arg0 + 0x70) & 3; + *(u16 *)((u8 *)arg0 + 0x72) = *(u16 *)((u8 *)arg0 + 0x72) | 0x1000; + if (*(s16 *)((u8 *)arg0 + 0x100) == 0) { + ((void (*)(void))func_80142C84)(); + } + *(s32 *)((u8 *)arg0 + 0xcc) = + ((s32 (*)(s32, s32))func_80143994)( + (s32)arg0, (s32)*(s16 *)(*(s32 *)((u8 *)arg0 + 0x20) + 0x18)); + func_8012AD50(arg0); +} + DEFINE_func_80142BB4() /* dedup: shared engine-core @0x80142BB4 (src/shared) */ diff --git a/src/ov_SC05_007/ov_SC05_007_jr_80140608.c b/src/ov_SC05_007/ov_SC05_007_jr_80140608.c index abec88e88..6b6c72290 100644 --- a/src/ov_SC05_007/ov_SC05_007_jr_80140608.c +++ b/src/ov_SC05_007/ov_SC05_007_jr_80140608.c @@ -1842,7 +1842,25 @@ void func_80142A80(void) } -INCLUDE_ASM("asm/ov_SC05_007/nonmatchings/ov_SC05_007_jr_80140608", func_80142B2C); +extern void func_80142C84(s32 a0); +extern void func_80143994(s32 a0, s32 a1); +extern s32 func_8012AD50(void *a0); + +void func_80142B2C(void *arg0) { + *(s32 *)((u8 *)arg0 + 0x1c) = 0x180; + *(s16 *)((u8 *)arg0 + 0x5c) = 0x100; + *(u16 *)((u8 *)arg0 + 0x100) = *(u16 *)((u8 *)arg0 + 0x70) & 0x100; + *(u16 *)((u8 *)arg0 + 0x70) = *(u16 *)((u8 *)arg0 + 0x70) & 3; + *(u16 *)((u8 *)arg0 + 0x72) = *(u16 *)((u8 *)arg0 + 0x72) | 0x1000; + if (*(s16 *)((u8 *)arg0 + 0x100) == 0) { + ((void (*)(void))func_80142C84)(); + } + *(s32 *)((u8 *)arg0 + 0xcc) = + ((s32 (*)(s32, s32))func_80143994)( + (s32)arg0, (s32)*(s16 *)(*(s32 *)((u8 *)arg0 + 0x20) + 0x18)); + func_8012AD50(arg0); +} + DEFINE_func_80142BB4() /* dedup: shared engine-core @0x80142BB4 (src/shared) */ diff --git a/src/ov_SC05_008/ov_SC05_008_jr_80140608.c b/src/ov_SC05_008/ov_SC05_008_jr_80140608.c index 6aa894a3b..55ed05f92 100644 --- a/src/ov_SC05_008/ov_SC05_008_jr_80140608.c +++ b/src/ov_SC05_008/ov_SC05_008_jr_80140608.c @@ -1842,7 +1842,25 @@ void func_80142A80(void) } -INCLUDE_ASM("asm/ov_SC05_008/nonmatchings/ov_SC05_008_jr_80140608", func_80142B2C); +extern void func_80142C84(s32 a0); +extern void func_80143994(s32 a0, s32 a1); +extern s32 func_8012AD50(void *a0); + +void func_80142B2C(void *arg0) { + *(s32 *)((u8 *)arg0 + 0x1c) = 0x180; + *(s16 *)((u8 *)arg0 + 0x5c) = 0x100; + *(u16 *)((u8 *)arg0 + 0x100) = *(u16 *)((u8 *)arg0 + 0x70) & 0x100; + *(u16 *)((u8 *)arg0 + 0x70) = *(u16 *)((u8 *)arg0 + 0x70) & 3; + *(u16 *)((u8 *)arg0 + 0x72) = *(u16 *)((u8 *)arg0 + 0x72) | 0x1000; + if (*(s16 *)((u8 *)arg0 + 0x100) == 0) { + ((void (*)(void))func_80142C84)(); + } + *(s32 *)((u8 *)arg0 + 0xcc) = + ((s32 (*)(s32, s32))func_80143994)( + (s32)arg0, (s32)*(s16 *)(*(s32 *)((u8 *)arg0 + 0x20) + 0x18)); + func_8012AD50(arg0); +} + DEFINE_func_80142BB4() /* dedup: shared engine-core @0x80142BB4 (src/shared) */ diff --git a/src/ov_SC05_009/ov_SC05_009_jr_80140608.c b/src/ov_SC05_009/ov_SC05_009_jr_80140608.c index 2ba2b846e..86e015476 100644 --- a/src/ov_SC05_009/ov_SC05_009_jr_80140608.c +++ b/src/ov_SC05_009/ov_SC05_009_jr_80140608.c @@ -1842,7 +1842,25 @@ void func_80142A80(void) } -INCLUDE_ASM("asm/ov_SC05_009/nonmatchings/ov_SC05_009_jr_80140608", func_80142B2C); +extern void func_80142C84(s32 a0); +extern void func_80143994(s32 a0, s32 a1); +extern s32 func_8012AD50(void *a0); + +void func_80142B2C(void *arg0) { + *(s32 *)((u8 *)arg0 + 0x1c) = 0x180; + *(s16 *)((u8 *)arg0 + 0x5c) = 0x100; + *(u16 *)((u8 *)arg0 + 0x100) = *(u16 *)((u8 *)arg0 + 0x70) & 0x100; + *(u16 *)((u8 *)arg0 + 0x70) = *(u16 *)((u8 *)arg0 + 0x70) & 3; + *(u16 *)((u8 *)arg0 + 0x72) = *(u16 *)((u8 *)arg0 + 0x72) | 0x1000; + if (*(s16 *)((u8 *)arg0 + 0x100) == 0) { + ((void (*)(void))func_80142C84)(); + } + *(s32 *)((u8 *)arg0 + 0xcc) = + ((s32 (*)(s32, s32))func_80143994)( + (s32)arg0, (s32)*(s16 *)(*(s32 *)((u8 *)arg0 + 0x20) + 0x18)); + func_8012AD50(arg0); +} + DEFINE_func_80142BB4() /* dedup: shared engine-core @0x80142BB4 (src/shared) */ diff --git a/src/ov_SC05_010/ov_SC05_010_jr_80140608.c b/src/ov_SC05_010/ov_SC05_010_jr_80140608.c index 9bb44ee65..dd3432f6f 100644 --- a/src/ov_SC05_010/ov_SC05_010_jr_80140608.c +++ b/src/ov_SC05_010/ov_SC05_010_jr_80140608.c @@ -1842,7 +1842,25 @@ void func_80142A80(void) } -INCLUDE_ASM("asm/ov_SC05_010/nonmatchings/ov_SC05_010_jr_80140608", func_80142B2C); +extern void func_80142C84(s32 a0); +extern void func_80143994(s32 a0, s32 a1); +extern s32 func_8012AD50(void *a0); + +void func_80142B2C(void *arg0) { + *(s32 *)((u8 *)arg0 + 0x1c) = 0x180; + *(s16 *)((u8 *)arg0 + 0x5c) = 0x100; + *(u16 *)((u8 *)arg0 + 0x100) = *(u16 *)((u8 *)arg0 + 0x70) & 0x100; + *(u16 *)((u8 *)arg0 + 0x70) = *(u16 *)((u8 *)arg0 + 0x70) & 3; + *(u16 *)((u8 *)arg0 + 0x72) = *(u16 *)((u8 *)arg0 + 0x72) | 0x1000; + if (*(s16 *)((u8 *)arg0 + 0x100) == 0) { + ((void (*)(void))func_80142C84)(); + } + *(s32 *)((u8 *)arg0 + 0xcc) = + ((s32 (*)(s32, s32))func_80143994)( + (s32)arg0, (s32)*(s16 *)(*(s32 *)((u8 *)arg0 + 0x20) + 0x18)); + func_8012AD50(arg0); +} + DEFINE_func_80142BB4() /* dedup: shared engine-core @0x80142BB4 (src/shared) */ diff --git a/src/ov_SC05_011/ov_SC05_011_jr_80140608.c b/src/ov_SC05_011/ov_SC05_011_jr_80140608.c index a2a5329c6..036be8e5c 100644 --- a/src/ov_SC05_011/ov_SC05_011_jr_80140608.c +++ b/src/ov_SC05_011/ov_SC05_011_jr_80140608.c @@ -1842,7 +1842,25 @@ void func_80142A80(void) } -INCLUDE_ASM("asm/ov_SC05_011/nonmatchings/ov_SC05_011_jr_80140608", func_80142B2C); +extern void func_80142C84(s32 a0); +extern void func_80143994(s32 a0, s32 a1); +extern s32 func_8012AD50(void *a0); + +void func_80142B2C(void *arg0) { + *(s32 *)((u8 *)arg0 + 0x1c) = 0x180; + *(s16 *)((u8 *)arg0 + 0x5c) = 0x100; + *(u16 *)((u8 *)arg0 + 0x100) = *(u16 *)((u8 *)arg0 + 0x70) & 0x100; + *(u16 *)((u8 *)arg0 + 0x70) = *(u16 *)((u8 *)arg0 + 0x70) & 3; + *(u16 *)((u8 *)arg0 + 0x72) = *(u16 *)((u8 *)arg0 + 0x72) | 0x1000; + if (*(s16 *)((u8 *)arg0 + 0x100) == 0) { + ((void (*)(void))func_80142C84)(); + } + *(s32 *)((u8 *)arg0 + 0xcc) = + ((s32 (*)(s32, s32))func_80143994)( + (s32)arg0, (s32)*(s16 *)(*(s32 *)((u8 *)arg0 + 0x20) + 0x18)); + func_8012AD50(arg0); +} + DEFINE_func_80142BB4() /* dedup: shared engine-core @0x80142BB4 (src/shared) */ diff --git a/src/ov_SC05_017/ov_SC05_017_jr_80140608.c b/src/ov_SC05_017/ov_SC05_017_jr_80140608.c index 70b50b108..bb2456e7e 100644 --- a/src/ov_SC05_017/ov_SC05_017_jr_80140608.c +++ b/src/ov_SC05_017/ov_SC05_017_jr_80140608.c @@ -1842,7 +1842,25 @@ void func_80142A80(void) } -INCLUDE_ASM("asm/ov_SC05_017/nonmatchings/ov_SC05_017_jr_80140608", func_80142B2C); +extern void func_80142C84(s32 a0); +extern void func_80143994(s32 a0, s32 a1); +extern s32 func_8012AD50(void *a0); + +void func_80142B2C(void *arg0) { + *(s32 *)((u8 *)arg0 + 0x1c) = 0x180; + *(s16 *)((u8 *)arg0 + 0x5c) = 0x100; + *(u16 *)((u8 *)arg0 + 0x100) = *(u16 *)((u8 *)arg0 + 0x70) & 0x100; + *(u16 *)((u8 *)arg0 + 0x70) = *(u16 *)((u8 *)arg0 + 0x70) & 3; + *(u16 *)((u8 *)arg0 + 0x72) = *(u16 *)((u8 *)arg0 + 0x72) | 0x1000; + if (*(s16 *)((u8 *)arg0 + 0x100) == 0) { + ((void (*)(void))func_80142C84)(); + } + *(s32 *)((u8 *)arg0 + 0xcc) = + ((s32 (*)(s32, s32))func_80143994)( + (s32)arg0, (s32)*(s16 *)(*(s32 *)((u8 *)arg0 + 0x20) + 0x18)); + func_8012AD50(arg0); +} + DEFINE_func_80142BB4() /* dedup: shared engine-core @0x80142BB4 (src/shared) */ diff --git a/src/ov_SC05_018/ov_SC05_018_jr_80140608.c b/src/ov_SC05_018/ov_SC05_018_jr_80140608.c index 6988c9fc5..ebc21f659 100644 --- a/src/ov_SC05_018/ov_SC05_018_jr_80140608.c +++ b/src/ov_SC05_018/ov_SC05_018_jr_80140608.c @@ -1842,7 +1842,25 @@ void func_80142A80(void) } -INCLUDE_ASM("asm/ov_SC05_018/nonmatchings/ov_SC05_018_jr_80140608", func_80142B2C); +extern void func_80142C84(s32 a0); +extern void func_80143994(s32 a0, s32 a1); +extern s32 func_8012AD50(void *a0); + +void func_80142B2C(void *arg0) { + *(s32 *)((u8 *)arg0 + 0x1c) = 0x180; + *(s16 *)((u8 *)arg0 + 0x5c) = 0x100; + *(u16 *)((u8 *)arg0 + 0x100) = *(u16 *)((u8 *)arg0 + 0x70) & 0x100; + *(u16 *)((u8 *)arg0 + 0x70) = *(u16 *)((u8 *)arg0 + 0x70) & 3; + *(u16 *)((u8 *)arg0 + 0x72) = *(u16 *)((u8 *)arg0 + 0x72) | 0x1000; + if (*(s16 *)((u8 *)arg0 + 0x100) == 0) { + ((void (*)(void))func_80142C84)(); + } + *(s32 *)((u8 *)arg0 + 0xcc) = + ((s32 (*)(s32, s32))func_80143994)( + (s32)arg0, (s32)*(s16 *)(*(s32 *)((u8 *)arg0 + 0x20) + 0x18)); + func_8012AD50(arg0); +} + DEFINE_func_80142BB4() /* dedup: shared engine-core @0x80142BB4 (src/shared) */ diff --git a/src/ov_SC05_019/ov_SC05_019_jr_80140608.c b/src/ov_SC05_019/ov_SC05_019_jr_80140608.c index f200efab4..a93d15eea 100644 --- a/src/ov_SC05_019/ov_SC05_019_jr_80140608.c +++ b/src/ov_SC05_019/ov_SC05_019_jr_80140608.c @@ -1842,7 +1842,25 @@ void func_80142A80(void) } -INCLUDE_ASM("asm/ov_SC05_019/nonmatchings/ov_SC05_019_jr_80140608", func_80142B2C); +extern void func_80142C84(s32 a0); +extern void func_80143994(s32 a0, s32 a1); +extern s32 func_8012AD50(void *a0); + +void func_80142B2C(void *arg0) { + *(s32 *)((u8 *)arg0 + 0x1c) = 0x180; + *(s16 *)((u8 *)arg0 + 0x5c) = 0x100; + *(u16 *)((u8 *)arg0 + 0x100) = *(u16 *)((u8 *)arg0 + 0x70) & 0x100; + *(u16 *)((u8 *)arg0 + 0x70) = *(u16 *)((u8 *)arg0 + 0x70) & 3; + *(u16 *)((u8 *)arg0 + 0x72) = *(u16 *)((u8 *)arg0 + 0x72) | 0x1000; + if (*(s16 *)((u8 *)arg0 + 0x100) == 0) { + ((void (*)(void))func_80142C84)(); + } + *(s32 *)((u8 *)arg0 + 0xcc) = + ((s32 (*)(s32, s32))func_80143994)( + (s32)arg0, (s32)*(s16 *)(*(s32 *)((u8 *)arg0 + 0x20) + 0x18)); + func_8012AD50(arg0); +} + DEFINE_func_80142BB4() /* dedup: shared engine-core @0x80142BB4 (src/shared) */ diff --git a/src/ov_SC06_000/ov_SC06_000_jr_80140608.c b/src/ov_SC06_000/ov_SC06_000_jr_80140608.c index 9f6727345..7a8619c2a 100644 --- a/src/ov_SC06_000/ov_SC06_000_jr_80140608.c +++ b/src/ov_SC06_000/ov_SC06_000_jr_80140608.c @@ -1894,7 +1894,25 @@ void func_80142A80(void) } -INCLUDE_ASM("asm/ov_SC06_000/nonmatchings/ov_SC06_000_jr_80140608", func_80142B2C); +extern void func_80142C84(s32 a0); +extern void func_80143994(s32 a0, s32 a1); +extern s32 func_8012AD50(void *a0); + +void func_80142B2C(void *arg0) { + *(s32 *)((u8 *)arg0 + 0x1c) = 0x180; + *(s16 *)((u8 *)arg0 + 0x5c) = 0x100; + *(u16 *)((u8 *)arg0 + 0x100) = *(u16 *)((u8 *)arg0 + 0x70) & 0x100; + *(u16 *)((u8 *)arg0 + 0x70) = *(u16 *)((u8 *)arg0 + 0x70) & 3; + *(u16 *)((u8 *)arg0 + 0x72) = *(u16 *)((u8 *)arg0 + 0x72) | 0x1000; + if (*(s16 *)((u8 *)arg0 + 0x100) == 0) { + ((void (*)(void))func_80142C84)(); + } + *(s32 *)((u8 *)arg0 + 0xcc) = + ((s32 (*)(s32, s32))func_80143994)( + (s32)arg0, (s32)*(s16 *)(*(s32 *)((u8 *)arg0 + 0x20) + 0x18)); + func_8012AD50(arg0); +} + DEFINE_func_80142BB4() /* dedup: shared engine-core @0x80142BB4 (src/shared) */ diff --git a/src/ov_SC06_006/ov_SC06_006_jr_80140608.c b/src/ov_SC06_006/ov_SC06_006_jr_80140608.c index fd7d4de40..3a288aae3 100644 --- a/src/ov_SC06_006/ov_SC06_006_jr_80140608.c +++ b/src/ov_SC06_006/ov_SC06_006_jr_80140608.c @@ -1842,7 +1842,25 @@ void func_80142A80(void) } -INCLUDE_ASM("asm/ov_SC06_006/nonmatchings/ov_SC06_006_jr_80140608", func_80142B2C); +extern void func_80142C84(s32 a0); +extern void func_80143994(s32 a0, s32 a1); +extern s32 func_8012AD50(void *a0); + +void func_80142B2C(void *arg0) { + *(s32 *)((u8 *)arg0 + 0x1c) = 0x180; + *(s16 *)((u8 *)arg0 + 0x5c) = 0x100; + *(u16 *)((u8 *)arg0 + 0x100) = *(u16 *)((u8 *)arg0 + 0x70) & 0x100; + *(u16 *)((u8 *)arg0 + 0x70) = *(u16 *)((u8 *)arg0 + 0x70) & 3; + *(u16 *)((u8 *)arg0 + 0x72) = *(u16 *)((u8 *)arg0 + 0x72) | 0x1000; + if (*(s16 *)((u8 *)arg0 + 0x100) == 0) { + ((void (*)(void))func_80142C84)(); + } + *(s32 *)((u8 *)arg0 + 0xcc) = + ((s32 (*)(s32, s32))func_80143994)( + (s32)arg0, (s32)*(s16 *)(*(s32 *)((u8 *)arg0 + 0x20) + 0x18)); + func_8012AD50(arg0); +} + DEFINE_func_80142BB4() /* dedup: shared engine-core @0x80142BB4 (src/shared) */ diff --git a/src/ov_SC06_008/ov_SC06_008_jr_80140608.c b/src/ov_SC06_008/ov_SC06_008_jr_80140608.c index 116d6b427..a87c70abc 100644 --- a/src/ov_SC06_008/ov_SC06_008_jr_80140608.c +++ b/src/ov_SC06_008/ov_SC06_008_jr_80140608.c @@ -1842,7 +1842,25 @@ void func_80142A80(void) } -INCLUDE_ASM("asm/ov_SC06_008/nonmatchings/ov_SC06_008_jr_80140608", func_80142B2C); +extern void func_80142C84(s32 a0); +extern void func_80143994(s32 a0, s32 a1); +extern s32 func_8012AD50(void *a0); + +void func_80142B2C(void *arg0) { + *(s32 *)((u8 *)arg0 + 0x1c) = 0x180; + *(s16 *)((u8 *)arg0 + 0x5c) = 0x100; + *(u16 *)((u8 *)arg0 + 0x100) = *(u16 *)((u8 *)arg0 + 0x70) & 0x100; + *(u16 *)((u8 *)arg0 + 0x70) = *(u16 *)((u8 *)arg0 + 0x70) & 3; + *(u16 *)((u8 *)arg0 + 0x72) = *(u16 *)((u8 *)arg0 + 0x72) | 0x1000; + if (*(s16 *)((u8 *)arg0 + 0x100) == 0) { + ((void (*)(void))func_80142C84)(); + } + *(s32 *)((u8 *)arg0 + 0xcc) = + ((s32 (*)(s32, s32))func_80143994)( + (s32)arg0, (s32)*(s16 *)(*(s32 *)((u8 *)arg0 + 0x20) + 0x18)); + func_8012AD50(arg0); +} + DEFINE_func_80142BB4() /* dedup: shared engine-core @0x80142BB4 (src/shared) */ diff --git a/src/ov_SC06_010/ov_SC06_010_jr_80140608.c b/src/ov_SC06_010/ov_SC06_010_jr_80140608.c index e89d9510b..d067bf8ab 100644 --- a/src/ov_SC06_010/ov_SC06_010_jr_80140608.c +++ b/src/ov_SC06_010/ov_SC06_010_jr_80140608.c @@ -1876,7 +1876,25 @@ void func_80142A80(void) } -INCLUDE_ASM("asm/ov_SC06_010/nonmatchings/ov_SC06_010_jr_80140608", func_80142B2C); +extern void func_80142C84(s32 a0); +extern void func_80143994(s32 a0, s32 a1); +extern s32 func_8012AD50(void *a0); + +void func_80142B2C(void *arg0) { + *(s32 *)((u8 *)arg0 + 0x1c) = 0x180; + *(s16 *)((u8 *)arg0 + 0x5c) = 0x100; + *(u16 *)((u8 *)arg0 + 0x100) = *(u16 *)((u8 *)arg0 + 0x70) & 0x100; + *(u16 *)((u8 *)arg0 + 0x70) = *(u16 *)((u8 *)arg0 + 0x70) & 3; + *(u16 *)((u8 *)arg0 + 0x72) = *(u16 *)((u8 *)arg0 + 0x72) | 0x1000; + if (*(s16 *)((u8 *)arg0 + 0x100) == 0) { + ((void (*)(void))func_80142C84)(); + } + *(s32 *)((u8 *)arg0 + 0xcc) = + ((s32 (*)(s32, s32))func_80143994)( + (s32)arg0, (s32)*(s16 *)(*(s32 *)((u8 *)arg0 + 0x20) + 0x18)); + func_8012AD50(arg0); +} + DEFINE_func_80142BB4() /* dedup: shared engine-core @0x80142BB4 (src/shared) */ diff --git a/src/ov_SC06_011/ov_SC06_011_jr_80140608.c b/src/ov_SC06_011/ov_SC06_011_jr_80140608.c index 19a28d4de..e7d5577a2 100644 --- a/src/ov_SC06_011/ov_SC06_011_jr_80140608.c +++ b/src/ov_SC06_011/ov_SC06_011_jr_80140608.c @@ -1842,7 +1842,25 @@ void func_80142A80(void) } -INCLUDE_ASM("asm/ov_SC06_011/nonmatchings/ov_SC06_011_jr_80140608", func_80142B2C); +extern void func_80142C84(s32 a0); +extern void func_80143994(s32 a0, s32 a1); +extern s32 func_8012AD50(void *a0); + +void func_80142B2C(void *arg0) { + *(s32 *)((u8 *)arg0 + 0x1c) = 0x180; + *(s16 *)((u8 *)arg0 + 0x5c) = 0x100; + *(u16 *)((u8 *)arg0 + 0x100) = *(u16 *)((u8 *)arg0 + 0x70) & 0x100; + *(u16 *)((u8 *)arg0 + 0x70) = *(u16 *)((u8 *)arg0 + 0x70) & 3; + *(u16 *)((u8 *)arg0 + 0x72) = *(u16 *)((u8 *)arg0 + 0x72) | 0x1000; + if (*(s16 *)((u8 *)arg0 + 0x100) == 0) { + ((void (*)(void))func_80142C84)(); + } + *(s32 *)((u8 *)arg0 + 0xcc) = + ((s32 (*)(s32, s32))func_80143994)( + (s32)arg0, (s32)*(s16 *)(*(s32 *)((u8 *)arg0 + 0x20) + 0x18)); + func_8012AD50(arg0); +} + DEFINE_func_80142BB4() /* dedup: shared engine-core @0x80142BB4 (src/shared) */ diff --git a/src/ov_SC06_013/ov_SC06_013_jr_80140608.c b/src/ov_SC06_013/ov_SC06_013_jr_80140608.c index ceb7bd662..12ba4828b 100644 --- a/src/ov_SC06_013/ov_SC06_013_jr_80140608.c +++ b/src/ov_SC06_013/ov_SC06_013_jr_80140608.c @@ -1843,7 +1843,25 @@ void func_80142A80(void) } -INCLUDE_ASM("asm/ov_SC06_013/nonmatchings/ov_SC06_013_jr_80140608", func_80142B2C); +extern void func_80142C84(s32 a0); +extern void func_80143994(s32 a0, s32 a1); +extern s32 func_8012AD50(void *a0); + +void func_80142B2C(void *arg0) { + *(s32 *)((u8 *)arg0 + 0x1c) = 0x180; + *(s16 *)((u8 *)arg0 + 0x5c) = 0x100; + *(u16 *)((u8 *)arg0 + 0x100) = *(u16 *)((u8 *)arg0 + 0x70) & 0x100; + *(u16 *)((u8 *)arg0 + 0x70) = *(u16 *)((u8 *)arg0 + 0x70) & 3; + *(u16 *)((u8 *)arg0 + 0x72) = *(u16 *)((u8 *)arg0 + 0x72) | 0x1000; + if (*(s16 *)((u8 *)arg0 + 0x100) == 0) { + ((void (*)(void))func_80142C84)(); + } + *(s32 *)((u8 *)arg0 + 0xcc) = + ((s32 (*)(s32, s32))func_80143994)( + (s32)arg0, (s32)*(s16 *)(*(s32 *)((u8 *)arg0 + 0x20) + 0x18)); + func_8012AD50(arg0); +} + DEFINE_func_80142BB4() /* dedup: shared engine-core @0x80142BB4 (src/shared) */ diff --git a/src/ov_SC06_014/ov_SC06_014_jr_80140608.c b/src/ov_SC06_014/ov_SC06_014_jr_80140608.c index 48890fb19..2372f1b45 100644 --- a/src/ov_SC06_014/ov_SC06_014_jr_80140608.c +++ b/src/ov_SC06_014/ov_SC06_014_jr_80140608.c @@ -1842,7 +1842,25 @@ void func_80142A80(void) } -INCLUDE_ASM("asm/ov_SC06_014/nonmatchings/ov_SC06_014_jr_80140608", func_80142B2C); +extern void func_80142C84(s32 a0); +extern void func_80143994(s32 a0, s32 a1); +extern s32 func_8012AD50(void *a0); + +void func_80142B2C(void *arg0) { + *(s32 *)((u8 *)arg0 + 0x1c) = 0x180; + *(s16 *)((u8 *)arg0 + 0x5c) = 0x100; + *(u16 *)((u8 *)arg0 + 0x100) = *(u16 *)((u8 *)arg0 + 0x70) & 0x100; + *(u16 *)((u8 *)arg0 + 0x70) = *(u16 *)((u8 *)arg0 + 0x70) & 3; + *(u16 *)((u8 *)arg0 + 0x72) = *(u16 *)((u8 *)arg0 + 0x72) | 0x1000; + if (*(s16 *)((u8 *)arg0 + 0x100) == 0) { + ((void (*)(void))func_80142C84)(); + } + *(s32 *)((u8 *)arg0 + 0xcc) = + ((s32 (*)(s32, s32))func_80143994)( + (s32)arg0, (s32)*(s16 *)(*(s32 *)((u8 *)arg0 + 0x20) + 0x18)); + func_8012AD50(arg0); +} + DEFINE_func_80142BB4() /* dedup: shared engine-core @0x80142BB4 (src/shared) */ diff --git a/src/ov_SC06_015/ov_SC06_015_jr_80140608.c b/src/ov_SC06_015/ov_SC06_015_jr_80140608.c index 44c512cf3..6a14b147a 100644 --- a/src/ov_SC06_015/ov_SC06_015_jr_80140608.c +++ b/src/ov_SC06_015/ov_SC06_015_jr_80140608.c @@ -1842,7 +1842,25 @@ void func_80142A80(void) } -INCLUDE_ASM("asm/ov_SC06_015/nonmatchings/ov_SC06_015_jr_80140608", func_80142B2C); +extern void func_80142C84(s32 a0); +extern void func_80143994(s32 a0, s32 a1); +extern s32 func_8012AD50(void *a0); + +void func_80142B2C(void *arg0) { + *(s32 *)((u8 *)arg0 + 0x1c) = 0x180; + *(s16 *)((u8 *)arg0 + 0x5c) = 0x100; + *(u16 *)((u8 *)arg0 + 0x100) = *(u16 *)((u8 *)arg0 + 0x70) & 0x100; + *(u16 *)((u8 *)arg0 + 0x70) = *(u16 *)((u8 *)arg0 + 0x70) & 3; + *(u16 *)((u8 *)arg0 + 0x72) = *(u16 *)((u8 *)arg0 + 0x72) | 0x1000; + if (*(s16 *)((u8 *)arg0 + 0x100) == 0) { + ((void (*)(void))func_80142C84)(); + } + *(s32 *)((u8 *)arg0 + 0xcc) = + ((s32 (*)(s32, s32))func_80143994)( + (s32)arg0, (s32)*(s16 *)(*(s32 *)((u8 *)arg0 + 0x20) + 0x18)); + func_8012AD50(arg0); +} + DEFINE_func_80142BB4() /* dedup: shared engine-core @0x80142BB4 (src/shared) */ diff --git a/src/ov_SC06_016/ov_SC06_016_jr_80140608.c b/src/ov_SC06_016/ov_SC06_016_jr_80140608.c index 02fad4de0..c0b926753 100644 --- a/src/ov_SC06_016/ov_SC06_016_jr_80140608.c +++ b/src/ov_SC06_016/ov_SC06_016_jr_80140608.c @@ -1858,7 +1858,25 @@ void func_80142A80(void) } -INCLUDE_ASM("asm/ov_SC06_016/nonmatchings/ov_SC06_016_jr_80140608", func_80142B2C); +extern void func_80142C84(s32 a0); +extern void func_80143994(s32 a0, s32 a1); +extern s32 func_8012AD50(void *a0); + +void func_80142B2C(void *arg0) { + *(s32 *)((u8 *)arg0 + 0x1c) = 0x180; + *(s16 *)((u8 *)arg0 + 0x5c) = 0x100; + *(u16 *)((u8 *)arg0 + 0x100) = *(u16 *)((u8 *)arg0 + 0x70) & 0x100; + *(u16 *)((u8 *)arg0 + 0x70) = *(u16 *)((u8 *)arg0 + 0x70) & 3; + *(u16 *)((u8 *)arg0 + 0x72) = *(u16 *)((u8 *)arg0 + 0x72) | 0x1000; + if (*(s16 *)((u8 *)arg0 + 0x100) == 0) { + ((void (*)(void))func_80142C84)(); + } + *(s32 *)((u8 *)arg0 + 0xcc) = + ((s32 (*)(s32, s32))func_80143994)( + (s32)arg0, (s32)*(s16 *)(*(s32 *)((u8 *)arg0 + 0x20) + 0x18)); + func_8012AD50(arg0); +} + DEFINE_func_80142BB4() /* dedup: shared engine-core @0x80142BB4 (src/shared) */ diff --git a/src/ov_SC06_018/ov_SC06_018_jr_80140608.c b/src/ov_SC06_018/ov_SC06_018_jr_80140608.c index 429327667..72fac3f4a 100644 --- a/src/ov_SC06_018/ov_SC06_018_jr_80140608.c +++ b/src/ov_SC06_018/ov_SC06_018_jr_80140608.c @@ -1842,7 +1842,25 @@ void func_80142A80(void) } -INCLUDE_ASM("asm/ov_SC06_018/nonmatchings/ov_SC06_018_jr_80140608", func_80142B2C); +extern void func_80142C84(s32 a0); +extern void func_80143994(s32 a0, s32 a1); +extern s32 func_8012AD50(void *a0); + +void func_80142B2C(void *arg0) { + *(s32 *)((u8 *)arg0 + 0x1c) = 0x180; + *(s16 *)((u8 *)arg0 + 0x5c) = 0x100; + *(u16 *)((u8 *)arg0 + 0x100) = *(u16 *)((u8 *)arg0 + 0x70) & 0x100; + *(u16 *)((u8 *)arg0 + 0x70) = *(u16 *)((u8 *)arg0 + 0x70) & 3; + *(u16 *)((u8 *)arg0 + 0x72) = *(u16 *)((u8 *)arg0 + 0x72) | 0x1000; + if (*(s16 *)((u8 *)arg0 + 0x100) == 0) { + ((void (*)(void))func_80142C84)(); + } + *(s32 *)((u8 *)arg0 + 0xcc) = + ((s32 (*)(s32, s32))func_80143994)( + (s32)arg0, (s32)*(s16 *)(*(s32 *)((u8 *)arg0 + 0x20) + 0x18)); + func_8012AD50(arg0); +} + DEFINE_func_80142BB4() /* dedup: shared engine-core @0x80142BB4 (src/shared) */ diff --git a/src/ov_SC06_020/ov_SC06_020_jr_80140608.c b/src/ov_SC06_020/ov_SC06_020_jr_80140608.c index 8c7b75ba0..018286b3c 100644 --- a/src/ov_SC06_020/ov_SC06_020_jr_80140608.c +++ b/src/ov_SC06_020/ov_SC06_020_jr_80140608.c @@ -1842,7 +1842,25 @@ void func_80142A80(void) } -INCLUDE_ASM("asm/ov_SC06_020/nonmatchings/ov_SC06_020_jr_80140608", func_80142B2C); +extern void func_80142C84(s32 a0); +extern void func_80143994(s32 a0, s32 a1); +extern s32 func_8012AD50(void *a0); + +void func_80142B2C(void *arg0) { + *(s32 *)((u8 *)arg0 + 0x1c) = 0x180; + *(s16 *)((u8 *)arg0 + 0x5c) = 0x100; + *(u16 *)((u8 *)arg0 + 0x100) = *(u16 *)((u8 *)arg0 + 0x70) & 0x100; + *(u16 *)((u8 *)arg0 + 0x70) = *(u16 *)((u8 *)arg0 + 0x70) & 3; + *(u16 *)((u8 *)arg0 + 0x72) = *(u16 *)((u8 *)arg0 + 0x72) | 0x1000; + if (*(s16 *)((u8 *)arg0 + 0x100) == 0) { + ((void (*)(void))func_80142C84)(); + } + *(s32 *)((u8 *)arg0 + 0xcc) = + ((s32 (*)(s32, s32))func_80143994)( + (s32)arg0, (s32)*(s16 *)(*(s32 *)((u8 *)arg0 + 0x20) + 0x18)); + func_8012AD50(arg0); +} + DEFINE_func_80142BB4() /* dedup: shared engine-core @0x80142BB4 (src/shared) */ diff --git a/src/ov_SC06_022/ov_SC06_022_jr_80140608.c b/src/ov_SC06_022/ov_SC06_022_jr_80140608.c index e837ede20..0e4f71f3f 100644 --- a/src/ov_SC06_022/ov_SC06_022_jr_80140608.c +++ b/src/ov_SC06_022/ov_SC06_022_jr_80140608.c @@ -1842,7 +1842,25 @@ void func_80142A80(void) } -INCLUDE_ASM("asm/ov_SC06_022/nonmatchings/ov_SC06_022_jr_80140608", func_80142B2C); +extern void func_80142C84(s32 a0); +extern void func_80143994(s32 a0, s32 a1); +extern s32 func_8012AD50(void *a0); + +void func_80142B2C(void *arg0) { + *(s32 *)((u8 *)arg0 + 0x1c) = 0x180; + *(s16 *)((u8 *)arg0 + 0x5c) = 0x100; + *(u16 *)((u8 *)arg0 + 0x100) = *(u16 *)((u8 *)arg0 + 0x70) & 0x100; + *(u16 *)((u8 *)arg0 + 0x70) = *(u16 *)((u8 *)arg0 + 0x70) & 3; + *(u16 *)((u8 *)arg0 + 0x72) = *(u16 *)((u8 *)arg0 + 0x72) | 0x1000; + if (*(s16 *)((u8 *)arg0 + 0x100) == 0) { + ((void (*)(void))func_80142C84)(); + } + *(s32 *)((u8 *)arg0 + 0xcc) = + ((s32 (*)(s32, s32))func_80143994)( + (s32)arg0, (s32)*(s16 *)(*(s32 *)((u8 *)arg0 + 0x20) + 0x18)); + func_8012AD50(arg0); +} + DEFINE_func_80142BB4() /* dedup: shared engine-core @0x80142BB4 (src/shared) */ diff --git a/src/ov_SC06_024/ov_SC06_024_jr_80140608.c b/src/ov_SC06_024/ov_SC06_024_jr_80140608.c index 92227beed..2816a7dfc 100644 --- a/src/ov_SC06_024/ov_SC06_024_jr_80140608.c +++ b/src/ov_SC06_024/ov_SC06_024_jr_80140608.c @@ -1858,7 +1858,25 @@ void func_80142A80(void) } -INCLUDE_ASM("asm/ov_SC06_024/nonmatchings/ov_SC06_024_jr_80140608", func_80142B2C); +extern void func_80142C84(s32 a0); +extern void func_80143994(s32 a0, s32 a1); +extern s32 func_8012AD50(void *a0); + +void func_80142B2C(void *arg0) { + *(s32 *)((u8 *)arg0 + 0x1c) = 0x180; + *(s16 *)((u8 *)arg0 + 0x5c) = 0x100; + *(u16 *)((u8 *)arg0 + 0x100) = *(u16 *)((u8 *)arg0 + 0x70) & 0x100; + *(u16 *)((u8 *)arg0 + 0x70) = *(u16 *)((u8 *)arg0 + 0x70) & 3; + *(u16 *)((u8 *)arg0 + 0x72) = *(u16 *)((u8 *)arg0 + 0x72) | 0x1000; + if (*(s16 *)((u8 *)arg0 + 0x100) == 0) { + ((void (*)(void))func_80142C84)(); + } + *(s32 *)((u8 *)arg0 + 0xcc) = + ((s32 (*)(s32, s32))func_80143994)( + (s32)arg0, (s32)*(s16 *)(*(s32 *)((u8 *)arg0 + 0x20) + 0x18)); + func_8012AD50(arg0); +} + DEFINE_func_80142BB4() /* dedup: shared engine-core @0x80142BB4 (src/shared) */ diff --git a/src/ov_SC06_025/ov_SC06_025_jr_80140608.c b/src/ov_SC06_025/ov_SC06_025_jr_80140608.c index 23e3b45aa..c9244c8d1 100644 --- a/src/ov_SC06_025/ov_SC06_025_jr_80140608.c +++ b/src/ov_SC06_025/ov_SC06_025_jr_80140608.c @@ -1842,7 +1842,25 @@ void func_80142A80(void) } -INCLUDE_ASM("asm/ov_SC06_025/nonmatchings/ov_SC06_025_jr_80140608", func_80142B2C); +extern void func_80142C84(s32 a0); +extern void func_80143994(s32 a0, s32 a1); +extern s32 func_8012AD50(void *a0); + +void func_80142B2C(void *arg0) { + *(s32 *)((u8 *)arg0 + 0x1c) = 0x180; + *(s16 *)((u8 *)arg0 + 0x5c) = 0x100; + *(u16 *)((u8 *)arg0 + 0x100) = *(u16 *)((u8 *)arg0 + 0x70) & 0x100; + *(u16 *)((u8 *)arg0 + 0x70) = *(u16 *)((u8 *)arg0 + 0x70) & 3; + *(u16 *)((u8 *)arg0 + 0x72) = *(u16 *)((u8 *)arg0 + 0x72) | 0x1000; + if (*(s16 *)((u8 *)arg0 + 0x100) == 0) { + ((void (*)(void))func_80142C84)(); + } + *(s32 *)((u8 *)arg0 + 0xcc) = + ((s32 (*)(s32, s32))func_80143994)( + (s32)arg0, (s32)*(s16 *)(*(s32 *)((u8 *)arg0 + 0x20) + 0x18)); + func_8012AD50(arg0); +} + DEFINE_func_80142BB4() /* dedup: shared engine-core @0x80142BB4 (src/shared) */ diff --git a/src/ov_SC06_027/ov_SC06_027_jr_80140608.c b/src/ov_SC06_027/ov_SC06_027_jr_80140608.c index 32f8f92e3..81e672060 100644 --- a/src/ov_SC06_027/ov_SC06_027_jr_80140608.c +++ b/src/ov_SC06_027/ov_SC06_027_jr_80140608.c @@ -1842,7 +1842,25 @@ void func_80142A80(void) } -INCLUDE_ASM("asm/ov_SC06_027/nonmatchings/ov_SC06_027_jr_80140608", func_80142B2C); +extern void func_80142C84(s32 a0); +extern void func_80143994(s32 a0, s32 a1); +extern s32 func_8012AD50(void *a0); + +void func_80142B2C(void *arg0) { + *(s32 *)((u8 *)arg0 + 0x1c) = 0x180; + *(s16 *)((u8 *)arg0 + 0x5c) = 0x100; + *(u16 *)((u8 *)arg0 + 0x100) = *(u16 *)((u8 *)arg0 + 0x70) & 0x100; + *(u16 *)((u8 *)arg0 + 0x70) = *(u16 *)((u8 *)arg0 + 0x70) & 3; + *(u16 *)((u8 *)arg0 + 0x72) = *(u16 *)((u8 *)arg0 + 0x72) | 0x1000; + if (*(s16 *)((u8 *)arg0 + 0x100) == 0) { + ((void (*)(void))func_80142C84)(); + } + *(s32 *)((u8 *)arg0 + 0xcc) = + ((s32 (*)(s32, s32))func_80143994)( + (s32)arg0, (s32)*(s16 *)(*(s32 *)((u8 *)arg0 + 0x20) + 0x18)); + func_8012AD50(arg0); +} + DEFINE_func_80142BB4() /* dedup: shared engine-core @0x80142BB4 (src/shared) */ diff --git a/src/ov_SC06_029/ov_SC06_029_jr_80140608.c b/src/ov_SC06_029/ov_SC06_029_jr_80140608.c index 60328478c..59ff0cdad 100644 --- a/src/ov_SC06_029/ov_SC06_029_jr_80140608.c +++ b/src/ov_SC06_029/ov_SC06_029_jr_80140608.c @@ -1842,7 +1842,25 @@ void func_80142A80(void) } -INCLUDE_ASM("asm/ov_SC06_029/nonmatchings/ov_SC06_029_jr_80140608", func_80142B2C); +extern void func_80142C84(s32 a0); +extern void func_80143994(s32 a0, s32 a1); +extern s32 func_8012AD50(void *a0); + +void func_80142B2C(void *arg0) { + *(s32 *)((u8 *)arg0 + 0x1c) = 0x180; + *(s16 *)((u8 *)arg0 + 0x5c) = 0x100; + *(u16 *)((u8 *)arg0 + 0x100) = *(u16 *)((u8 *)arg0 + 0x70) & 0x100; + *(u16 *)((u8 *)arg0 + 0x70) = *(u16 *)((u8 *)arg0 + 0x70) & 3; + *(u16 *)((u8 *)arg0 + 0x72) = *(u16 *)((u8 *)arg0 + 0x72) | 0x1000; + if (*(s16 *)((u8 *)arg0 + 0x100) == 0) { + ((void (*)(void))func_80142C84)(); + } + *(s32 *)((u8 *)arg0 + 0xcc) = + ((s32 (*)(s32, s32))func_80143994)( + (s32)arg0, (s32)*(s16 *)(*(s32 *)((u8 *)arg0 + 0x20) + 0x18)); + func_8012AD50(arg0); +} + DEFINE_func_80142BB4() /* dedup: shared engine-core @0x80142BB4 (src/shared) */ diff --git a/src/ov_SC06_030/ov_SC06_030_jr_80140608.c b/src/ov_SC06_030/ov_SC06_030_jr_80140608.c index 5dbb024de..70509c627 100644 --- a/src/ov_SC06_030/ov_SC06_030_jr_80140608.c +++ b/src/ov_SC06_030/ov_SC06_030_jr_80140608.c @@ -1842,7 +1842,25 @@ void func_80142A80(void) } -INCLUDE_ASM("asm/ov_SC06_030/nonmatchings/ov_SC06_030_jr_80140608", func_80142B2C); +extern void func_80142C84(s32 a0); +extern void func_80143994(s32 a0, s32 a1); +extern s32 func_8012AD50(void *a0); + +void func_80142B2C(void *arg0) { + *(s32 *)((u8 *)arg0 + 0x1c) = 0x180; + *(s16 *)((u8 *)arg0 + 0x5c) = 0x100; + *(u16 *)((u8 *)arg0 + 0x100) = *(u16 *)((u8 *)arg0 + 0x70) & 0x100; + *(u16 *)((u8 *)arg0 + 0x70) = *(u16 *)((u8 *)arg0 + 0x70) & 3; + *(u16 *)((u8 *)arg0 + 0x72) = *(u16 *)((u8 *)arg0 + 0x72) | 0x1000; + if (*(s16 *)((u8 *)arg0 + 0x100) == 0) { + ((void (*)(void))func_80142C84)(); + } + *(s32 *)((u8 *)arg0 + 0xcc) = + ((s32 (*)(s32, s32))func_80143994)( + (s32)arg0, (s32)*(s16 *)(*(s32 *)((u8 *)arg0 + 0x20) + 0x18)); + func_8012AD50(arg0); +} + DEFINE_func_80142BB4() /* dedup: shared engine-core @0x80142BB4 (src/shared) */ diff --git a/src/ov_SC06_032/ov_SC06_032_jr_80140608.c b/src/ov_SC06_032/ov_SC06_032_jr_80140608.c index 9e1af9709..076e99f7c 100644 --- a/src/ov_SC06_032/ov_SC06_032_jr_80140608.c +++ b/src/ov_SC06_032/ov_SC06_032_jr_80140608.c @@ -1842,7 +1842,25 @@ void func_80142A80(void) } -INCLUDE_ASM("asm/ov_SC06_032/nonmatchings/ov_SC06_032_jr_80140608", func_80142B2C); +extern void func_80142C84(s32 a0); +extern void func_80143994(s32 a0, s32 a1); +extern s32 func_8012AD50(void *a0); + +void func_80142B2C(void *arg0) { + *(s32 *)((u8 *)arg0 + 0x1c) = 0x180; + *(s16 *)((u8 *)arg0 + 0x5c) = 0x100; + *(u16 *)((u8 *)arg0 + 0x100) = *(u16 *)((u8 *)arg0 + 0x70) & 0x100; + *(u16 *)((u8 *)arg0 + 0x70) = *(u16 *)((u8 *)arg0 + 0x70) & 3; + *(u16 *)((u8 *)arg0 + 0x72) = *(u16 *)((u8 *)arg0 + 0x72) | 0x1000; + if (*(s16 *)((u8 *)arg0 + 0x100) == 0) { + ((void (*)(void))func_80142C84)(); + } + *(s32 *)((u8 *)arg0 + 0xcc) = + ((s32 (*)(s32, s32))func_80143994)( + (s32)arg0, (s32)*(s16 *)(*(s32 *)((u8 *)arg0 + 0x20) + 0x18)); + func_8012AD50(arg0); +} + DEFINE_func_80142BB4() /* dedup: shared engine-core @0x80142BB4 (src/shared) */ diff --git a/src/ov_SC06_033/ov_SC06_033_jr_80140608.c b/src/ov_SC06_033/ov_SC06_033_jr_80140608.c index 761d8fdb5..d4b087e4e 100644 --- a/src/ov_SC06_033/ov_SC06_033_jr_80140608.c +++ b/src/ov_SC06_033/ov_SC06_033_jr_80140608.c @@ -1842,7 +1842,25 @@ void func_80142A80(void) } -INCLUDE_ASM("asm/ov_SC06_033/nonmatchings/ov_SC06_033_jr_80140608", func_80142B2C); +extern void func_80142C84(s32 a0); +extern void func_80143994(s32 a0, s32 a1); +extern s32 func_8012AD50(void *a0); + +void func_80142B2C(void *arg0) { + *(s32 *)((u8 *)arg0 + 0x1c) = 0x180; + *(s16 *)((u8 *)arg0 + 0x5c) = 0x100; + *(u16 *)((u8 *)arg0 + 0x100) = *(u16 *)((u8 *)arg0 + 0x70) & 0x100; + *(u16 *)((u8 *)arg0 + 0x70) = *(u16 *)((u8 *)arg0 + 0x70) & 3; + *(u16 *)((u8 *)arg0 + 0x72) = *(u16 *)((u8 *)arg0 + 0x72) | 0x1000; + if (*(s16 *)((u8 *)arg0 + 0x100) == 0) { + ((void (*)(void))func_80142C84)(); + } + *(s32 *)((u8 *)arg0 + 0xcc) = + ((s32 (*)(s32, s32))func_80143994)( + (s32)arg0, (s32)*(s16 *)(*(s32 *)((u8 *)arg0 + 0x20) + 0x18)); + func_8012AD50(arg0); +} + DEFINE_func_80142BB4() /* dedup: shared engine-core @0x80142BB4 (src/shared) */ diff --git a/src/ov_SC07_000/ov_SC07_000_jr_80140608.c b/src/ov_SC07_000/ov_SC07_000_jr_80140608.c index 9c0199ab7..fe1ca3e0d 100644 --- a/src/ov_SC07_000/ov_SC07_000_jr_80140608.c +++ b/src/ov_SC07_000/ov_SC07_000_jr_80140608.c @@ -1844,7 +1844,25 @@ void func_80142A80(void) } -INCLUDE_ASM("asm/ov_SC07_000/nonmatchings/ov_SC07_000_jr_80140608", func_80142B2C); +extern void func_80142C84(s32 a0); +extern void func_80143994(s32 a0, s32 a1); +extern s32 func_8012AD50(void *a0); + +void func_80142B2C(void *arg0) { + *(s32 *)((u8 *)arg0 + 0x1c) = 0x180; + *(s16 *)((u8 *)arg0 + 0x5c) = 0x100; + *(u16 *)((u8 *)arg0 + 0x100) = *(u16 *)((u8 *)arg0 + 0x70) & 0x100; + *(u16 *)((u8 *)arg0 + 0x70) = *(u16 *)((u8 *)arg0 + 0x70) & 3; + *(u16 *)((u8 *)arg0 + 0x72) = *(u16 *)((u8 *)arg0 + 0x72) | 0x1000; + if (*(s16 *)((u8 *)arg0 + 0x100) == 0) { + ((void (*)(void))func_80142C84)(); + } + *(s32 *)((u8 *)arg0 + 0xcc) = + ((s32 (*)(s32, s32))func_80143994)( + (s32)arg0, (s32)*(s16 *)(*(s32 *)((u8 *)arg0 + 0x20) + 0x18)); + func_8012AD50(arg0); +} + DEFINE_func_80142BB4() /* dedup: shared engine-core @0x80142BB4 (src/shared) */ diff --git a/src/ov_SC07_001/ov_SC07_001_jr_80140608.c b/src/ov_SC07_001/ov_SC07_001_jr_80140608.c index 5c5951b7a..5238144c0 100644 --- a/src/ov_SC07_001/ov_SC07_001_jr_80140608.c +++ b/src/ov_SC07_001/ov_SC07_001_jr_80140608.c @@ -1842,7 +1842,25 @@ void func_80142A80(void) } -INCLUDE_ASM("asm/ov_SC07_001/nonmatchings/ov_SC07_001_jr_80140608", func_80142B2C); +extern void func_80142C84(s32 a0); +extern void func_80143994(s32 a0, s32 a1); +extern s32 func_8012AD50(void *a0); + +void func_80142B2C(void *arg0) { + *(s32 *)((u8 *)arg0 + 0x1c) = 0x180; + *(s16 *)((u8 *)arg0 + 0x5c) = 0x100; + *(u16 *)((u8 *)arg0 + 0x100) = *(u16 *)((u8 *)arg0 + 0x70) & 0x100; + *(u16 *)((u8 *)arg0 + 0x70) = *(u16 *)((u8 *)arg0 + 0x70) & 3; + *(u16 *)((u8 *)arg0 + 0x72) = *(u16 *)((u8 *)arg0 + 0x72) | 0x1000; + if (*(s16 *)((u8 *)arg0 + 0x100) == 0) { + ((void (*)(void))func_80142C84)(); + } + *(s32 *)((u8 *)arg0 + 0xcc) = + ((s32 (*)(s32, s32))func_80143994)( + (s32)arg0, (s32)*(s16 *)(*(s32 *)((u8 *)arg0 + 0x20) + 0x18)); + func_8012AD50(arg0); +} + DEFINE_func_80142BB4() /* dedup: shared engine-core @0x80142BB4 (src/shared) */ diff --git a/src/ov_SC07_002/ov_SC07_002_jr_80140608.c b/src/ov_SC07_002/ov_SC07_002_jr_80140608.c index 78e690a5e..823b4bcdd 100644 --- a/src/ov_SC07_002/ov_SC07_002_jr_80140608.c +++ b/src/ov_SC07_002/ov_SC07_002_jr_80140608.c @@ -1842,7 +1842,25 @@ void func_80142A80(void) } -INCLUDE_ASM("asm/ov_SC07_002/nonmatchings/ov_SC07_002_jr_80140608", func_80142B2C); +extern void func_80142C84(s32 a0); +extern void func_80143994(s32 a0, s32 a1); +extern s32 func_8012AD50(void *a0); + +void func_80142B2C(void *arg0) { + *(s32 *)((u8 *)arg0 + 0x1c) = 0x180; + *(s16 *)((u8 *)arg0 + 0x5c) = 0x100; + *(u16 *)((u8 *)arg0 + 0x100) = *(u16 *)((u8 *)arg0 + 0x70) & 0x100; + *(u16 *)((u8 *)arg0 + 0x70) = *(u16 *)((u8 *)arg0 + 0x70) & 3; + *(u16 *)((u8 *)arg0 + 0x72) = *(u16 *)((u8 *)arg0 + 0x72) | 0x1000; + if (*(s16 *)((u8 *)arg0 + 0x100) == 0) { + ((void (*)(void))func_80142C84)(); + } + *(s32 *)((u8 *)arg0 + 0xcc) = + ((s32 (*)(s32, s32))func_80143994)( + (s32)arg0, (s32)*(s16 *)(*(s32 *)((u8 *)arg0 + 0x20) + 0x18)); + func_8012AD50(arg0); +} + DEFINE_func_80142BB4() /* dedup: shared engine-core @0x80142BB4 (src/shared) */ diff --git a/src/ov_SC07_006/ov_SC07_006_jr_80140608.c b/src/ov_SC07_006/ov_SC07_006_jr_80140608.c index 6dc5aae0d..f277ce66c 100644 --- a/src/ov_SC07_006/ov_SC07_006_jr_80140608.c +++ b/src/ov_SC07_006/ov_SC07_006_jr_80140608.c @@ -1774,7 +1774,25 @@ void func_80142A80(void) } -INCLUDE_ASM("asm/ov_SC07_006/nonmatchings/ov_SC07_006_jr_80140608", func_80142B2C); +extern void func_80142C84(s32 a0); +extern void func_80143994(s32 a0, s32 a1); +extern s32 func_8012AD50(void *a0); + +void func_80142B2C(void *arg0) { + *(s32 *)((u8 *)arg0 + 0x1c) = 0x180; + *(s16 *)((u8 *)arg0 + 0x5c) = 0x100; + *(u16 *)((u8 *)arg0 + 0x100) = *(u16 *)((u8 *)arg0 + 0x70) & 0x100; + *(u16 *)((u8 *)arg0 + 0x70) = *(u16 *)((u8 *)arg0 + 0x70) & 3; + *(u16 *)((u8 *)arg0 + 0x72) = *(u16 *)((u8 *)arg0 + 0x72) | 0x1000; + if (*(s16 *)((u8 *)arg0 + 0x100) == 0) { + ((void (*)(void))func_80142C84)(); + } + *(s32 *)((u8 *)arg0 + 0xcc) = + ((s32 (*)(s32, s32))func_80143994)( + (s32)arg0, (s32)*(s16 *)(*(s32 *)((u8 *)arg0 + 0x20) + 0x18)); + func_8012AD50(arg0); +} + extern void func_801439C0(u8 *a0); extern void func_8012AD44(s32 *a0, s16 a1); diff --git a/src/ov_SC07_007/ov_SC07_007_jr_80140608.c b/src/ov_SC07_007/ov_SC07_007_jr_80140608.c index bce4ed0ec..bbef8df0b 100644 --- a/src/ov_SC07_007/ov_SC07_007_jr_80140608.c +++ b/src/ov_SC07_007/ov_SC07_007_jr_80140608.c @@ -1768,7 +1768,25 @@ void func_80142A80(void) } -INCLUDE_ASM("asm/ov_SC07_007/nonmatchings/ov_SC07_007_jr_80140608", func_80142B2C); +extern void func_80142C84(s32 a0); +extern void func_80143994(s32 a0, s32 a1); +extern s32 func_8012AD50(void *a0); + +void func_80142B2C(void *arg0) { + *(s32 *)((u8 *)arg0 + 0x1c) = 0x180; + *(s16 *)((u8 *)arg0 + 0x5c) = 0x100; + *(u16 *)((u8 *)arg0 + 0x100) = *(u16 *)((u8 *)arg0 + 0x70) & 0x100; + *(u16 *)((u8 *)arg0 + 0x70) = *(u16 *)((u8 *)arg0 + 0x70) & 3; + *(u16 *)((u8 *)arg0 + 0x72) = *(u16 *)((u8 *)arg0 + 0x72) | 0x1000; + if (*(s16 *)((u8 *)arg0 + 0x100) == 0) { + ((void (*)(void))func_80142C84)(); + } + *(s32 *)((u8 *)arg0 + 0xcc) = + ((s32 (*)(s32, s32))func_80143994)( + (s32)arg0, (s32)*(s16 *)(*(s32 *)((u8 *)arg0 + 0x20) + 0x18)); + func_8012AD50(arg0); +} + extern void func_801439C0(u8 *a0); extern void func_8012AD44(s32 *a0, s16 a1); diff --git a/src/ov_SC07_008/ov_SC07_008_jr_80140608.c b/src/ov_SC07_008/ov_SC07_008_jr_80140608.c index e40b11b42..35438af73 100644 --- a/src/ov_SC07_008/ov_SC07_008_jr_80140608.c +++ b/src/ov_SC07_008/ov_SC07_008_jr_80140608.c @@ -1842,7 +1842,25 @@ void func_80142A80(void) } -INCLUDE_ASM("asm/ov_SC07_008/nonmatchings/ov_SC07_008_jr_80140608", func_80142B2C); +extern void func_80142C84(s32 a0); +extern void func_80143994(s32 a0, s32 a1); +extern s32 func_8012AD50(void *a0); + +void func_80142B2C(void *arg0) { + *(s32 *)((u8 *)arg0 + 0x1c) = 0x180; + *(s16 *)((u8 *)arg0 + 0x5c) = 0x100; + *(u16 *)((u8 *)arg0 + 0x100) = *(u16 *)((u8 *)arg0 + 0x70) & 0x100; + *(u16 *)((u8 *)arg0 + 0x70) = *(u16 *)((u8 *)arg0 + 0x70) & 3; + *(u16 *)((u8 *)arg0 + 0x72) = *(u16 *)((u8 *)arg0 + 0x72) | 0x1000; + if (*(s16 *)((u8 *)arg0 + 0x100) == 0) { + ((void (*)(void))func_80142C84)(); + } + *(s32 *)((u8 *)arg0 + 0xcc) = + ((s32 (*)(s32, s32))func_80143994)( + (s32)arg0, (s32)*(s16 *)(*(s32 *)((u8 *)arg0 + 0x20) + 0x18)); + func_8012AD50(arg0); +} + DEFINE_func_80142BB4() /* dedup: shared engine-core @0x80142BB4 (src/shared) */ diff --git a/src/ov_SC07_009/ov_SC07_009_jr_80140608.c b/src/ov_SC07_009/ov_SC07_009_jr_80140608.c index b93e84388..6b83a47b4 100644 --- a/src/ov_SC07_009/ov_SC07_009_jr_80140608.c +++ b/src/ov_SC07_009/ov_SC07_009_jr_80140608.c @@ -1842,7 +1842,25 @@ void func_80142A80(void) } -INCLUDE_ASM("asm/ov_SC07_009/nonmatchings/ov_SC07_009_jr_80140608", func_80142B2C); +extern void func_80142C84(s32 a0); +extern void func_80143994(s32 a0, s32 a1); +extern s32 func_8012AD50(void *a0); + +void func_80142B2C(void *arg0) { + *(s32 *)((u8 *)arg0 + 0x1c) = 0x180; + *(s16 *)((u8 *)arg0 + 0x5c) = 0x100; + *(u16 *)((u8 *)arg0 + 0x100) = *(u16 *)((u8 *)arg0 + 0x70) & 0x100; + *(u16 *)((u8 *)arg0 + 0x70) = *(u16 *)((u8 *)arg0 + 0x70) & 3; + *(u16 *)((u8 *)arg0 + 0x72) = *(u16 *)((u8 *)arg0 + 0x72) | 0x1000; + if (*(s16 *)((u8 *)arg0 + 0x100) == 0) { + ((void (*)(void))func_80142C84)(); + } + *(s32 *)((u8 *)arg0 + 0xcc) = + ((s32 (*)(s32, s32))func_80143994)( + (s32)arg0, (s32)*(s16 *)(*(s32 *)((u8 *)arg0 + 0x20) + 0x18)); + func_8012AD50(arg0); +} + DEFINE_func_80142BB4() /* dedup: shared engine-core @0x80142BB4 (src/shared) */ diff --git a/src/ov_SC07_010/ov_SC07_010_jr_80140608.c b/src/ov_SC07_010/ov_SC07_010_jr_80140608.c index 6269c9300..a5d83d7fa 100644 --- a/src/ov_SC07_010/ov_SC07_010_jr_80140608.c +++ b/src/ov_SC07_010/ov_SC07_010_jr_80140608.c @@ -1124,7 +1124,25 @@ void func_80142A80(void) } -INCLUDE_ASM("asm/ov_SC07_010/nonmatchings/ov_SC07_010_jr_80140608", func_80142B2C); +extern void func_80142C84(s32 a0); +extern void func_80143994(s32 a0, s32 a1); +extern s32 func_8012AD50(void *a0); + +void func_80142B2C(void *arg0) { + *(s32 *)((u8 *)arg0 + 0x1c) = 0x180; + *(s16 *)((u8 *)arg0 + 0x5c) = 0x100; + *(u16 *)((u8 *)arg0 + 0x100) = *(u16 *)((u8 *)arg0 + 0x70) & 0x100; + *(u16 *)((u8 *)arg0 + 0x70) = *(u16 *)((u8 *)arg0 + 0x70) & 3; + *(u16 *)((u8 *)arg0 + 0x72) = *(u16 *)((u8 *)arg0 + 0x72) | 0x1000; + if (*(s16 *)((u8 *)arg0 + 0x100) == 0) { + ((void (*)(void))func_80142C84)(); + } + *(s32 *)((u8 *)arg0 + 0xcc) = + ((s32 (*)(s32, s32))func_80143994)( + (s32)arg0, (s32)*(s16 *)(*(s32 *)((u8 *)arg0 + 0x20) + 0x18)); + func_8012AD50(arg0); +} + DEFINE_func_80142BB4() /* dedup: shared engine-core @0x80142bb4 (src/shared) */ diff --git a/src/ov_SC07_011/ov_SC07_011_jr_80140608.c b/src/ov_SC07_011/ov_SC07_011_jr_80140608.c index db552d6a2..f41d30954 100644 --- a/src/ov_SC07_011/ov_SC07_011_jr_80140608.c +++ b/src/ov_SC07_011/ov_SC07_011_jr_80140608.c @@ -1770,7 +1770,25 @@ void func_80142A80(void) } -INCLUDE_ASM("asm/ov_SC07_011/nonmatchings/ov_SC07_011_jr_80140608", func_80142B2C); +extern void func_80142C84(s32 a0); +extern void func_80143994(s32 a0, s32 a1); +extern s32 func_8012AD50(void *a0); + +void func_80142B2C(void *arg0) { + *(s32 *)((u8 *)arg0 + 0x1c) = 0x180; + *(s16 *)((u8 *)arg0 + 0x5c) = 0x100; + *(u16 *)((u8 *)arg0 + 0x100) = *(u16 *)((u8 *)arg0 + 0x70) & 0x100; + *(u16 *)((u8 *)arg0 + 0x70) = *(u16 *)((u8 *)arg0 + 0x70) & 3; + *(u16 *)((u8 *)arg0 + 0x72) = *(u16 *)((u8 *)arg0 + 0x72) | 0x1000; + if (*(s16 *)((u8 *)arg0 + 0x100) == 0) { + ((void (*)(void))func_80142C84)(); + } + *(s32 *)((u8 *)arg0 + 0xcc) = + ((s32 (*)(s32, s32))func_80143994)( + (s32)arg0, (s32)*(s16 *)(*(s32 *)((u8 *)arg0 + 0x20) + 0x18)); + func_8012AD50(arg0); +} + extern void func_801439C0(u8 *a0); extern void func_8012AD44(s32 *a0, s16 a1); diff --git a/tools/family_sweep.py b/tools/family_sweep.py index 6df12a673..e3c492488 100644 --- a/tools/family_sweep.py +++ b/tools/family_sweep.py @@ -55,6 +55,39 @@ def load_sigs(): _HDR_SIG_CACHE = None +_MACRO_DEF_SIG_CACHE = None + + +def macro_def_sig_map(): + """{func_name: 'ret func(params)'} from the DEFINE_func_X() macros in engine_core.h that DEFINE + the function (`void func_80142C84(s32 a0) { ... }`), as opposed to `header_sig_map()` which reads + the `extern` decls a macro emits for its callees. + + §121 (Phase-29 T95): a draft that references such a function has nothing to harvest — `gather_externs` + copies file-scope `extern` lines out of the exemplar TU, and a macro-DEFINED shared function has no + extern anywhere. The member TU instantiates the macro too, but often BELOW the splice point, so the + symbol is `undeclared (first use)` when our body uses it as a value (a cast call site). Guessing the + type is worse than useless — a no-prototype `extern s32 f();` then collides with the macro's real + `void f(s32)`. Byte-verified on func_80142B2C: undeclared -> (wrong guess) conflicting types -> + MATCH (34 ins) once the extern is synthesised from the macro's OWN definition head.""" + global _MACRO_DEF_SIG_CACHE + if _MACRO_DEF_SIG_CACHE is not None: + return _MACRO_DEF_SIG_CACHE + smap = {} + path = os.path.join(REPO, "src/shared/engine_core.h") + if os.path.exists(path): + txt = open(path).read() + for m in re.finditer(r'#define\s+DEFINE_(func_[0-9A-Fa-f]+)\(\)\s*\\\n((?:.*\\\n)*?.*?)\{', + txt): + fn, body = m.group(1), m.group(2) + d = re.search(rf'([A-Za-z_][\w \*]*?)\s*\b{fn}\s*\(([^)]*)\)\s*$', + body.replace("\\\n", "\n").strip().split("\n")[-1]) + if d and d.group(1).strip(): + smap[fn] = f"{d.group(1).strip()} {fn}({d.group(2).strip()})" + _MACRO_DEF_SIG_CACHE = smap + return smap + + def header_sig_map(): """{func_name: 'ret func(params)'} from the `extern func_X();` decls a DEFINE_func macro emits in src/shared/engine_core.h (a shared engine fn that CALLS the member forward-declares @@ -602,6 +635,21 @@ def hseq_sweep(a): draft, CSR.tu_ambient(tu_path).get("typedefs", {}), to_func) except Exception as e: print(f" [uniquify-types] {ov} {to_func}: {repr(e)[:90]}", flush=True) + # §121 — declare macro-DEFINED callees the draft references but nothing declares + # ABOVE it (the member TU instantiates DEFINE_func_X() below our splice point). + try: + _mds = macro_def_sig_map() + _need = [] + for _fn in sorted(set(re.findall(r'\bfunc_[0-9A-Fa-f]{8}\b', draft))): + if _fn == to_func or _fn not in _mds: + continue + if re.search(rf'\b(?:extern|void|s32|u32|int|char|short|float)\b[^;\n]*\b{_fn}\s*\(', draft): + continue # already declared/defined in the draft + _need.append(f"extern {_mds[_fn]};") + if _need: + draft = "\n".join(_need) + "\n" + draft + except Exception as e: + print(f" [macro-extern] {ov} {to_func}: {repr(e)[:90]}", flush=True) d = os.path.join(REPO, SWEEP, ov) os.makedirs(d, exist_ok=True) open(os.path.join(d, f"func_{to_addr:08X}.c"), "w").write(draft + "\n")