decomp(aoss): refine decrypt state/length allocation #1096

Merged
coah80 merged 1 commits from agent/bittle/aoss-decrypt-neighbor-order into main 2026-10-03 11:55:25 +00:00
coah80 commented 2026-10-03 11:54:32 +00:00 (Migrated from github.com)

Minimal declaration-only change

Swap only the existing uninitialized state/dataLength declaration positions. All assignments, expressions, scopes, types, initializers, arrays, aggregate storage and configuration stay fixed.

  • AOSSDecryptMessage: 97.88162% → 97.990654%, 321/321 instructions
  • Unit: 97.72777% → 97.73641%
  • Positional differences worsen 87 → 90; official fuzzy determines retention
  • All 20 siblings, 16/21 exact functions, code 6436/16192, data 3928/3928 and link measures preserved

One fixed-center audit actually compiled baseline + all 287 unique immediate swap/move neighbors, then independently scored all 288 immutable snapshots. No adaptive search. Nine orders tie for the same best object; retained first best 037 is the minimal two-declaration swap. This covers the previous center only, not all 15! orders or the new winner's neighborhood.

Independent parent gates

Rebased and freshly built on 059ed52b0b. Tested tree b258ed81da.

  • Every snapshot's official function/unit/section result independently reproduced; source/object hashes and real-compilation evidence checked
  • All 1,027 unit/function reports checked: no regressions; only target improves
  • All sibling instruction/relocation streams and allocated data/relocations preserved
  • Actual-object symbolic induction checks equal ordered memory effects, CTR/CR predicates and live cursor roles through paired/tail decrypt loops
  • All 23 call sites unchanged. Original CRC callee live-input analysis verifies differing scratch registers are unobserved; later caller cleanup inputs remain intact
  • Production-function UBSan harness rerun: 2,120 cases each for candidate and baseline, every payload length 0–1472, independent cipher/CRC expectations, allocation failures, control/address errors and publication/cleanup guards
  • Pool identical; literal audit: 19 functions, 12 arguments, zero errors. Existing unequal-size skips are AOSS_Init_old and AOSSSendHelloRequest
  • Full default build/progress, 43U/ok, main/leaf and diff checks pass
  • DOL SHA1 26116613f624061ba99c8d1a299aaa6efa85670d

These are bounded symbolic/native diagnostics, not hardware execution. Evidence and complete snapshot results are in tools/decomp-assist/allhands-aoss-decrypt-fixed-neighbors.attempts.md and results.csv. No original binaries/disassembly uploaded. Draft for human review; no merge or auto-merge requested.

Note

Swap declaration order of state and dataLength in AOSSDecryptMessage

Exchanges the declaration positions of the local state pointer and dataLength integer in the decryptor function in AOSS.c. Types, uses, and logic are unchanged. Adds a fixed-center declaration-order search record and results artifact in allhands-aoss-decrypt-fixed-neighbors.attempts.md and allhands-aoss-decrypt-fixed-neighbors.results.csv.

Macroscope summarized d40a1fe.

## Minimal declaration-only change Swap only the existing uninitialized state/dataLength declaration positions. All assignments, expressions, scopes, types, initializers, arrays, aggregate storage and configuration stay fixed. - AOSSDecryptMessage: 97.88162% → 97.990654%, 321/321 instructions - Unit: 97.72777% → 97.73641% - Positional differences worsen 87 → 90; official fuzzy determines retention - All 20 siblings, 16/21 exact functions, code 6436/16192, data 3928/3928 and link measures preserved One fixed-center audit actually compiled baseline + all 287 unique immediate swap/move neighbors, then independently scored all 288 immutable snapshots. No adaptive search. Nine orders tie for the same best object; retained first best 037 is the minimal two-declaration swap. This covers the previous center only, not all 15! orders or the new winner's neighborhood. ## Independent parent gates Rebased and freshly built on 059ed52b0b551e5aa7dd26a284c76c88539b7110. Tested tree b258ed81daf1f359db371cc3e8d277fa613254bf. - Every snapshot's official function/unit/section result independently reproduced; source/object hashes and real-compilation evidence checked - All 1,027 unit/function reports checked: no regressions; only target improves - All sibling instruction/relocation streams and allocated data/relocations preserved - Actual-object symbolic induction checks equal ordered memory effects, CTR/CR predicates and live cursor roles through paired/tail decrypt loops - All 23 call sites unchanged. Original CRC callee live-input analysis verifies differing scratch registers are unobserved; later caller cleanup inputs remain intact - Production-function UBSan harness rerun: 2,120 cases each for candidate and baseline, every payload length 0–1472, independent cipher/CRC expectations, allocation failures, control/address errors and publication/cleanup guards - Pool identical; literal audit: 19 functions, 12 arguments, zero errors. Existing unequal-size skips are AOSS_Init_old and AOSSSendHelloRequest - Full default build/progress, 43U/ok, main/leaf and diff checks pass - DOL SHA1 26116613f624061ba99c8d1a299aaa6efa85670d These are bounded symbolic/native diagnostics, not hardware execution. Evidence and complete snapshot results are in tools/decomp-assist/allhands-aoss-decrypt-fixed-neighbors.attempts.md and results.csv. No original binaries/disassembly uploaded. Draft for human review; no merge or auto-merge requested. <!-- Macroscope's pull request summary starts here --> <!-- Macroscope will only edit the content between these invisible markers, and the markers themselves will not be visible in the GitHub rendered markdown. --> <!-- If you delete either of the start / end markers from your PR's description, Macroscope will append its summary at the bottom of the description. --> > [!NOTE] > ### Swap declaration order of `state` and `dataLength` in `AOSSDecryptMessage` > Exchanges the declaration positions of the local `state` pointer and `dataLength` integer in the decryptor function in [AOSS.c](https://github.com/coah80/wii-ipl/pull/1096/files#diff-c9d178769a3c839c7dccd0eba548dd59c264dfe097f6aa29f6df6f8bb7546c98). Types, uses, and logic are unchanged. Adds a fixed-center declaration-order search record and results artifact in [allhands-aoss-decrypt-fixed-neighbors.attempts.md](https://github.com/coah80/wii-ipl/pull/1096/files#diff-a810861110cf5c91929455d35ce3db1653ba29a72af76d7f48eefa9618c8bcb8) and [allhands-aoss-decrypt-fixed-neighbors.results.csv](https://github.com/coah80/wii-ipl/pull/1096/files#diff-2bb46b1262cc644b7c8dfee98512994ab6b080102b9d51550cb62807cae2768f). > > <!-- Macroscope's review summary starts here --> > > <sup><a href="https://app.macroscope.com">Macroscope</a> summarized d40a1fe.</sup> > <!-- Macroscope's review summary ends here --> > <!-- Macroscope's pull request summary ends here -->
coah80 commented 2026-10-03 11:55:23 +00:00 (Migrated from github.com)

Reviewed and merged: rebased on main, full build ok, DOL sha1 26116613f624061ba99c8d1a299aaa6efa85670d, 0 regressions, 0 forbidden patterns.

Reviewed and merged: rebased on main, full build ok, DOL sha1 26116613f624061ba99c8d1a299aaa6efa85670d, 0 regressions, 0 forbidden patterns.
Sign in to join this conversation.