Compare commits

..

68 Commits

Author SHA1 Message Date
Cursor Agent
2aa13863fa Match iplMemoryCard .sdata2 (data 100%)
Append the int-to-float conversion constant that ends the original
.sdata2 for src/scene/memoryCard/iplMemoryCard.cpp. Data bytes go from
2640/2664 (99.0991%) to 2664/2664; code was already 100%.

Co-authored-by: coah <coah80@users.noreply.github.com>
2026-10-01 21:31:55 +00:00
coah
3946983f96 KPAD 19/29, kbd_lib 15/21 (objdiff) (worker 2ecd44fa) (#482) 2026-10-01 16:29:36 -05:00
github-actions[bot]
85d75cd0cf docs: update progress [skip ci] 2026-10-01 21:27:27 +00:00
coah
af39f2678f Match SD disk-info success return and restore its epilogue extent (#481)
* Restore the SD disk-info function's original epilogue extent

* Match explicit SD disk-info success return and update code total

* Match explicit SD disk-info success return and update code total
2026-10-01 16:26:40 -05:00
github-actions[bot]
d613662c54 docs: update progress [skip ci] 2026-10-01 21:17:45 +00:00
coah
0e6e235004 Correct PFSYS_TimeStamp's truncated symbol extent (#479)
* Include original stack restore and return in PFSYS_TimeStamp extent

* Account for timestamp epilogue in verified code-byte total
2026-10-01 16:17:08 -05:00
coah
020e1b6f0b iplSetting 105/112 (worker e1b8983d) (#480) 2026-10-01 16:16:23 -05:00
coah
3440aab039 Handle objects without .data in pool_diff (#478)
* Treat absent .data sections as empty string pools

* Test absent and unequal string pools
2026-10-01 16:11:01 -05:00
coah
dab806eaa2 Correct the 43U completion guard's expected unit count (#477) 2026-10-01 16:10:57 -05:00
github-actions[bot]
f4fd16f88f docs: update progress [skip ci] 2026-10-01 21:04:39 +00:00
coah
3d8de1a356 Link the exact-matching NAND driver (#476)
* Link NAND driver with verified storage layout

* Link NAND driver with verified storage layout

* Link NAND driver with verified storage layout
2026-10-01 16:03:40 -05:00
coah
8e43db0528 tiInputForm 210/221 (+8 KB matched code) (worker dad5faf7) (#475) 2026-10-01 16:00:46 -05:00
coah
21c9b95b1b NWC24Download 23/30 (worker 58d80e3c) (#474) 2026-10-01 15:41:52 -05:00
coah
d4bdd3462c iplAddress 94/101 (worker 98388c1d) (#473) 2026-10-01 15:40:46 -05:00
coah
f7d81a0196 CHANSVm 220/233 (worker 2f51b24f) (#472) 2026-10-01 12:31:21 -05:00
coah
4f35874d02 fix: drop unreferenced lbl_ double pinned in iplMemoryCard (#471) 2026-10-01 10:55:24 -05:00
coah
0a5cbaf78e iplAddress 93/101 (worker 81732f71) (#470) 2026-10-01 10:53:32 -05:00
coah
6e7c016ae3 CHANSVm 218/233 (worker 19444f58) (#469) 2026-10-01 10:52:18 -05:00
github-actions[bot]
e60306db62 docs: update progress [skip ci] 2026-10-01 14:03:51 +00:00
devin-ai-integration[bot]
5d0ced6a15 Link scene/memoryCard/iplMemoryCardBase (clean subset) (#468)
Gate Rect.~Rect and RuntimeTypeInfo.DynamicCast behind
IPL_MEMORYCARD_BASE_CPP so this TU emits the weak destructors and the
out-of-line dynamic cast the original object contains.

Co-authored-by: devin <devin@cognition.ai>
Co-authored-by: coah80 <usernamecole7@gmail.com>
2026-10-01 14:03:09 +00:00
github-actions[bot]
858a507ddf docs: update progress [skip ci] 2026-10-01 12:54:41 +00:00
devin-ai-integration[bot]
ce424f1a3e Link scene/memoryCard/iplMemoryCard (clean subset) (#467)
Model MemCardEventListener as a novtable abstract base and give
MemCardEventHandler its full pure-virtual surface so the GCWindow and
MemoryCardManager vtables reproduce the original zero-slot layout.
Declare lbl_81694A78 as a file-scope const so the object exports the
u64->f64 conversion constant that iplMemoryCardBase.o references.

Co-authored-by: devin <devin@cognition.ai>
Co-authored-by: coah80 <usernamecole7@gmail.com>
2026-10-01 12:54:08 +00:00
github-actions[bot]
bcb37e07ef docs: update progress [skip ci] 2026-10-01 11:41:02 +00:00
devin-ai-integration[bot]
11094c638a Link clib/zi8cinfo (#466)
Co-authored-by: devin <devin@cognition.ai>
Co-authored-by: wch <usernamecole7@gmail.com>
2026-10-01 11:40:25 +00:00
coah
cb49bde9c6 NWC24Download 21/30 (worker b7c38d52) (#465) 2026-10-01 05:43:26 -05:00
coah
df9fd72e87 iplAddress 91/101, tiZiString 26/29 (worker 5e1635f3) (#464) 2026-10-01 05:37:54 -05:00
coah
0c554a1602 CHANSVm 217/233 (worker e7171d72) (#463) 2026-10-01 05:08:52 -05:00
coah
f00336cc8b NWC24Download 19/30, nup 18/23 (worker 1ac4946e) (#462) 2026-10-01 05:07:41 -05:00
coah
842bbc6942 tiCandidateBox 108/112, iplSDChannelSelect 117/129 (worker 993eabbf) (#461) 2026-10-01 05:06:29 -05:00
coah
ab01520044 CHANSVm: small fuzzy gains (worker b60f5370) (#460) 2026-10-01 03:31:36 -05:00
coah
5f948d3f3a AOSS 96.8, zi8alpha 94.2 (worker 5906998c) (#459) 2026-10-01 03:26:27 -05:00
coah
699f844395 CHANSVm 216/233 (worker b8f00dfb) (#458) 2026-10-01 03:05:28 -05:00
coah
3afb9d8425 iplSDChannelSelect 116/129, tiCandidateBox 104/112 (worker f7b4ed19) (#457) 2026-10-01 02:58:57 -05:00
coah
72c3f4ba2d zi8cgetc: tiny gains (worker 4e5688ba) (#456) 2026-10-01 02:45:50 -05:00
coah
905c45b998 AOSS 96.5, zi8alpha 93.1 (worker 58992861) (#455) 2026-10-01 02:41:34 -05:00
coah
5a849425b1 zi8cgetc: GetZH fuzzy 85 -> 96.4% (worker 68034ea8) (#454) 2026-10-01 02:16:35 -05:00
coah
fd11ddb195 AOSS fuzzy 96.3 (worker fc04bcfa) (#453) 2026-10-01 02:03:34 -05:00
coah
d9b51418b9 CHANSVm: blob unpack, hmac, slice, float parse (worker e953cfc4) (#452) 2026-10-01 02:02:26 -05:00
coah
87e7ab6922 iplSDChannelSelect, tiCandidateBox: structural fixes (worker d5dcdbc0) (#451) 2026-10-01 02:01:17 -05:00
github-actions[bot]
d186251506 docs: update progress [skip ci] 2026-10-01 05:27:53 +00:00
devin-ai-integration[bot]
cb58211725 Link cdb/CDBIntArray (#450)
Co-authored-by: devin <devin@cognition.ai>
Co-authored-by: wch <usernamecole7@gmail.com>
2026-10-01 05:27:17 +00:00
github-actions[bot]
2dbf80c418 docs: update progress [skip ci] 2026-10-01 04:38:36 +00:00
devin-ai-integration[bot]
faee1f779d Link fa msc units + msc_drv (#449)
Co-authored-by: devin <devin@cognition.ai>
Co-authored-by: wch <usernamecole7@gmail.com>
2026-10-01 04:37:58 +00:00
github-actions[bot]
a324e9a843 docs: update progress [skip ci] 2026-10-01 04:37:27 +00:00
devin-ai-integration[bot]
2bddfcde52 Link pfk_api, pfd_cmn, pf_cp932, pf_fat16, pf_stub (#448)
Co-authored-by: devin <devin@cognition.ai>
Co-authored-by: wch <usernamecole7@gmail.com>
2026-10-01 04:36:51 +00:00
coah
776b7981df declsearch tool; odh/wad/KPAD/pf_dir closer (worker 8e7ae0d1) (#447) 2026-09-30 22:42:40 -05:00
coah
539693c76a AOSS fuzzy 88 -> 95, zi8alpha 93 (worker 3d36d663) (#446) 2026-09-30 22:25:48 -05:00
coah
3134c4c05a zi8cgetc: GetZH 81 -> 83% (worker ca7cac87) (#445) 2026-09-30 22:18:17 -05:00
coah
d60d10868a asm to C: CDBDatabase 33 -> 15 asm bodies, iplSound 14 -> 3 (worker d04fb346) (#444) 2026-09-30 22:16:35 -05:00
coah
735b0ab878 odh 22/28 (idct_fast, fdct_fast, LineDeconv* exact) (worker 8060e828) (#443) 2026-09-30 22:15:03 -05:00
coah
ea8d4d3b8a zi8cgetc: GetZH instruction count now matches (deficit 0), 81.4% (worker 04fae432) (#442) 2026-09-30 21:36:48 -05:00
coah
7329402a2c BS2Mach 24/29: NAND state globals volatile at definition (worker ddd698b1) (#441) 2026-09-30 21:34:55 -05:00
coah
e46168062b kbd_lib: kbdProcMod 63 -> 99.9%, data 100% (worker aef57ff5) (#440) 2026-09-30 21:27:26 -05:00
coah
b2074a70d7 regalloc sweep 2: CDBRecord 27/29 (worker 03558e7c) (#439) 2026-09-30 21:24:09 -05:00
coah
98648d19bb AOSS, zi8alpha: deficits shrinking (worker 59064877) (#438) 2026-09-30 21:00:22 -05:00
coah
d03219249b regalloc sweep: pf_dir 35/38, NWC24Mime 12/16 (worker edd57acb) (#437) 2026-09-30 20:50:49 -05:00
coah
3c23585249 zi8cgetc: GetZH deficit 78 -> 62 insns (worker 7d22ea37) (#436) 2026-09-30 20:44:21 -05:00
coah
b4745ba2da pf_path, iplAddressEdit closer (worker 1bceaa8f) (#435) 2026-09-30 20:36:41 -05:00
coah
fb3e7bd49a sub-90 functions: SDChannelSelect, AddressEdit closer (worker 35852f84) (#434) 2026-09-30 20:34:31 -05:00
coah
e34eac26ef ATERM/AOSS: small fuzzy gains (worker 52d046e2) (#433) 2026-09-30 20:29:11 -05:00
coah
565d039c01 zconvert 2/4 (worst 78 -> 99.6%) (worker 9f5c4222) (#432) 2026-09-30 20:27:10 -05:00
coah
46d7bc07cf wad: small fuzzy gains (worker ca7a1e52) (#431) 2026-09-30 20:18:01 -05:00
coah
6ec48a1b9a TMC_JPEG: RGB565 6/13 (worker c0724c9e) (#430) 2026-09-30 20:01:28 -05:00
coah
07b3a2b579 ATERM 14/26 (fuzzy 92 -> 96) (worker 8f2e6497) (#429) 2026-09-30 19:59:08 -05:00
coah
e1b46d09e8 wad 34/40 (worker cfd01890) (#428) 2026-09-30 19:48:56 -05:00
coah
a4d46cf340 NWC24Download 18/30, iplSetting 105/112 (worker 363488f7) (#427) 2026-09-30 19:44:27 -05:00
github-actions[bot]
46e8217f2f docs: update progress [skip ci] 2026-10-01 00:07:00 +00:00
devin-ai-integration[bot]
028e36cce2 Link kbd_lib_map_us (#426)
Co-authored-by: devin <devin@cognition.ai>
Co-authored-by: wch <usernamecole7@gmail.com>
2026-10-01 00:06:18 +00:00
136 changed files with 22402 additions and 5300 deletions

View File

@@ -53,9 +53,9 @@ Progress
<!-- progress:start -->
| Decompiled | Matched | Linked | Data |
|:---:|:---:|:---:|:---:|
| 98.86% | 86.11% | 60.34% | 90.91% |
| 99.37% | 87.47% | 61.64% | 91.14% |
units 901/1027 complete, functions 12124/12563 matched.
units 915/1027 complete, functions 12203/12563 matched.
decompiled = code with a C/C++ implementation (objdiff fuzzy), matched = byte-exact code, linked = code actually linked into the DOL, data = byte-exact data
<!-- progress:end -->

View File

@@ -4192,11 +4192,11 @@ libs/RVL_SDK/src/fa/driver/nand_drv.c:
.sbss start:0x816996C0 end:0x816996E0
libs/RVL_SDK/src/fa/driver/sd_drv.c:
.bss start:0x811AF460 end:0x811AF6C0
.bss start:0x811AF460 end:0x811AF6C0 align:32
.text start:0x815EA41C end:0x815ED20C
.rodata start:0x816329E8 end:0x81632B58
.data start:0x81690D18 end:0x81691728
.sbss start:0x816996E0 end:0x81699708
.sbss start:0x816996E0 end:0x81699708 align:32
libs/RVL_SDK/src/fa/driver/pfd_cmn.c:
.text start:0x815ED20C end:0x815ED324

View File

@@ -13113,7 +13113,7 @@ pfstub_com_massage = .text:0x815E6C40; // type:function size:0xE4
pfstub_store_result = .text:0x815E6D24; // type:function size:0xC4
PFSYS_initializeSYS = .text:0x815E6DE8; // type:function size:0x4
PFSYS_GetCurrentContextID = .text:0x815E6DEC; // type:function size:0x18
PFSYS_TimeStamp = .text:0x815E6E04; // type:function size:0x74
PFSYS_TimeStamp = .text:0x815E6E04; // type:function size:0x7C
pfstub_call_function_standard = .text:0x815E6E80; // type:function size:0x584
pfstub_attach = .text:0x815E7404; // type:function size:0x50
pfstub_buffering = .text:0x815E7454; // type:function size:0x50
@@ -13202,7 +13202,7 @@ pfd_sddrv_pread = .text:0x815EAADC; // type:function size:0x38
pfd_sddrv_pwrite = .text:0x815EAB14; // type:function size:0x38
pfd_sddrv_unmount = .text:0x815EAB4C; // type:function size:0x34
pfd_sddrv_finalize = .text:0x815EAB80; // type:function size:0xE4
pfd_sddrv_get_disk_info = .text:0x815EAC64; // type:function size:0x180
pfd_sddrv_get_disk_info = .text:0x815EAC64; // type:function size:0x188
pfd_sddrv_init_drv_tbl = .text:0x815EADEC; // type:function size:0x18
pfd_sddrv_registar_callback = .text:0x815EAE04; // type:function size:0x10
pfd_sddrv_is_media_insert = .text:0x815EAE14; // type:function size:0x98

View File

@@ -812,8 +812,8 @@ config.libs = [
]
),
IPLSection("memoryCard", [
Object(NonMatching, "scene/memoryCard/iplMemoryCard.cpp"),
Object(NonMatching, "scene/memoryCard/iplMemoryCardBase.cpp"),
Object(Matching, "scene/memoryCard/iplMemoryCard.cpp"),
Object(Matching, "scene/memoryCard/iplMemoryCardBase.cpp"),
Object(NonMatching, "scene/memoryCard/iplMemoryCardManager.cpp"),
Object(Matching, "scene/memoryCard/iplGCSaveData.cpp"),
Object(NonMatching, "scene/memoryCard/iplGCWindow.cpp"),
@@ -987,7 +987,7 @@ config.libs = [
Object(NonMatching, "clib/zi8alpha.c"),
Object(Matching, "clib/zi8alts.c"),
Object(NonMatching, "clib/zi8cgetc.c"),
Object(NonMatching, "clib/zi8cinfo.c"),
Object(Matching, "clib/zi8cinfo.c"),
Object(Matching, "clib/zi8copy.c"),
Object(NonMatching, "clib/zi8dawg.c"),
Object(Matching, "clib/zi8getc.c"),
@@ -1025,7 +1025,7 @@ config.libs = [
Object(NonMatching, "cdb/CDBRecord.c"),
Object(Matching, "cdb/CDBRecordFile.c"),
Object(Matching, "cdb/CDBRecordKey.c"),
Object(Matching, "cdb/CDBIntArray.c"),
Object(Matching, "cdb/CDBIntArray.c"),
Object(Matching, "cdb/CDBSystem.c"),
Object(Matching, "cdb/CDBAttr.c"),
Object(Matching, "cdb/CDBFBridge.c"),
@@ -1698,7 +1698,7 @@ config.libs = [
Object(NonMatching, "fa/pf_entry_iterator.c"),
Object(NonMatching, "fa/pf_fat.c"),
Object(NonMatching, "fa/pf_fat12.c"),
Object(NonMatching, "fa/pf_fat16.c"),
Object(Matching, "fa/pf_fat16.c"),
Object(Matching, "fa/pf_fat32.c"),
Object(Matching, "fa/pf_fatfs.c"),
Object(NonMatching, "fa/pf_file.c"),
@@ -1706,7 +1706,7 @@ config.libs = [
Object(Matching, "fa/pf_sector.c"),
Object(NonMatching, "fa/pf_volume.c"),
Object(Matching, "fa/pf_volume_apiadd.c"),
Object(NonMatching, "fa/pf_cp932.c"),
Object(Matching, "fa/pf_cp932.c"),
Object(Matching, "fa/pf_api_util.c"),
Object(Matching, "fa/pf_attach.c"),
Object(Matching, "fa/pf_buffering.c"),
@@ -1800,7 +1800,7 @@ config.libs = [
Object(Matching, "fa/pf_w_rmdir.c"),
Object(Matching, "fa/pf_w_xdivide.c"),
Object(Matching, "fa/pf_filelock.c"),
Object(NonMatching, "fa/pf_stub.c"),
Object(Matching, "fa/pf_stub.c"),
Object(Matching, "fa/pf_system.c"),
Object(Matching, "fa/pf_stub_standard.c"),
Object(Matching, "fa/pfs_attach.c"),
@@ -1851,15 +1851,15 @@ config.libs = [
Object(Matching, "fa/api/FASetThreadPriority.c"),
Object(Matching, "fa/api/FAUnmount.c"),
Object(NonMatching, "fa/kernel/pfk_api.c"),
Object(Matching, "fa/kernel/pfk_api.c"),
Object(NonMatching, "fa/driver/nand_drv.c"),
Object(Matching, "fa/driver/nand_drv.c"),
Object(NonMatching, "fa/driver/sd_drv.c"),
Object(NonMatching, "fa/driver/pfd_cmn.c"),
Object(NonMatching, "fa/driver/msc_drv.c"),
Object(Matching, "fa/driver/pfd_cmn.c"),
Object(Matching, "fa/driver/msc_drv.c"),
Object(NonMatching, "fa/msc/puh_msc.c"),
Object(NonMatching, "fa/msc/puh_msc_cmd.c"),
Object(Matching, "fa/msc/puh_msc.c"),
Object(Matching, "fa/msc/puh_msc_cmd.c"),
Object(NonMatching, "fa/msc/puh_msc_blk.c"),
]
),
@@ -1887,7 +1887,7 @@ config.libs = [
RVLSDKLib("kbd", [
Object(NonMatching, "kbd/kbd_lib.c"),
Object(NonMatching, "kbd/kbd_lib_map_jp.c"),
Object(NonMatching, "kbd/kbd_lib_map_us.c"),
Object(Matching, "kbd/kbd_lib_map_us.c"),
Object(NonMatching, "kbd/kbd_lib_map_eu.c"),
]
),

View File

@@ -96,7 +96,7 @@ CHANSVmNativeClass* CHANSVmAddNativeClass(CHANSVm* vm, const char* clsName, CHAN
/*** CHANS Image ***/
/************************/
typedef vmBoolInt (*CHANSVmImageCtorCallback)(CHANSVm* vm);
typedef vmBoolInt (*CHANSVmImageCtorCallback)(CHANSVm* vm, vmPtr data);
typedef vmPtr (*CHANSVmImageAllocatorCallback)(CHANSVm* vm, u32 size);
void CHANSVmImageRegisterAllocator(CHANSVmImageAllocatorCallback allocCb, CHANSVmImageCtorCallback ctorCb);

View File

@@ -187,7 +187,19 @@ namespace textinput {
void SetFocusedText(s32 pane) { mnFocusedIdx = pane; }
s32 GetFocusedText() { return mnFocusedIdx; }
f32 GetWidthScale_() const { return 608.0f / mfScreenWidth; }
#ifdef TI_CANDIDATEBOX_IMPLEMENTATION
f32 GetMargin_() const {
f32 margin;
if (mfScreenWidth > 700.0f) {
margin = 10.0f;
} else {
margin = 20.0f;
}
return margin;
}
#else
f32 GetMargin_() const { return mfScreenWidth > 700.0f ? 10.0f : 20.0f; }
#endif
s32 GetNextPageIdx_(s32 page) const;
s32 GetPrevPageIdx_(s32 page) const;
s32 GetDispNum() const;

View File

@@ -20,7 +20,11 @@ namespace gui {
class Manager;
class EventHandler;
#if defined(IPL_GC_SAVEDATA_NOVTABLE) || defined(IPL_MEMORY_CARD_NOVTABLE)
class __declspec(novtable) Interface {
#else
class Interface {
#endif
public:
virtual void create() {} // 0x08 (0x02)
@@ -30,14 +34,14 @@ namespace gui {
virtual void draw(Mtx& mtx) {} // 0x14 (0x05)
virtual void draw() {} // 0x18 (0x06)
#ifdef IPL_CHANNEL_TITLE_NOVTABLE
#if defined(IPL_CHANNEL_TITLE_NOVTABLE) || defined(IPL_GC_SAVEDATA_NOVTABLE) || defined(IPL_MEMORY_CARD_NOVTABLE)
virtual ~Interface(); // 0x1C (0x07)
#else
virtual ~Interface() {} // 0x1C (0x07)
#endif
};
#ifdef IPL_CHANNEL_TITLE_NOVTABLE
#if defined(IPL_CHANNEL_TITLE_NOVTABLE) || defined(IPL_GC_WINDOW_NOVTABLE) || defined(IPL_GC_SAVEDATA_NOVTABLE) || defined(IPL_MEMORY_CARD_NOVTABLE)
class __declspec(novtable) EventHandler {
#else
class EventHandler {

View File

@@ -24,7 +24,7 @@ namespace ipl {
mbDisableCon(bDisableCon) {}
#endif
#ifdef IPL_CHANNEL_TITLE_NOVTABLE
#if defined(IPL_CHANNEL_TITLE_NOVTABLE) || defined(IPL_GC_SAVEDATA_NOVTABLE) || defined(IPL_MEMORY_CARD_NOVTABLE)
virtual ~PaneManager();
#else
virtual ~PaneManager() {}

View File

@@ -8,7 +8,7 @@
namespace ipl {
namespace scene {
class GCWindow : public MemoryBase, public MemCardEventHandler {
class GCWindow : public MemoryBase, public MemCardEventListener {
#ifdef IPL_MEMORY_CARD_CPP
friend class MemoryCard;
#endif
@@ -48,6 +48,25 @@ private:
void set_texture(const char*, const GXTexObj&);
public:
virtual void onMemEvent(long, u8);
#ifdef IPL_GC_WINDOW_CPP
virtual void on_wait_anim() = 0;
virtual void on_exit() = 0;
virtual void on_error() = 0;
virtual void on_format() = 0;
virtual void on_dialog_result() = 0;
virtual void on_select_in() = 0;
virtual void on_message_done() = 0;
virtual void on_button_trig() = 0;
#else
virtual void on_wait_anim();
virtual void on_exit();
virtual void on_error();
virtual void on_format();
virtual void on_dialog_result();
virtual void on_select_in();
virtual void on_message_done();
virtual void on_button_trig();
#endif
bool isProcess();
void stop_wait_anim();

View File

@@ -35,7 +35,11 @@ namespace ipl {
MemoryBase* mpBase; // 0x0C
};
#ifdef IPL_CHANNEL_TITLE_NOVTABLE
class __declspec(novtable) MemoryBase {
#else
class MemoryBase {
#endif
public:
class Anm {
public:

View File

@@ -12,13 +12,61 @@
namespace ipl {
namespace scene {
class MemCardEventHandler {
class __declspec(novtable) MemCardEventListener {
public:
MemCardEventListener() {}
virtual ~MemCardEventListener() {}
virtual void onMemEvent(long event, u8 slot);
};
class MemCardEventHandler : public MemCardEventListener {
public:
MemCardEventHandler() {}
virtual ~MemCardEventHandler();
virtual void onMemEvent(long event, u8 slot);
virtual void onMount(u8 slot) = 0;
virtual void onUnmount(u8 slot) = 0;
virtual void onAttach(u8 slot) = 0;
virtual void onDetach(u8 slot) = 0;
virtual void onCheck(u8 slot) = 0;
virtual void onFormat(u8 slot) = 0;
virtual void onRepair(u8 slot) = 0;
virtual void onRead(u8 slot) = 0;
virtual void onWrite(u8 slot) = 0;
virtual void onOpen(u8 slot) = 0;
virtual void onClose(u8 slot) = 0;
virtual void onCreate(u8 slot) = 0;
virtual void onDelete(u8 slot) = 0;
virtual void onCopy(u8 slot) = 0;
virtual void onMove(u8 slot) = 0;
virtual void onRename(u8 slot) = 0;
virtual void onVerify(u8 slot) = 0;
virtual void onCommit(u8 slot) = 0;
virtual void onProbe(u8 slot) = 0;
virtual void onMountAsync(u8 slot) = 0;
virtual void onUnmountAsync(u8 slot) = 0;
virtual void onCheckAsync(u8 slot) = 0;
virtual void onFormatAsync(u8 slot) = 0;
virtual void onReadAsync(u8 slot) = 0;
virtual void onWriteAsync(u8 slot) = 0;
virtual void onCreateAsync(u8 slot) = 0;
virtual void onDeleteAsync(u8 slot) = 0;
virtual void onCopyAsync(u8 slot) = 0;
virtual void onMoveAsync(u8 slot) = 0;
virtual void onRenameAsync(u8 slot) = 0;
virtual void onVerifyAsync(u8 slot) = 0;
virtual void onCommitAsync(u8 slot) = 0;
virtual void onProbeAsync(u8 slot) = 0;
virtual void onFreeBlocks(u8 slot) = 0;
virtual void onGetLength(u8 slot) = 0;
virtual void onSetAttrib(u8 slot) = 0;
virtual void onGetAttrib(u8 slot) = 0;
virtual void onSlotStatus(u8 slot) = 0;
};
typedef struct MCFile {
@@ -56,6 +104,44 @@ namespace ipl {
}
virtual ~MemoryCardManager();
virtual void onMount(u8 slot) = 0;
virtual void onUnmount(u8 slot) = 0;
virtual void onAttach(u8 slot) = 0;
virtual void onDetach(u8 slot) = 0;
virtual void onCheck(u8 slot) = 0;
virtual void onFormat(u8 slot) = 0;
virtual void onRepair(u8 slot) = 0;
virtual void onRead(u8 slot) = 0;
virtual void onWrite(u8 slot) = 0;
virtual void onOpen(u8 slot) = 0;
virtual void onClose(u8 slot) = 0;
virtual void onCreate(u8 slot) = 0;
virtual void onDelete(u8 slot) = 0;
virtual void onCopy(u8 slot) = 0;
virtual void onMove(u8 slot) = 0;
virtual void onRename(u8 slot) = 0;
virtual void onVerify(u8 slot) = 0;
virtual void onCommit(u8 slot) = 0;
virtual void onProbe(u8 slot) = 0;
virtual void onMountAsync(u8 slot) = 0;
virtual void onUnmountAsync(u8 slot) = 0;
virtual void onCheckAsync(u8 slot) = 0;
virtual void onFormatAsync(u8 slot) = 0;
virtual void onReadAsync(u8 slot) = 0;
virtual void onWriteAsync(u8 slot) = 0;
virtual void onCreateAsync(u8 slot) = 0;
virtual void onDeleteAsync(u8 slot) = 0;
virtual void onCopyAsync(u8 slot) = 0;
virtual void onMoveAsync(u8 slot) = 0;
virtual void onRenameAsync(u8 slot) = 0;
virtual void onVerifyAsync(u8 slot) = 0;
virtual void onCommitAsync(u8 slot) = 0;
virtual void onProbeAsync(u8 slot) = 0;
virtual void onFreeBlocks(u8 slot) = 0;
virtual void onGetLength(u8 slot) = 0;
virtual void onSetAttrib(u8 slot) = 0;
virtual void onGetAttrib(u8 slot) = 0;
void calc();
bool isSlotReady(u8 slot);
@@ -96,7 +182,7 @@ namespace ipl {
u16 getFreeBlocks(u8 slot);
#endif
void setEventHandler(MemCardEventHandler* eventHandler) {
void setEventHandler(MemCardEventListener* eventHandler) {
mpEventHandler = eventHandler;
}
@@ -107,7 +193,7 @@ namespace ipl {
s32 mLastResult; // 0x16930
s32 mLastCmd; // 0x16934
u32 unk_0x16938; // 0x16938
MemCardEventHandler* mpEventHandler; // 0x1693C
MemCardEventListener* mpEventHandler; // 0x1693C
};
} // namespace scene
} // namespace ipl

View File

@@ -395,9 +395,9 @@ namespace ipl {
NandSDWorker* mpSDWorker;
ESTitleId32* mpSDTitleIds;
SDChannelSelectTitleInfo* mpSDTitleInfo;
NandSDWorker::TitleUsage* mpNandTitleInfo;
s32 mFirstTitleCount;
s32 mSecondTitleCount;
mutable NandSDWorker::TitleUsage* mpNandTitleInfo;
mutable s32 mFirstTitleCount;
mutable s32 mSecondTitleCount;
SDChannelObj* mpCurrentLoadedChannel;
u32 mSDTitleCount;
u32 mNandTitleCount;

View File

@@ -38,21 +38,49 @@ namespace ipl {
int holdSE(const char* sndName);
int holdSEwithPosDis(const char* sndName, f32 x, f32 y);
#ifdef IPL_SOUND_MATCHING
void stopBGM(int unk = 0);
#else
int stopBGM(int unk = 0);
#endif
int stopBGM(nw4r::snd::SoundHandle* handle, int unk = 0);
int stopSE(nw4r::snd::SoundHandle* handle, int unk = 0);
void stopAllSound(int unk = 0);
int resetAllSound();
#ifdef IPL_SOUND_MATCHING
void muteOffBGM(int);
#else
int muteOffBGM(int);
#endif
#ifdef IPL_SOUND_MATCHING
void muteOnBGM(int);
#else
int muteOnBGM(int);
#endif
#ifdef IPL_SOUND_MATCHING
void pauseOnBGM();
#else
int pauseOnBGM();
#endif
#ifdef IPL_SOUND_MATCHING
void pauseOffBGM();
#else
int pauseOffBGM();
#endif
#ifdef IPL_SOUND_MATCHING
void pauseOnSE();
#else
int pauseOnSE();
#endif
#ifdef IPL_SOUND_MATCHING
void pauseOffSE();
#else
int pauseOffSE();
#endif
void setOutputMode(EAudioOutputMode mode);

View File

@@ -48,10 +48,14 @@ namespace EGG {
virtual bool prepareSound(nw4r::snd::SoundHandle* pHandle, u32 id) { return mSoundArchivePlayer.PrepareSound(pHandle, id); } // 0x44
virtual bool prepareSound(nw4r::snd::SoundHandle* pHandle, unsigned int id) { return mSoundArchivePlayer.PrepareSound(pHandle, id); } // 0x44
virtual bool prepareSound(nw4r::snd::SoundHandle* pHandle, const char* pName) {
#ifdef IPL_SOUND_MATCHING
u32 id = changeNameToId(pName);
#else
u32 id = nw4r::snd::SoundArchive::INVALID_ID;
if (mpArchive != NULL) {
id = changeNameToId(pName);
}
#endif
return mSoundArchivePlayer.PrepareSound(pHandle, id);
} // 0x48

View File

@@ -20,9 +20,13 @@ namespace EGG {
~SoundHeapMgr() { destroySoundHeap(); }
virtual bool loadState(s32 id) {
#ifdef IPL_SOUND_MATCHING
if (id > 0 && mHeap.GetCurrentLevel() >= id) {
#else
s32 level = mHeap.GetCurrentLevel();
if (id > 0 && level >= id) {
#endif
mHeap.LoadState(id);
return true;
}

View File

@@ -11,7 +11,11 @@ namespace nw4r {
namespace snd {
class SoundHandle : private ut::NonCopyable {
public:
#ifdef IPL_SOUND_MATCHING
SoundHandle() NO_INLINE;
#else
SoundHandle() NO_INLINE : mSound(NULL) {}
#endif
~SoundHandle() { DetachSound(); }
void detail_AttachSound(detail::BasicSound* sound);

View File

@@ -31,7 +31,14 @@ namespace nw4r {
ut::detail::AutoLock<OSMutex> lock(mMutex);
return mFrameHeap.SaveState();
}
#ifdef IPL_SOUND_MATCHING
void LoadState(int id) {
ut::detail::AutoLock<OSMutex> lock(mMutex);
mFrameHeap.LoadState(id);
}
#else
void LoadState(int id);
#endif
bool IsValid() { return mFrameHeap.IsValid(); }

View File

@@ -20,7 +20,7 @@ namespace nw4r {
Rect(f32 l, f32 t, f32 r, f32 b) : left(l), top(t), right(r), bottom(b) {}
#endif
#ifndef IPL_CONTROLLER_TRIVIAL_RECT_DTOR
#if !defined(IPL_CONTROLLER_TRIVIAL_RECT_DTOR) && !defined(IPL_MEMORYCARD_BASE_CPP)
~Rect() {}
#endif

View File

@@ -37,7 +37,7 @@ namespace nw4r {
} // namespace detail
template <typename TDerived, typename TBase>
#ifdef IPL_BOARD_OBJECT_EXTERNAL_DYNAMIC_CAST
#if defined(IPL_BOARD_OBJECT_EXTERNAL_DYNAMIC_CAST) || defined(IPL_MEMORYCARD_BASE_CPP)
TDerived DynamicCast(TBase* pPtr);
#else
inline TDerived DynamicCast(TBase* pPtr) {

View File

@@ -188,20 +188,20 @@ void TMCJPEGDEC_IdctBlock_Lumi(s32* block, u8* conv_row_ptr, u16 pitch, s32 zigz
oddHighSum = b1 + b7;
b1 = b1 - b7;
u = b6 + b2;
t = t * 0xB5 >> 8;
b2 = t * 0xB5 >> 8;
x_factor = oddHighSum - oddLowSum;
z_factor = b5 + b1;
dcValue = *dst + 0x40000;
a = dcValue - b4;
x = x_factor * 0xB5 >> 8;
d = dcValue + b4;
u = t + u;
v = a + t;
u = b2 + u;
v = a + b2;
z_factor = z_factor * 0x62 >> 8;
w = d + u;
y = d - u;
m_part = b1 * 0x14E >> 8;
e = a - t;
e = a - b2;
m_part = m_part - z_factor;
oddLowSum += m_part;
n = oddHighSum + oddLowSum;

View File

@@ -1411,131 +1411,22 @@ static s32 TMCJPEGDEC_parse_dht(s32 first, TMCCJPEGDecWork* work) {
}
#endif
#ifdef __MWERKS__
static asm s32 TMCJPEGDEC_parse_dqt(register TMCCJPEGDecWork* work) {
nofralloc
stwu r1, -0x130(r1)
mflr r0
lis r4, lbl_8161E080@ha
stw r0, 0x134(r1)
addi r4, r4, lbl_8161E080@l
li r0, 0x20
addi r6, r1, 0xc
stmw r24, 0x110(r1)
mr r30, r3
addi r5, r4, -4
mtctr r0
_parse_dqt_copy:
lwz r4, 4(r5)
lwzu r0, 8(r5)
stw r4, 4(r6)
stwu r0, 8(r6)
bdnz _parse_dqt_copy
addi r31, r3, 0x58
mr r4, r30
addi r3, r1, 0xa
bl TMCJPEGDEC_get_wbyte
cmpwi r3, 0
bge _parse_dqt_have_length
b _parse_dqt_return
_parse_dqt_have_length:
lhz r3, 0xa(r1)
addi r29, r1, 0x10
li r27, 1
lis r28, TMCJPEGDEC_Zigzag_data@ha
addi r0, r3, -2
sth r0, 0xa(r1)
_parse_dqt_table:
lhz r5, 0xa(r1)
mr r4, r30
addi r3, r1, 9
addi r0, r5, -0x41
sth r0, 0xa(r1)
bl TMCJPEGDEC_get_byte
cmpwi r3, 0
bge _parse_dqt_have_qt_info
b _parse_dqt_return
_parse_dqt_have_qt_info:
lbz r0, 9(r1)
cmplwi r0, 4
ble _parse_dqt_valid_qt_info
li r3, -0x41
b _parse_dqt_return
_parse_dqt_valid_qt_info:
add r3, r31, r0
addi r26, r28, TMCJPEGDEC_Zigzag_data@l
stb r27, 0x1790(r3)
li r25, 0
_parse_dqt_coeff:
lbz r24, 0(r26)
cmpwi r24, 0x3f
ble _parse_dqt_valid_coeff
li r3, -0x41
b _parse_dqt_return
_parse_dqt_valid_coeff:
mr r4, r30
addi r3, r1, 8
bl TMCJPEGDEC_get_byte
cmpwi r3, 0
bge _parse_dqt_have_coeff
b _parse_dqt_return
_parse_dqt_have_coeff:
slwi r4, r24, 2
lbz r3, 9(r1)
add r0, r4, r31
lbz r5, 8(r1)
lwzx r4, r29, r4
slwi r3, r3, 8
mullw. r4, r5, r4
stwx r4, r3, r0
bne _parse_dqt_nonzero
li r3, -0x41
b _parse_dqt_return
_parse_dqt_nonzero:
addi r25, r25, 1
addi r26, r26, 1
cmpwi r25, 0x40
blt _parse_dqt_coeff
lhz r0, 0xa(r1)
cmpwi r0, 0
bne _parse_dqt_table
li r3, 0
_parse_dqt_return:
lmw r24, 0x110(r1)
lwz r0, 0x134(r1)
mtlr r0
addi r1, r1, 0x130
blr
}
#else
static s32 TMCJPEGDEC_parse_dqt(TMCCJPEGDecWork* work) {
typedef struct {
u32 data[64];
} CopyBlock64;
u8* scaleInfo;
u32 tblCopy[65];
u32* tblPtr;
typedef struct { u32 coefficients[4][64]; } QuantizationTables;
QuantizationTables* scaleInfo;
u32 tblCopy[64];
u32* d;
u16 len;
s32 r;
d = tblCopy;
*(CopyBlock64*)(d + 1) = *(CopyBlock64*)lbl_8161E080;
*(CopyBlock64*)d = *(CopyBlock64*)lbl_8161E080;
scaleInfo = (u8*)work + 0x58;
scaleInfo = (QuantizationTables*)&work->scaleFlag;
r = TMCJPEGDEC_get_wbyte(&len, work);
if (r < 0) {
@@ -1543,8 +1434,6 @@ static s32 TMCJPEGDEC_parse_dqt(TMCCJPEGDecWork* work) {
}
len -= 2;
tblPtr = &tblCopy[1];
do {
u8 qtInfo;
const u8* zigPtr;
@@ -1563,11 +1452,10 @@ static s32 TMCJPEGDEC_parse_dqt(TMCCJPEGDecWork* work) {
return -0x41;
}
scaleInfo[qtInfo + 0x1790] = 1; // quantTblFlag[0..3]
((TMCUnknownInfo*)scaleInfo)->quantTblFlag[qtInfo] = 1;
zigPtr = TMCJPEGDEC_Zigzag_data;
for (zzIdx = 0; zzIdx < 64; zzIdx++) {
u32 tmp;
zz = *zigPtr;
if (zz > 0x3F) {
@@ -1579,9 +1467,8 @@ static s32 TMCJPEGDEC_parse_dqt(TMCCJPEGDecWork* work) {
return r;
}
tmp = (zz << 2) + ((u32)qtInfo << 8);
val = (u32)byte * tblPtr[zz];
*(u32*)(tmp + scaleInfo) = val;
val = (u32)byte * tblCopy[zz];
scaleInfo->coefficients[qtInfo][zz] = val;
if (val == 0) {
return -0x41;
}
@@ -1592,7 +1479,6 @@ static s32 TMCJPEGDEC_parse_dqt(TMCCJPEGDecWork* work) {
return 0;
}
#endif
#ifdef __MWERKS__
static asm s32 TMCJPEGDEC_parse_sof(register TMCCJPEGDecWork* work) {

View File

@@ -14,85 +14,138 @@ static void TMCJPEGDEC_converterYUV444toRGB565edge(TMCCJPEGDecWork*, s32, s32);
static void TMCJPEGDEC_converterYUV400toRGB565(TMCCJPEGDecWork*, s32, s32);
static void TMCJPEGDEC_converterYUV400toRGB565edge(TMCCJPEGDecWork*, s32, s32);
static inline s32 selectRGB565Converter(TMCCJPEGDecWork* work, u8* ob, s32 cc, TMCCJPEGDecState* st) {
switch (cc) {
case 0: {
u8 mode = work->idctMode;
u8* ptr = ob + 4;
u8* p1 = ptr + mode;
u8* p2 = p1 + mode;
u8* p3 = p2 + mode;
s32 TMCJPEGDEC_set_converterRGB565(TMCCJPEGDecWork* work) {
u8* buffer;
s32 componentCount;
TMCCJPEGDecState* state;
work->pConvRowPtrs[0] = (void*)ptr;
work->pConvRowPtrs[1] = (void*)p1;
work->pConvRowPtrs[2] = (void*)p2;
work->pConvRowPtrs[3] = (void*)p3;
work->pConvRowPtrs[5] = (void*)(ob + 0x104);
work->pConvRowPtrs[6] = (void*)(ob + 0x144);
buffer = work->convBuf;
componentCount = work->componentCount;
state = work->pState;
switch (componentCount) {
case 0: {
u8 mode;
u8* firstRow;
u8* secondRow;
u8* thirdRow;
u8* fourthRow;
u8* cbBlock;
u8* crBlock;
mode = work->idctMode;
firstRow = buffer + 4;
work->pConverterFunc = TMCJPEGDEC_converterYUV411toRGB565;
work->pConverterFuncEdge = TMCJPEGDEC_converterYUV411toRGB565edge;
work->pitch = 0x20;
secondRow = firstRow + mode;
thirdRow = secondRow + mode;
fourthRow = thirdRow + mode;
cbBlock = buffer + 260;
crBlock = buffer + 324;
work->pConvRowPtrs[0] = firstRow;
work->pConvRowPtrs[1] = secondRow;
work->pConvRowPtrs[2] = thirdRow;
work->pConvRowPtrs[3] = fourthRow;
work->pConvRowPtrs[5] = cbBlock;
work->pConvRowPtrs[6] = crBlock;
work->pitch = 32;
work->converterFlags = 0;
break;
}
case 1: {
u8 mode = work->idctMode;
u8* ptr = ob + 4;
work->pConvRowPtrs[0] = (void*)ptr;
work->pConvRowPtrs[1] = (void*)(ptr + mode);
work->pConvRowPtrs[5] = (void*)(ob + 0x84);
work->pConvRowPtrs[6] = (void*)(ob + 0xc4);
u8 mode;
u8* firstRow;
u8* secondRow;
u8* cbBlock;
u8* crBlock;
mode = work->idctMode;
firstRow = buffer + 4;
work->pConverterFunc = TMCJPEGDEC_converterYUV422toRGB565;
work->pConverterFuncEdge = TMCJPEGDEC_converterYUV422toRGB565edge;
work->pitch = 0x10;
secondRow = firstRow + mode;
cbBlock = buffer + 132;
crBlock = buffer + 196;
work->pConvRowPtrs[0] = firstRow;
work->pConvRowPtrs[1] = secondRow;
work->pConvRowPtrs[5] = cbBlock;
work->pConvRowPtrs[6] = crBlock;
work->pitch = 16;
work->converterFlags = 0;
break;
}
case 2: {
u8 mode = work->idctMode;
u8* ptr = ob + 4;
u8* p1 = ptr + mode;
u8* p2 = ptr + mode * 16;
u8* p3 = p2 + mode;
work->pConvRowPtrs[0] = (void*)ptr;
work->pConvRowPtrs[1] = (void*)p1;
work->pConvRowPtrs[2] = (void*)p2;
work->pConvRowPtrs[3] = (void*)p3;
work->pConvRowPtrs[5] = (void*)(ob + 0x104);
work->pConvRowPtrs[6] = (void*)(ob + 0x144);
u8 mode;
u8* firstRow;
u8* secondRow;
u8* thirdRow;
u8* fourthRow;
u8* cbBlock;
u8* crBlock;
mode = work->idctMode;
firstRow = buffer + 4;
work->pConverterFunc = TMCJPEGDEC_converterYUV420toRGB565;
work->pConverterFuncEdge = TMCJPEGDEC_converterYUV420toRGB565edge;
work->pitch = 0x10;
secondRow = firstRow + mode;
thirdRow = firstRow + mode * 16;
fourthRow = thirdRow + mode;
cbBlock = buffer + 260;
crBlock = buffer + 324;
work->pConvRowPtrs[0] = firstRow;
work->pConvRowPtrs[1] = secondRow;
work->pConvRowPtrs[2] = thirdRow;
work->pConvRowPtrs[3] = fourthRow;
work->pConvRowPtrs[5] = cbBlock;
work->pConvRowPtrs[6] = crBlock;
work->pitch = 16;
work->converterFlags = 0;
break;
}
case 3: {
u8 mode = work->idctMode;
u8* ptr = ob + 4;
work->pConvRowPtrs[0] = (void*)ptr;
work->pConvRowPtrs[1] = (void*)(ptr + mode * 8);
work->pConvRowPtrs[5] = (void*)(ob + 0x84);
work->pConvRowPtrs[6] = (void*)(ob + 0xc4);
u8 mode;
u8* firstRow;
u8* secondRow;
u8* cbBlock;
u8* crBlock;
mode = work->idctMode;
firstRow = buffer + 4;
work->pConverterFunc = TMCJPEGDEC_converterYUV211toRGB565;
work->pConverterFuncEdge = TMCJPEGDEC_converterYUV211toRGB565edge;
work->pitch = 0x08;
secondRow = firstRow + mode * 8;
cbBlock = buffer + 132;
crBlock = buffer + 196;
work->pConvRowPtrs[0] = firstRow;
work->pConvRowPtrs[1] = secondRow;
work->pConvRowPtrs[5] = cbBlock;
work->pConvRowPtrs[6] = crBlock;
work->pitch = 8;
work->converterFlags = 0;
break;
}
case 4: {
work->pConvRowPtrs[0] = (void*)(ob + 0x4);
work->pConvRowPtrs[5] = (void*)(ob + 0x44);
work->pConvRowPtrs[6] = (void*)(ob + 0x84);
work->pConverterFunc = TMCJPEGDEC_converterYUV444toRGB565;
work->pConverterFuncEdge = TMCJPEGDEC_converterYUV444toRGB565edge;
TMCConverterFunc* converter;
TMCConverterFunc* edgeConverter;
converter = TMCJPEGDEC_converterYUV444toRGB565;
edgeConverter = TMCJPEGDEC_converterYUV444toRGB565edge;
work->pConvRowPtrs[0] = buffer + 4;
work->pConvRowPtrs[5] = buffer + 0x44;
work->pConvRowPtrs[6] = buffer + 0x84;
work->pConverterFunc = converter;
work->pConverterFuncEdge = edgeConverter;
work->pitch = 0x08;
work->converterFlags = 0;
break;
}
case 5: {
work->pConvRowPtrs[0] = (void*)(ob + 0x4);
work->pConverterFunc = TMCJPEGDEC_converterYUV400toRGB565;
work->pConverterFuncEdge = TMCJPEGDEC_converterYUV400toRGB565edge;
TMCConverterFunc* converter;
TMCConverterFunc* edgeConverter;
converter = TMCJPEGDEC_converterYUV400toRGB565;
edgeConverter = TMCJPEGDEC_converterYUV400toRGB565edge;
work->pConvRowPtrs[0] = buffer + 4;
work->pConverterFunc = converter;
work->pConverterFuncEdge = edgeConverter;
work->pitch = 0x08;
work->converterFlags = 0;
break;
@@ -103,18 +156,15 @@ static inline s32 selectRGB565Converter(TMCCJPEGDecWork* work, u8* ob, s32 cc, T
}
{
s32 width = st->jpegWidth;
s32 height = st->jpegHeight;
st->convWidth = ((u32)width / 4 + (width % 4 != 0)) * 4;
st->convHeight = ((u32)height / 4 + (height % 4 != 0)) * 4;
s32 width = state->jpegWidth;
s32 height = state->jpegHeight;
state->convWidth = ((u32)width / 4 + (width % 4 != 0)) * 4;
state->convHeight = ((u32)height / 4 + (height % 4 != 0)) * 4;
}
return 0;
}
s32 TMCJPEGDEC_set_converterRGB565(TMCCJPEGDecWork* work) {
return selectRGB565Converter(work, work->convBuf, work->componentCount, work->pState);
}
static void TMCJPEGDEC_converterYUV411toRGB565(TMCCJPEGDecWork* work, s32 x, s32 y) {
u16* output;
s32 lumaSkip;
@@ -306,8 +356,8 @@ static void TMCJPEGDEC_converterYUV422toRGB565(TMCCJPEGDecWork* work, s32 x, s32
lumaSkip = 16 - width;
chromaSkip = lumaSkip >> 1;
for (; y < yEnd; y++) {
tileRow = (y >> 2) * tileWidth;
output = (u16*)(texture + ((y & 3) << 3));
tileRow = (y >> 2) * tileWidth;
for (column = x; column < xEnd; column += 2) {
cbValue = (s8)*cb++;
crValue = (s8)*cr++;
@@ -348,28 +398,28 @@ static void TMCJPEGDEC_converterYUV422toRGB565(TMCCJPEGDecWork* work, s32 x, s32
static void TMCJPEGDEC_converterYUV422toRGB565edge(TMCCJPEGDecWork* work, s32 x, s32 y) {
s32 lumaSkip;
s32 chromaSkip;
s32 column;
u16* output;
s32 tileRow;
u8* texture;
u8* luminance;
u8* cb;
u8* cr;
s32 yEnd;
s32 column;
s32 xEnd;
s32 red;
u16* output;
s32 width;
TMCCJPEGDecState* state;
s32 cbValue;
u32 tileWidth;
s32 redOffset;
s32 value;
s32 greenOffset;
s32 height;
s32 cbValue;
s32 yEnd;
TMCCJPEGDecState* state;
s32 width;
u32 tileWidth;
s32 red;
s32 redOffset;
s32 greenOffset;
s8 crValue;
s32 blue;
s32 blueOffset;
s32 green;
s8 crValue;
s32 value;
luminance = work->convBuf + 4;
cb = &work->convBuf[132];
@@ -393,8 +443,8 @@ static void TMCJPEGDEC_converterYUV422toRGB565edge(TMCCJPEGDecWork* work, s32 x,
chromaSkip = lumaSkip >> 1;
ASSERTLINE((x & 1) == 0, __LINE__);
for (; y < yEnd; y++) {
tileRow = (y >> 2) * tileWidth;
output = (u16*)(texture + ((y & 3) << 3));
tileRow = (y >> 2) * tileWidth;
for (column = x; column < xEnd; column += 1) {
if ((column & 1) == 0) {
cbValue = (s8)*cb++;
@@ -513,29 +563,29 @@ static void TMCJPEGDEC_converterYUV420toRGB565(TMCCJPEGDecWork* work, s32 x, s32
}
static void TMCJPEGDEC_converterYUV420toRGB565edge(TMCCJPEGDecWork* work, s32 x, s32 y) {
s32 column;
u16* output;
s8 crValue;
s32 tileRow;
u8* texture;
u8* luminance;
s8* cb;
s8* cr;
TMCCJPEGDecState* state;
u32 tileWidth;
u8* texture;
s32 width;
s32 height;
s8* cr;
s32 column;
s32 xEnd;
s8 cbValue;
s32 yEnd;
s32 red;
s32 blue;
u32 tileWidth;
s32 height;
TMCCJPEGDecState* state;
s32 green;
s32 lumaSkip;
s32 chromaSkip;
s32 tileRow;
u16* output;
s32 cbValue;
s32 crValue;
s32 redOffset;
s32 greenOffset;
s32 blueOffset;
s32 blue;
s32 red;
s32 green;
luminance = work->convBuf + 4;
cb = (s8*)&work->convBuf[260];
@@ -559,8 +609,8 @@ static void TMCJPEGDEC_converterYUV420toRGB565edge(TMCCJPEGDecWork* work, s32 x,
chromaSkip = lumaSkip >> 1;
ASSERTLINE((x & 1) == 0, __LINE__);
for (; y < yEnd; y++) {
tileRow = (y >> 2) * tileWidth;
output = (u16*)(texture + ((y & 3) << 3));
tileRow = (y >> 2) * tileWidth;
for (column = x; column < xEnd; column += 1) {
if ((column & 1) == 0) {
cbValue = *cb++;
@@ -594,24 +644,24 @@ static void TMCJPEGDEC_converterYUV420toRGB565edge(TMCCJPEGDecWork* work, s32 x,
static void TMCJPEGDEC_converterYUV211toRGB565(TMCCJPEGDecWork* work, s32 x, s32 y) {
u16* output;
s32 lumaSkip;
s32 yEnd;
s32 tileRow;
u8* texture;
u8* luminance;
s32 red;
s32 column;
u8* cb;
u8* cr;
u32 tileWidth;
s32 greenOffset;
s32 column;
s32 height;
s32 width;
s8 crValue;
s32 greenOffset;
s32 redOffset;
s32 cbValue;
s32 blueOffset;
s32 height;
s8 crValue;
s32 xEnd;
s32 value;
s32 tileRow;
u8* cb;
s32 yEnd;
u32 tileWidth;
TMCCJPEGDecState* state;
s32 blue;
s32 green;
@@ -632,8 +682,8 @@ static void TMCJPEGDEC_converterYUV211toRGB565(TMCCJPEGDecWork* work, s32 x, s32
lumaSkip = 8 - width;
chromaSkip = lumaSkip >> 0;
for (; y < yEnd; y++) {
tileRow = (y >> 2) * tileWidth;
output = (u16*)(texture + ((y & 3) << 3));
tileRow = (y >> 2) * tileWidth;
for (column = x; column < xEnd; column += 1) {
{
@@ -671,24 +721,24 @@ static void TMCJPEGDEC_converterYUV211toRGB565(TMCCJPEGDecWork* work, s32 x, s32
static void TMCJPEGDEC_converterYUV211toRGB565edge(TMCCJPEGDecWork* work, s32 x, s32 y) {
s32 lumaSkip;
u8* cb;
u16* output;
s32 tileRow;
s32 greenOffset;
u8* texture;
u8* luminance;
u32 tileWidth;
u8* cb;
s32 redOffset;
u8* cr;
s32 xEnd;
s32 column;
s32 width;
TMCCJPEGDecState* state;
s32 column;
s32 xEnd;
s8 crValue;
s32 value;
s32 red;
s32 blueOffset;
s32 yEnd;
u16* output;
u32 tileWidth;
s32 blue;
s32 cbValue;
s32 green;
@@ -718,8 +768,8 @@ static void TMCJPEGDEC_converterYUV211toRGB565edge(TMCCJPEGDecWork* work, s32 x,
lumaSkip = 8 - width;
chromaSkip = lumaSkip >> 0;
for (; y < yEnd; y++) {
tileRow = (y >> 2) * tileWidth;
output = (u16*)(texture + ((y & 3) << 3));
tileRow = (y >> 2) * tileWidth;
for (column = x; column < xEnd; column += 1) {
{

View File

@@ -14,85 +14,138 @@ static void TMCJPEGDEC_converterYUV444toRGBA8edge(TMCCJPEGDecWork*, s32, s32);
static void TMCJPEGDEC_converterYUV400toRGBA8(TMCCJPEGDecWork*, s32, s32);
static void TMCJPEGDEC_converterYUV400toRGBA8edge(TMCCJPEGDecWork*, s32, s32);
static inline s32 selectRGBA8Converter(TMCCJPEGDecWork* work, u8* ob, s32 cc, TMCCJPEGDecState* st) {
switch (cc) {
case 0: {
u8 mode = work->idctMode;
u8* ptr = ob + 4;
u8* p1 = ptr + mode;
u8* p2 = p1 + mode;
u8* p3 = p2 + mode;
s32 TMCJPEGDEC_set_converterRGBA8(TMCCJPEGDecWork* work) {
u8* buffer;
s32 componentCount;
TMCCJPEGDecState* state;
work->pConvRowPtrs[0] = (void*)ptr;
work->pConvRowPtrs[1] = (void*)p1;
work->pConvRowPtrs[2] = (void*)p2;
work->pConvRowPtrs[3] = (void*)p3;
work->pConvRowPtrs[5] = (void*)(ob + 0x104);
work->pConvRowPtrs[6] = (void*)(ob + 0x144);
buffer = work->convBuf;
componentCount = work->componentCount;
state = work->pState;
switch (componentCount) {
case 0: {
u8 mode;
u8* firstRow;
u8* secondRow;
u8* thirdRow;
u8* fourthRow;
u8* cbBlock;
u8* crBlock;
mode = work->idctMode;
firstRow = buffer + 4;
work->pConverterFunc = TMCJPEGDEC_converterYUV411toRGBA8;
work->pConverterFuncEdge = TMCJPEGDEC_converterYUV411toRGBA8edge;
work->pitch = 0x20;
secondRow = firstRow + mode;
thirdRow = secondRow + mode;
fourthRow = thirdRow + mode;
cbBlock = buffer + 260;
crBlock = buffer + 324;
work->pConvRowPtrs[0] = firstRow;
work->pConvRowPtrs[1] = secondRow;
work->pConvRowPtrs[2] = thirdRow;
work->pConvRowPtrs[3] = fourthRow;
work->pConvRowPtrs[5] = cbBlock;
work->pConvRowPtrs[6] = crBlock;
work->pitch = 32;
work->converterFlags = 0;
break;
}
case 1: {
u8 mode = work->idctMode;
u8* ptr = ob + 4;
work->pConvRowPtrs[0] = (void*)ptr;
work->pConvRowPtrs[1] = (void*)(ptr + mode);
work->pConvRowPtrs[5] = (void*)(ob + 0x84);
work->pConvRowPtrs[6] = (void*)(ob + 0xC4);
u8 mode;
u8* firstRow;
u8* secondRow;
u8* cbBlock;
u8* crBlock;
mode = work->idctMode;
firstRow = buffer + 4;
work->pConverterFunc = TMCJPEGDEC_converterYUV422toRGBA8;
work->pConverterFuncEdge = TMCJPEGDEC_converterYUV422toRGBA8edge;
work->pitch = 0x10;
secondRow = firstRow + mode;
cbBlock = buffer + 132;
crBlock = buffer + 196;
work->pConvRowPtrs[0] = firstRow;
work->pConvRowPtrs[1] = secondRow;
work->pConvRowPtrs[5] = cbBlock;
work->pConvRowPtrs[6] = crBlock;
work->pitch = 16;
work->converterFlags = 0;
break;
}
case 2: {
u8 mode = work->idctMode;
u8* ptr = ob + 4;
u8* p1 = ptr + mode;
u8* p2 = ptr + mode * 16;
u8* p3 = p2 + mode;
work->pConvRowPtrs[0] = (void*)ptr;
work->pConvRowPtrs[1] = (void*)p1;
work->pConvRowPtrs[2] = (void*)p2;
work->pConvRowPtrs[3] = (void*)p3;
work->pConvRowPtrs[5] = (void*)(ob + 0x104);
work->pConvRowPtrs[6] = (void*)(ob + 0x144);
u8 mode;
u8* firstRow;
u8* secondRow;
u8* thirdRow;
u8* fourthRow;
u8* cbBlock;
u8* crBlock;
mode = work->idctMode;
firstRow = buffer + 4;
work->pConverterFunc = TMCJPEGDEC_converterYUV420toRGBA8;
work->pConverterFuncEdge = TMCJPEGDEC_converterYUV420toRGBA8edge;
work->pitch = 0x10;
secondRow = firstRow + mode;
thirdRow = firstRow + mode * 16;
fourthRow = thirdRow + mode;
cbBlock = buffer + 260;
crBlock = buffer + 324;
work->pConvRowPtrs[0] = firstRow;
work->pConvRowPtrs[1] = secondRow;
work->pConvRowPtrs[2] = thirdRow;
work->pConvRowPtrs[3] = fourthRow;
work->pConvRowPtrs[5] = cbBlock;
work->pConvRowPtrs[6] = crBlock;
work->pitch = 16;
work->converterFlags = 0;
break;
}
case 3: {
u8 mode = work->idctMode;
u8* ptr = ob + 4;
work->pConvRowPtrs[0] = (void*)ptr;
work->pConvRowPtrs[1] = (void*)(ptr + mode * 8);
work->pConvRowPtrs[5] = (void*)(ob + 0x84);
work->pConvRowPtrs[6] = (void*)(ob + 0xC4);
u8 mode;
u8* firstRow;
u8* secondRow;
u8* cbBlock;
u8* crBlock;
mode = work->idctMode;
firstRow = buffer + 4;
work->pConverterFunc = TMCJPEGDEC_converterYUV211toRGBA8;
work->pConverterFuncEdge = TMCJPEGDEC_converterYUV211toRGBA8edge;
work->pitch = 0x08;
secondRow = firstRow + mode * 8;
cbBlock = buffer + 132;
crBlock = buffer + 196;
work->pConvRowPtrs[0] = firstRow;
work->pConvRowPtrs[1] = secondRow;
work->pConvRowPtrs[5] = cbBlock;
work->pConvRowPtrs[6] = crBlock;
work->pitch = 8;
work->converterFlags = 0;
break;
}
case 4: {
work->pConvRowPtrs[0] = (void*)(ob + 4);
work->pConvRowPtrs[5] = (void*)(ob + 0x44);
work->pConvRowPtrs[6] = (void*)(ob + 0x84);
work->pConverterFunc = TMCJPEGDEC_converterYUV444toRGBA8;
work->pConverterFuncEdge = TMCJPEGDEC_converterYUV444toRGBA8edge;
TMCConverterFunc* converter;
TMCConverterFunc* edgeConverter;
converter = TMCJPEGDEC_converterYUV444toRGBA8;
edgeConverter = TMCJPEGDEC_converterYUV444toRGBA8edge;
work->pConvRowPtrs[0] = buffer + 4;
work->pConvRowPtrs[5] = buffer + 0x44;
work->pConvRowPtrs[6] = buffer + 0x84;
work->pConverterFunc = converter;
work->pConverterFuncEdge = edgeConverter;
work->pitch = 0x08;
work->converterFlags = 0;
break;
}
case 5: {
work->pConvRowPtrs[0] = (void*)(ob + 4);
work->pConverterFunc = TMCJPEGDEC_converterYUV400toRGBA8;
work->pConverterFuncEdge = TMCJPEGDEC_converterYUV400toRGBA8edge;
TMCConverterFunc* converter;
TMCConverterFunc* edgeConverter;
converter = TMCJPEGDEC_converterYUV400toRGBA8;
edgeConverter = TMCJPEGDEC_converterYUV400toRGBA8edge;
work->pConvRowPtrs[0] = buffer + 4;
work->pConverterFunc = converter;
work->pConverterFuncEdge = edgeConverter;
work->pitch = 0x08;
work->converterFlags = 0;
break;
@@ -103,18 +156,15 @@ static inline s32 selectRGBA8Converter(TMCCJPEGDecWork* work, u8* ob, s32 cc, TM
}
{
s32 width = st->jpegWidth;
s32 height = st->jpegHeight;
st->convWidth = ((u32)width / 4 + (width % 4 != 0)) * 4;
st->convHeight = ((u32)height / 4 + (height % 4 != 0)) * 4;
s32 width = state->jpegWidth;
s32 height = state->jpegHeight;
state->convWidth = ((u32)width / 4 + (width % 4 != 0)) * 4;
state->convHeight = ((u32)height / 4 + (height % 4 != 0)) * 4;
}
return 0;
}
s32 TMCJPEGDEC_set_converterRGBA8(TMCCJPEGDecWork* work) {
return selectRGBA8Converter(work, work->convBuf, work->componentCount, work->pState);
}
static void TMCJPEGDEC_converterYUV411toRGBA8(TMCCJPEGDecWork* work, s32 x, s32 y) {
s8 crValue;
u8* luminance;
@@ -179,10 +229,9 @@ static void TMCJPEGDEC_converterYUV411toRGBA8(TMCCJPEGDecWork* work, s32 x, s32
green = green > 255 ? 255 : green < 0 ? 0 : green;
red = red > 255 ? 255 : red < 0 ? 0 : red;
}
output[(column & 3) + (((((column) >> 2) << 1) + tileRow) << 4)] =
(u8)red + 0x10000 - 0x100;
output[(column & 3) + (((((column) >> 2) << 1) + tileRow + 1) << 4)] =
((green & 255) << 8) + (blue & 255);
red = (u8)red + 0x10000 - 0x100;
output[(column & 3) + (((((column) >> 2) << 1) + tileRow) << 4)] = red;
output[(column & 3) + (((((column) >> 2) << 1) + tileRow + 1) << 4)] = ((green & 255) << 8) + (blue & 255);
}
{
value = *luminance++;
@@ -194,10 +243,9 @@ static void TMCJPEGDEC_converterYUV411toRGBA8(TMCCJPEGDecWork* work, s32 x, s32
green = green > 255 ? 255 : green < 0 ? 0 : green;
red = red > 255 ? 255 : red < 0 ? 0 : red;
}
output[(column + 1 & 3) + (((((column + 1) >> 2) << 1) + tileRow) << 4)] =
(u8)red + 0x10000 - 0x100;
output[(column + 1 & 3) + (((((column + 1) >> 2) << 1) + tileRow + 1) << 4)] =
((green & 255) << 8) + (blue & 255);
red = (u8)red + 0x10000 - 0x100;
output[(column + 1 & 3) + (((((column + 1) >> 2) << 1) + tileRow) << 4)] = red;
output[(column + 1 & 3) + (((((column + 1) >> 2) << 1) + tileRow + 1) << 4)] = ((green & 255) << 8) + (blue & 255);
}
{
value = *luminance++;
@@ -209,10 +257,9 @@ static void TMCJPEGDEC_converterYUV411toRGBA8(TMCCJPEGDecWork* work, s32 x, s32
green = green > 255 ? 255 : green < 0 ? 0 : green;
red = red > 255 ? 255 : red < 0 ? 0 : red;
}
output[(column + 2 & 3) + (((((column + 2) >> 2) << 1) + tileRow) << 4)] =
(u8)red + 0x10000 - 0x100;
output[(column + 2 & 3) + (((((column + 2) >> 2) << 1) + tileRow + 1) << 4)] =
((green & 255) << 8) + (blue & 255);
red = (u8)red + 0x10000 - 0x100;
output[(column + 2 & 3) + (((((column + 2) >> 2) << 1) + tileRow) << 4)] = red;
output[(column + 2 & 3) + (((((column + 2) >> 2) << 1) + tileRow + 1) << 4)] = ((green & 255) << 8) + (blue & 255);
}
{
value = *luminance++;
@@ -224,10 +271,9 @@ static void TMCJPEGDEC_converterYUV411toRGBA8(TMCCJPEGDecWork* work, s32 x, s32
green = green > 255 ? 255 : green < 0 ? 0 : green;
red = red > 255 ? 255 : red < 0 ? 0 : red;
}
output[(column + 3 & 3) + (((((column + 3) >> 2) << 1) + tileRow) << 4)] =
(u8)red + 0x10000 - 0x100;
output[(column + 3 & 3) + (((((column + 3) >> 2) << 1) + tileRow + 1) << 4)] =
((green & 255) << 8) + (blue & 255);
red = (u8)red + 0x10000 - 0x100;
output[(column + 3 & 3) + (((((column + 3) >> 2) << 1) + tileRow) << 4)] = red;
output[(column + 3 & 3) + (((((column + 3) >> 2) << 1) + tileRow + 1) << 4)] = ((green & 255) << 8) + (blue & 255);
}
}
@@ -357,8 +403,8 @@ static void TMCJPEGDEC_converterYUV422toRGBA8(TMCCJPEGDecWork* work, s32 x, s32
lumaSkip = 16 - width;
chromaSkip = lumaSkip >> 1;
for (; y < yEnd; y++) {
tileRow = (y >> 2) * tileWidth;
output = (u16*)(texture + ((y & 3) << 3));
tileRow = (y >> 2) * tileWidth;
for (column = x; column < xEnd; column += 2) {
cbValue = (s8)*cb++;
crValue = (s8)*cr++;
@@ -442,8 +488,8 @@ static void TMCJPEGDEC_converterYUV422toRGBA8edge(TMCCJPEGDecWork* work, s32 x,
chromaSkip = lumaSkip >> 1;
ASSERTLINE((x & 1) == 0, __LINE__);
for (; y < yEnd; y++) {
tileRow = (y >> 2) * tileWidth;
output = (u16*)(texture + ((y & 3) << 3));
tileRow = (y >> 2) * tileWidth;
for (column = x; column < xEnd; column += 1) {
if ((column & 1) == 0) {
cbValue = (s8)*cb++;
@@ -511,8 +557,8 @@ static void TMCJPEGDEC_converterYUV420toRGBA8(TMCCJPEGDecWork* work, s32 x, s32
lumaSkip = 16 - width;
chromaSkip = lumaSkip >> 1;
for (; y < yEnd; y++) {
tileRow = (y >> 2) * tileWidth;
output = (u16*)(texture + ((y & 3) << 3));
tileRow = (y >> 2) * tileWidth;
for (column = x; column < xEnd; column += 2) {
@@ -812,23 +858,23 @@ static void TMCJPEGDEC_converterYUV444toRGBA8(TMCCJPEGDecWork* work, s32 x, s32
u16* output;
s32 tileWidth;
s32 tileRow;
s32 blue;
s32 xEnd;
u8* luminance;
u8* cb;
u8* cr;
TMCCJPEGDecState* state;
s32 column;
s32 row;
s32 width;
s8 crValue;
s32 height;
s32 width;
s32 column;
s32 rowSkip;
s32 yEnd;
u8* texture;
s32 cbValue;
s8 crValue;
s32 row;
s32 red;
s32 cbValue;
s32 green;
s32 xEnd;
s32 blue;
s32 value;
luminance = work->convBuf + 4;

View File

@@ -205,8 +205,8 @@ static void TMCJPEG_814EFEAC(TMCCJPEGDecWork* work, s32 x, s32 y) {
yEnd = y + height;
rowSkip = 32 - width;
for (; row < yEnd; row++) {
tileRow = (row >> 2) * tileWidth;
output = lumaTexture + ((row & 3) << 3);
tileRow = (row >> 2) * tileWidth;
for (column = x; column < xEnd; column += 4) {
(output + (column & 7))[(s32)(((column >> 3) + tileRow) << 5)] = luminance[0];
(output + ((column + 1) & 7))[(s32)((((column + 1) >> 3) + tileRow) << 5)] = luminance[1];

View File

@@ -142,6 +142,9 @@ typedef struct ziFuzzyZYPairs {
int rANDn : 1;
int bANDp : 1;
int gANDk : 1;
int dANDt : 1;
int reserved : 20;
} ziFuzzyZYPairs;
typedef struct _ziGetParam {
@@ -357,8 +360,8 @@ typedef struct ziMatchParam {
ziWChar first2; // 0x68
ziWChar comp; // 0x6A
ziU8 nSeg; // 0x6C
ziU8 segs1[0xC0]; // 0x6D
ziU8 segsD[0xC0]; // 0x12D
ziU8 segs1[16][12]; // 0x6D
ziU8 segsD[16][12]; // 0x12D
ziU8 pad_0x1ED; // 0x1ED
} ziMatchParam;

View File

@@ -67,12 +67,11 @@ ziWChar Zi8ConvertUC2WC(ziChar character, ziU8 language ZI_NEED_WORK) {
return mapped[character - defaults->first];
}
ziChar Zi8ConvertWC2UC(ziWChar character, ziU8 language ZI_NEED_WORK) {
ziU16 index, count, first, last, value;
ziU16 index, count, value, first, last;
ziU8* cursor;
ziConversionTable* table;
const ziConversionRangeTable* defaults;
ziConversionRange* ranges;
ziConversionEntry* entry;
ziU8* cursor;
if (character == 0) {
Zi8LogError(0x133, __zi8_work_data);
return 0;
@@ -83,94 +82,109 @@ ziChar Zi8ConvertWC2UC(ziWChar character, ziU8 language ZI_NEED_WORK) {
Zi8LogError(0x6AE, __zi8_work_data);
return 0;
}
entry = table->entries;
count = (ziU16)table->count[0] << 8 | table->count[1];
entry = (ziConversionEntry*)table;
count = (ziU16)entry->first[0] << 8 | entry->first[1];
entry++;
for (index = 0; index < count; index++) {
first = ((ziU16)entry->first[0] << 8 | entry->first[1]);
first = (ziU16)entry->first[0] << 8 | entry->first[1];
last = (ziU16)entry->last[0] << 8 | entry->last[1];
if (first <= character && character <= last) {
value = ((ziU16)entry->value[0] << 8 | entry->value[1]);
if (first == last) {
Zi8LogError(100, __zi8_work_data);
return value & 0xFF;
}
Zi8LogError(100, __zi8_work_data);
return ((ziU8*)table->entries)[character + value - first];
if (character < first || character > last) {
entry++;
continue;
}
entry++;
value = (ziU16)entry->value[0] << 8 | entry->value[1];
if (first == last) {
Zi8LogError(100, __zi8_work_data);
return value & 0xFF;
}
entry = (ziConversionEntry*)((ziU8*)table + value + character - first + 8);
Zi8LogError(100, __zi8_work_data);
return *(ziU8*)entry;
}
Zi8LogError(0x6C2, __zi8_work_data);
return 0;
} else {
defaults = &Zi8CvrtTables.reverse;
if (defaults == 0) {
ranges = Zi8CvrtTables.reverse.entries;
if (ranges == 0) {
Zi8LogError(0x6AE, __zi8_work_data);
return 0;
}
ranges = defaults->entries;
for (index = 0; index < defaults->count; index++) {
if (ranges[index].first <= character && character <= ranges[index].last) {
count = Zi8CvrtTables.reverse.count;
for (index = 0; index < count; index++) {
if (character >= ranges[index].first && character <= ranges[index].last) {
Zi8LogError(100, __zi8_work_data);
if (ranges[index].first == ranges[index].last) return ranges[index].result.character & 0xFF;
return ((ziU8*)ranges[index].result.table)[character - ranges[index].first];
if (ranges[index].first == ranges[index].last)
return ranges[index].result.character & 0xFF;
cursor = ranges[index].result.table;
return cursor[character - ranges[index].first];
}
}
Zi8LogError(0x6C2, __zi8_work_data);
return 0;
}
Zi8LogError(0x6C2, __zi8_work_data);
return 0;
}
ziWChar Zi8ConvertUC2Key(ziChar character, ziU8 language ZI_NEED_WORK) {
ziU16 count, index, first, last;
ziU32 key = 0;
ziU16 key = 0;
ziU16 index, count, first, last;
ziConversionTable* table;
const ziConversionRangeTable* defaults;
ziWChar* mapped;
ziConversionRange* ranges;
ziConversionEntry* entry;
ziU8* cursor;
if (character == 0) {
Zi8LogError(0x133, __zi8_work_data);
return 0;
}
if (ZI_WORK->userKeys[language] != 0) return Zi8ConvertUC2UserKey(character, language, __zi8_work_data);
if (ZI_WORK->userKeys[language] != 0)
return Zi8ConvertUC2UserKey(character, language, __zi8_work_data);
if (Zi8GetTableCount(language, 8, __zi8_work_data) != 0) {
table = Zi8GetTableAddress(language, 8, __zi8_work_data);
if (table == 0) {
Zi8LogError(0x6B8, __zi8_work_data);
return 0;
}
entry = table->entries;
count = (ziU16)table->count[0] << 8 | table->count[1];
entry = (ziConversionEntry*)table;
count = (ziU16)entry->first[0] << 8 | entry->first[1];
entry++;
for (index = 0; index < count; index++) {
first = ((ziU16)entry->first[0] << 8 | entry->first[1]);
first = (ziU16)entry->first[0] << 8 | entry->first[1];
last = (ziU16)entry->last[0] << 8 | entry->last[1];
if (first <= character && character <= last) {
key = ((ziU16)entry->value[0] << 8 | entry->value[1]);
if (first != last) {
cursor = (ziU8*)table->entries + key + (character - first) * 2;
key = (ziU16)cursor[0] << 8 | cursor[1];
}
break;
if (character < first || character > last) {
entry++;
continue;
}
entry++;
key = (ziU16)entry->value[0] << 8 | entry->value[1];
if (first == last) break;
entry = (ziConversionEntry*)((ziU8*)table + key + (character - first) * 2);
entry = (ziConversionEntry*)((ziU8*)entry + 8);
key = (ziU16)entry->first[0] << 8 | entry->first[1];
break;
}
} else {
defaults = &Zi8CvrtTables.keys;
if (defaults == 0) {
ranges = Zi8CvrtTables.keys.entries;
if (ranges == 0) {
Zi8LogError(0x6B8, __zi8_work_data);
return 0;
}
ranges = defaults->entries;
for (index = 0; index < defaults->count; index++) {
if (ranges[index].first <= character && character <= ranges[index].last) {
if (ranges[index].first == ranges[index].last) key = ranges[index].result.character & 0xFF;
else key = ((ziWChar*)ranges[index].result.table)[character - ranges[index].first];
count = Zi8CvrtTables.keys.count;
for (index = 0; index < count; index++) {
if (character >= ranges[index].first && character <= ranges[index].last) {
if (ranges[index].first == ranges[index].last) {
key = (ziU8)ranges[index].result.character;
break;
}
mapped = ranges[index].result.table;
key = mapped[character - ranges[index].first];
break;
}
}
}
if (key == 0) {
Zi8LogError(0x6C2, __zi8_work_data);
key = 0xEFF1;
} else Zi8LogError(100, __zi8_work_data);
return key;
return 0xEFF1;
} else {
Zi8LogError(100, __zi8_work_data);
return key;
}
}
ziWChar Zi8ConvertWC2Key(ziWChar character, ziU8 language ZI_NEED_WORK) {
return Zi8ConvertUC2Key(Zi8ConvertWC2UC(character, language, __zi8_work_data), language, __zi8_work_data);

View File

@@ -269,10 +269,10 @@ Zi8UInt Zi8SpellingZY(ziU16 *output,Zi8UInt key,ziU8 includeTone)
Zi8UInt Zi8SpellingPY(ziU16 *output,Zi8UInt key,ziU8 includeTone)
{
Zi8UInt length = 0;
ziU16 initialIndex = (ziU16)(((key & 0xffff) >> 9) & 0x3f);
ziU16 finalIndex = (ziU16)(((key & 0xffff) >> 3) & 0x3f);
ziU16 tone = (ziU16)(key & 7);
Zi8UInt length = 0;
volatile ziU16 tone = (ziU16)(key & 7);
output[0] = zi8PYinitialSpelling[initialIndex][0];
output[1] = zi8PYinitialSpelling[initialIndex][1];

View File

@@ -1074,7 +1074,7 @@ filterVowelCandidate:
(((ZiAlphaWork*)workData)->dictionaries[language] == 0)))))) {
if (language != ((ZiAlphaWork*)workData)->language) break;
index = ((ZiAlphaWork*)workData)->dictionaryKinds[dictionaryIndex + 1];
if ((index == 0xc) || (((index < 0xc && (index < 9)) && (4 < index)))) {
if (index == 0xc || (index < 9 && index >= 5)) {
if (Zi8getKeyLayout(language,0xeff1,&punctuationBuffer[0],1,workData) == 0) {
punctuationBuffer[0] = 0;
}
@@ -1101,7 +1101,7 @@ filterVowelCandidate:
punctuationCursor = &punctuationBuffer[0];
dictionaryKind = 0xb;
}
else if ((int)(unsigned int)(ziU8)((ZiAlphaOptions*)optionData)->minWordLength <= (int)wordLength) {
else if (((ZiAlphaOptions*)optionData)->minWordLength <= wordLength) {
if (prefixVowelRestriction) {
if (*wordCursor >= 0x30 && *wordCursor <= 0x39) goto retryDictionary;
if (language == 0x2f) {
@@ -1116,15 +1116,15 @@ filterVowelCandidate:
{
prepareCandidate:
if (((elementCount == 1) && (dictionaryKind != 10)) &&
((0xeff0 < *wordCursor && (*wordCursor < 0xf011)))) {
((*wordCursor >= 0xeff1 && *wordCursor <= 0xf010))) {
punctuationCandidate = ZI8_TRUE;
break;
}
wordCursor[wordLength] = 0;
if (((exactLengthOnly != 0) && (elementCount != 0)) && ((int)elementCount < (int)wordLength))
if (((exactLengthOnly != 0) && (elementCount != 0)) && ((int)wordLength > (int)elementCount))
{
wordLength = elementCount;
wordCursor[elementCount] = 0;
wordCursor[wordLength] = 0;
}
wordLength = (ziU16)Zi8DeTokenization(wordCursor,wordLength & 0xffff,wordCapacity & 0xffff,language);
if (((phoneticInput) && ((unsigned int)parameters->elementCount < (wordLength & 0xff))) &&
@@ -1136,35 +1136,39 @@ prepareCandidate:
((Zi8ZHCheckSpelling(wordCursor,parameters->elements,parameters->elementCount,
workData)) != '\0')) {
if ((((ZiAlphaWork*)workData)->caseMode != '\0') && ((!phoneticInput && (!phoneticSeparator)))) {
Zi8ChangeWordCase(wordCursor + -prefixCount,language,workData);
Zi8ChangeWordCase(wordCursor - prefixCount,language,workData);
}
if ((((ZiAlphaOptions*)optionData)->suffixOnly != '\0') &&
((int)(unsigned int)(ziU8)((ZiAlphaOptions*)optionData)->maxWordLength < (int)(wordLength + prefixCount))) {
wordLength = (ziU8)((ZiAlphaOptions*)optionData)->maxWordLength - prefixCount;
((int)((ZiAlphaOptions*)optionData)->maxWordLength < (int)(wordLength + prefixCount))) {
wordLength = ((ZiAlphaOptions*)optionData)->maxWordLength - prefixCount;
wordCursor[wordLength] = 0;
}
if (((int)(unsigned int)(ziU8)((ZiAlphaOptions*)optionData)->maxWordLength < (int)(wordLength + prefixCount)) ||
((Zi8IsDupWordW(wordCursor + -prefixCount,wordLength + prefixCount & 0xff,
if (((int)((ZiAlphaOptions*)optionData)->maxWordLength < (int)(wordLength + prefixCount)) ||
((Zi8IsDupWordW(wordCursor - prefixCount,wordLength + prefixCount & 0xff,
workData)) != '\0')) {
if ((prefixCount != 0) && ((ziU8)((ZiAlphaOptions*)optionData)->maxWordLength <= prefixCount)) break;
if ((prefixCount != 0) && (((ZiAlphaOptions*)optionData)->maxWordLength <= prefixCount)) break;
}
else {
if ((((keyLayoutCount == 0) || (((ZiAlphaOptions*)optionData)->lookupMode != '\0')) ||
((int)(wordLength + prefixCount) < 2)) ||
((int)(wordLength + prefixCount) <= 1)) ||
(0x40 < (int)(wordLength + prefixCount))) goto emitCandidate;
if (dictionaryKind == 5) {
switch (dictionaryKind) {
case 5:
case 1:
case 9:
checkKeyLayout:
keyLayoutCursor = keyLayout;
candidateCharacterCount = wordLength + prefixCount;
for (index = 0; (int)index < (int)(unsigned int)keyLayoutCount; index = index + 1) {
if (candidateCharacterCount <= *keyLayoutCursor) {
if (candidateCharacterCount < *keyLayoutCursor++) {
if (*keyLayoutCursor < candidateCharacterCount) {
keyLayoutCursor = keyLayoutCursor + *keyLayoutCursor + 1;
} else {
if (*keyLayoutCursor++ > candidateCharacterCount) {
index = (unsigned int)keyLayoutCount;
}
break;
}
keyLayoutCursor = keyLayoutCursor + *keyLayoutCursor + 1;
}
if ((int)index < (int)(unsigned int)keyLayoutCount) {
for (elementIndex = 0; (int)elementIndex < (int)(unsigned int)candidateCharacterCount;
@@ -1172,32 +1176,31 @@ checkKeyLayout:
candidateBytes[elementIndex] = Zi8ConvertWC2UC(wordCursor[elementIndex - prefixCount],language,workData);
}
for (; (int)index < (int)(unsigned int)keyLayoutCount; index = index + 1) {
for (elementIndex = 0;
((int)elementIndex < (int)(unsigned int)candidateCharacterCount &&
(candidateBytes[elementIndex] == keyLayoutCursor[elementIndex]));
elementIndex = elementIndex + 1) {
elementIndex = 0;
while (elementIndex < candidateCharacterCount) {
if (candidateBytes[elementIndex] != keyLayoutCursor[elementIndex]) break;
elementIndex++;
}
if (elementIndex == candidateCharacterCount) {
wordCursor[-prefixCount] = 0;
goto retryDictionary;
}
keyLayoutCursor += candidateCharacterCount;
if (candidateCharacterCount < *keyLayoutCursor++) break;
if (*keyLayoutCursor++ > candidateCharacterCount) break;
}
}
break;
default:
break;
}
else if (dictionaryKind < 5) {
if (dictionaryKind == 1) goto checkKeyLayout;
}
else if (dictionaryKind == 9) goto checkKeyLayout;
emitCandidate:
if (firstCandidate == 0) {
if (((ZiAlphaOptions*)optionData)->countOnly != '\0') {
if (((ZiAlphaOptions*)optionData)->suffixOnly != '\0') {
if ((int)(wordLength + prefixCount) < (int)(unsigned int)(ziU8)((ZiAlphaOptions*)optionData)->shortestWord) {
if ((int)((ZiAlphaOptions*)optionData)->shortestWord > (int)(wordLength + prefixCount)) {
((ZiAlphaOptions*)optionData)->shortestWord = wordLength + prefixCount;
}
if ((int)(unsigned int)(ziU8)((ZiAlphaOptions*)optionData)->longestWord < (int)(wordLength + prefixCount)) {
if ((int)((ZiAlphaOptions*)optionData)->longestWord < (int)(wordLength + prefixCount)) {
((ZiAlphaOptions*)optionData)->longestWord = wordLength + prefixCount;
}
}
@@ -1221,23 +1224,17 @@ emitCandidate:
} else {
if (((((ZiAlphaWork*)workData)->suffixMode == '\0') && (wordCursor[1] == 0)) &&
(candidateCount == 0)) {
if ((*wordCursor < 0xeff1) || (0xf010 < *wordCursor)) {
((ZiAlphaWork*)workData)->singleCharacter = *wordCursor;
}
else {
if (*wordCursor >= 0xeff1 && *wordCursor <= 0xf010) {
((ZiAlphaWork*)workData)->singleCharacter = 0;
}
}
if (((dictionaryExact == 0) || (parameters->elementCount != ((ZiAlphaWork*)workData)->rememberedCount))
|| ((parameters->maxCandidates != 1 &&
((candidateCount != 0 || (parameters->firstCandidate != 0)))))) {
if (((dictionaryExact == 0) && (parameters->elementCount == ((ZiAlphaWork*)workData)->rememberedCount))
&& ((parameters->maxCandidates == 1 ||
((candidateCount == 0 && (parameters->firstCandidate == 0)))))) {
((ZiAlphaWork*)workData)->rememberedWord[0] = 0;
else {
((ZiAlphaWork*)workData)->singleCharacter = *wordCursor;
}
}
else {
if (dictionaryExact != 0 &&
parameters->elementCount == ((ZiAlphaWork*)workData)->rememberedCount &&
(parameters->maxCandidates == 1 ||
(candidateCount == 0 && parameters->firstCandidate == 0))) {
for (index = 0; (int)index < (int)prefixCount; index = index + 1) {
((ZiAlphaWork*)workData)->rememberedWord[index]
= wordCursor[index - prefixCount];
@@ -1248,6 +1245,13 @@ emitCandidate:
}
((ZiAlphaWork*)workData)->rememberedWord[index + prefixCount] = 0;
}
else {
if (((dictionaryExact == 0) && (parameters->elementCount == ((ZiAlphaWork*)workData)->rememberedCount))
&& ((parameters->maxCandidates == 1 ||
((candidateCount == 0 && (parameters->firstCandidate == 0)))))) {
((ZiAlphaWork*)workData)->rememberedWord[0] = 0;
}
}
if ((((ZiAlphaWork*)workData)->suffixMode == '\0') &&
((((((dictionaryKind == 1 && ((((ZiAlphaWork*)workData)->dictionaryFlags & 1) != 0)) ||
((dictionaryKind == 3 && ((((ZiAlphaWork*)workData)->dictionaryFlags & 2) != 0)))) ||
@@ -1310,7 +1314,7 @@ emitCandidate:
}
else {
if (((ZiAlphaOptions*)optionData)->suffixOnly != '\0') {
wordCursor = wordCursor + -prefixCount;
wordCursor = wordCursor - prefixCount;
wordCapacity = wordCapacity + prefixCount;
wordLength += prefixCount;
for (index = 0; parameters->elementCount + index < wordLength; index++) {
@@ -1432,7 +1436,7 @@ finishDictionaryPass:;
if ((completionAllowed) &&
((((((ZiAlphaWork*)workData)->suffixMode == '\0' && (2 < (int)elementCount)) &&
(elements[elementCount - 2] == 0xeff1)) &&
((unsigned int)((ZiAlphaWork*)workData)->prefixCount == elementCount - 2)))) {
((int)((ZiAlphaWork*)workData)->prefixCount == elementCount - 2)))) {
((ZiAlphaWork*)workData)->prefixElementCount = ((ZiAlphaWork*)workData)->prefixCount + '\x01';
((ZiAlphaWork*)workData)->suffixMode = 1;
}
@@ -1440,19 +1444,58 @@ finishDictionaryPass:;
prefixPrepared = ZI8_TRUE;
goto preparePrefix;
}
if ((((completionAllowed) && (((ZiAlphaWork*)workData)->suffixMode != '\0')) &&
if (!((((completionAllowed) && (((ZiAlphaWork*)workData)->suffixMode != '\0')) &&
((((ZiAlphaWork*)workData)->suffixLocked == '\0' && (2 < (int)elementCount)))) &&
(((elements[elementCount - 2] == 0xeff1 &&
((unsigned int)((ZiAlphaWork*)workData)->suffixCount == elementCount - 2)) ||
(((unsigned int)((ZiAlphaWork*)workData)->suffixCount == elementCount - 1 &&
((Zi8IsAlphaPunct(elements[elementCount - 1])) != '\0')))))) {
((int)((ZiAlphaWork*)workData)->suffixCount == elementCount - 2)) ||
(((int)((ZiAlphaWork*)workData)->suffixCount == elementCount - 1 &&
((Zi8IsAlphaPunct(elements[elementCount - 1])) != '\0'))))))) {
tryAlternatePrefix:
if ((prefixPrepared) && (1 < ((ZiAlphaWork*)workData)->alternatePrefixCount)) {
if (language == parameters->language) {
if (primaryMatched) {
((ZiAlphaWork*)workData)->alternatePrefixCount = 0;
}
}
else if (secondaryMatched) {
((ZiAlphaWork*)workData)->alternatePrefixCount = 0;
}
if (((ZiAlphaWork*)workData)->alternatePrefixCount != '\0') {
wordCursor -= prefixCount;
elements -= prefixCount;
elementCount = elementCount + prefixCount;
wordCapacity = wordCapacity + prefixCount;
prefixCount = 0;
prefixPrepared = ZI8_FALSE;
((ZiAlphaWork*)workData)->suffixMode = 0;
((ZiAlphaWork*)workData)->suffixLocked = 0;
((ZiAlphaWork*)workData)->suffixCount = 0;
for (index = 0; index < (int)(unsigned int)((ZiAlphaWork*)workData)->alternatePrefixCount; index = index + 1) {
((ZiAlphaWork*)workData)->prefix[index] =
((ZiAlphaWork*)workData)->alternatePrefix[index];
}
((ZiAlphaWork*)workData)->prefixCount = (ziU8)index;
if (((ZiAlphaWork*)workData)->language == parameters->language) {
((ZiAlphaWork*)workData)->language = parameters->subLanguage;
}
else {
((ZiAlphaWork*)workData)->language = parameters->language;
}
((ZiAlphaWork*)workData)->alternatePrefixCount = 0;
}
}
if ((((primaryMatched) && (secondaryMatched)) || (elementCount == 0)) ||
(((language == parameters->language && (primaryMatched)) || ((language == parameters->subLanguage && (secondaryMatched))))))
goto finishCandidates;
if (completionAllowed) goto checkPrefixPunctuation;
} else {
if ((((ZiAlphaWork*)workData)->prefixEnabled == '\0') || (elements[elementCount - 1] != 0xeff1)) {
if ((!primaryMatched) && (!secondaryMatched)) {
((ZiAlphaWork*)workData)->suffixLocked = 1;
((ZiAlphaWork*)workData)->suffixElementCount = parameters->elementCount - 1;
if (prefixCount != 0) {
wordCursor = wordCursor + -prefixCount;
elements = elements + -prefixCount;
wordCursor -= prefixCount;
elements -= prefixCount;
elementCount = elementCount + prefixCount;
wordCapacity = wordCapacity + prefixCount;
prefixCount = 0;
@@ -1477,8 +1520,8 @@ checkPrefixPunctuation:
((((Zi8GetTableCount(language,0x1f,workData)) & 8) == 0 &&
(parameters->elements[parameters->elementCount - 1] != 0xEFF1)))))) {
if (prefixPrepared) {
wordCursor = wordCursor + -prefixCount;
elements = elements + -prefixCount;
wordCursor -= prefixCount;
elements -= prefixCount;
elementCount = elementCount + prefixCount;
wordCapacity = wordCapacity + prefixCount;
prefixCount = 0;
@@ -1486,7 +1529,7 @@ checkPrefixPunctuation:
if (((ZiAlphaWork*)workData)->suffixLocked != '\0') {
((ZiAlphaWork*)workData)->previousSuffixCount = ((ZiAlphaWork*)workData)->suffixElementCount;
((ZiAlphaWork*)workData)->suffixElementCount = parameters->elementCount;
elementIndex = (unsigned int)((ZiAlphaWork*)workData)->prefixCount + (unsigned int)((ZiAlphaWork*)workData)->suffixCount;
elementIndex = (int)((ZiAlphaWork*)workData)->prefixCount + (int)((ZiAlphaWork*)workData)->suffixCount;
if (elements[elementIndex] != 0xEFF1 && Zi8IsAlphaPunct(elements[elementIndex]) != 0) {
((ZiAlphaWork*)workData)->suffix[((ZiAlphaWork*)workData)->suffixCount++] = elements[elementIndex];
} else {
@@ -1516,46 +1559,6 @@ checkPrefixPunctuation:
goto preparePrefix;
}
}
else {
tryAlternatePrefix:
if ((prefixPrepared) && (1 < ((ZiAlphaWork*)workData)->alternatePrefixCount)) {
if (language == parameters->language) {
if (primaryMatched) {
((ZiAlphaWork*)workData)->alternatePrefixCount = 0;
}
}
else if (secondaryMatched) {
((ZiAlphaWork*)workData)->alternatePrefixCount = 0;
}
if (((ZiAlphaWork*)workData)->alternatePrefixCount != '\0') {
wordCursor = wordCursor + -prefixCount;
elements = elements + -prefixCount;
elementCount = elementCount + prefixCount;
wordCapacity = wordCapacity + prefixCount;
prefixCount = 0;
prefixPrepared = ZI8_FALSE;
((ZiAlphaWork*)workData)->suffixMode = 0;
((ZiAlphaWork*)workData)->suffixLocked = 0;
((ZiAlphaWork*)workData)->suffixCount = 0;
for (index = 0; index < (int)(unsigned int)((ZiAlphaWork*)workData)->alternatePrefixCount; index = index + 1) {
((ZiAlphaWork*)workData)->prefix[index] =
((ZiAlphaWork*)workData)->alternatePrefix[index];
}
((ZiAlphaWork*)workData)->prefixCount = (ziU8)index;
if (((ZiAlphaWork*)workData)->language == parameters->language) {
((ZiAlphaWork*)workData)->language = parameters->subLanguage;
}
else {
((ZiAlphaWork*)workData)->language = parameters->language;
}
((ZiAlphaWork*)workData)->alternatePrefixCount = 0;
}
}
if ((((primaryMatched) && (secondaryMatched)) || (elementCount == 0)) ||
(((language == parameters->language && (primaryMatched)) || ((language == parameters->subLanguage && (secondaryMatched))))))
goto finishCandidates;
if (completionAllowed) goto checkPrefixPunctuation;
}
if (!completionAllowed && ((ZiAlphaWork*)workData)->suffixMode == 0 && ((ZiAlphaWork*)workData)->prefixCount != 0 &&
elementCount > 2 && ((ZiAlphaWork*)workData)->prefixCount == elementCount - 1 &&
Zi8IsAlphaPunct(parameters->elements[((ZiAlphaWork*)workData)->prefixCount - 1]) != 0) goto checkPrefixFields;
@@ -1615,7 +1618,7 @@ finishCandidates:
} else {
wordCursor = 0;
}
if (wordCursor != (ziU16 *)0x0) {
if (wordCursor) {
Zi8SetHighlightedWordW(wordCursor,parameters->language,parameters->subLanguage,workData);
}
}
@@ -1631,8 +1634,7 @@ finishCandidates:
countIndex = ((ZiAlphaWork*)workData)->dictionaryCount - 1;
}
for (; countIndex >= 1; countIndex = countIndex - 1) {
((ZiAlphaWork*)workData)->dictionaryCounts[countIndex] =
((ZiAlphaWork*)workData)->dictionaryCounts[countIndex] -
((ZiAlphaWork*)workData)->dictionaryCounts[countIndex] -=
((ZiAlphaWork*)workData)->dictionaryCounts[countIndex - 1];
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -643,7 +643,7 @@ ziU32 Zi8GetSInfo(ziU8* strokes, ziU8* extraStrokes, ziWChar* outputBuffer, ziU8
{
int strokeIndex;
int outputCount;
int extraCount;
volatile int extraCount;
outputCount = 0;
Zi8LogError(100, work);
@@ -660,8 +660,7 @@ ziU32 Zi8GetSInfo(ziU8* strokes, ziU8* extraStrokes, ziWChar* outputBuffer, ziU8
goto lowStroke;
}
badStroke:
outputCount--;
outputBuffer[(ziU8)outputCount] = 0;
outputBuffer[(ziU8)--outputCount] = 0;
return outputCount;
lowStroke:
outputBuffer[(ziU8)outputCount] = zi8StrokeCode(strokes[strokeIndex] & 0xf, work);

View File

@@ -89,7 +89,12 @@ ziU32 Zi8MatchPUDdata_ZHS(ziWChar* pattern, ziU8 length, ziU8 language, ziWChar*
ZI_WORK->unk_0x310 = (ziU32)table + section->offset[0] * 0x100 + section->offset[1];
ZI_WORK->unk_0x318 = 0;
}
while ((entry = (ziU8*)ZI_WORK->unk_0x310) != 0) {
for (;;) {
entry = (ziU8*)ZI_WORK->unk_0x310;
if (entry == 0) {
Zi8LogError(0x4B3, __zi8_work_data);
return 0;
}
while ((ziS32)ZI_WORK->unk_0x318 < (ziS32)ZI_WORK->unk_0x314) {
word = entry + 1;
wordSize = *entry;
@@ -158,8 +163,6 @@ next:
fallback = 1;
ZI_WORK->unk_0x318 = 0;
}
Zi8LogError(0x4B3, __zi8_work_data);
return 0;
}
ziU32 Zi8MatchPUDdata(ziWChar* pattern, ziU8 length, ziU8 language, ziWChar* output, ziU16 capacity, ziU8 complete, ziU8 continuation ZI_NEED_WORK) {
ziU32 result;
@@ -167,11 +170,12 @@ ziU32 Zi8MatchPUDdata(ziWChar* pattern, ziU8 length, ziU8 language, ziWChar* out
for (;;) {
result = Zi8_8147FD7C(pattern, length, language, output, capacity, complete, continuation, __zi8_work_data);
if ((ziU8)result != 0) break;
if ((ZI_WORK->pudCount = ZI_WORK->pudCount + 1) > 16) {
if (++ZI_WORK->pudCount <= 16) {
continuation = 0;
} else {
ZI_WORK->pudCount = 1;
break;
}
continuation = 0;
}
return result;
}

View File

@@ -45,7 +45,7 @@ ziBool Zi8_81480224(ziUserWord* word ZI_NEED_WORK) {
if (candidate->length == length) {
position = 0;
while (position < length) {
if ((ziU8)candidate->text[position] != (ziU8)word->text[position]) break;
if (candidate->text[position] != word->text[position]) break;
position++;
}
if (position == length) {
@@ -56,8 +56,7 @@ ziBool Zi8_81480224(ziUserWord* word ZI_NEED_WORK) {
previous = current;
current = current->next;
}
length = ZI_WORK->uwdCount;
ZI_WORK->uwdCount = length + 1;
length = ZI_WORK->uwdCount++;
added = &ZI_WORK->uwdNodes[length];
if (previous == 0) {
ZI_WORK->uwdList = added;
@@ -91,8 +90,11 @@ ziU8 Zi8MatchUWDdata(ziWChar* pattern, ziU8 length, ziWChar* currentWord, ziU16
ziWChar folded;
int fallback = 0;
int visited = 0;
int position, prefixLength, previousOffset;
ziU32 size, entryLanguage, entryLength;
int prefixLength;
int position, previousOffset;
ziU32 size;
ziU8 entryLanguage;
ziU32 entryLength;
ziU8* cursor;
ziU8* begin;
ziU8* boundary;
@@ -103,18 +105,33 @@ ziU8 Zi8MatchUWDdata(ziWChar* pattern, ziU8 length, ziWChar* currentWord, ziU16
ziUserDictionary* dictionary;
int firstSegment;
Zi8LogError(100, __zi8_work_data);
if (!(ZI_WORK->unk_0x138 < 3 && ZI_WORK->unk_0x138 != 0 && ZI_WORK->unk_0x130[ZI_WORK->unk_0x138 - 1] != 0)) {
if (!(ZI_WORK->unk_0x138 <= 2 && ZI_WORK->unk_0x138 != 0 && ZI_WORK->unk_0x130[ZI_WORK->unk_0x138 - 1] != 0)) {
Zi8ReplaceLastError(0x19C, __zi8_work_data);
return 0;
}
dictionary = ZI_WORK->unk_0x130[ZI_WORK->unk_0x138 - 1];
if (continuation == 0) {
if (continuation != 0) {
result = Zi8_814803F4(__zi8_work_data);
entryLength = 0;
if (result != 0) {
entryLanguage = result->language;
entryLength = result->length;
if (entryLength >= capacity) {
Zi8_8148047C(__zi8_work_data);
return 0;
}
for (position = 0; position < (ziS32)entryLength; position++) output[position] = Zi8ConvertUC2WC(result->text[position], entryLanguage, __zi8_work_data);
}
return entryLength;
}
{
Zi8_8148047C(__zi8_work_data);
ZI_WORK->unk_0x13C = 0;
if (currentWord == 0 || currentLength == 0 || currentWord[currentLength - 1] != 0x20) ZI_WORK->unk_0x140 = 0;
else {
prefixLength = 0;
for (position = currentLength - 2; position >= 0 && currentWord[position] != 0x20; position--) prefixLength++;
for (position = currentLength - 2; currentWord[position] != 0x20 && position >= 0; position--) prefixLength++;
position++;
if (prefixLength == 0 || prefixLength > 63) ZI_WORK->unk_0x140 = 0;
else {
ZI_WORK->unk_0x140 = 1;
@@ -123,7 +140,7 @@ ziU8 Zi8MatchUWDdata(ziWChar* pattern, ziU8 length, ziWChar* currentWord, ziU16
ZI_WORK->unk_0x141[1] = language;
ZI_WORK->unk_0x141[2] = prefixLength;
previousOffset = 4;
for (; ++position, prefixLength > 0; prefixLength--) {
for (; prefixLength > 0; prefixLength--, position++) {
folded = currentWord[position];
ZI_WORK->unk_0x141[previousOffset] = Zi8ConvertWC2UC(folded, language, __zi8_work_data);
ZI_WORK->unk_0x184[previousOffset] = 0;
@@ -131,12 +148,10 @@ ziU8 Zi8MatchUWDdata(ziWChar* pattern, ziU8 length, ziWChar* currentWord, ziU16
if (!Zi8ChangeCharCase(1, &folded, language, __zi8_work_data)) Zi8ChangeCharCase(0, &folded, language, __zi8_work_data);
ZI_WORK->unk_0x184[previousOffset] = Zi8ConvertWC2UC(folded, language, __zi8_work_data);
}
if (ZI_WORK->unk_0x141[previousOffset] == 0) {
if (ZI_WORK->unk_0x141[previousOffset++] == 0) {
ZI_WORK->unk_0x140 = 0;
previousOffset++;
break;
}
previousOffset++;
}
}
}
@@ -146,7 +161,8 @@ rescan:
boundary = (ziU8*)dictionary + dictionary->boundary + 7;
end = (ziU8*)dictionary + dictionary->end + 7;
cursor = begin;
firstSegment = begin < boundary;
if (begin < boundary) firstSegment = 1;
else firstSegment = 0;
while (firstSegment ? cursor < boundary : cursor < end) {
size = *cursor;
candidate = (ziUserWord*)cursor;
@@ -185,7 +201,7 @@ next:
visited = 0;
goto rescan;
}
if (complete != 0 && length == 1) {
if (complete == 1 && length != 0 && continuation == 0) {
complete = 0;
fallback = 1;
visited = 0;

View File

@@ -22,7 +22,8 @@ ziU32 ZiDAWGGetChild(ziU32 node) {
node += offset;
if (((ziU32)header & 2) != 0) {
if ((*(ziU8*)node & 0x80) != 0) {
offset = *((ziU8*)node + 2) + ((*(ziU8*)node & 0x7f) * 0x10000 + ((ziU32)*((ziU8*)node + 1) & 0xffff) * 0x100 + 0x8000);
offset = (*(ziU8*)node & 0x7f) * 0x10000 + ((ziU32)*((ziU8*)node + 1) & 0xffff) * 0x100 + 0x8000;
offset += *((ziU8*)node + 2);
} else {
offset = ((ziU32)*(ziU8*)node & 0xffff) * 0x100;
offset += (ziU32)*((ziU8*)node + 1);
@@ -43,7 +44,7 @@ ziU32 ZiDAWGGetChild(ziU32 node) {
ziU8* ZiDAWGGetSibling(ziU8* node) {
ziU16 header;
ziU8* cursor;
ziU8* cursor = node;
ziS32 depth;
ziS32 offset;
@@ -53,29 +54,29 @@ ziU8* ZiDAWGGetSibling(ziU8* node) {
if ((header & 4) == 0) {
node = 0;
} else {
cursor = node;
if ((header & 8) != 0) {
if ((node[0] & 0xf) == 0xf) {
cursor = node + 2;
node += 2;
} else {
cursor = node + 1;
node += 1;
}
if ((header & 2) != 0) {
if ((*cursor & 0x80) == 0) {
cursor += 2;
if ((*node & 0x80) == 0) {
node += 2;
} else {
cursor += 3;
node += 3;
}
}
if ((*cursor & 0x80) == 0) {
node += (ziU32)cursor[1] + (ziU32)*cursor * 0x100;
if ((*node & 0x80) != 0) {
node += (*node & 0x7f) * 0x10000 + (ziU32)node[1] * 0x100 +
(ziU32)node[2] + 0x8000;
} else {
node += (*cursor & 0x7f) * 0x10000 + (ziU32)cursor[1] * 0x100 +
0x8000 + (ziU32)cursor[2];
node += (ziU16)*node * 0x100 + (ziU32)node[1];
}
} else {
cursor = node;
do {
header = nodeHeaderTable[cursor[0] >> 4];
if ((cursor[0] & 0xf) == 0xf) {
@@ -89,24 +90,24 @@ ziU8* ZiDAWGGetSibling(ziU8* node) {
if ((header & 1) != 0) {
if ((header & 2) == 0) {
depth++;
} else if ((*cursor & 0x80) == 0) {
cursor += 2;
offset += 2;
} else {
} else if ((*cursor & 0x80) != 0) {
cursor += 3;
offset += 3;
} else {
cursor += 2;
offset += 2;
}
}
if ((header & 4) == 0) {
depth--;
} else if ((header & 8) != 0) {
if ((*cursor & 0x80) == 0) {
cursor += 2;
offset += 2;
} else {
if ((*cursor & 0x80) != 0) {
cursor += 3;
offset += 3;
} else {
cursor += 2;
offset += 2;
}
depth--;
}
@@ -163,16 +164,10 @@ ziU32 ZiDAWGGetGraphInfo(zi8DawgCtx* context, ziU8* entry, ziU16* keys) {
result = 0;
pair = (((ziU16)entry[0] << 8) + entry[1]);
if (pair != 0) {
goto graph_invalid;
return 0;
}
pair = (((ziU16)entry[2] << 8) + entry[3]);
if (pair == 0) {
goto graph_valid;
}
graph_invalid:
result = 0;
goto graph_done;
graph_valid:
end = (ziU32)(entry + (((ziU16)entry[4] << 8) + entry[5] + 1) * 10);
entry += 10;
depth = 0;
@@ -182,19 +177,18 @@ graph_valid:
}
while (1) {
if (*keys == (ziU16)(entry[3] + ((ziU16)entry[2] << 8))) {
if (*keys == (ziS32)(entry[3] + ((ziU16)entry[2] << 8))) {
break;
}
entry += (entry[1] + ((ziU16)entry[0] << 8)) * 10 + 10;
if ((end <= (ziU32)entry) ||
(*keys == (ziU16)(entry[3] + ((ziU16)entry[2] << 8)))) {
if (((ziU32)entry >= end) ||
(*keys == (ziS32)(entry[3] + ((ziU16)entry[2] << 8)))) {
break;
}
}
if (end <= (ziU32)entry) {
result = 0;
break;
if ((ziU32)entry >= end) {
return 0;
}
result = graph + (ziU32)entry[4] * 0x10000 + ((ziU16)entry[5] << 8) +
@@ -215,8 +209,7 @@ graph_valid:
depth++;
keys++;
}
}
graph_done:
return result;
}

View File

@@ -17,7 +17,7 @@ typedef struct ziUserKeys {
typedef struct ziChineseEntry {
ziU8 data[9];
ziU8 offsetHigh;
ziU16 offsetLow;
ziU8 offsetLow[2];
} ziChineseEntry;
ziU8 Zi8GetCandidatesOrCount(ziGetParam*, ziSearchState* ZI_NEED_WORK);
@@ -26,19 +26,22 @@ ziPtr Zi8GetTableAddress(ziU8, ziU8 ZI_NEED_WORK);
ziU16 Zi8Uni2Ord(ziWChar ZI_NEED_WORK);
ziBool Zi8IsWordW(ziWChar* word, ziU8 language ZI_NEED_WORK) {
ziU8 remaining, group;
ziU16 value = 0;
int count;
int offset;
ziU8 group;
ziU8 remaining;
ziU16 value;
ziWChar* cursor;
ziU8 formats[8] = {1, 5, 0, 0, 0, 0, 0, 0};
ziSearchState search;
ziGetParam request;
ziWChar ordinals[65];
ziU32 savedFormats = ZI_WORK->unk_0x1410;
ziU8 savedCount = ZI_WORK->unk_0x1418;
int length, count, offset;
int length;
int unmatched;
ziChineseEntry* entry;
ziU8* data;
ziU8 formats[8] = {1, 5, 0, 0, 0, 0, 0, 0};
ziU32 savedFormats = ZI_WORK->unk_0x1410;
ziU8 savedCount = ZI_WORK->unk_0x1418;
search.flags = 0;
search.word = 0;
search.length = 0;
@@ -52,7 +55,7 @@ ziBool Zi8IsWordW(ziWChar* word, ziU8 language ZI_NEED_WORK) {
}
if (language != 1) {
for (length = 0; word[length] != 0; length++) {
if (word[length] > 0xEFF0 || length == 64) return 0;
if (word[length] >= 0xEFF1 || length == 64) return 0;
}
((ziU8*)&search.length)[0] = length;
((ziU8*)&search.flags)[2] = 1;
@@ -91,21 +94,34 @@ ziBool Zi8IsWordW(ziWChar* word, ziU8 language ZI_NEED_WORK) {
if (language == 1) {
length = 0;
do {
if (word[length] == 0) {
count = length - 1;
ordinals[length] = Zi8Uni2Ord(word[length], __zi8_work_data);
if (ordinals[length] == 0xFFFF) return 0;
length++;
if (length == 64) return 0;
} while (word[length] != 0);
{
if (length == 1) return 1;
count = --length;
ordinals[count] |= 0x8000;
ZI_WORK->unk_0x16 = Zi8GetFormatVersion(1, __zi8_work_data) & 2;
entry = (ziChineseEntry*)Zi8GetTableAddress(1, 0, __zi8_work_data) + ordinals[0];
data = (ziU8*)Zi8GetTableAddress(1, 1, __zi8_work_data) + ((entry->offsetHigh & 15) << 16 | entry->offsetLow);
data = (ziU8*)Zi8GetTableAddress(1, 1, __zi8_work_data) + ((entry->offsetHigh & 15) << 16 | ((entry->offsetLow[0] << 8) | entry->offsetLow[1]));
if (ZI_WORK->unk_0x16 != 0) {
group = *data & 7;
if (group == 5) offset = 4;
else if (group < 5) {
if (group == 2) offset = 2;
else if (group < 2) offset = 1;
else offset = 3;
} else offset = 1;
switch (*data & 7) {
case 2:
offset = 2;
break;
case 3:
case 4:
offset = 3;
break;
case 5:
offset = 4;
break;
default:
offset = 1;
break;
}
data += offset;
}
if ((*data & 0x80) == 0) return 0;
@@ -134,11 +150,7 @@ ziBool Zi8IsWordW(ziWChar* word, ziU8 language ZI_NEED_WORK) {
}
Zi8LogError(0x2BD, __zi8_work_data);
return 0;
}
ordinals[length] = Zi8Uni2Ord(word[length], __zi8_work_data);
if (ordinals[length] == 0xFFFF) return 0;
length++;
} while (length != 64);
}
} else Zi8ReplaceLastError(0x26C, __zi8_work_data);
return 0;
}
@@ -156,10 +168,9 @@ ziWChar Zi8ConvertUC2UserKey(ziChar character, ziU8 language ZI_NEED_WORK) {
}
}
found:
if (key < 32) {
if (key == 0) return 0xEFFA;
if (key >= 1 && key <= 9) return key + 0xEFF0;
if (key <= 31) return key + 0xEFF1;
}
if (key >= 32) return 0;
if (key == 0) return 0xEFFA;
if (key >= 1 && key <= 9) return key + 0xEFF0;
if (key <= 31) return key + 0xEFF1;
return 0;
}

View File

@@ -44,13 +44,12 @@ static ziU8 ziNumKeysWithChars(ziU8 language, ziPtr __zi8_work_data) {
}
ziBool Zi8getKeyLayout(ziU8 language, ziWChar key, ziWChar* chars, ziU8 mode, ziPtr __zi8_work_data) {
ziU8 numKeys;
ziU16 tableCount;
ziU8 numKeys;
ziU8* dataAddress;
ziUserKeyMap* customTable;
ziU32 totalCharacters;
ziU16 charCount;
ziU32 keyIndex;
ziU16 keyIndex;
ziWChar* keyChars;
dataAddress = 0;
@@ -93,15 +92,15 @@ tables_ready:
return 0;
}
totalCharacters = 0;
keyIndex = totalCharacters;
tableCount = 0;
keyIndex = tableCount;
for (; (ziU16)keyIndex < key; keyIndex++) {
totalCharacters += dataAddress[(ziU16)keyIndex];
tableCount += dataAddress[(ziU16)keyIndex];
}
if ((charCount = (ziU8)dataAddress[key]) == 0) {
return 0;
}
dataAddress = dataAddress + numKeys + ((totalCharacters & 0xffff) * 2);
dataAddress = dataAddress + numKeys + (tableCount * 2);
keyIndex = 0;
for (; (ziU16)keyIndex < charCount; keyIndex++) {
chars[(ziU16)keyIndex] = (ziU16)dataAddress[(ziU16)keyIndex * 2] |

View File

@@ -23,48 +23,60 @@ ziU8 Zi8DetachOEMdata(ziU8 id ZI_NEED_WORK) {
}
ziU8 Zi8MatchOEMdata(ziWChar* pattern, ziU8 length, ziU8 language, ziWChar* word, ziU16 capacity, ziBool complete, ziBool continuation ZI_NEED_WORK) {
ziWChar folded;
ziU8 fallback = 0;
ziU32 index;
ziS32 index;
ziU32 position;
ziU32 fallback = 0;
if (!continuation) ZI_WORK->oemIdx = 0;
index = ZI_WORK->oemIdx;
if ((ziS32)index >= ZI_WORK->oemLen || ZI_WORK->oemMatch == 0) goto noMatch;
if ((ziS32)index >= ZI_WORK->oemLen) goto failed;
if (ZI_WORK->oemMatch == 0) goto failed;
capacity--;
if (length >= capacity) goto noMatch;
word[capacity] = 0;
word[length] = complete ? 1 : 0;
for (;;) {
if ((ziS32)index >= ZI_WORK->oemLen || !ZI_WORK->oemMatch(index, word, capacity, ZI_WORK->oemData)) {
if (length != 1 || !complete || continuation) goto noMatch;
complete = 0;
fallback = 1;
index = 0;
continue;
}
position = 0;
if ((complete && word[length] == 0) || (!complete && word[length] != 0)) {
for (; (ziS32)position < length; position++) {
if (pattern[position] < 0xEFF1 || pattern[position] > 0xF37F) {
if (word[position] != pattern[position]) {
if (!ZI_WORK->unk_0x1F || language == 1) break;
folded = pattern[position];
if (!Zi8ChangeCharCase(1, &folded, language, __zi8_work_data) || folded != word[position]) break;
}
} else if (pattern[position] != Zi8ConvertWC2Key(word[position], language, __zi8_work_data)) break;
}
}
if ((ziS32)position >= length) {
if (fallback) {
*word = *pattern;
return 1;
}
ZI_WORK->oemIdx = index + 1;
while (word[position] != 0) position++;
return position;
}
word[length] = complete ? 1 : 0;
index++;
if ((ziS32)length >= (ziS32)capacity) {
failed:
return 0;
}
noMatch:
word[capacity] = 0;
if (complete) word[length] = 1; else word[length] = 0;
goto matchRetry;
posEntry:
position = 0;
if ((complete && word[length] == 0) || (!complete && word[length] != 0)) {
for (; (ziS32)position < length; position++) {
if (pattern[position] >= 0xEFF1 && pattern[position] <= 0xF37F) {
if (pattern[position] == Zi8ConvertWC2Key(word[position], language, __zi8_work_data)) continue;
break;
} else if (word[position] != pattern[position]) {
if (!ZI_WORK->unk_0x1F || language == 1) break;
folded = pattern[position];
if (!Zi8ChangeCharCase(1, &folded, language, __zi8_work_data) || folded != word[position]) break;
}
}
}
if ((ziS32)position < length) {
if (complete) word[length] = 1; else word[length] = 0;
index++;
if ((ziS32)index >= ZI_WORK->oemLen) goto oemFailed;
goto matchRetry;
}
if (fallback) {
index = 0;
*word = *pattern;
return 1;
}
index++;
ZI_WORK->oemIdx = index;
while (word[position] != 0) position++;
return position;
matchRetry:
if ((ziS32)index >= ZI_WORK->oemLen) goto oemFailed;
if (!ZI_WORK->oemMatch(index, word, capacity, ZI_WORK->oemData)) goto oemFailed;
goto posEntry;
oemFailed:
if (length != 1 || !complete || continuation) goto tail0;
complete = 0;
fallback = 1;
index = 0;
goto matchRetry;
tail0:
return 0;
}

View File

@@ -1,7 +1,7 @@
#include <revolution/fa.h>
static FAInsertCallback g_attach_func;
static FAEjectCallback g_detach_func;
static FAInsertCallback g_attach_func;
extern s32 uhf_msc_is_media_insert(void);

View File

@@ -24,9 +24,9 @@ char NAND_Org_Path[64];
NAND_DISK_INFO nanddisk_info[23];
NAND_SEMAPHORE csem;
NAND_SEMAPHORE osem;
s32 Nanddisk_Internal_Info_Init;
s32 NAND_Init;
s32 fa_nanad_semid;
s32 Nanddisk_Internal_Info_Init = 0;
s32 NAND_Init = 0;
s32 fa_nanad_semid = 0;
static inline s32 find_disk(PDM_DISK* disk, NAND_DISK_INFO** result) {
NAND_DISK_INFO* info;

View File

@@ -1,9 +1,9 @@
#include <private/fa/puh_msc.h>
static s32 st_uhs_msc_status;
static s32 st_uhs_msc_msgid;
static s32 st_uhs_msc_tskid;
s32 uhg_msc_memid_8169971C;
static s32 st_uhs_msc_tskid;
static s32 st_uhs_msc_msgid;
static s32 st_uhs_msc_status;
static s32 _uhf_msc_api_send_message(UHF_MSC_PARAMETERS* parameters, u32 command);
s32 usbh_msc_read10(UHF_MSC_DEVICE* device, u32 sector, u16 count, void* buffer, void* sense) {

View File

@@ -26,11 +26,10 @@ FAFuncTbl st_uhs_msc_blk_func = {
};
static inline UHF_MSC_DEVICE* uhf_msc_blk_find_device(FADisk* disk) {
UHF_MSC_DEVICE* entry = uhg_msc_blk_device_tbl;
UHF_MSC_DEVICE* device = NULL;
u32 index;
for (index = 0; index < 8; entry++, index++) {
if (entry->disk == disk) {
for (index = 0; index < 8; index++) {
if (uhg_msc_blk_device_tbl[index].disk == disk) {
device = &uhg_msc_blk_device_tbl[index];
break;
}
@@ -88,9 +87,8 @@ s32 uhf_msc_blk_mount(FADisk* disk) {
}
s32 uhf_msc_blk_pread(FADisk* disk, u8* buffer, u32 sector, u32 blocks, u32* completed) {
u16 transfer_blocks;
UHF_MSC_DEVICE* device;
s32 error;
UHF_MSC_DEVICE* device;
u32 block_size;
u8* transfer_buffer;
u32 transfer_limit;
@@ -129,7 +127,7 @@ s32 uhf_msc_blk_pread(FADisk* disk, u8* buffer, u32 sector, u32 blocks, u32* com
transfer_buffer = buffer;
}
do {
transfer_blocks = transfer_limit;
u16 transfer_blocks = transfer_limit;
if (blocks <= transfer_limit) {
transfer_blocks = blocks;
}

View File

@@ -10,24 +10,34 @@ pf_s32 pdm_part_is_master_boot_sector(pf_u8* buf, pf_u32 total, pf_bool* p_is_mb
pf_s16 index;
pf_u32 start[4];
pf_u32 count[4];
pf_u32* p_start;
pf_u32* p_count;
*p_is_mbr = 0;
if (buf[510] != 0x55 || buf[511] != 0xAA) { return 2; }
p_start = start;
p_count = count;
for (index = 0; index < 4; index++) {
start[index] = 0;
start[index] = (((pf_u32)buf[456] << 16) + buf[454]) + (((pf_u32)buf[457] << 24) + ((pf_u32)buf[455] << 8));
count[index] = (((pf_u32)buf[460] << 16) + buf[458]) + (((pf_u32)buf[461] << 24) + ((pf_u32)buf[459] << 8));
if (start[index] != 0 && count[index] != 0) {
*p_start = 0;
*p_start = (((pf_u32)buf[456] << 16) + buf[454]) + (((pf_u32)buf[457] << 24) + ((pf_u32)buf[455] << 8));
*p_count = (((pf_u32)buf[460] << 16) + buf[458]) + (((pf_u32)buf[461] << 24) + ((pf_u32)buf[459] << 8));
if (*p_start != 0 && *p_count != 0) {
if (index == 0) { *p_is_mbr = 1; }
} else {
if (index == 0) { return 2; }
}
p_start++;
p_count++;
buf += 16;
}
p_start = start;
p_count = count;
for (index = 0; index < 4; index++) {
if (start[index] + count[index] > total) {
if (*p_start + *p_count > total) {
if (index == 0) { *p_is_mbr = 0; }
return 2;
}
p_start++;
p_count++;
}
return 0;
}

View File

@@ -1,4 +1,3 @@
#define PF_FA_CP932_TABLE
#define VFiPFCODE_CP932_OEM2Unicode PFCODE_CP932_OEM2Unicode
#define VFiPFCODE_CP932_OEMCharWidth PFCODE_CP932_OEMCharWidth
#define VFiPFCODE_CP932_Unicode2OEM PFCODE_CP932_Unicode2OEM

View File

@@ -214,21 +214,19 @@ pf_s32 PFDIR_CheckDirIsEmpty(PF_ENT_ITER* iter, pf_u32* is_empty) {
PFDIR_SDD* PFDIR_GetSDD(PF_VOLUME* volume, PF_DIR_ENT* entry) {
PFDIR_VOLUME_DIRS* volume_dirs = (PFDIR_VOLUME_DIRS*)volume;
PFDIR_SDD* first_free_sdd = 0;
PFDIR_SDD* free_candidate = volume_dirs->sdds;
pf_s32 i;
pf_s32 remaining = 3;
for (i = 0; remaining != 0; remaining--) {
if ((volume_dirs->sdds[i].stat & 1) == 0 || ((volume_dirs->sdds[i].stat & 1) != 0 && (!volume_dirs->sdds[i].stat & 2) != 0)) {
if (first_free_sdd == 0) {
first_free_sdd = free_candidate;
first_free_sdd = &volume_dirs->sdds[i];
}
} else if (entry->p_vol == volume_dirs->sdds[i].dir_entry.p_vol &&
entry->entry_sector == volume_dirs->sdds[i].dir_entry.entry_sector &&
entry->entry_offset == volume_dirs->sdds[i].dir_entry.entry_offset) {
return &volume_dirs->sdds[i];
}
free_candidate++;
i++;
}
if (first_free_sdd == 0) {
@@ -1072,7 +1070,7 @@ pf_s32 PFDIR_p_move(PF_VOLUME* volume, PF_STR* old_path, PF_STR* new_path) {
error = PFENT_ITER_GetEntryOfPath(&source_iter, &source_entry, volume, (PFDIR_STR*)old_path, 0);
if (error != 0) { return error; }
if (PFPATH_GetVolumeFromPath(new_path) != volume) { return 0x1F; }
if (volume != PFPATH_GetVolumeFromPath(new_path)) { return 0x1F; }
error = PFPATH_SplitPath((PFDIR_STR*)new_path, &directory, &destination_name);
if (error != 0) { return error; }
if (PFSTR_GetCodeMode(&destination_name) == 2) {

View File

@@ -728,20 +728,23 @@ pf_s32 PFENT_ITER_GetEntryOfIter(PFITER_ENT_ITER* p_iter, PF_DIR_ENT* p_ent) {
pf_s32 PFENT_ITER_GetLFNEntryName(PFITER_ENT_ITER* p_iter, PF_DIR_ENT* p_ent) {
pf_u32 i;
pf_u32 index;
pf_s32 err;
if (p_ent->num_entry_LFNs != 0 && !(p_ent->small_letter_flag & 0x18)) {
index = 0;
for (i = 0; i < p_ent->num_entry_LFNs; ++i) {
pf_u16* destination;
err = PFENT_ITER_Retreat(p_iter, 0);
if (err != 0) return err;
err = PFENT_ITER_LoadEntry(p_iter);
if (err != 0) return err;
destination = &p_ent->long_name[(i * 26U) / 2U];
destination = &p_ent->long_name[index];
pf_memcpy(destination, &p_iter->buf[1], 10);
pf_memcpy(destination + 5, &p_iter->buf[14], 12);
pf_memcpy(destination + 11, &p_iter->buf[28], 4);
index += 13;
}
p_ent->long_name[(p_ent->num_entry_LFNs * 26U) / 2U] = 0;
p_ent->long_name[index] = 0;
}
return 0;
}

View File

@@ -126,6 +126,7 @@ pf_s32 PFFAT12_WriteFATEntryWithBuf(PF_VOLUME* p_vol, pf_s16 cluster, pf_u16 val
pf_s32 fat_offset;
pf_u32 fat_sector;
pf_s32 result;
pf_u32 next_sector;
fat_offset = (pf_u16)(cluster + (cluster >> 1));
fat_sector = (pf_u16)(p_vol->bpb.active_FAT_sector + (fat_offset >> p_vol->bpb.log2_bytes_per_sector));
offset_in_sector = fat_offset & (p_vol->bpb.bytes_per_sector - 1);
@@ -146,10 +147,10 @@ pf_s32 PFFAT12_WriteFATEntryWithBuf(PF_VOLUME* p_vol, pf_s16 cluster, pf_u16 val
p_page->p_buf[(pf_u16)offset_in_sector] = (p_page->p_buf[(pf_u16)offset_in_sector] & 0xF) | ((value << 4) & 0xF0);
if ((pf_u16)offset_in_sector == (pf_u32)(p_vol->bpb.bytes_per_sector - 1)) {
FLUSH_FAT_BUFFER();
offset_in_sector = fat_sector + 1;
err = VFiPFSEC_ReadFAT(p_vol, p_page->p_buf, offset_in_sector, 0, p_vol->bpb.bytes_per_sector);
next_sector = fat_sector + 1;
err = VFiPFSEC_ReadFAT(p_vol, p_page->p_buf, next_sector, 0, p_vol->bpb.bytes_per_sector);
if (err != 0) { return err; }
p_page->sector = offset_in_sector;
p_page->sector = next_sector;
p_page->p_buf[0] = value >> 4;
} else {
((pf_u16)offset_in_sector + p_page->p_buf)[1] = value >> 4;
@@ -158,10 +159,10 @@ pf_s32 PFFAT12_WriteFATEntryWithBuf(PF_VOLUME* p_vol, pf_s16 cluster, pf_u16 val
p_page->p_buf[(pf_u16)offset_in_sector] = value;
if ((pf_u16)offset_in_sector == (pf_u32)(p_vol->bpb.bytes_per_sector - 1)) {
FLUSH_FAT_BUFFER();
offset_in_sector = fat_sector + 1;
err = VFiPFSEC_ReadFAT(p_vol, p_page->p_buf, offset_in_sector, 0, p_vol->bpb.bytes_per_sector);
next_sector = fat_sector + 1;
err = VFiPFSEC_ReadFAT(p_vol, p_page->p_buf, next_sector, 0, p_vol->bpb.bytes_per_sector);
if (err != 0) { return err; }
p_page->sector = offset_in_sector;
p_page->sector = next_sector;
p_page->p_buf[0] = (p_page->p_buf[0] & 0xF0) | ((pf_u8)(value >> 8));
} else {
((pf_u16)offset_in_sector + p_page->p_buf)[1] = (((pf_u16)offset_in_sector + p_page->p_buf)[1] & 0xF0) | ((pf_u8)(value >> 8));

View File

@@ -102,7 +102,7 @@ pf_s32 PFFAT16_WriteFATEntryWithBuf(PF_VOLUME* p_vol, pf_u32 cluster, pf_u32 val
err = VFiPFSEC_ReadFAT(p_vol, p_page->p_buf, fat_sector, 0, p_vol->bpb.bytes_per_sector);
}
p_page->p_buf[offset_in_sector] = value;
(offset_in_sector + p_page->p_buf)[1] = value >> 8;
p_page->p_buf[offset_in_sector + 1] = value >> 8;
if (err != 0) {
result = err;
}

View File

@@ -400,20 +400,22 @@ pf_s32 PFPATH_cmpNameImpl(const pf_s8* name, const pf_s8* pattern, pf_u32* match
case '*': {
do {
pattern_width = volume->codeset.oem_char_width(pattern);
if (pattern_width == 1) {
pattern_char = pf_toupper(*pattern);
if (pattern_width != 1) {
read_char = (pf_u16)PF_GET_LE_U16((const pf_u8*)pattern);
} else {
pattern_char = PF_GET_LE_U16((const pf_u8*)pattern);
read_char = pf_toupper(*pattern);
}
pattern_char = (pf_u16)read_char;
pattern += pattern_width;
if (pattern_char == '?') {
if (name_char == 0) { return 1; }
name += name_width;
name_width = volume->codeset.oem_char_width(name);
if (name_width == 1) { name_char = pf_toupper(*name); }
else { name_char = PF_GET_LE_U16((const pf_u8*)name); }
if (name_width == 1) { read_char = pf_toupper(*name); }
else { read_char = (pf_u16)PF_GET_LE_U16((const pf_u8*)name); }
name_char = (pf_u16)read_char;
}
} while (pattern_char == '*' || pattern_char == '?');
} while (pattern_char == '?' || pattern_char == '*');
if (pattern_char == 0) {
return 0;
}
@@ -428,21 +430,21 @@ pf_s32 PFPATH_cmpNameImpl(const pf_s8* name, const pf_s8* pattern, pf_u32* match
}
name_width = volume->codeset.oem_char_width(name);
if (name_width == 1) {
name_char = pf_toupper(*name);
read_char = pf_toupper(*name);
} else {
name_char = PF_GET_LE_U16((const pf_u8*)name);
read_char = (pf_u16)PF_GET_LE_U16((const pf_u8*)name);
}
name_char = (pf_u16)read_char;
}
if (*name == 0 || *pattern == 0) {
*matched_end = 1;
}
return 1;
}
default:
if (name_char != pattern_char) { return 1; }
break;
}
name += name_width;
if (*name == 0 || *pattern == 0) {
*matched_end = 1;
}
}
return *name != 0;
}

View File

@@ -58,7 +58,7 @@ void* pfstub_entry(void* argument) {
pf_vol_set.context_id = message->task_id;
if (message->operation >= 0 && message->operation < 100) {
pfstub_call_function_standard(message);
} else if (received->operation >= 100 && received->operation < 200) {
} else if (((s32*)received)[1] >= 100 && ((s32*)received)[1] < 200) {
pfstub_call_function_unicode(message);
} else {
message->result.status = -1;

View File

@@ -69,17 +69,17 @@ typedef struct {
} KBDChannel;
typedef struct {
u32 callbackAddress;
USBKBDCmdLEDCallback callbackAddress;
void* callbackArg;
} KBDLEDCallbackData;
const char* __KBDVersion =
"<< RVL_SDK - KBD \trelease build: Apr 20 2010 11:21:43 (0x4199_60831) >>";
static BOOL kbdInitialized;
static USBKBDAttachCallback kbdDevAttachCallback;
static USBKBDDetachCallback kbdDevDetachCallback;
static void (*kbdKeyCallback)(KBDKeyEventData* event);
static USBKBDDetachCallback kbdDevDetachCallback;
static USBKBDAttachCallback kbdDevAttachCallback;
static BOOL kbdInitialized;
KBDKeyMapTable kbdKeyMaps = {0};
typedef struct {
@@ -346,7 +346,6 @@ static void kbdProcKey(u32 key, u32 pressed, u32 channel) {
event.channel = channel;
event.state = pressed;
event.modifiers = 0;
kbdGetModState(channel, &event.modifiers);
map = &kbdKeyMaps.maps[data->country];
keyCount = map->keypadCount;
@@ -402,87 +401,86 @@ static void kbdProcKey(u32 key, u32 pressed, u32 channel) {
static void kbdProcMod(u32 key, u32 pressed, u32 channel) {
KBDChannel* data;
u32 modState;
s32 delta;
u8 flags;
u32 modifiers;
KBDModifierState* state = (KBDModifierState*)&modifiers;
u32 finalState;
s8 value;
data = &kbdData[channel];
delta = (pressed & 1) != 0 ? 1 : -1;
flags = kbdKeyMaps.maps[data->country].flags;
if (kbdGetModState(channel, &modifiers) != 0) {
modifiers = data->modState;
}
kbdGetModState(channel, &modState);
switch (key) {
case 0xF001:
if (data->lockState != 0) {
if ((pressed & 1) != 0) {
modifiers ^= 2;
modState ^= 2;
}
} else {
value = data->lockCount[1] + delta;
data->lockCount[1] = value;
state->keys.rightControl = (u8)value != 0;
modState = (modState & ~0x2) | (((u8)value != 0) << 1);
}
break;
case 0xF005:
if (data->lockState != 0) {
if ((pressed & 1) != 0) {
modifiers ^= 0x20;
modState ^= 0x20;
}
} else {
value = data->lockCount[4] + delta;
data->lockCount[4] = value;
modifiers = (modifiers & ~0x20) | (((u8)value != 0) << 5);
modState = (modState & ~0x20) | (((u8)value != 0) << 5);
}
break;
case 0xF000:
if (data->lockState != 0) {
if ((pressed & 1) != 0) {
modifiers ^= 1;
modState ^= 1;
}
} else {
value = data->lockCount[0] + delta;
data->lockCount[0] = value;
state->keys.leftControl = (u8)value != 0;
modState = (modState & ~0x1) | ((u8)value != 0);
}
break;
case 0xF008:
if (((pressed & 1) != 0) && (data->lockProcessing != 0)) {
modifiers ^= 0x200;
modState ^= 0x200;
}
break;
case 0xF007:
if (((pressed & 1) != 0) && (data->lockProcessing != 0)) {
modifiers ^= 0x100;
modState ^= 0x100;
}
break;
case 0xF006:
if (((pressed & 1) != 0) && (data->lockProcessing != 0)) {
u32 oldState;
u32 lockState;
oldState = modifiers;
oldState = modState;
lockState = oldState & 0xC0;
switch (lockState) {
case 0:
if ((flags & 1) == 1) {
modifiers = oldState | 0x40;
modState = oldState | 0x40;
}
break;
case 0x40:
{
modifiers = oldState & 0xFFFFFFBF;
modState = oldState & 0xFFFFFFBF;
if ((flags & 4) == 4) {
modifiers = oldState & 0xFFFFFFBF | 0x80;
modState = oldState & 0xFFFFFFBF | 0x80;
}
}
break;
case 0x80:
modifiers = oldState & 0xFFFFFF7F;
modState = oldState & 0xFFFFFF7F;
break;
case 0xC0:
modifiers = oldState & 0xFFFFFF3F;
modState = oldState & 0xFFFFFF3F;
break;
}
}
@@ -490,43 +488,43 @@ static void kbdProcMod(u32 key, u32 pressed, u32 channel) {
case 0xF002:
if (data->lockState != 0) {
if ((pressed & 1) != 0) {
modifiers ^= 4;
modState ^= 4;
}
} else {
value = data->lockCount[2] + delta;
data->lockCount[2] = value;
modifiers = (modifiers & ~4) | (((u8)value != 0) << 2);
modState = (modState & ~0x4) | (((u8)value != 0) << 2);
}
break;
case 0xF003:
if (data->lockState != 0) {
if ((pressed & 1) != 0) {
modifiers ^= 8;
modState ^= 8;
}
} else {
value = data->lockCount[3] + delta;
data->lockCount[3] = value;
state->keys.rightShift = (u8)value != 0;
modState = (modState & ~0x8) | (((u8)value != 0) << 3);
}
break;
case 0xF004:
if (data->lockState != 0) {
if ((pressed & 1) != 0) {
modifiers ^= 0x10;
modState ^= 0x10;
}
} else {
value = data->lockCount[5] + delta;
data->lockCount[5] = value;
state->keys.leftAlt = (u8)value != 0;
modState = (modState & ~0x10) | (((u8)value != 0) << 4);
}
break;
case 0xF021:
if (((pressed & 1) != 0) && (data->lockProcessing != 0)) {
modifiers ^= 0x400;
modState ^= 0x400;
}
break;
}
finalState = modifiers | 0x1000;
finalState = modState | 0x1000;
KBDSetModState(channel, finalState);
}
@@ -565,28 +563,26 @@ static inline u32 kbdChannelFlags(u32 channel) {
static void kbd_led_handler(BOOL success, void* callbackArg) {
u32 index;
u32 result;
u32 callbackAddress;
u32 err;
index = (u32)callbackArg;
callbackAddress = kbdLCBuf[index].callbackAddress;
kbdCmdBuf[index].device = 0;
if (callbackAddress == 0) {
if (kbdLCBuf[index].callbackAddress == (USBKBDCmdLEDCallback)(u32)kbdCmdBuf[index].device) {
return;
}
switch (success) {
case TRUE:
result = 0;
break;
default:
result = 7;
err = 7;
break;
case TRUE:
err = 0;
break;
}
((USBKBDCmdLEDCallback)kbdLCBuf[index].callbackAddress)(result, kbdLCBuf[index].callbackArg);
kbdLCBuf[index].callbackAddress(err, kbdLCBuf[index].callbackArg);
}
USBKBDErr KBDSetLedsAsync(u32 channel, u32 leds, USBKBDCmdLEDCallback callback, void* callbackArg) {
u32 index;
s32 index;
u32 ofs;
u8 ledBits;
BOOL interrupts;
USBKBDErr result;
@@ -596,14 +592,14 @@ USBKBDErr KBDSetLedsAsync(u32 channel, u32 leds, USBKBDCmdLEDCallback callback,
if (channel >= 4) {
return 4;
}
if ((s32)kbdData[(u8)channel].flags == 1 || (s32)kbdData[(u8)channel].flags == 4) {
if ((s32)kbdChannelFlags(channel) == 1 || (s32)kbdChannelFlags(channel) == 4) {
return 5;
}
ledBits = leds;
interrupts = OSDisableInterrupts();
for (index = 0; index < 12; index++) {
if (kbdCmdBuf[index].device == 0) {
kbdCmdBuf[index].device = (u32)kbdData[channel].device;
for (index = 0, ofs = 0; index < 12; index++, ofs += sizeof(KBDLEDCommand)) {
if (*(u32*)&((u8*)kbdCmdBuf)[ofs] == 0) {
*(u32*)&((u8*)kbdCmdBuf)[ofs] = (u32)kbdData[channel].device;
break;
}
}
@@ -611,21 +607,22 @@ USBKBDErr KBDSetLedsAsync(u32 channel, u32 leds, USBKBDCmdLEDCallback callback,
if (index == 12) {
return 7;
}
kbdLCBuf[index].callbackAddress = (u32)callback;
kbdLCBuf[index].callbackAddress = callback;
kbdLCBuf[index].callbackArg = callbackArg;
result = USBKBDSetLEDAsync((u32)kbdData[channel].device, ledBits,
(USBKBDCmdLEDAsync*)&kbdCmdBuf[index],
kbd_led_handler, (void*)index);
switch (result) {
case 0:
return 0;
default:
return 7;
case 0:
return 0;
}
}
USBKBDErr KBDSetLeds(u32 channel, u32 leds) {
u32 index;
KBDLEDCommand* command;
BOOL interrupts;
USBKBDErr result;
u8 ledBits;
@@ -638,15 +635,17 @@ USBKBDErr KBDSetLeds(u32 channel, u32 leds) {
if ((s32)kbdChannelFlags(channel) == 1 || (s32)kbdChannelFlags(channel) == 4) {
return 5;
}
ledBits = leds;
ledBits = leds & 0xff;
interrupts = OSDisableInterrupts();
index = 0;
command = kbdCmdBuf;
while (index < 12) {
if ((kbdCmdBuf + index)->device == 0) {
kbdCmdBuf[index].device = (u32)kbdData[channel].device;
if (command->device == 0) {
command->device = (u32)kbdData[channel].device;
break;
}
index++;
command++;
}
OSRestoreInterrupts(interrupts);
if (index == 12) {
@@ -839,30 +838,28 @@ USBKBDErr KBDSetModState(u32 channel, u32 value) {
kbdData[channel].modState = value & ~0x1000;
} else {
BOOL interrupts;
KBDModifierState* state;
KBDModifierState oldState;
KBDModifierState newState;
interrupts = OSDisableInterrupts();
state = (KBDModifierState*)&kbdData[channel].modState;
newState.value = value & 0xfc0;
oldState.value = kbdData[channel].modState;
newState.bits.physical = oldState.bits.physical;
*state = newState;
kbdData[channel].modState = newState.value;
OSRestoreInterrupts(interrupts);
}
return 0;
}
u16 KBDTranslateHidCode(u32 keyCode, u32 modifiers, s32 country) {
KBDKeyMap* map;
u16* table;
u32 keyIndex;
u16 entry;
s32 mask;
u16* table;
u16 activeFlag;
u16 entry;
KBDKeyMap* map;
s32 offset;
s32 group;
u32 shiftFlag;
u16 activeFlag;
u32 keyIndex;
if (kbdInitialized == FALSE) {
return 0xFFFF;

View File

@@ -268,10 +268,10 @@ void KPADSetPosParam(s32 chan, f32 x, f32 y) {
}
static void reset_kpad(KPADInside* kpad) {
f32 sensorDistance;
f32 upperY;
f32 distanceValue;
f32 zero;
f32 upperY;
f32 sensorDistance;
f32 lowerY;
f32 one;
f32 negativeOne;
@@ -1607,8 +1607,8 @@ static void KPADiSamplingCallback(s32 chan) {
u32 device;
if (WPADProbe(chan, &device) != -1) {
u8 index = kpad->ringIndex;
KPADSample* status;
u32 tier;
KPADSample* status;
u32 enabled;
u32 tableIndex;
if (index >= 16) {

View File

@@ -367,7 +367,8 @@ static s32 __nupGetServerInfo(char* serverAddress, char* messageId, unsigned lon
} else {
snprintf(endpoint, endpointSize, "https://%s/nus/services/NetUpdateSOAP", serverAddress);
requestSize = strlen(messageId) + strlen(productArea);
requestSize += strlen(countryCode) + 0x449;
unsigned long countryLength = strlen(countryCode);
requestSize += countryLength + 0x449;
if (auditData != 0) {
requestSize += strlen(auditData);
}
@@ -1174,7 +1175,7 @@ static inline s32 __nupGetBoot2Version(u16* version) {
if (result == 0) {
u16 checkedVersion = bootVersion;
*version = checkedVersion;
result = checkedVersion == bootVersion ? result : -0x1389;
if (checkedVersion != bootVersion) { result = -0x1389; }
}
return result;
}
@@ -1224,9 +1225,9 @@ static inline void __nupSetStatus(NUPContextInfo* context, s32 status) {
extern "C" void* __nupOp(void* argument) {
u8* response = 0;
ESTmdView* tmdView = 0;
char* auditData = 0;
u32 needsAudit;
u32 currentDeviceId;
u32 needsAudit;
char* auditData = 0;
s32 result;
u16 serverBootVersion = 0;
u16 bootTitleVersion;

View File

@@ -1,4 +1,5 @@
#include <stdio.h>
#include <stdlib.h>
#include <private/es.h>
#include <private/nand.h>
#include <private/os.h>
@@ -167,7 +168,7 @@ typedef struct __attribute__((aligned(32))) WADImportWorkspace {
WADFileHeader fileHeader;
u8 wadHeader[0x80];
WADUnpackInfo unpackInfo;
WADStream stream ALIGN32;
WADStream stream;
} WADImportWorkspace;
typedef struct WADImportTransfer {
@@ -541,11 +542,7 @@ static s32 WAD_815BFFA8(WADImportLoopArgs* args) {
u32 size;
for (; (remaining != 0) && (result == 0); bufferIndex ^= 1) {
size = remaining;
if (remaining > transfer->chunkSize) {
size = transfer->chunkSize;
}
size = remaining > transfer->chunkSize ? transfer->chunkSize : remaining;
OSLockMutex(&transfer->mutex[bufferIndex]);
while (transfer->ready[bufferIndex] == 0) {
OSWaitCond(&transfer->signalCond[bufferIndex], &transfer->mutex[bufferIndex]);
@@ -562,22 +559,12 @@ static s32 WAD_815BFFA8(WADImportLoopArgs* args) {
return result;
}
static inline void WADReportCancelledContent(void) {
const char* functionName = "WADImportEx";
OSReport("%s:%d Cancel importing the content.\n", functionName, 0x8DF);
}
static inline void WADReportCancelledTitle(void) {
const char* functionName = "WADImportEx";
OSReport("%s:%d Cancel importing the title.\n", functionName, 0x8E6);
}
s32 WADImportEx(char* path, MEMAllocator* allocator, WADLocation location, u32 offset, u32 flags,
WADProcessCallback processCallback) {
s32 result = 0;
ESTitleMeta* titleMeta;
void* firstBuffer = 0;
void* secondBuffer = 0;
ESHash* sharedContentHashes = 0;
ESContentId* installedContentIds = 0;
ESContentMeta* matchingContents = 0;
u32 importedBytes = 0;
u32 contentCount;
u32 headerReadSize;
@@ -587,11 +574,11 @@ s32 WADImportEx(char* path, MEMAllocator* allocator, WADLocation location, u32 o
WADThreadStack* threadStack = 0;
s32 contentFd;
s32 titleImportStarted = FALSE;
ESTitleMeta* installedTitleMeta = 0;
ESContentId* installedContentIds = 0;
ESTitleMeta* titleMeta;
void* firstBuffer = 0;
s32 contentImportStarted = FALSE;
ESContentMeta* matchingContents = 0;
ESHash* sharedContentHashes = 0;
void* secondBuffer = 0;
ESTitleMeta* installedTitleMeta = 0;
WADStream stream;
WADUnpackInfo unpackInfo;
WADSaveDataHeader wadHeader ALIGN32;
@@ -658,8 +645,8 @@ s32 WADImportEx(char* path, MEMAllocator* allocator, WADLocation location, u32 o
if (result != 0) {
goto cleanup;
}
titleMeta = unpackInfo.titleMeta;
importedBytes = unpackInfo.contentOffset;
titleMeta = unpackInfo.titleMeta;
if (((flags & 8) != 0) && (titleMeta != 0)) {
ticketViewCount = 0;
if (unpackInfo.headerInfo != 2) {
@@ -905,10 +892,9 @@ s32 WADImportEx(char* path, MEMAllocator* allocator, WADLocation location, u32 o
OSUnlockMutex(&transfer.mutex[bufferIndex]);
break;
}
readSize = (chunkSize + 0x1F) & ~0x1F;
readBuffer = transfer.buffers[bufferIndex];
result = WADReadStream(&stream,
&readBuffer, readSize,
&readBuffer, (chunkSize + 0x1F) & ~0x1F,
offset + importedBytes);
if ((u32)result != ((chunkSize + 0x1F) & ~0x1F)) {
OSLockMutex(&transfer.mutex[bufferIndex ^ 1]);
@@ -963,6 +949,7 @@ s32 WADImportEx(char* path, MEMAllocator* allocator, WADLocation location, u32 o
(unpackInfo.fileCount == 0)) {
goto cleanup;
}
fileHeaderBuffer = &backupHeader;
if (firstBuffer == 0) {
firstBuffer = _WADMemAlloc(allocator, 0x10000);
if (firstBuffer == 0) {
@@ -970,7 +957,6 @@ s32 WADImportEx(char* path, MEMAllocator* allocator, WADLocation location, u32 o
goto cleanup;
}
}
fileHeaderBuffer = &backupHeader;
if (secondBuffer == 0) {
secondBuffer = _WADMemAlloc(allocator, 0x10000);
if (secondBuffer == 0) {
@@ -1166,12 +1152,12 @@ cleanup:
}
if (contentImportStarted) {
ES_ImportContentEnd(contentFd);
WADReportCancelledContent();
OSReport("%s:%d Cancel importing the content.\n", __func__, 0x8DF);
}
if (titleImportStarted) {
ES_ImportTitleCancel();
_WADCleanTmpDir(allocator);
WADReportCancelledTitle();
OSReport("%s:%d Cancel importing the title.\n", __func__, 0x8E6);
}
if (processCallback != 0) {
if (importedBytes != 0) {
@@ -1191,8 +1177,8 @@ cleanup:
static s32 WAD_815C1288(WADExportLoopArgs* args) {
ESFd fd = args->fd;
u32 remaining = args->size;
u32 size;
u32 remaining = args->size;
u32 bufferIndex = 0;
WADImportTransfer* transfer = args->transfer;
s32 result = 0;
@@ -1578,7 +1564,6 @@ s32 WADBackupEx(u64 titleId, u32 flags, MEMAllocator* allocator, char* path, u32
result = -3006;
goto cleanup;
}
result = 0;
transfer.ready[bufferIndex] = 0;
OSUnlockMutex(&transfer.mutex[bufferIndex]);
OSSignalCond(&transfer.waitCond[bufferIndex]);
@@ -1733,7 +1718,6 @@ file_done:
if (result != 0) {
goto cleanup;
}
result = 0;
result = ES_GetDeviceCert((ESCertSignature*)ROUNDUP((u32)certificates->device, 64));
if (result != 0) {
goto cleanup;
@@ -1742,6 +1726,7 @@ file_done:
result = -3006;
goto cleanup;
}
result = 0;
if ((s32)WADWriteStream(&stream, signature, sizeof(signature)) != (s32)sizeof(signature)) {
result = -3006;
goto cleanup;
@@ -2943,11 +2928,7 @@ static s32 WAD_815C43E0(WADHashThreadArgs* args) {
u32 size;
for (; (remaining != 0) && (result == 0); bufferIndex ^= 1) {
size = remaining;
if (remaining > transfer->chunkSize) {
size = transfer->chunkSize;
}
size = remaining > transfer->chunkSize ? transfer->chunkSize : remaining;
OSLockMutex(&transfer->mutex[bufferIndex]);
while (transfer->ready[bufferIndex] == 0) {
OSWaitCond(&transfer->signalCond[bufferIndex], &transfer->mutex[bufferIndex]);
@@ -2990,10 +2971,7 @@ static s32 _WADHash(WADStream* stream, u32 offset, u32 size, void* context, void
result = 0;
if (!(secondBuffer != 0 && threadStack != 0)) {
while (size != 0) {
readSize = size;
if (size > chunkSize) {
readSize = chunkSize;
}
readSize = size > chunkSize ? chunkSize : size;
readBuffer = buffer;
result = WADReadStream(stream, &readBuffer, readSize, offset + completed);
if ((u32)result != readSize) {
@@ -3028,10 +3006,7 @@ static s32 _WADHash(WADStream* stream, u32 offset, u32 size, void* context, void
bufferIndex = 0;
while (size != 0 && transfer.error == 0) {
OSMutex* mutex;
readSize = size;
if (size > chunkSize) {
readSize = chunkSize;
}
readSize = size > chunkSize ? chunkSize : size;
mutex = &transfer.mutex[bufferIndex];
OSLockMutex(mutex);
while (transfer.ready[bufferIndex] != 0 && transfer.error == 0) {
@@ -3509,7 +3484,7 @@ s32 WADImportDVDExForBS(const char* path, void* buffer, u32 bufferSize) {
return -3004;
}
fileOpened = TRUE;
if (buffer == 0) {
if (buffer == NULL) {
result = -3003;
goto cleanup;
}
@@ -3550,8 +3525,8 @@ s32 WADImportDVDExForBS(const char* path, void* buffer, u32 bufferSize) {
parts.titleMeta = readBuffer + sectionOffset;
sectionOffset += (header.tmdSize + 0x3F) & ~0x3F;
}
remainingBufferSize = bufferSize - sectionOffset;
contentBuffer = readBuffer + sectionOffset;
remainingBufferSize = bufferSize - sectionOffset;
if ((u32)sectionOffset > bufferSize) {
result = -3003;
goto cleanup;

File diff suppressed because it is too large Load Diff

View File

@@ -48,10 +48,6 @@ CDBErr CDBRecordOpenReadOnly_(CDBRecord* record);
CDBErr CDBRecordClose_(CDBRecord* record);
CDBErr CDBRecordWrite_(CDBRecord* record, void* buffer, u32 size);
CDBErr CDBRecordRemove_(CDBRecord* record);
CDBErr CDBRecordGetFileSize_(CDBRecord* record, u32* size);
void CDBRecordDuplicate_(CDBRecord* dst, CDBRecord* src);
void CDBRecordPrivateChangeOwner_(CDBRecord* record, CDBRecordKey* key);
CDBErr CDBRecordBackupToSD_(CDBRecord* record);
CDBErr CDBRecordUpdateModifiedDate(CDBRecord* record);
CDBErr CDBRecordEncrypt(CDBRecord* record, void* buffer, CDBRecordKey* key, u32 size, u32* encryptedSize);
@@ -371,19 +367,6 @@ CDBErr CDBRecordSeek(CDBRecord* record, s32 offset, CDBSeek seek) {
return err;
}
CDBErr CDBRecordGetFileSize_(CDBRecord* record, u32* size) {
CDBErr err;
CDBLock();
if (record->file == NULL) {
CDBReportError("can't get file size of the record ; the record is closed\n");
err = CDB_ERROR_27;
} else {
err = CDBRecordFileGetFileSize(record, size);
}
CDBUnlock();
return err;
}
CDBErr CDBRecordGetDataSize(CDBRecord* record, u32* size) {
CDBErr err;
CDBLock();
@@ -397,44 +380,6 @@ CDBErr CDBRecordGetDataSize(CDBRecord* record, u32* size) {
return err;
}
CDBErr CDBRecordReduceFileSize_(CDBRecord* record, u32 size) {
CDBErr err = CDB_ERROR_OK;
CDBLock();
if (record->file == NULL) {
CDBReportError("can't reduce file size of the record ; the record is closed\n");
err = CDB_ERROR_27;
} else if ((((CDBRecordDatabaseState*)((CDBDatabase*)record->unk_0x00)->instance)->openFlags & 2) == 0) {
CDBReportError("can't reduce file size of the record ; the record is opened as READONLY\n");
err = CDB_ERROR_26;
} else if (size <= CDB_RECORD_BUFFER_SIZE) {
CDBReportError("can't reduce file size of the record ; file size must be over %d bytes\n", CDB_RECORD_BUFFER_SIZE);
err = CDB_ERROR_1;
} else {
CDBAttrSetFileSize(&((CDBRecordFile*)record->file)->attr, size);
}
CDBUnlock();
return err;
}
CDBErr CDBRecordReduceDataSize_(CDBRecord* record, u32 size) {
CDBErr err = CDB_ERROR_OK;
CDBLock();
if (record->file == NULL) {
CDBReportError("can't reduce data size of the record ; the record is closed\n");
err = CDB_ERROR_27;
} else if ((((CDBRecordDatabaseState*)((CDBDatabase*)record->unk_0x00)->instance)->openFlags & 2) == 0) {
CDBReportError("can't reduce data size of the record ; the record is opened as READONLY\n");
err = CDB_ERROR_26;
} else if (!CDBRecordBelongedDBOpenedAsRW(record)) {
CDBReportError("can't reduce data size of the record; permission denied\n");
err = CDB_ERROR_ACCESS_DENIED;
} else {
CDBAttrSetFileSize(&((CDBRecordFile*)record->file)->attr, size + CDB_RECORD_BUFFER_SIZE);
}
CDBUnlock();
return err;
}
CDBErr CDBRecordRemove(CDBRecord* record) {
CDBErr err;
CDBLock();
@@ -466,155 +411,6 @@ CDBErr CDBRecordRemove_(CDBRecord* record) {
return result;
}
CDBErr CDBRecordSetFileType_(CDBRecord* record, u32 type) {
CDBErr err = CDB_ERROR_OK;
CDBLock();
if ((((CDBRecordDatabaseState*)((CDBDatabase*)record->unk_0x00)->instance)->openFlags & 2) == 0) {
CDBReportError("can't set file type of the record; the database is opened as READONLY\n");
err = CDB_ERROR_26;
} else if (record->file == NULL) {
CDBReportError("can't set file type of the record ; the record is closed\n");
err = CDB_ERROR_27;
} else if ((((CDBRecordFile*)record->file)->unk_0x1C) == 1) {
CDBReportError("can't set file type of the record ; the record is opened as READONLY\n");
err = CDB_ERROR_26;
} else if (record->key.location != CDB_FS_LOCATION_NAND) {
CDBReportError("can't set file type of the record ; the record must exsist on NAND\n");
err = CDB_ERROR_2;
} else {
CDBAttrSetFileType(&((CDBRecordFile*)record->file)->attr, type);
}
CDBUnlock();
return err;
}
CDBErr CDBRecordGetFileType_(CDBRecord* record, u32* type) {
CDBErr err = CDB_ERROR_OK;
CDBLock();
if (record->file == NULL) {
CDBReportError("can't get file type of the record ; the record is closed\n");
err = CDB_ERROR_27;
} else {
CDBAttrGetFileType(&((CDBRecordFile*)record->file)->attr, type);
}
CDBUnlock();
return err;
}
CDBErr CDBRecordGetGameCode_(CDBRecord* record, char* gameCode) {
CDBErr err = CDB_ERROR_OK;
CDBLock();
if (record->file == NULL) {
CDBReportError("can't get game code of the record ; the record is closed\n");
err = CDB_ERROR_27;
} else {
CDBAttrGetGameCode(&((CDBRecordFile*)record->file)->attr, gameCode);
}
CDBUnlock();
return err;
}
CDBErr CDBRecordGetMakerCode_(CDBRecord* record, char* makerCode) {
CDBErr err = CDB_ERROR_OK;
CDBLock();
if (record->file == NULL) {
CDBReportError("can't get maker code of the record ; the record is closed\n");
err = CDB_ERROR_27;
} else {
CDBAttrGetMakerCode(&((CDBRecordFile*)record->file)->attr, makerCode);
}
CDBUnlock();
return err;
}
CDBErr CDBRecordGetModifiedTime_(CDBRecord* record, u32* modifiedTime) {
CDBErr err = CDB_ERROR_OK;
CDBLock();
if (record->file == NULL) {
CDBReportError("can't get modified time of the record; the record is closed\n");
err = CDB_ERROR_27;
} else {
CDBAttrGetModifiedDate(&((CDBRecordFile*)record->file)->attr, modifiedTime);
}
CDBUnlock();
return err;
}
CDBErr CDBRecordGetModifiedCount_(CDBRecord* record, u32* modifiedCount) {
CDBErr err = CDB_ERROR_OK;
CDBLock();
if (record->file == NULL) {
CDBReportError("can't get modified count of the record; the record is closed\n");
err = CDB_ERROR_27;
} else {
err = CDBAttrGetModifiedCount(&((CDBRecordFile*)record->file)->attr, modifiedCount);
}
CDBUnlock();
return err;
}
CDBErr CDBRecordSetName_(CDBRecord* record, const char* name) {
CDBErr err = CDB_ERROR_OK;
CDBLock();
if ((((CDBRecordDatabaseState*)((CDBDatabase*)record->unk_0x00)->instance)->openFlags & 2) == 0) {
CDBReportError("can't set a name of the record; the database is opened as READONLY\n");
err = CDB_ERROR_26;
} else if (!CDBRecordBelongedDBOpenedAsRW(record)) {
CDBReportError("can't add keyword to the record; permission denied\n");
err = CDB_ERROR_ACCESS_DENIED;
} else if (record->file == NULL) {
CDBReportError("can't set a name of the record; the record is closed\n");
err = CDB_ERROR_27;
} else if ((((CDBRecordFile*)record->file)->unk_0x1C) == 1) {
CDBReportError("can't set a name of the record; the record is opened as READONLY\n");
err = CDB_ERROR_26;
} else {
CDBAttrSetName(&((CDBRecordFile*)record->file)->attr, name);
}
CDBUnlock();
return err;
}
CDBErr CDBRecordGetKeyword_(CDBRecord* record, char* keyword) {
CDBErr err = CDB_ERROR_OK;
CDBLock();
if (record->file == NULL) {
CDBReportError("can't get keyword from the record; the record is closed\n");
err = CDB_ERROR_27;
} else {
CDBAttrGetKeyword(&((CDBRecordFile*)record->file)->attr, keyword);
}
CDBUnlock();
return err;
}
CDBErr CDBRecordGetKey_(CDBRecord* record, CDBRecordKey* key) {
CDBErr err = CDB_ERROR_OK;
CDBLock();
if (record->file == NULL) {
CDBReportError("can't get key from the record; the record is closed\n");
err = CDB_ERROR_27;
} else {
CDBRecordKeyCopy(key, &((CDBRecordFile*)record->file)->key);
}
CDBUnlock();
return err;
}
CDBErr CDBRecordGetCalenderTime_(CDBRecord* record, OSCalendarTime* time) {
CDBErr err = CDB_ERROR_OK;
CDBLock();
if (record->file == NULL) {
CDBReportError("can't get calender time from the record; the record is closed\n");
err = CDB_ERROR_27;
} else {
CDBAttrGetCalenderTime(&((CDBRecordFile*)record->file)->attr, time);
}
CDBUnlock();
return err;
}
void CDBRecordGetTypeForce(CDBRecord* record, char* type) {
CDBLock();
CDBConvKeyStrToType(record->key.keyString, type);
@@ -659,7 +455,7 @@ CDBErr CDBRecordGetId(CDBRecord* record, CDBId* id) {
} else {
CDBLock();
if (record->file == NULL) {
CDBReportError("can't get maker code of the record ; the record is closed\n");
CDBReportError("can't get CDBId of the record ; the record is closed\n");
err = CDB_ERROR_27;
} else {
CDBLock();
@@ -723,17 +519,6 @@ CDBErr CDBRecordUpdateModifiedDate(CDBRecord* record) {
return CDB_ERROR_OK;
}
void CDBRecordDuplicate_(CDBRecord* dst, CDBRecord* src) {
CDBRecordKeyCopy(&dst->key, &src->key);
dst->unk_0x00 = src->unk_0x00;
dst->file = src->file;
dst->cryptBuf = src->cryptBuf;
}
void CDBRecordDuplicatePanic_(void) {
OSPanic(__FILE__, __LINE__, "CDBRecordDuplicate invalud location\n");
}
CDBErr CDBRecordBackupToSD(CDBRecord* record) {
CDBErr err;
CDBLock();
@@ -815,7 +600,10 @@ CDBErr CDBRecordBackupToSD_(CDBRecord* record) {
}
CDBLock();
recordFile = localRecord.file;
CDBRecordDuplicate_(record, &localRecord);
CDBRecordKeyCopy(&record->key, &localRecord.key);
record->unk_0x00 = localRecord.unk_0x00;
record->file = localRecord.file;
record->cryptBuf = localRecord.cryptBuf;
CDBRecordKeyCopy(&recordFile->key, &localRecord.key);
CDBUnlock();
return CDB_ERROR_OK;
@@ -935,7 +723,14 @@ CDBErr CDBRecordEncrypt(CDBRecord* record, void* buffer, CDBRecordKey* key, u32
return CDB_ERROR_OK;
}
}
err = CDBRecordGetFileSize_(record, &fileSize);
CDBLock();
if ((s32)record->file == 0) {
CDBReportError("can't get file size of the record ; the record is closed\n");
err = CDB_ERROR_27;
} else {
err = CDBRecordFileGetFileSize(record, &fileSize);
}
CDBUnlock();
CDBAttrSetFileSize(&recordFile->attr, fileSize);
if (err != CDB_ERROR_OK) {
return CDB_ERROR_OK;
@@ -1019,19 +814,6 @@ CDBErr CDBRecordEncrypt(CDBRecord* record, void* buffer, CDBRecordKey* key, u32
return CDB_ERROR_OK;
}
void CDBRecordPrivateChangeOwner_(CDBRecord* record, CDBRecordKey* key) {
CDBReport_(3);
OSReport("\x83\x74\x83\x40\x83\x43\x83\x8B\x96\xBC\x82\xCC\x89\xFC\xE2\x82\x82\xF0\x8C\x9F\x8F\x6F\n");
}
void CDBRecordPrivateChangeOwnerDebug_(CDBRecord* record, CDBRecordKey* key) {
OSReport("CDBRecordPrivateChangeOwner\n");
OSReport(" i_pre-wiiid = %lX\n", key->wiiId);
OSReport(" record-wiiid = %lX\n", record->key.wiiId);
OSReport("path =%s\n", (char*)key);
OSReport("path2=%s\n", (char*)&record->key);
}
CDBErr CDBRecordDecrypt(CDBRecord* record, void* buffer, u32 size, u32* dataSize, CDBRecordKey* key) {
CDBErr status;
int fileOffset;
@@ -1039,8 +821,8 @@ CDBErr CDBRecordDecrypt(CDBRecord* record, void* buffer, u32 size, u32* dataSize
u32 fileDataSize;
u32 fileSize;
u8 iv[16];
u8 digest[20] ATTRIBUTE_ALIGN(64);
u8 wiiIdKey[64] ATTRIBUTE_ALIGN(16);
u8 digest[20] ATTRIBUTE_ALIGN(64);
CDBRecordKey comparisonKey;
NETHMACContext hmac;
CDBAttrSignature signature;
@@ -1150,7 +932,8 @@ CDBErr CDBRecordDecrypt(CDBRecord* record, void* buffer, u32 size, u32* dataSize
CDBAttrGetKeyStr((CDBAttr*)buffer, comparisonKey.keyString);
if (CDBRecordKeyCompareByDate(&comparisonKey, &record->key) != 0) {
if (CDBIsPrintDebugMessage(3)) {
CDBRecordPrivateChangeOwner_(record, key);
CDBReport_(3);
OSReport("CDBRecordPrivateChangeOwner\n");
}
return CDB_ERROR_32;
}

View File

@@ -347,6 +347,10 @@ NWC24Err NWC24SetDlPriority(NWC24DlTask* dlTask, u8 dlPriority) {
static inline void ReadDlTaskIdentifier(const NWC24DlTask* dlTask, u16* identifier) {
*identifier = ((const DlTaskData*)dlTask)->id;
}
static inline NWC24Err SetDlTaskNextTime(NWC24DlTask* dlTask, OSTime time) {
NWC24Work* work = NWC24WorkP;
DlTaskListHeader* header = work != NULL ? (DlTaskListHeader*)work->dlHead : NULL;
@@ -358,7 +362,7 @@ static inline NWC24Err SetDlTaskNextTime(NWC24DlTask* dlTask, OSTime time) {
else if (task->id != 0xffff && task->id >= header->maxTaskCount) { result = NWC24_ERR_INVALID_VALUE; }
else { result = NWC24_OK; }
if (result != NWC24_OK) { return result; }
taskId = task->id;
ReadDlTaskIdentifier(dlTask, &taskId);
if (taskId == 0xffff) { return NWC24_ERR_FAILED; }
time /= 60;
header = work != NULL ? (DlTaskListHeader*)work->dlHead : NULL;
@@ -421,7 +425,7 @@ NWC24Err NWC24SetDlInterval(NWC24DlTask* dlTask, u16 dlInterval) {
}
}
if (result == NWC24_OK) {
taskId = task->id;
ReadDlTaskIdentifier(dlTask, &taskId);
if (taskId != 0xffff) {
nextTime /= 60;
if (work != NULL) {
@@ -543,12 +547,12 @@ NWC24Err NWC24DumpDlTask(NWC24DlTask* dlTask) {
}
NWC24Err NWC24IterateDlTask(NWC24DlId* dlIterateId, BOOL begin) {
NWC24Err result;
DlTaskListHeader* entriesHeader;
NWC24Work* work;
u16 taskId;
u16 maxTaskCount;
DlTaskListHeader* header;
DlTaskListHeader* entriesHeader;
NWC24Err result;
if (NWC24WorkP != NULL) {
header = (DlTaskListHeader*)NWC24WorkP->dlHead;
@@ -580,7 +584,7 @@ NWC24Err NWC24IterateDlTask(NWC24DlId* dlIterateId, BOOL begin) {
}
entriesHeader = (DlTaskListHeader*)work->dlHead;
do {
while (taskId < (work == NULL ? (DlTaskListHeader*)NULL : entriesHeader)->maxTaskCount) {
header = work != NULL ? entriesHeader : NULL;
if (taskId >= header->maxTaskCount || taskId == 0xffff) {
result = NWC24_ERR_INVALID_VALUE;
@@ -594,20 +598,20 @@ NWC24Err NWC24IterateDlTask(NWC24DlId* dlIterateId, BOOL begin) {
return NWC24_OK;
}
taskId++;
} while (taskId < (work != NULL ? entriesHeader : (DlTaskListHeader*)NULL)->maxTaskCount);
}
return NWC24_ERR_DONE;
}
NWC24Err NWC24IterateDlTaskEx(NWC24DlIterateWork* dlIterateWork, NWC24DlId* dlIterateId) {
DlTaskIterationState* state = (DlTaskIterationState*)dlIterateWork;
s32 (*getValue)(NWC24DlId);
NWC24DlId taskId;
s32 value;
BOOL descending;
BOOL passesSelected;
BOOL bestCandidate;
NWC24Err result;
BOOL found = FALSE;
s32 (*getValue)(NWC24DlId);
NWC24Err result;
if (state->valid == 0) {
return NWC24_ERR_INVALID_VALUE;
@@ -635,8 +639,8 @@ NWC24Err NWC24IterateDlTaskEx(NWC24DlIterateWork* dlIterateWork, NWC24DlId* dlIt
if (value == state->comparisonValue && (s32)state->comparisonId < (s32)taskId) {
*dlIterateId = taskId;
state->comparisonValue = value;
state->selectedValue = value;
state->comparisonId = taskId;
state->selectedValue = value;
return NWC24_OK;
}
result = NWC24IterateDlTask(&taskId, FALSE);
@@ -714,6 +718,16 @@ static inline NWC24Err CheckDlTaskRetry(NWC24DlTask* dlTask, u8 retryCount) {
if ((retryMask & (1 << retryCount)) == 0) { return NWC24_ERR_DISABLED; }
return NWC24_OK;
}
static inline NWC24Err UpdateDlTaskAccessTime(NWC24DlTask* dlTask) {
OSTime universalTime;
NWC24Err result = NWC24iGetUniversalTime(&universalTime);
if (result >= NWC24_OK) {
result = SetDlTaskAccessTime(dlTask, universalTime);
if (result < NWC24_OK) { return result; }
}
return result;
}
NWC24Err NWC24UpdateDlTask(NWC24DlTask* dlTask) {
DlTaskData* task = (DlTaskData*)dlTask;
DlTaskListHeader* header;
@@ -725,11 +739,7 @@ NWC24Err NWC24UpdateDlTask(NWC24DlTask* dlTask) {
if (result != NWC24_OK) { return result; }
taskId = task->id;
if (taskId == 0xffff || taskId >= GetCachedDlHeader()->maxTaskCount) { return NWC24_ERR_INVALID_VALUE; }
result = NWC24iGetUniversalTime(&universalTime);
if (result >= NWC24_OK) {
result = SetDlTaskAccessTime(dlTask, universalTime);
if (result < NWC24_OK) { return result; }
}
result = UpdateDlTaskAccessTime(dlTask);
if (result < NWC24_OK) { return result; }
result = ValidateDlTask(dlTask, TRUE);
if (result == NWC24_OK) {
@@ -778,23 +788,26 @@ NWC24Err NWC24AddDlTask(NWC24DlTask* dlTask) {
result = CheckDlTaskListHeader(header);
if (result < NWC24_OK) { return result; }
result = AddTaskInternal(dlTask, GetCachedDlHeader()->taskCount, GetCachedDlHeader()->maxTaskCount);
if (result < NWC24_OK) { return result; }
universalTime = 0;
result = NWC24iGetUniversalTime(&universalTime);
if (result < NWC24_OK) { return result; }
{
s32 intervalSeconds;
s64 nextTime;
intervalSeconds = ((DlTaskData*)dlTask)->interval * 60;
nextTime = universalTime + intervalSeconds;
return SetDlTaskNextTime(dlTask, nextTime);
if (result >= NWC24_OK) {
universalTime = 0;
result = NWC24iGetUniversalTime(&universalTime);
if (result < NWC24_OK) { return result; }
{
s32 intervalSeconds;
s64 nextTime;
intervalSeconds = ((DlTaskData*)dlTask)->interval * 60;
nextTime = universalTime + intervalSeconds;
return SetDlTaskNextTime(dlTask, nextTime);
}
}
return result;
}
NWC24Err NWC24GetDlTask(NWC24DlTask* dlTask, NWC24DlId dlId) {
DlTaskListHeader* header;
NWC24File file;
DlTaskData* task = (DlTaskData*)dlTask;
NWC24Err result;
NWC24Err operationResult;
@@ -847,7 +860,7 @@ NWC24Err NWC24GetDlTask(NWC24DlTask* dlTask, NWC24DlId dlId) {
if (operationResult < NWC24_OK) {
result = operationResult;
} else {
operationResult = NWC24FRead(dlTask, 0x200, &file);
operationResult = NWC24FRead(task, 0x200, &file);
result = NWC24_OK;
if (operationResult < NWC24_OK) {
result = operationResult;
@@ -879,17 +892,13 @@ NWC24Err NWC24PurgeOldestDlTask() {
state.initialized = 1;
state.valid = 1;
result = NWC24IterateDlTaskEx((NWC24DlIterateWork*)&state, &taskId);
while (result == NWC24_OK) {
while ((result = NWC24IterateDlTaskEx((NWC24DlIterateWork*)&state, &taskId)) == NWC24_OK) {
header = GetCachedDlHeader();
if (taskId >= header->taskCount) { break; }
result = NWC24IterateDlTaskEx((NWC24DlIterateWork*)&state, &taskId);
}
if (result == NWC24_ERR_DONE) {
return NWC24_ERR_FAILED;
}
if (result < NWC24_OK) {
if (result == NWC24_ERR_DONE) { result = NWC24_ERR_FAILED; }
return result;
}
@@ -1014,9 +1023,7 @@ NWC24Err NWC24ExtendDlTaskList(u32 num) {
result = WriteDlHeader(&file);
closeList:
closeResult = NWC24FClose(&file);
if (result != NWC24_OK) {
closeResult = result;
}
closeResult = result != NWC24_OK ? result : closeResult;
result = NWC24iLoadDlHeader();
if (closeResult != NWC24_OK) {
result = closeResult;
@@ -1065,15 +1072,10 @@ NWC24Err NWC24iCheckDlHeaderConsistency(DlTaskListHeader* header, BOOL repair) {
NWC24Err NWC24iCreateDlTaskList() {
u16 taskId;
DlTaskListHeader* header;
DlTaskListHeader* header = GetCachedDlHeader();
NWC24Err result;
NWC24File file;
if (NWC24WorkP != NULL) {
header = (DlTaskListHeader*)NWC24WorkP->dlHead;
} else {
header = NULL;
}
memset(header, 0, 0x800);
header->magic = 0x5763446c;
@@ -1220,13 +1222,16 @@ static inline NWC24Err ValidateDlTaskUrl(NWC24DlTask* dlTask) {
DlTaskListHeader* header = GetCachedDlHeader();
NWC24Err result;
if (task->id >= header->maxTaskCount && task->id != 0xffff) { return NWC24_ERR_INVALID_VALUE; }
result = NWC24iCheckStringLength(task->url, 7, 0x100);
if (result >= NWC24_OK) {
if (strncmp(task->url, "http://", 7) != 0 && strncmp(task->url, "https://", 8) != 0) { result = NWC24_ERR_FORMAT; }
else { result = NWC24_OK; }
{
const char* url = task->url;
result = NWC24iCheckStringLength(url, 7, 0x100);
if (result >= NWC24_OK) {
if (strncmp(url, "http://", 7) != 0 && strncmp(url, "https://", 8) != 0) { result = NWC24_ERR_FORMAT; }
else { result = NWC24_OK; }
}
if (result < NWC24_OK) { return result; }
return NWC24_OK;
}
if (result < NWC24_OK) { return result; }
return NWC24_OK;
}
static inline NWC24Err FindFreeDlTask(NWC24DlTask* dlTask, u16 taskCount, u16 maxTaskCount) {
@@ -1256,11 +1261,7 @@ static inline NWC24Err UpdateDlTaskInline(NWC24DlTask* dlTask) {
if (result != NWC24_OK) { return result; }
taskId = task->id;
if (taskId == 0xffff || taskId >= GetCachedDlHeader()->maxTaskCount) { return NWC24_ERR_INVALID_VALUE; }
result = NWC24iGetUniversalTime(&universalTime);
if (result >= NWC24_OK) {
result = SetDlTaskAccessTime(dlTask, universalTime);
if (result < NWC24_OK) { return result; }
}
result = UpdateDlTaskAccessTime(dlTask);
if (result < NWC24_OK) { return result; }
result = ValidateDlTask(dlTask, TRUE);
if (result == NWC24_OK) {
@@ -1268,9 +1269,7 @@ static inline NWC24Err UpdateDlTaskInline(NWC24DlTask* dlTask) {
task->unknown_0x1a = 0;
}
if (task->retryEnabled == 1) {
for (;;) {
result = CheckDlTaskRetry(dlTask, task->retryCount);
if (result != NWC24_ERR_DISABLED) { break; }
while ((result = CheckDlTaskRetry(dlTask, task->retryCount)) == NWC24_ERR_DISABLED) {
task->retryCount = (task->retryCount + 1) & 0x1f;
}
if (result < NWC24_OK) { return result; }

View File

@@ -596,9 +596,9 @@ static NWC24Err DecodeWord(char* charsetData, u32 charsetCapacity, char* decoded
NWC24Err NWC24DecodeMIMEHeaderFieldBody(u8* charsetData, u32 charsetDataSize, u8* decoded, u32 decodedCapacity, u32* decodedSize, u8* encoded,
u32 encodedSize) {
int result = 0;
u8* output;
s32 inputSize;
char* input;
s32 inputSize;
u8* output;
s32 remainingCapacity;
if (decodedSize == NULL) {

208
sol-high-attempts.jsonl Normal file

File diff suppressed because one or more lines are too long

47
sol-high-results.txt Normal file
View File

@@ -0,0 +1,47 @@
Final matching audit
src/scene/sdChannelSelect/iplSDChannelSelect: exact 114/129 -> 116/129; objdiff code 25472 -> 26472/33828; data 224 -> 224/2960
create__Q33ipl5scene15SDChannelSelectFv | objdiff 97.73972% | 145/146 instructions; BS2 loop uses different retained manager/string bases | 7 distinct source attempts, 6 compiled
handleSDTitleListResult__Q33ipl5scene15SDChannelSelectFv | objdiff 99.15205% | 170/171 instructions; timer branch form and loop register selection | 5 distinct source attempts, 5 compiled
collectTitlesByUsage__Q33ipl5scene15SDChannelSelectFPClPClPUxPcPUl | objdiff 97.81188% | 101/101 instructions; count increment and threshold loads scheduled differently | 7 distinct source attempts, 7 compiled
collectTitlesFromNandUsage__Q33ipl5scene15SDChannelSelectFPClPClPUxPcPUl | objdiff 97.833336% | 102/102 instructions; count increment and threshold loads scheduled differently | 7 distinct source attempts, 7 compiled
collectTitlesByChannelOrder__Q33ipl5scene15SDChannelSelectFPClPClPUxPcPUl | objdiff 97.29365% | 126/126 instructions; title registers, indexed operand order, threshold-load scheduling | 7 distinct source attempts, 7 compiled
collectTitlesBySpecialChannels__Q33ipl5scene15SDChannelSelectFPClPClPUxPcPUl | objdiff 97.55125% | 361/361 instructions; four count-increment/threshold-load schedules | 7 distinct source attempts, 7 compiled
flushSaveDataAndMountSD__Q33ipl5scene15SDChannelSelectFv | objdiff 99.65714% | 35/35 instructions; heap and save-manager loads occur in reversed order | 3 distinct source attempts, 3 compiled
calcCommon__Q33ipl5scene15SDChannelSelectFv | objdiff 99.07407% | 109/108 instructions; target omits setup of the second event-handler argument | 3 distinct source attempts, 3 compiled
drawChannelTransitionObjects__Q33ipl5scene15SDChannelSelectFv | objdiff 95.35849% | 153/159 instructions; state-range branches, switch lowering, and register selection | 7 distinct source attempts, 7 compiled
initializeNormalPage__Q33ipl5scene15SDChannelSelectFv | objdiff 98.93617% | 95/94 instructions; target omits setup of the second event-handler argument | 3 distinct source attempts, 3 compiled
selectChannel__Q33ipl5scene15SDChannelSelectFii | objdiff 98.305084% | 60/59 instructions; target omits setup of the second event-handler argument | 3 distinct source attempts, 3 compiled
setChannelScissor__Q33ipl5scene15SDChannelSelectCFPCQ33ipl5scene12SDChannelObj | objdiff 93.4721% | 233/233 instructions; floating-point evaluation order and register allocation | 3 distinct source attempts, 3 compiled
onEventDerived__Q43ipl5scene32@unnamed@iplSDChannelSelect_cpp@33SDChannelSelectButtonEventHandlerFUlUlPCQ33ipl10controller9Interface | objdiff 98.541664% | 144/144 instructions; event branch form and opt-out argument setup | 6 distinct source attempts, 4 compiled
src/keyboard/tiCandidateBox: exact 103/112 -> 104/112; objdiff code 17212 -> 17996/24000; data 1132 -> 1132/4652
create__Q39textinput12candidatebox12LayoutByNW4RFP12MEMAllocator | objdiff 92.71023% | 351/352 instructions; inlined initialization loop and retained pane-name addresses | 4 distinct source attempts, 4 compiled
createAnmPane___Q39textinput12candidatebox12LayoutByNW4RFP12MEMAllocator | objdiff 96.56481% | 214/216 instructions; inlined constructor/vtable lifetime and register selection | 3 distinct source attempts, 3 compiled
CalcPaneLocate___Q39textinput12candidatebox10UITextAreaFv | objdiff 99.78161% | 435/435 instructions; 18 floating-point register differences | 7 distinct source attempts, 7 compiled
GetNextPageIdx___Q39textinput12candidatebox10UITextAreaCFl | objdiff 100.0% | 130/130 instructions; eight unresolved SDA21 base-register fields; C conversion left 12 register differences and was restored to preserve baseline objdiff 100% | 10 distinct source attempts, 10 compiled
GetPrevPageIdx___Q39textinput12candidatebox10UITextAreaCFl | objdiff 99.57365% | 129/129 instructions; 11 floating-point register differences | 11 distinct source attempts, 11 compiled
StartScroll__Q39textinput12candidatebox10UITextAreaFl | objdiff 99.78378% | 185/185 instructions; eight floating-point register differences | 12 distinct source attempts, 12 compiled
StartScrollToIdx__Q39textinput12candidatebox10UITextAreaFl | objdiff 99.809784% | 184/184 instructions; seven floating-point register differences | 12 distinct source attempts, 12 compiled
onGUIEvent__Q39textinput12candidatebox10UITextAreaFRQ39textinput3gui13PaneComponentUlPQ49textinput11nw4rmanager14TiEventHandler5Input | objdiff 100.0% | 450/450 instructions; objdiff 100%; gate misnormalizes two CR1 branches using the CR operand instead of the branch destination | 3 distinct source attempts, 3 compiled
src/keyboard/tiCellPhone: exact 83/86 -> 83/86; objdiff code 12824 -> 12824/19028; data 3860 -> 3860/3860
onKey__Q49textinput8keyboard13cellphonetype4BaseFUlPv | objdiff 99.67009% | 682/682 instructions; 37 register differences across inlined lookup scopes | 7 distinct source attempts, 7 compiled
create__Q49textinput8keyboard13cellphonetype12LayoutByNW4RFP12MEMAllocator | objdiff 99.8949% | 333/333 instructions; seven register differences in the toggle animation loop | 10 distinct source attempts, 9 compiled
init__Q49textinput8keyboard13cellphonetype12LayoutByNW4RFv | objdiff 98.52612% | 536/536 instructions; 155 register differences; same frame and operation sequence; no tested lifetime/declaration change fixed allocation | 6 distinct source attempts, 6 compiled
Open-function audit: 24 functions; minimum 3 source attempts each.
No shared keyboard headers were edited. No configuration or target symbol sizes were edited.
The 83/86 CellPhone instruction-exact count did not improve. Its create fuzzy score improved from 99.81982% to 99.8949%.
CandidateBox has two objdiff-100 functions excluded by the raw instruction gate: GetNextPageIdx and onGUIEvent. Raw relocation fields and CR1 branch normalization account for that discrepancy; no gate tools were changed.
String pools remain identical. Object data percentages are partial in SDChannelSelect and CandidateBox; this run does not claim unit completion.
Writing skill applied: unslop.
Final full gate: GATE PASS
Regressions vs baseline: 0
Forbidden patterns: 0
Readability warnings: 0
DOL SHA1: 26116613f624061ba99c8d1a299aaa6efa85670d

View File

@@ -63,7 +63,7 @@ BOOL AbortFlag = FALSE;
volatile int lbl_81698A44 = 0;
volatile int lbl_81698A48 = 0;
volatile int lbl_81698A4C = 0;
u32 lbl_81698A50 = 0;
vu32 lbl_81698A50 = 0;
u32 lbl_81698A54 = 0;
u32 lbl_81698A58 = 0;
u32 lbl_81698A5C = 0;
@@ -83,17 +83,17 @@ u32 lbl_81698A9C = 0;
u64 lbl_81698AA0 = 0;
u32 lbl_81698AA8 = 0;
u32 lbl_81698AAC = 0;
u32 lbl_81698AB0 = 0;
u32 lbl_81698AB4 = 0;
vu32 lbl_81698AB0 = 0;
vu32 lbl_81698AB4 = 0;
u8 *lbl_81698AB8 = NULL;
NANDFileInfo *lbl_81698ABC = NULL;
u32 lbl_81698AC0 = 0;
NANDCallback lbl_81698AC4 = NULL;
vu32 lbl_81698AC0 = 0;
volatile NANDCallback lbl_81698AC4 = NULL;
u32 lbl_81698AC8 = 0;
u32 lbl_81698ACC = 0;
vu32 lbl_81698ACC = 0;
u32 lbl_81698AD0 = 0;
u32 lbl_81698AD4 = 0;
u32 lbl_81698AD8 = 0;
vu32 lbl_81698AD4 = 0;
vu32 lbl_81698AD8 = 0;
vu32 lbl_81698ADC = 0;
vu32 lbl_81698AE0 = 0;
u32 *lbl_81698AE4 = 0;
@@ -1045,8 +1045,8 @@ void BS2NANDDivideCallback(s32 result, NANDCommandBlock *block) {
} else if (result < 0) {
NandCompletion(result, block);
} else {
NandTransferred = NandTransferred + result;
NandBuffer = NandBuffer + result;
NandBuffer += result;
NandTransferred += result;
if (NandLength - NandTransferred > 0x40000) {
if (NandOperation == 1) {
BS2Report("NANDWriteAsync buf:0x%08X, length:0x%08X\n", NandBuffer, 0x40000);
@@ -1059,7 +1059,7 @@ void BS2NANDDivideCallback(s32 result, NANDCommandBlock *block) {
NandCompletion(ret, block);
}
} else {
if (NandLength != NandTransferred) {
if (NandLength - NandTransferred != 0) {
if (NandOperation == 1) {
BS2Report("NANDWriteAsync buf:0x%08X, length:0x%08X\n", NandBuffer, NandLength - NandTransferred);
ret = NANDWriteAsync(NandFile, (void *)NandBuffer, NandLength - NandTransferred, BS2NANDDivideCallback, block);
@@ -1084,17 +1084,12 @@ void BS2NANDDivideReadAsync(NANDFileInfo *info, void *buffer, u32 length, NANDCa
NandTransferred = 0;
NandFile = info;
NandBuffer = (u8 *)buffer;
switch (NandLength > 0x40000) {
default: {
if (NandLength > 0x40000) {
BS2Report("NANDReadAsync buf:0x%08X, length:0x%08X\n", NandBuffer, 0x40000);
NANDReadAsync(NandFile, (void *)NandBuffer, 0x40000, BS2NANDDivideCallback, block);
break;
}
case 0: {
} else {
BS2Report("NANDReadAsync buf:0x%08X, length:0x%08X\n", NandBuffer, NandLength);
NANDReadAsync(NandFile, (void *)NandBuffer, NandLength, BS2NANDDivideCallback, block);
break;
}
}
}
@@ -1105,17 +1100,12 @@ void BS2NANDDivideWriteAsync(NANDFileInfo *info, const void *buffer, u32 length,
NandTransferred = 0;
NandFile = info;
NandBuffer = (u8 *)buffer;
switch (NandLength > 0x40000) {
default: {
if (NandLength > 0x40000) {
BS2Report("NANDWriteAsync buf:0x%08X, length:0x%08X\n", NandBuffer, 0x40000);
NANDWriteAsync(NandFile, (void *)NandBuffer, 0x40000, BS2NANDDivideCallback, block);
break;
}
case 0: {
} else {
BS2Report("NANDWriteAsync buf:0x%08X, length:0x%08X\n", NandBuffer, NandLength);
NANDWriteAsync(NandFile, (void *)NandBuffer, NandLength, BS2NANDDivideCallback, block);
break;
}
}
}
@@ -1202,8 +1192,8 @@ BOOL CheckBS2CommandStatus() {
if (BS2BootCaching != 0) {
BS2Report("Write partition ifno\n");
NandPending = 1;
CacheCommandComplete = 1;
CacheLength += OSRoundUp32B(((DVDGameTOC *)DataToc)->partitionCount * sizeof(DVDPartitionInfo)) + 32;
CacheCommandComplete = 1;
if ((unsigned int)CacheLength > 0xb00000) {
BS2NANDCallback(-1, NULL);
return 1;

File diff suppressed because it is too large Load Diff

View File

@@ -1,3 +1,4 @@
#define TI_CANDIDATEBOX_IMPLEMENTATION
#include "keyboard/tiCandidateBox.h"
#include "keyboard/tiManager.h"
@@ -407,8 +408,9 @@ namespace textinput {
}
void LayoutByNW4R::createAnmPane_(MEMAllocator* allocator) {
CandidateTextAnmPane* pane;
for (u16 i = 0; i < ARRAY_LENGTH(lbl_8165D2F8.panes); i++) {
CandidateTextAnmPane* pane = NULL;
pane = NULL;
const PaneToAnimation& p = lbl_8165D2F8.panes[i];
switch (p.type) {
case KT_ScrollButton: {
@@ -1052,9 +1054,11 @@ namespace textinput {
f32 fontSizeWidth = pTextBox->GetFontSize().width;
f32 charSpace = pTextBox->GetCharSpace();
f32 acc = 0.0f;
for (int i = 0; text[i] != L'\0'; i++) {
const wchar_t* character = text;
while (*character != L'\0') {
acc += charSpace;
acc += f->GetCharWidth(text[i]);
acc += f->GetCharWidth(*character);
++character;
}
return acc * (fontSizeWidth / f->GetWidth()) + 0.01f;
}
@@ -1237,7 +1241,7 @@ namespace textinput {
}
void UITextArea::Draw(const nw4r::lyt::DrawInfo& drawInfo) {
// NONMATCHING
textdrawer::Base::ViewPort viewport;
s32 selected = GetSelectedPaneIdx();
if (!IsScrolling()) {
for (u32 i = 0; i < NUM_PANES; i++) {
@@ -1247,31 +1251,26 @@ namespace textinput {
}
}
struct {
f32 left;
f32 width;
} scissor;
nw4r::ut::Rect r = mpTextAreaPane->getPane()->GetPaneRect(drawInfo);
// TODO - These vectors are zero-initialized using GPRs first...
Vec v1 = {0, 0, 0};
Vec v2 = {0, 0, 0};
v1.x = r.left;
v1.y = r.top;
Vec v2 = {0, 0, 0};
v2.x = r.right;
v2.y = r.bottom;
MTXMultVec(mpTextAreaPane->getTextPane()->GetGlobalMtx(), &v1, &v1);
MTXMultVec(mpTextAreaPane->getTextPane()->GetGlobalMtx(), &v2, &v2);
u32 left, top, wd, ht;
GXGetScissor(&left, &top, &wd, &ht);
// TODO - These floats need to be stored to the stack
f32 scale = 640.0f / mfScreenWidth;
scissor.left = v1.x + mfScreenWidth / 2.0f;
scissor.left += scissor.left * (scale - 1.0f);
scissor.width = scale * (v2.x - v1.x);
GXSetScissor(scissor.left, top, scissor.width, ht);
viewport.xOrig = v1.x + mfScreenWidth / 2.0f;
viewport.xOrig += viewport.xOrig * (scale - 1.0f);
viewport.wd = scale * (v2.x - v1.x);
GXSetScissor(viewport.xOrig, top, viewport.wd, ht);
mpTextsPane->getPane()->Draw(drawInfo);
if (!IsScrolling()) {
GXSetScissor(left, top, (scissor.width + scissor.left) - left, ht);
GXSetScissor(left, top, (viewport.wd + viewport.xOrig) - left, ht);
for (u32 i = 0; i < NUM_PANES; i++) {
if (i == selected || mpTextAnmPane[i]->getState() == ANM_FocusOut) {
mpTextBoxPane[i]->getPane()->SetVisible(true);
@@ -1282,153 +1281,28 @@ namespace textinput {
GXSetScissor(left, top, wd, ht);
}
extern "C" asm void GetNextPageIdx___Q39textinput12candidatebox10UITextAreaCFl() {
nofralloc
stwu r1, -0xc0(r1)
mflr r0
stw r0, 0xc4(r1)
stfd f31, 0xb0(r1)
psq_st f31, 0xb8(r1), 0, 0
stfd f30, 0xa0(r1)
psq_st f30, 0xa8(r1), 0, 0
stfd f29, 0x90(r1)
psq_st f29, 0x98(r1), 0, 0
stfd f28, 0x80(r1)
psq_st f28, 0x88(r1), 0, 0
stfd f27, 0x70(r1)
psq_st f27, 0x78(r1), 0, 0
stfd f26, 0x60(r1)
psq_st f26, 0x68(r1), 0, 0
stfd f25, 0x50(r1)
psq_st f25, 0x58(r1), 0, 0
stfd f24, 0x40(r1)
psq_st f24, 0x48(r1), 0, 0
stfd f23, 0x30(r1)
psq_st f23, 0x38(r1), 0, 0
addi r11, r1, 0x30
bl _savegpr_24
lfs f0, lbl_81694DA8(r2)
mr r24, r3
lfs f1, 0x1fc(r3)
mr r25, r4
lwz r5, 0xd8(r3)
fdivs f25, f0, f1
lfs f0, lbl_81694DB4(r2)
lwz r5, 0x9c(r5)
lwz r3, 0x38(r3)
lfs f31, 0x4c(r5)
lwz r27, 0x9c(r3)
fcmpo cr0, f1, f0
ble GetNextPageIdx_L1
lfs f28, lbl_81694DAC(r2)
b GetNextPageIdx_L2
GetNextPageIdx_L1:
lfs f28, lbl_81694DB0(r2)
GetNextPageIdx_L2:
fneg f23, f28
lfd f29, lbl_81694DC8(r2)
lfs f30, lbl_81694DBC(r2)
mr r26, r25
slwi r28, r4, 7
lis r31, 0x4330
b GetNextPageIdx_L3
GetNextPageIdx_L4:
lwz r0, 0x1e8(r24)
cmpw r26, r0
bne GetNextPageIdx_L5
li r3, -1
b GetNextPageIdx_L6
GetNextPageIdx_L5:
lwz r0, 0x204(r24)
add r0, r0, r28
addic. r30, r0, 4
bne GetNextPageIdx_L7
lfs f0, lbl_81694D90(r2)
b GetNextPageIdx_L8
GetNextPageIdx_L7:
mr r3, r27
bl GetFont__Q34nw4r3lyt8TextBoxCFv
lfs f26, 0xe4(r27)
mr r29, r3
lfs f24, 0xf0(r27)
lfs f27, lbl_81694D90(r2)
b GetNextPageIdx_L9
GetNextPageIdx_L10:
lwz r12, 0(r29)
fadds f27, f27, f24
mr r3, r29
lwz r12, 0x48(r12)
mtctr r12
bctrl
xoris r0, r3, 0x8000
stw r31, 8(r1)
addi r30, r30, 2
stw r0, 0xc(r1)
lfd f0, 8(r1)
fsubs f0, f0, f29
fadds f27, f27, f0
GetNextPageIdx_L9:
lhz r4, 0(r30)
cmpwi r4, 0
bne GetNextPageIdx_L10
lwz r12, 0(r29)
mr r3, r29
lwz r12, 0xc(r12)
mtctr r12
bctrl
xoris r0, r3, 0x8000
stw r31, 8(r1)
stw r0, 0xc(r1)
lfd f0, 8(r1)
fsubs f0, f0, f29
fdivs f0, f26, f0
fmuls f0, f27, f0
fadds f0, f30, f0
GetNextPageIdx_L8:
fmuls f0, f0, f25
addi r28, r28, 0x80
addi r26, r26, 1
fadds f0, f28, f0
fadds f23, f23, f0
GetNextPageIdx_L3:
fcmpo cr0, f23, f31
cror 2, 0, 2
beq GetNextPageIdx_L4
addi r0, r26, -1
cmpw r0, r25
bne GetNextPageIdx_L11
addi r26, r26, 1
GetNextPageIdx_L11:
addi r3, r26, -1
GetNextPageIdx_L6:
psq_l f31, 0xb8(r1), 0, 0
lfd f31, 0xb0(r1)
psq_l f30, 0xa8(r1), 0, 0
lfd f30, 0xa0(r1)
psq_l f29, 0x98(r1), 0, 0
lfd f29, 0x90(r1)
psq_l f28, 0x88(r1), 0, 0
lfd f28, 0x80(r1)
psq_l f27, 0x78(r1), 0, 0
lfd f27, 0x70(r1)
psq_l f26, 0x68(r1), 0, 0
lfd f26, 0x60(r1)
psq_l f25, 0x58(r1), 0, 0
lfd f25, 0x50(r1)
psq_l f24, 0x48(r1), 0, 0
lfd f24, 0x40(r1)
psq_l f23, 0x38(r1), 0, 0
addi r11, r1, 0x30
lfd f23, 0x30(r1)
bl _restgpr_24
lwz r0, 0xc4(r1)
mtlr r0
addi r1, r1, 0xc0
blr
s32 UITextArea::GetNextPageIdx_(s32 idx) const {
f32 areaPaneWidth = mpTextAreaPane->getPane()->GetSize().width;
nw4r::lyt::TextBox* textBox = mpTextBoxPane[0]->getTextPane();
f32 widthScale = GetWidthScale_();
f32 margin = GetMargin_();
f32 xOffset = -margin;
s32 candidateIndex = idx;
while (xOffset <= areaPaneWidth) {
if (candidateIndex == mnCandidateNum) {
return -1;
}
f32 textWidth = calcStringWidth(mpCandidates->szwcPredicted[candidateIndex], textBox);
xOffset += margin + textWidth * widthScale;
++candidateIndex;
}
if (candidateIndex - 1 == idx) {
++candidateIndex;
}
return candidateIndex - 1;
}
s32 UITextArea::GetPrevPageIdx_(s32 idx) const {
// NONMATCHING - only regswaps, hopefully
f32 areaPaneWidth = mpTextAreaPane->getPane()->GetSize().width;
nw4r::lyt::TextBox* textBox = mpTextBoxPane[0]->getTextPane();
@@ -1452,7 +1326,6 @@ namespace textinput {
}
void UITextArea::StartScroll(s32 steps) {
// NONMATCHING - only regswaps, hopefully
f32 acc = 0.0f;
f32 widthScale = GetWidthScale_();
f32 margin = GetMargin_();
@@ -1470,7 +1343,7 @@ namespace textinput {
}
}
mScrollAnimation.startAnm(this, 0.0f, -acc, 15.0f, this);
mScrollAnimation.startAnm(this, 0.0f, -acc, 15.0f, reinterpret_cast<void*>(steps));
}
void UITextArea::StartScrollToIdx(s32 idx) {

View File

@@ -606,8 +606,9 @@ namespace textinput {
CellPhoneAnmPane* pane = new (MEMAllocFromAllocator(allocator, sizeof(CellPhoneAnmPane)))
CellPhoneAnmPane(getPane(csPaneNameNormalAnimationKey[i].name), NULL);
nw4r::ut::List_Append(&mAnmPanes, pane);
const char* animationKey;
const PaneNameToAnimationKey& paneName = csPaneNameNormalAnimationKey[i];
const char* animationKey = paneName.animationKey;
animationKey = paneName.animationKey;
for (u16 j = 0; j < 5; ++j) {
void* resource = mpMultiArcResourceAccessor->GetResource(0, csAninationFileForControlKey[j].filename);

View File

@@ -284,122 +284,12 @@ void Base::inputCharDefault_(wchar_t character, u32 modifiers) {
meScrollFlag = SF_ScrollOn;
}
extern "C" asm void draw__Q39textinput9inputform12LayoutByNW4RFv() {
nofralloc
stwu r1, -0x50(r1)
mflr r0
stw r0, 0x54(r1)
stw r31, 0x4c(r1)
stw r30, 0x48(r1)
mr r30, r3
addi r3, r3, 0x218
bl draw__Q39textinput11nw4rmanager6LayoutFv
lwz r12, 0x218(r30)
addi r3, r30, 0x218
lwz r12, 0x28(r12)
mtctr r12
bctrl
lwz r4, 0x10(r3)
li r5, 1
lwz r3, 0x21c(r30)
lbz r0, 0xcd(r4)
lwz r4, 0x2c0(r30)
stb r0, 0x1c8(r30)
lwz r3, 0x10(r3)
lwz r12, 0(r3)
lwz r12, 0x3c(r12)
mtctr r12
bctrl
lwz r12, 0x218(r30)
mr r6, r3
addi r3, r30, 0x218
addi r4, r30, 0x130
lwz r12, 0x70(r12)
addi r5, r30, 0x230
addi r6, r6, 0x84
mtctr r12
bctrl
lwz r12, 0(r30)
mr r3, r30
lwz r12, 0x188(r12)
mtctr r12
bctrl
stw r3, 0x18(r1)
addi r3, r30, 0x10
lfs f2, 0x188(r30)
stw r4, 0x1c(r1)
lfs f1, 0x18(r1)
bl SetCursor__Q34nw4r2ut10CharWriterFff
lwz r12, 0(r30)
mr r3, r30
lwz r12, 0x188(r12)
mtctr r12
bctrl
lfs f0, lbl_81694D28(r0)
stw r3, 0x20(r1)
stfs f0, 0x30(r1)
stfs f0, 0x34(r1)
stfs f0, 0x38(r1)
stfs f0, 0x3c(r1)
lwz r12, 0(r30)
stw r3, 8(r1)
mr r3, r30
lwz r12, 0x184(r12)
stw r4, 0x24(r1)
stw r4, 0xc(r1)
mtctr r12
bctrl
stw r3, 0x10(r1)
lfs f1, 8(r1)
stw r4, 0x14(r1)
lfs f5, 0x10(r1)
lfs f4, 0x14(r1)
stfs f5, 0x30(r1)
lfs f0, 0xc(r1)
stfs f4, 0x3c(r1)
lfs f3, 0x128(r30)
lfs f2, 0x120(r30)
stw r3, 0x28(r1)
fsubs f2, f3, f2
stw r4, 0x2c(r1)
fmuls f1, f1, f2
fadds f1, f5, f1
stfs f1, 0x38(r1)
lfs f2, 0x124(r30)
lfs f1, 0x12c(r30)
fsubs f1, f2, f1
fmuls f0, f0, f1
fadds f0, f4, f0
stfs f0, 0x34(r1)
lwz r3, 0x164(r30)
lwz r12, 0(r3)
lwz r12, 0x7c(r12)
mtctr r12
bctrl
lwz r12, 0x5c(r30)
mr r31, r3
addi r3, r30, 0x10
addi r4, r1, 0x30
lwz r12, 0x20(r12)
mtctr r12
bctrl
lwz r12, 0(r30)
mr r3, r30
mr r4, r31
lwz r12, 0x174(r12)
mtctr r12
bctrl
lwz r12, 0x5c(r30)
addi r3, r30, 0x10
lwz r12, 0x24(r12)
mtctr r12
bctrl
lwz r0, 0x54(r1)
lwz r31, 0x4c(r1)
lwz r30, 0x48(r1)
mtlr r0
addi r1, r1, 0x50
blr
void LayoutByNW4R::draw() {
nw4rmanager::Layout::draw();
muGlobalAlpha = getLayout()->GetRootPane()->GetAlpha();
nw4r::lyt::Pane* textBox = mpLayout->GetRootPane()->FindPaneByName(static_cast<const char*>(mpLayoutData), true);
AdjustPaneMtx(mMtx.m, mDrawInfo, textBox->GetGlobalMtx());
Base::draw();
}
void Base::calcCursorTimer() {
muCursorTimer += 8;
@@ -1046,17 +936,17 @@ void Base::onCommand(INPUT_COMMAND command, void* data) {
mbPredictOn = enabled;
if (meLanguage == KR) mpManager->getPCKeyboard()->refreshState();
}
tistring::Decolated::TranslateMode predictionFixedMode = mpString->getTranslateMode();
const tistring::Decolated::TranslateMode predictionUnfixMode = mpUnfixString->getTranslateMode();
s32 predictionFixedMode = mpString->getTranslateMode();
s32 predictionUnfixMode = mpUnfixString->getTranslateMode();
mpString->initKanaConverter();
mpUnfixString->initKanaConverter();
if (meLanguage == KR) {
if (predictionFixedMode != tistring::Decolated::TM_Direct) predictionFixedMode = tistring::Decolated::TM_Hangul;
} else if (meLanguage == CN) predictionFixedMode = tistring::Decolated::TM_Direct;
mpString->getCursorPos();
mpString->setTranslateMode(predictionFixedMode);
mpString->setTranslateMode(static_cast<tistring::Decolated::TranslateMode>(predictionFixedMode));
mpString->getCursorPos();
mpUnfixString->setTranslateMode(predictionUnfixMode);
mpUnfixString->setTranslateMode(static_cast<tistring::Decolated::TranslateMode>(predictionUnfixMode));
switch (mePredictMode) {
case PM_Atok:
if (!mbPredictOn) {

View File

@@ -557,10 +557,11 @@ void WithZi::setCurrentWord(const wchar_t* word) {
LatestWord[1] = 0;
return;
}
mbContextChanged = 1;
wchar_t* currentWord;
const wchar_t* source;
u32 length;
s32 copied;
mbContextChanged = 1;
length = 0;
currentWord = reinterpret_cast<wchar_t*>(LatestWord);
for (; *currentWord != 0 && *currentWord != 0x20;
@@ -571,14 +572,10 @@ void WithZi::setCurrentWord(const wchar_t* word) {
}
}
copied = 0;
const wchar_t* source = word;
u32 destinationOffset = length;
source = word;
for (; *source != 0 && length < 0x3f;) {
wchar_t character = word[copied];
++length;
LatestWord[length++] = word[copied++];
++source;
++copied;
LatestWord[destinationOffset++] = character;
}
LatestWord[length] = 0;
mCurrentWordLength = copied;

View File

@@ -327,15 +327,20 @@ namespace ipl {
mpDialogLayout->calc();
}
static inline math::VEC2 scaledPageOffset(f32 scale) {
math::VEC2 result;
result.y = sPageOffset.y * scale;
result.x = sPageOffset.x * scale;
return result;
}
void Address::draw() {
if (System::getSceneManager()->onDrawLayer(DRAW_LAYER_2)) {
utility::Graphics::setOrtho(0);
nw4r::lyt::Pane* pane = mpLayout->FindPaneByName("N_note_a");
for (int i = mNextPageNum; i >= 1; i--) {
math::VEC2 trans;
trans.y = sPageOffset.y * i;
trans.x = sPageOffset.x * i;
math::VEC2 trans = scaledPageOffset(i);
pane->SetTranslate(trans);
pane->CalculateMtx(*mpLayout->getDrawInfo());
mpLayout->draw(pane);
@@ -536,11 +541,16 @@ namespace ipl {
}
}
static inline nw4r::math::_VEC2 negativeOffset(const nw4r::math::_VEC2& value) {
f32 negativeY = -value.y;
f32 negativeX = -value.x;
nw4r::math::_VEC2 result = {negativeX, negativeY};
return result;
}
void Address::stt_cover_backward() {
if (!mpLayout->getAnim(4)->isPlaying()) {
math::VEC2 offset;
offset.x = -sPageOffset.x;
offset.y = -sPageOffset.y;
math::VEC2 offset = negativeOffset(sPageOffset);
add_translate(mpLayout->FindPaneByName("N_note_base"), offset);
mbCover = true;
mNextPageNum++;
@@ -582,10 +592,20 @@ namespace ipl {
}
}
static inline nw4r::math::_VEC2 previousPageOffset() {
f32 negativeY = -sPageOffset.y;
f32 negativeX = -sPageOffset.x;
nw4r::math::_VEC2 result;
result.y = negativeY;
result.x = negativeX;
return result;
}
void Address::stt_backward() {
if (!mpLayout->getAnim(5)->isPlaying()) {
mNextPageNum++;
add_translate(mpLayout->FindPaneByName("N_note_base"), -sPageOffset);
math::VEC2 offset = previousPageOffset();
add_translate(mpLayout->FindPaneByName("N_note_base"), offset);
set_page_text("T_nmbr_b", mPage + 1);
for (u32 i = 0; i < BTN_MAX; i++) {
@@ -602,9 +622,17 @@ namespace ipl {
}
}
static inline nw4r::math::VEC2 loopPageOffset() {
nw4r::math::VEC2 result;
result.y = -sPageOffset.y;
result.x = -sPageOffset.x;
return result;
}
void Address::stt_loop_forward() {
if (!mpLayout->getAnim(4)->isPlaying()) {
add_translate(mpLayout->FindPaneByName("N_note_base"), -sPageOffset * PAGE_MAX);
math::VEC2 offset = loopPageOffset() * PAGE_MAX;
add_translate(mpLayout->FindPaneByName("N_note_base"), offset);
set_page_text("T_nmbr_b", mPage + 1);
reset_gui(false);

View File

@@ -595,6 +595,7 @@ create_mode_done:
}
void ipl::scene::AddressEdit::stt_wait_decide_anm() {
nw4r::lyt::Pane* textPane;
bool complete = true;
ipl::scene::Button* button = static_cast<ipl::scene::Button*>(ipl::System::getScene(5));
for (s32 i = 0; i < 5; ++i) {
@@ -645,7 +646,7 @@ void ipl::scene::AddressEdit::stt_wait_decide_anm() {
animator = mpBackgroundLayout->getAnim(0);
animator->initFrame();
animator->restart();
nw4r::lyt::Pane* textPane = mpNameLayout->getNW4RLyt()->GetRootPane()->FindPaneByName(
textPane = mpNameLayout->getNW4RLyt()->GetRootPane()->FindPaneByName(
"T_question_00", true);
set_textbox(textPane, ipl::System::getMessage(0x32));
textPane = mpNameLayout->getNW4RLyt()->GetRootPane()->FindPaneByName("T_name_00", true);
@@ -2209,86 +2210,62 @@ done:
return;
}
void ipl::scene::AddressEdit::start_left_event(
const char* paneName) {
void ipl::scene::AddressEdit::start_left_event(const char* paneName) {
int buttonNo = get_button_no(paneName);
switch (mState) {
case 0x22:
goto state22;
case 0:
switch (buttonNo) {
case 0: {
if (mpFriendCache->getInfo(mSelectedFriend).attr.status != 2) {
break;
}
s32* count = &mPointCount[buttonNo];
if (*count == 1) {
layout::Animator* animator = mpCodeLayout->getAnim(buttonNo + 11);
animator->initFrame();
animator->restart();
}
if (*count > 0) {
--*count;
}
break;
}
case 3:
goto state0Button3;
case 0:
goto state0Friend;
if (mPointCount[buttonNo] == 1) {
mpBalloon->fadeoutForce();
}
case 1:
case 2:
goto state0Common;
case 2: {
s32* count = &mPointCount[buttonNo];
if (*count == 1) {
layout::Animator* animator = mpCodeLayout->getAnim(buttonNo + 11);
animator->initFrame();
animator->restart();
}
if (*count > 0) {
--*count;
}
break;
}
default:
break;
}
break;
case 0x22:
switch (buttonNo) {
case 3: {
s32* count = &mPointCount[buttonNo];
if (*count == 1) {
mpBalloon->fadeoutForce();
}
--*count;
break;
}
}
break;
default:
break;
}
goto done;
state0Friend: {
u32 friendIndex = mSelectedFriend;
u32 friendType = mpFriendCache->getInfo(friendIndex).attr.status;
if (friendType != 2) {
goto done;
}
s32* count = &mPointCount[buttonNo];
if (*count == 1) {
ipl::layout::Object* layout = mpCodeLayout;
ipl::layout::Animator* pane = layout->getAnim(buttonNo + 0xb);
pane->initFrame();
pane->restart();
}
if (*count > 0) {
--*count;
}
goto done;
}
state0Button3: {
s32* count = &mPointCount[buttonNo];
if (*count == 1) {
(mpBalloon)->fadeoutForce();
}
--*count;
goto done;
}
state0Common: {
s32* count = &mPointCount[buttonNo];
if (*count == 1) {
ipl::layout::Object* layout = mpCodeLayout;
ipl::layout::Animator* pane = layout->getAnim(buttonNo + 0xb);
pane->initFrame();
pane->restart();
}
if (*count > 0) {
--*count;
}
goto done;
}
state22:
if (buttonNo != 3) {
goto done;
}
{
s32* count = &mPointCount[buttonNo];
if (*count == 1) {
(mpBalloon)->fadeoutForce();
}
--*count;
}
done:
return;
}
void ipl::scene::AddressEdit::start_trig_event(

View File

@@ -697,16 +697,19 @@ extern "C" s32 CardSequence_813D3424(s32 slot, s32 fileNo, CARDDir* dir) {
s32 sectorSize;
CARDFileInfo fileInfo;
} local;
s32 result = CARDFastOpen(slot, fileNo, &local.fileInfo);
s32 result;
u32 iconAddressBase;
s32 iconAddressOffset;
result = CARDFastOpen(slot, fileNo, &local.fileInfo);
if (result < 0) {
return result;
}
u32 bannerImageSize = 0;
s32 bannerImageSize = 0;
u8 format = dir->bannerFormat & 3;
u32 iconAddress = dir->iconAddr;
u32 iconAddressBase = iconAddress & 0xFFFFFE00;
s32 iconAddressOffset = iconAddress - iconAddressBase;
iconAddressBase = iconAddress & 0xFFFFFE00;
iconAddressOffset = iconAddress - iconAddressBase;
switch (format) {
case 1: {
@@ -827,7 +830,7 @@ iconSpeedDone:
sThread->icons[slot][fileNo].anmDelta = 1;
}
s32 totalImageSize = bannerImageSize + iconImageSize;
s32 totalImageSize = iconImageSize + bannerImageSize;
u32 transferSize = (totalImageSize + iconAddressOffset + 0x1FF) & 0xFFFFFE00;
result = CARDGetSectorSize(slot, (u32*)&local.sectorSize);
if (result < 0) {
@@ -854,9 +857,14 @@ iconSpeedDone:
(u8*)sThread->imageReadBuffer + iconAddressOffset,
totalImageSize);
DCStoreRange(sThread->images[slot][fileNo], transferSize);
result = 0;
}
}
if (result < 0) {
goto closeFile;
}
iconAddress = dir->commentAddr;
iconAddressBase = iconAddress & 0xFFFFFE00;
s32 commentDataOffset = iconAddress - iconAddressBase;
@@ -865,26 +873,30 @@ iconSpeedDone:
if (result < 0) {
goto clearComment;
}
if ((s32)iconAddressBase >= 0) {
if ((s32)iconAddressBase < 0) {
result = 0;
} else {
u32 fileSize = (u32)dir->length * local.commentSectorSize;
if (iconAddressBase <= fileSize) {
u32 endOffset = iconAddressBase + imageSize;
if ((s32)endOffset >= 0 && endOffset <= fileSize) {
result = CARDRead(&local.fileInfo, sThread->commentBuffer, imageSize,
iconAddressBase);
if (result < 0) {
goto clearComment;
}
memset(sThread->comments[slot][fileNo], 0, 0x40);
memcpy(sThread->comments[slot][fileNo],
sThread->commentBuffer + commentDataOffset, 0x40);
result = 0;
goto commentDone;
}
if (iconAddressBase > fileSize) {
result = 0;
goto clearComment;
}
u32 endOffset = iconAddressBase + imageSize;
if ((s32)endOffset < 0 || endOffset > fileSize) {
result = 0;
goto clearComment;
}
result = CARDRead(&local.fileInfo, sThread->commentBuffer, imageSize,
iconAddressBase);
if (result < 0) {
goto clearComment;
}
memset(sThread->comments[slot][fileNo], 0, 0x40);
memcpy(sThread->comments[slot][fileNo],
sThread->commentBuffer + commentDataOffset, 0x40);
result = 0;
goto commentDone;
}
result = 0;
goto clearComment;
clearComment:
memset(sThread->comments[slot][fileNo], 0, 0x40);

View File

@@ -1,4 +1,4 @@
#define IPL_CHANNEL_TITLE_NOVTABLE
#define IPL_GC_SAVEDATA_NOVTABLE
#include "scene/memoryCard/iplGCSaveData.h"
#include "scene/memoryCard/iplMemoryCard.h"
@@ -6,7 +6,6 @@
#include "iplSound.h"
#include "iplSystem.h"
#undef IPL_CHANNEL_TITLE_NOVTABLE
namespace ipl {
namespace scene {

View File

@@ -1,7 +1,7 @@
#define IPL_MEMORYCARD_BASE_CTOR_OUT_OF_LINE
#define IPL_MEMORYCARD_BASE_EVENT_OUT_OF_LINE
#define IPL_GCW_PANEMANAGER_CTOR_OUT_OF_LINE
#define IPL_GCW_INTP_CTOR_OUT_OF_LINE
#define IPL_GC_WINDOW_NOVTABLE
#define IPL_GC_WINDOW_CPP
#include "scene/memoryCard/iplGCWindow.h"
#include "scene/memoryCard/iplMemoryCard.h"
@@ -14,10 +14,6 @@
#include <cstring>
namespace ipl {
namespace math {
template <typename T>
LinearIntp<T>::LinearIntp() {}
}
namespace scene {
struct TextboxToMessageID {
const char* name;
@@ -50,8 +46,15 @@ static const TextboxToMessageID scTextboxToMessageID[3] = {
};
static const char* scButtonName[3] = {"B_Move_00", "B_Copy_00", "B_Del_00"};
struct DigitTable {
wchar_t w[10];
};
static const DigitTable scNumber = {{L'0', L'1', L'2', L'3', L'4', L'5', L'6', L'7', L'8', L'9'}};
GCWindow::GCWindow(EGG::Heap* heap, nand::LayoutFile* layoutFile, const char* directory, const char* fileName)
: MemoryBase(), MemCardEventHandler(), mState(0), mLinearInterp(), mCardState(0), mCardIndex(0), mOperation(0), mActive(false),
: MemoryBase(), MemCardEventListener(), mState(0), mLinearInterp(), mCardState(0), mCardIndex(0), mOperation(0), mActive(false),
mWaiting(false) {
mpLayout = new layout::Object(heap, layoutFile, directory, fileName);
add_animation(scAnmName, 0x10);
@@ -102,15 +105,15 @@ void GCWindow::init(const math::VEC3& translate, MemoryCardManager* manager, u8
mpPaneManager->initPane(mpLayout->getNW4RLyt()->GetRootPane()->FindPaneByName(scButtonName[i], true));
}
int blocks = mpMemoryCardManager->getBlocks(cardState, cardIndex);
wchar_t digits[10] = {L'0', L'1', L'2', L'3', L'4', L'5', L'6', L'7', L'8', L'9'};
DigitTable digitTable = scNumber;
int blockCount = static_cast<u16>(blocks);
wchar_t decimal[5] = {0};
int skipCount = 0;
wchar_t blockText[5] = {0};
decimal[0] = digits[blockCount / 1000];
decimal[1] = digits[(blockCount / 100) % 10];
decimal[2] = digits[(blockCount / 10) % 10];
decimal[3] = digits[blockCount % 10];
decimal[0] = digitTable.w[blockCount / 1000];
decimal[1] = digitTable.w[(blockCount / 100) % 10];
decimal[2] = digitTable.w[(blockCount / 10) % 10];
decimal[3] = digitTable.w[blockCount % 10];
for (i = 0; i < 3; i++) {
if (decimal[i] != L'0') {
break;
@@ -785,7 +788,6 @@ SavedataEditWindow::SavedataEditWindow(EGG::Heap* heap, nand::LayoutFile* layout
add_animation("it_DataDetail_a_SeenOutNo.brlan", scAnmName[0].groupName);
add_animation("it_DataDetail_a_Wait.brlan", scAnmName[15].groupName);
mpLayout->finishBinding();
set_visible("N_Wait", false);
set_visible("T_Block_01", false);
mpEvent = new MemoryBaseEvent(this);
mpPaneManager = new gui::PaneManager(mpEvent, mpLayout->getDrawInfo(), NULL, NULL, true);

View File

@@ -1,8 +1,6 @@
#define IPL_MEMORY_CARD_CPP
#define IPL_MEMORYCARD_BASE_OUT_OF_LINE
#define IPL_CHANNEL_TITLE_NOVTABLE
#define IPL_MEMORY_CARD_NOVTABLE
#include "scene/memoryCard/iplMemoryCard.h"
#undef IPL_CHANNEL_TITLE_NOVTABLE
#include "scene/memoryCard/iplGCWindow.h"
#include "scene/memoryCard/iplGCSaveData.h"
@@ -82,6 +80,53 @@ namespace ipl {
"B_ArwR", "B_ArwL", "B_SelectWii_00", "B_SelectSd_00",
};
struct DigitTable {
wchar_t w[10];
};
static const DigitTable scNumber = {{L'0', L'1', L'2', L'3', L'4', L'5', L'6', L'7', L'8', L'9'}};
class __declspec(novtable) MemoryCardManagerImpl : public MemoryCardManager {
public:
virtual void onMount(u8) {}
virtual void onUnmount(u8) {}
virtual void onAttach(u8) {}
virtual void onDetach(u8) {}
virtual void onCheck(u8) {}
virtual void onFormat(u8) {}
virtual void onRepair(u8) {}
virtual void onRead(u8) {}
virtual void onWrite(u8) {}
virtual void onOpen(u8) {}
virtual void onClose(u8) {}
virtual void onCreate(u8) {}
virtual void onDelete(u8) {}
virtual void onCopy(u8) {}
virtual void onMove(u8) {}
virtual void onRename(u8) {}
virtual void onVerify(u8) {}
virtual void onCommit(u8) {}
virtual void onProbe(u8) {}
virtual void onMountAsync(u8) {}
virtual void onUnmountAsync(u8) {}
virtual void onCheckAsync(u8) {}
virtual void onFormatAsync(u8) {}
virtual void onReadAsync(u8) {}
virtual void onWriteAsync(u8) {}
virtual void onCreateAsync(u8) {}
virtual void onDeleteAsync(u8) {}
virtual void onCopyAsync(u8) {}
virtual void onMoveAsync(u8) {}
virtual void onRenameAsync(u8) {}
virtual void onVerifyAsync(u8) {}
virtual void onCommitAsync(u8) {}
virtual void onProbeAsync(u8) {}
virtual void onFreeBlocks(u8) {}
virtual void onGetLength(u8) {}
virtual void onSetAttrib(u8) {}
virtual void onGetAttrib(u8) {}
};
MemoryCard::MemoryCard(EGG::Heap* heap)
: Base(heap), MemoryBase(), mState(2), mPrevState(2), mSlot(0), mIconIndex(-15), mIconCount(0),
mShowArwR(0), mShowArwL(0), mpEvent(NULL), mpFocusSaveData(NULL) {
@@ -90,7 +135,6 @@ namespace ipl {
nw4r::ut::List_Init(&mBalloonList, 0);
}
MemoryBase::~MemoryBase() {}
void MemoryCard::prepare() {
System::getBS2Manager()->abort();
@@ -146,7 +190,7 @@ namespace ipl {
mpGCWindow = new GCWindow(getSceneHeap(), unk_0x08, "arc", "it_CubeDetail_a.brlyt");
mpGCWindow->do_animation(0);
MemoryCardManager* manager = new MemoryCardManager();
MemoryCardManager* manager = new MemoryCardManagerImpl();
mpManager = manager;
mpManager->setEventHandler(mpGCWindow);
mpGCWindow->mpMemoryCardManager = mpManager;
@@ -495,19 +539,14 @@ namespace ipl {
return;
}
u32 freeBlocks = mpManager->getFreeBlocks(slot);
wchar_t digits[5];
wchar_t digitTable[10] = {L'0', L'1', L'2', L'3', L'4', L'5', L'6', L'7', L'8', L'9'};
digits[0] = L'\0';
digits[1] = L'\0';
digits[2] = L'\0';
digits[3] = L'\0';
digits[4] = L'\0';
DigitTable digitTable = scNumber;
wchar_t digits[5] = {0};
wchar_t text[0x40] = L"";
int blocks = static_cast<u16>(freeBlocks);
digits[0] = digitTable[blocks / 1000];
digits[1] = digitTable[blocks / 100 % 10];
digits[2] = digitTable[blocks / 10 % 10];
digits[3] = digitTable[blocks % 10];
digits[0] = digitTable.w[blocks / 1000];
digits[1] = digitTable.w[blocks / 100 % 10];
digits[2] = digitTable.w[blocks / 10 % 10];
digits[3] = digitTable.w[blocks % 10];
int zeroOffset;
for (zeroOffset = 0; zeroOffset < 3; zeroOffset++) {
@@ -704,3 +743,7 @@ namespace ipl {
}
}
// Original .sdata2 ends with the PPC int-to-float conversion constant.
extern "C" const f64 sMemoryCardIntToFloat = 4503601774854144.0;

View File

@@ -1,4 +1,5 @@
#define IPL_MEMORYCARD_BASE_IMPLEMENTATION
#define IPL_MEMORYCARD_BASE_CPP
#include "scene/memoryCard/iplMemoryCardBase.h"
#include "scene/settingSelect/iplSettingSelect.h"
#include "scene/settingSelect/iplSettingButton.h"
@@ -130,7 +131,7 @@ void MemoryBase::set_textbox(const char* paneName, u32 message) {
void MemoryBase::set_textbox(const char* paneName, u32 message, int animationIndex, int frame) {
Anm* animation = get_animation(animationIndex);
if (animation->mAnim->getCurrentFrame() >= frame) {
if (animation->mAnim->getCurrentFrame() >= (f32)frame) {
set_textbox(paneName, message);
}
}
@@ -141,7 +142,7 @@ void MemoryBase::set_textbox(const char* paneName, const wchar_t* text, f32 widt
while (length != 0) {
textBox->SetString(text, 0, length);
textBox->CalculateMtx(*mpLayout->getDrawInfo());
nw4r::ut::Rect bounds = textBox->GetTextDrawRect(*mpLayout->getDrawInfo());
const nw4r::ut::Rect& bounds = textBox->GetTextDrawRect(*mpLayout->getDrawInfo());
if (bounds.right - bounds.left < width &&
-1.0f * (bounds.bottom - bounds.top) < height) {
break;

View File

@@ -145,15 +145,14 @@ bool MemoryCardManager::isDistSlot(u8 slot, long* state) {
bool MemoryCardManager::isMoveEnable(u8 slot, u32 index, long* code) {
CardDirectory* dirs = reinterpret_cast<CardDirectory*>(memorycard::getCardDirState());
memorycard::CardState* states = memorycard::getCardSlotState();
bool enabled = false;
int file = mFile[slot][index].fileNo;
u32 file = mFile[slot][index].fileNo;
memorycard::FileInfo* dir = NULL;
memorycard::CardState* destination = NULL;
long result = file;
long result;
bool enabled = false;
if (isDistSlot(slot, NULL) &&
((dir = &dirs[slot][file])->canMove != 0) &&
states[slot].key == (destination = &states[slot ^ 1])->key &&
destination->freeBlocks >= dir->size && destination->unk_0x0E != 0 &&
states[slot].key == states[slot ^ 1].key &&
states[slot ^ 1].freeBlocks >= dir->size && states[slot ^ 1].unk_0x0E != 0 &&
dir->unk_0x06 == 0) {
result = -0x15;
enabled = true;
@@ -169,9 +168,9 @@ bool MemoryCardManager::isMoveEnable(u8 slot, u32 index, long* code) {
}
} else if ((dir = &dirs[slot][file])->canMove == 0) {
result = -0x1a;
} else if (states[slot].key != (destination = &states[slot ^ 1])->key) {
} else if (states[slot].key != states[slot ^ 1].key) {
result = -0x1b;
} else if (destination->freeBlocks < dir->size || destination->unk_0x0E == 0) {
} else if (states[slot ^ 1].freeBlocks < dir->size || states[slot ^ 1].unk_0x0E == 0) {
result = -0x19;
} else if (dir->unk_0x06 != 0) {
result = -0x18;
@@ -186,15 +185,14 @@ bool MemoryCardManager::isMoveEnable(u8 slot, u32 index, long* code) {
bool MemoryCardManager::isCopyEnable(u8 slot, u32 index, long* code) {
CardDirectory* dirs = reinterpret_cast<CardDirectory*>(memorycard::getCardDirState());
memorycard::CardState* states = memorycard::getCardSlotState();
bool enabled = false;
int file = mFile[slot][index].fileNo;
u32 file = mFile[slot][index].fileNo;
memorycard::FileInfo* dir = NULL;
memorycard::CardState* destination = NULL;
long result = file;
long result;
bool enabled = false;
if (isDistSlot(slot, NULL) &&
((dir = &dirs[slot][file])->canCopy != 0) &&
states[slot].key == (destination = &states[slot ^ 1])->key &&
destination->freeBlocks >= dir->size && destination->unk_0x0E != 0 &&
states[slot].key == states[slot ^ 1].key &&
states[slot ^ 1].freeBlocks >= dir->size && states[slot ^ 1].unk_0x0E != 0 &&
dir->unk_0x06 == 0) {
result = -0x15;
enabled = true;
@@ -210,9 +208,9 @@ bool MemoryCardManager::isCopyEnable(u8 slot, u32 index, long* code) {
}
} else if ((dir = &dirs[slot][file])->canCopy == 0) {
result = -0x1a;
} else if (states[slot].key != (destination = &states[slot ^ 1])->key) {
} else if (states[slot].key != states[slot ^ 1].key) {
result = -0x1b;
} else if (destination->freeBlocks < dir->size || destination->unk_0x0E == 0) {
} else if (states[slot ^ 1].freeBlocks < dir->size || states[slot ^ 1].unk_0x0E == 0) {
result = -0x19;
} else if (dir->unk_0x06 != 0) {
result = -0x18;
@@ -253,10 +251,10 @@ void MemoryCardManager::update_icon_anm() {
for (int remaining = 0x7f; remaining > 0; remaining--, index++) {
u32 file = mFile[slot][index].fileNo;
if (file < 0x7f && dirs[slot][file].fileNo != 0) {
memorycard::IconState* icon = &icons[slot][file];
memorycard::IconState* icon = icons[slot] + file;
s32 frame = mFileCell[slot][file].iconAnmCounter + icon->anmDelta;
mFileCell[slot][file].iconAnmCounter = frame;
if ((s16)frame >= icon->anmMax) {
if ((s16)frame >= icons[slot][file].anmMax) {
if (icon->anmType == 4) {
mFileCell[slot][file].iconAnmCounter = icons[slot][file].anmMax - icon->unk_0x07 - 1;
icon->anmDelta = -1;
@@ -342,24 +340,24 @@ void MemoryCardManager::update_change_cardstate(u8 slot) {
}
GXTexObj* MemoryCardManager::create_icon(u8 slot, s16 index) {
CardIcons* icons = reinterpret_cast<CardIcons*>(memorycard::getIconStateArray());
memorycard::IconState (*icons)[0x7f] = reinterpret_cast<memorycard::IconState(*)[0x7f]>(memorycard::getIconStateArray());
int total = 0;
int file = mFile[slot][index].fileNo;
u32 file = mFile[slot][index].fileNo;
s16 frame = 0;
do {
u32 shift = frame;
u32 shift = frame << 1;
frame++;
total += ((icons[slot][file].anmFrameBits >> ((shift & 0x1f) << 1)) & 3) * 4;
total += ((icons[slot][file].anmFrameBits >> shift) & 3) * 4;
if (mFileCell[slot][file].iconAnmCounter <= total) {
break;
}
} while (frame < 9);
} while (frame <= 8);
return _create_icon(slot, file, frame - 1);
}
GXTexObj* MemoryCardManager::create_icon(u8 slot, s16 index, long start) {
memorycard::getIconStateArray();
int file = mFile[slot][index].fileNo;
u32 file = mFile[slot][index].fileNo;
return _create_icon(slot, file, 0);
}
@@ -385,7 +383,7 @@ GXTexObj* MemoryCardManager::_create_icon(u8 slot, s16 file, long start) {
}
const wchar_t* MemoryCardManager::getComment(u8 slot, s16 index, int which) {
int file = mFile[slot][index].fileNo;
u32 file = mFile[slot][index].fileNo;
wmemset(mFileCell[slot][file].comment[which], 0, 0x40);
char comment[33] = {0};
const char* comments = memorycard::getIconComment(slot, file);
@@ -427,7 +425,7 @@ const wchar_t* MemoryCardManager::getComment(u8 slot, s16 index, int which) {
GXTexObj* MemoryCardManager::create_banner(u8 slot, s16 index) {
CardDirectory* dirs = reinterpret_cast<CardDirectory*>(memorycard::getCardDirState());
CardIcons* icons = reinterpret_cast<CardIcons*>(memorycard::getIconStateArray());
int file = mFile[slot][index].fileNo;
u32 file = mFile[slot][index].fileNo;
if (dirs[slot][file].fileNo == 0 || !icons[slot][file].bannerEnable) {
return NULL;
}

View File

@@ -220,8 +220,8 @@ namespace ipl {
void SDChannelSelect::create() {
mpSDWorker = new (System::getMem2App(), 4) NandSDWorker();
mpWorkerHeap = (EGG::Heap*)System::getMem2App()->alloc(0x3EA60, 0x40);
mpThumbnailWorkHeap = (EGG::Heap*)System::getMem2App()->alloc(
MEMCalcHeapSizeForUnitHeap(0x19620, 0x60, 0x20) + 0x40000, 0x40);
u32 thumbnailHeapSize = MEMCalcHeapSizeForUnitHeap(0x19620, 0x60, 0x20) + 0x40000;
mpThumbnailWorkHeap = (EGG::Heap*)System::getMem2App()->alloc(thumbnailHeapSize, 0x40);
mpSDWorker->create(mpWorkerHeap, NULL, mpThumbnailWorkHeap, 0x12);
if (System::getSaveData()->didntGotoSDMenu() == FALSE) {
@@ -1275,12 +1275,17 @@ namespace ipl {
}
bool SDChannelSelect::isCurrentTitleUsageEnough(const s32* usage) const {
s32 blocks = mSecondTitleCount;
s32 bytes = mFirstTitleCount;
ESTitleId currentTitleId = SCGetTmpTitleID();
u32 titleCount = mNandTitleCount;
s32 bytes;
u32 titleCount;
s32 blocks;
ESTitleId currentTitleId;
u32 index;
bytes = mFirstTitleCount;
blocks = mSecondTitleCount;
currentTitleId = SCGetTmpTitleID();
titleCount = mNandTitleCount;
for (index = 0; index < titleCount; ++index) {
if (mpNandTitleInfo[index].curTitleId == currentTitleId) {
break;
@@ -1296,7 +1301,6 @@ namespace ipl {
}
return false;
}
void SDChannelSelect::getCurrentTitleUsage(s32* bytes, s32* blocks) const {
*bytes = mFirstTitleCount;
*blocks = mSecondTitleCount;
@@ -1595,8 +1599,8 @@ namespace ipl {
}
bool SDChannelSelect::findAdjacentChannel(int direction, int* page, int* index) const {
int currentPage;
int slotCount;
int currentPage;
int currentSlot;
currentPage = mCurrentPage;
currentSlot = currentPage * MAX_CHANNEL_INDEX + mCurrentChannelIndex;
@@ -1929,10 +1933,11 @@ namespace ipl {
SDChannelObj* channel = NULL;
System::getSaveData()->setLastSDPrevPage(mCurrentPage);
while (channel = static_cast<SDChannelObj*>(nw4r::ut::List_GetNext(&mChannelObjects, NULL)),
while (channel = static_cast<SDChannelObj*>(nw4r::ut::List_GetNext(&mChannelObjects, channel)),
channel != NULL) {
nw4r::ut::List_Remove(&mChannelObjects, channel);
destroyChannelObject(channel);
channel = NULL;
}
mpLayoutHeap->destroy();
@@ -1948,8 +1953,8 @@ namespace ipl {
OSSleepTicks(OSMicrosecondsToTicks((OSTime)100));
}
delete mpSaveDataFile;
mpSaveDataFile = NULL;
}
mpSaveDataFile = NULL;
if (mpSDWorker != NULL) {
if (!mpSDWorker->is_terminated()) {
@@ -2071,13 +2076,11 @@ namespace ipl {
}
void SDChannelSelect::drawChannelTransitionObjects() {
int index;
int page;
SDChannelObj* channel = NULL;
while (channel = static_cast<SDChannelObj*>(nw4r::ut::List_GetNext(&mChannelObjects, channel)),
channel != NULL) {
page = channel->getPage();
index = channel->getIndex();
int page = channel->mPage;
int index = channel->mIndex;
if (!hasChannelObject(page, index) || !isChannelReady(channel)) {
continue;
}
@@ -2086,14 +2089,25 @@ namespace ipl {
iplSDChannelObj_813E32C8(channel);
if (iplSDChannelObj_813E3330(channel)) {
if (mState < 24 && mState >= 15 &&
(page != mSourcePage || index != mSourceIndex)) {
nw4r::math::VEC3 position(channel->getTranslate());
mpPageLayouts[0]->GetRootPane()->SetTranslate(position);
mpPageLayouts[0]->calcMtx();
mpPageLayouts[0]->draw();
switch (mState) {
case 15:
case 16:
case 17:
case 18:
case 19:
case 20:
case 21:
case 22:
case 23:
if (page != mSourcePage || index != mSourceIndex) {
nw4r::math::VEC3 position(channel->getTranslate());
mpPageLayouts[0]->GetRootPane()->SetTranslate(position);
mpPageLayouts[0]->calcMtx();
mpPageLayouts[0]->draw();
}
break;
}
} else if (channel->mState == 2) {
} else if (channel->mStateFlags == 2) {
nw4r::math::VEC3 position(channel->getTranslate());
mpErrorLayout->GetRootPane()->SetTranslate(position);
mpErrorLayout->calcMtx();
@@ -2105,7 +2119,6 @@ namespace ipl {
case 16:
case 19:
case 20:
case 21:
case 22:
case 23:
if (page == mSourcePage && index == mSourceIndex) {
@@ -2117,10 +2130,15 @@ namespace ipl {
break;
}
if (mState < 22 && mState >= 19 &&
page == mDestinationPage && index == mDestinationIndex) {
mpPageLayouts[2]->draw();
mpPointerLayout->draw();
switch (mState) {
case 19:
case 20:
case 21:
if (page == mDestinationPage && index == mDestinationIndex) {
mpPageLayouts[2]->draw();
mpPointerLayout->draw();
}
break;
}
}
}
@@ -2703,8 +2721,8 @@ namespace ipl {
nw4r::math::MTX44 matrix;
f32 rightScale = projection.right / mScale.x;
f32 leftScale = projection.left / mScale.x;
f32 topScale = projection.top / mScale.y;
f32 bottomScale = projection.bottom / mScale.y;
f32 topScale = projection.top / mScale.y;
f32 bottom = mPosition.y - bottomScale;
f32 right = mPosition.x + rightScale;
f32 left = mPosition.x + leftScale;

File diff suppressed because it is too large Load Diff

View File

@@ -522,7 +522,7 @@ char gAtermAossSsid[7] = "******";
extern u32 gAtermUseSharedAddress;
extern char gAtermProductName[5];
u32 gAtermCancelRequested;
u8 gAtermSelectedBssid[8];
u8 gAtermSelectedBssid[6];
u32 gAtermProtocolState;
u8 gAtermAddressBuffer[8];
u32 gAtermResponseMode;
@@ -542,7 +542,7 @@ s32 gAtermState;
void ATERM_8140684C(OSAlarm* alarm, OSContext* context);
s32 ATERM_814038C8(void);
void ATERM_81405ACC(AtermMd5Context* context, const void* input, u32 length);
void ATERM_81405ACC(AtermMd5Context* context, void* input, u32 length);
extern u8 gAtermDigestFill[64];
extern u8* gAtermRequestOptions;
int ATERM_81404844(u16* destination, u16* source, u32 length, void* key, u32 keyLength);
@@ -616,7 +616,7 @@ int ATERM_814021BC(void) {
gAtermSocketReady = waitCount;
}
if (gAtermSocketReady != 0) {
while (SOHtoNl(0) == SOGetHostID()) {
while (SOGetHostID() == SOHtoNl(0)) {
OSInitMessageQueue(&hostQueue, &hostQueueBuffer, 1);
OSCreateAlarm(&hostAlarm);
OSSetAlarmTag(&hostAlarm, (u32)&hostQueue);
@@ -762,8 +762,7 @@ unlock_driver:
int ATERM_8140276C(AtermApRecordSet* currentRecords, AtermApRecordSet* previousRecords,
u32* changedIndex) {
AtermApRecord* currentRecord = currentRecords->entries;
AtermApRecord* previousRecord = previousRecords->entries;
u32 previousIndex;
u32 currentIndex = 0;
int found = 0;
int result = 0;
@@ -771,7 +770,8 @@ int ATERM_8140276C(AtermApRecordSet* currentRecords, AtermApRecordSet* previousR
size_t compareLength;
size_t aossLength;
size_t formattedSsidLength;
u32 previousIndex;
AtermApRecord* currentRecord = currentRecords->entries;
AtermApRecord* previousRecord = previousRecords->entries;
for (; currentIndex < currentRecords->count; currentIndex++) {
@@ -813,9 +813,11 @@ int ATERM_8140276C(AtermApRecordSet* currentRecords, AtermApRecordSet* previousR
if (!found) {
AtermSsidBuffer aossSsidName;
int currentHasAoss = 0;
int previousHasAoss = 0;
int currentHasAoss;
int previousHasAoss;
previousHasAoss = 0;
currentHasAoss = 0;
aossSsidName.clear.word0 = 0;
aossSsidName.clear.word1 = 0;
aossSsidName.clear.word2 = 0;
@@ -869,18 +871,17 @@ int ATERM_8140276C(AtermApRecordSet* currentRecords, AtermApRecordSet* previousR
int ATERM_81402A24(void) {
s32 result = -1;
s32 progressInfo[4];
AtermApRecordSet* currentRecords = NULL;
AtermApRecordSet* previousRecords = NULL;
u32 scanBufferBytes;
u32 recordIndex;
s32 iteration = 0;
u8* rawScanBuffer = NULL;
u8* scanBuffer;
u16* firstDescriptor;
AtermApRecord* recordCursor;
u32 recordBytes = gAtermScanLimit * sizeof(AtermApRecord) + sizeof(AtermApRecord) + sizeof(u32);
u32 scanBufferBytes;
s32 progressInfo[4];
u32 scanCount;
u32 recordIndex;
s32 iteration = 0;
AtermApRecordSet* currentRecords = NULL;
AtermApRecordSet* previousRecords = NULL;
u32 now;
char selectedMacText[32];
@@ -901,13 +902,13 @@ int ATERM_81402A24(void) {
}
scanBufferBytes = gAtermScanLimit * 0x100;
rawScanBuffer = (u8*)gAtermAllocate(scanBufferBytes + 0x40);
scanBuffer = (u8*)(((u32)rawScanBuffer + 0x1F) & ~0x1F);
scanBuffer = (u8*)(u32)(((u64)(u32)rawScanBuffer + 0x1F) & ~0x1FULL);
firstDescriptor = (u16*)(scanBuffer + sizeof(u16));
while (iteration < 300 && gAtermCancelRequested == 0) {
s64 currentTime = OSGetTime();
now = (u32)OSTicksToMilliseconds(currentTime);
if (gAtermDeadline <= now) {
if (now >= gAtermDeadline) {
break;
}
@@ -928,24 +929,25 @@ int ATERM_81402A24(void) {
u16* descriptorWords = firstDescriptor;
char* ssidCursor = (char*)currentRecords->entries[0].ssid;
u8* bssidCursor = currentRecords->entries[0].bssid;
recordCursor = currentRecords->entries;
recordIndex = 0;
while ((s32)recordIndex < result) {
WDBssDesc* descriptor = (WDBssDesc*)descriptorWords;
memcpy(ssidCursor, descriptor->ssid, sizeof(recordCursor->ssid));
if (descriptor->ssidLength > sizeof(recordCursor->ssid)) {
recordCursor->ssidLength = 0;
memcpy(ssidCursor, descriptor->ssid,
sizeof(currentRecords->entries[recordIndex].ssid));
if (descriptor->ssidLength > sizeof(currentRecords->entries[recordIndex].ssid)) {
currentRecords->entries[recordIndex].ssidLength = 0;
} else {
recordCursor->ssidLength = descriptor->ssidLength;
currentRecords->entries[recordIndex].ssidLength = descriptor->ssidLength;
}
recordCursor->ssid[recordCursor->ssidLength] = '\0';
recordCursor->status = (descriptor->capabilities >> 4) & 1;
memcpy(bssidCursor, descriptor->bssid, sizeof(recordCursor->bssid));
currentRecords->entries[recordIndex].ssid[
currentRecords->entries[recordIndex].ssidLength] = '\0';
currentRecords->entries[recordIndex].status = (descriptor->capabilities >> 4) & 1;
memcpy(bssidCursor, descriptor->bssid,
sizeof(currentRecords->entries[recordIndex].bssid));
descriptorWords += descriptor->length;
ssidCursor += sizeof(AtermApRecord);
bssidCursor += sizeof(AtermApRecord);
recordCursor++;
recordIndex++;
}
}
@@ -1163,9 +1165,11 @@ int ATERM_814031DC(AtermAssociationRequest* request) {
if (gAtermUseSharedAddress != 0) {
{
const u8* addressCursor = interfaceMacAddress;
const u8* addressEnd = interfaceMacAddress + 6;
int addressIndex;
char* textCursor = interfaceMacText;
for (addressIndex = 0; ; addressIndex++) {
addressIndex = 0;
do {
u8 addressByte = *addressCursor++;
char* encoded = textCursor;
s32 highNibble = (addressByte & 0xF0) >> 4;
@@ -1182,18 +1186,20 @@ int ATERM_814031DC(AtermAssociationRequest* request) {
}
*encoded = 0;
textCursor += encoded - textCursor;
if (addressIndex == 5) {
break;
if (addressIndex < 5) {
*textCursor++ = ':';
}
*textCursor++ = ':';
}
addressIndex++;
} while (addressCursor < addressEnd);
*textCursor = '\0';
}
{
const u8* addressCursor = scanAddress;
const u8* addressEnd = scanAddress + 6;
int addressIndex;
char* textCursor = scanAddressText;
for (addressIndex = 0; ; addressIndex++) {
addressIndex = 0;
do {
u8 addressByte = *addressCursor++;
char* encoded = textCursor;
s32 highNibble = (addressByte & 0xF0) >> 4;
@@ -1210,11 +1216,11 @@ int ATERM_814031DC(AtermAssociationRequest* request) {
}
*encoded = 0;
textCursor += encoded - textCursor;
if (addressIndex == 5) {
break;
if (addressIndex < 5) {
*textCursor++ = ':';
}
*textCursor++ = ':';
}
addressIndex++;
} while (addressCursor < addressEnd);
*textCursor = '\0';
}
}
@@ -1646,26 +1652,23 @@ s32 ATERM_814038C8(void) {
(__mulhwu(reciprocal, OS_BUS_CLOCK >> 2) >> 6));
u32 index;
u32 digestBytes;
u32 bitCount[2];
memcpy(response->authentication.challenge,
optionValue, 8);
digestContext.bitCountHigh = 0;
digestContext.bitCountLow = 0;
digestContext.state[0] = 0x67452301;
digestContext.state[1] = 0xEFCDAB89;
digestContext.state[2] = 0x98BADCFE;
digestContext.state[3] = 0x10325476;
digestContext.bitCountLow = 0;
digestContext.bitCountHigh = 0;
ATERM_81405ACC(&digestContext, &authenticationTime, sizeof(authenticationTime));
bitCount[0] = digestContext.bitCountLow;
bitCount[1] = digestContext.bitCountHigh;
digestLength[0] = bitCount[0];
digestLength[1] = bitCount[0] >> 8;
digestLength[2] = bitCount[0] >> 16;
digestLength[3] = bitCount[0] >> 24;
digestLength[4] = bitCount[1];
digestLength[5] = bitCount[1] >> 8;
digestLength[6] = bitCount[1] >> 16;
digestLength[7] = bitCount[1] >> 24;
digestLength[0] = digestContext.bitCountLow;
digestLength[1] = digestContext.bitCountLow >> 8;
digestLength[2] = digestContext.bitCountLow >> 16;
digestLength[3] = digestContext.bitCountLow >> 24;
digestLength[4] = digestContext.bitCountHigh;
digestLength[5] = digestContext.bitCountHigh >> 8;
digestLength[6] = digestContext.bitCountHigh >> 16;
digestLength[7] = digestContext.bitCountHigh >> 24;
digestBytes = (digestContext.bitCountLow >> 3) & 0x3F;
ATERM_81405ACC(&digestContext, gAtermDigestFill,
digestBytes < 56 ? 56 - digestBytes : 120 - digestBytes);
@@ -2095,39 +2098,26 @@ int ATERM_81404BFC(u32* expandedKey, const void* key, u32 keyBits) {
int ATERM_8140502C(u32* expandedKey, const void* key, u32 keyBits) {
int rounds = ATERM_81404BFC(expandedKey, key, keyBits);
u32* firstRound = expandedKey;
u32* lastRound = expandedKey + rounds * 4;
u32* roundKey;
s32 roundCount;
s32 firstIndex;
s32 lastIndex;
u32 word;
s32 lastIndex = rounds * 4;
s32 firstIndex = 0;
while (firstIndex < lastIndex) {
firstIndex += 4;
lastIndex -= 4;
{
u32 word = firstRound[0];
firstRound[0] = lastRound[0];
lastRound[0] = word;
}
{
u32 word = firstRound[1];
firstRound[1] = lastRound[1];
lastRound[1] = word;
}
{
u32 word = firstRound[2];
firstRound[2] = lastRound[2];
lastRound[2] = word;
}
{
u32 word = firstRound[3];
firstRound[3] = lastRound[3];
lastRound[3] = word;
}
firstRound += 4;
lastRound -= 4;
for (firstIndex = 0, lastIndex = rounds * 4;
firstIndex < lastIndex; firstIndex += 4, lastIndex -= 4) {
word = expandedKey[firstIndex];
expandedKey[firstIndex] = expandedKey[lastIndex];
expandedKey[lastIndex] = word;
word = expandedKey[firstIndex + 1];
expandedKey[firstIndex + 1] = expandedKey[lastIndex + 1];
expandedKey[lastIndex + 1] = word;
word = expandedKey[firstIndex + 2];
expandedKey[firstIndex + 2] = expandedKey[lastIndex + 2];
expandedKey[lastIndex + 2] = word;
word = expandedKey[firstIndex + 3];
expandedKey[firstIndex + 3] = expandedKey[lastIndex + 3];
expandedKey[lastIndex + 3] = word;
}
{
@@ -2156,151 +2146,183 @@ int ATERM_8140502C(u32* expandedKey, const void* key, u32 keyBits) {
#undef ATERM_AES_TRANSFORM_KEY
void ATERM_81405254(const u32* expandedKey, u32 rounds, const u8* input, u8* output) {
const u32* roundTable3 = gAtermAesEncryptTable3;
const u32* roundTable2 = gAtermAesEncryptTable2;
const u32* roundTable0 = gAtermAesEncryptTable0;
const u32* roundTable1 = gAtermAesEncryptTable1;
s32 roundPairs = (s32)rounds >> 1;
u32 state0 = (((u32)input[2] << 8) ^ input[3]) ^
(((u32)input[0] << 24) ^ ((u32)input[1] << 16)) ^ expandedKey[0];
u32 state1 = (((u32)input[6] << 8) ^ input[7]) ^
(((u32)input[4] << 24) ^ ((u32)input[5] << 16)) ^ expandedKey[1];
u32 state2 = (((u32)input[10] << 8) ^ input[11]) ^
(((u32)input[8] << 24) ^ ((u32)input[9] << 16)) ^ expandedKey[2];
u32 state3 = (((u32)input[14] << 8) ^ input[15]) ^
(((u32)input[12] << 24) ^ ((u32)input[13] << 16)) ^ expandedKey[3];
u32 state0, state1, state2, state3;
u32 next0, next1, next2, next3;
s32 roundPairs;
state0 = ((u32)input[0] << 24) ^ ((u32)input[1] << 16) ^
((u32)input[2] << 8) ^ (u32)input[3] ^ expandedKey[0];
state1 = ((u32)input[4] << 24) ^ ((u32)input[5] << 16) ^
((u32)input[6] << 8) ^ (u32)input[7] ^ expandedKey[1];
state2 = ((u32)input[8] << 24) ^ ((u32)input[9] << 16) ^
((u32)input[10] << 8) ^ (u32)input[11] ^ expandedKey[2];
state3 = ((u32)input[12] << 24) ^ ((u32)input[13] << 16) ^
((u32)input[14] << 8) ^ (u32)input[15] ^ expandedKey[3];
roundPairs = (s32)rounds >> 1;
for (;;) {
next0 = (roundTable3[state3 & 0xFF] ^ roundTable2[(state2 >> 8) & 0xFF]) ^
(roundTable0[state0 >> 24] ^ roundTable1[(state1 >> 16) & 0xFF]) ^ expandedKey[4];
next1 = (roundTable3[state0 & 0xFF] ^ roundTable2[(state3 >> 8) & 0xFF]) ^
(roundTable0[state1 >> 24] ^ roundTable1[(state2 >> 16) & 0xFF]) ^ expandedKey[5];
next2 = (roundTable3[state1 & 0xFF] ^ roundTable2[(state0 >> 8) & 0xFF]) ^
(roundTable0[state2 >> 24] ^ roundTable1[(state3 >> 16) & 0xFF]) ^ expandedKey[6];
next3 = (roundTable3[state2 & 0xFF] ^ roundTable2[(state1 >> 8) & 0xFF]) ^
(roundTable0[state3 >> 24] ^ roundTable1[(state0 >> 16) & 0xFF]) ^ expandedKey[7];
next0 = (gAtermAesEncryptTable3[state3 & 0xFF] ^
gAtermAesEncryptTable2[(state2 >> 8) & 0xFF]) ^
(gAtermAesEncryptTable0[state0 >> 24] ^
gAtermAesEncryptTable1[(state1 >> 16) & 0xFF]) ^ expandedKey[4];
next1 = (gAtermAesEncryptTable3[state0 & 0xFF] ^
gAtermAesEncryptTable2[(state3 >> 8) & 0xFF]) ^
(gAtermAesEncryptTable0[state1 >> 24] ^
gAtermAesEncryptTable1[(state2 >> 16) & 0xFF]) ^ expandedKey[5];
next2 = (gAtermAesEncryptTable3[state1 & 0xFF] ^
gAtermAesEncryptTable2[(state0 >> 8) & 0xFF]) ^
(gAtermAesEncryptTable0[state2 >> 24] ^
gAtermAesEncryptTable1[(state3 >> 16) & 0xFF]) ^ expandedKey[6];
next3 = (gAtermAesEncryptTable3[state2 & 0xFF] ^
gAtermAesEncryptTable2[(state1 >> 8) & 0xFF]) ^
(gAtermAesEncryptTable0[state3 >> 24] ^
gAtermAesEncryptTable1[(state0 >> 16) & 0xFF]) ^ expandedKey[7];
expandedKey += 8;
if (--roundPairs == 0) {
break;
}
state0 = (roundTable3[next3 & 0xFF] ^ roundTable2[(next2 >> 8) & 0xFF]) ^
(roundTable0[next0 >> 24] ^ roundTable1[(next1 >> 16) & 0xFF]) ^ expandedKey[0];
state1 = (roundTable3[next0 & 0xFF] ^ roundTable2[(next3 >> 8) & 0xFF]) ^
(roundTable0[next1 >> 24] ^ roundTable1[(next2 >> 16) & 0xFF]) ^ expandedKey[1];
state2 = (roundTable3[next1 & 0xFF] ^ roundTable2[(next0 >> 8) & 0xFF]) ^
(roundTable0[next2 >> 24] ^ roundTable1[(next3 >> 16) & 0xFF]) ^ expandedKey[2];
state3 = (roundTable3[next2 & 0xFF] ^ roundTable2[(next1 >> 8) & 0xFF]) ^
(roundTable0[next3 >> 24] ^ roundTable1[(next0 >> 16) & 0xFF]) ^ expandedKey[3];
state0 = (gAtermAesEncryptTable3[next3 & 0xFF] ^
gAtermAesEncryptTable2[(next2 >> 8) & 0xFF]) ^
(gAtermAesEncryptTable0[next0 >> 24] ^
gAtermAesEncryptTable1[(next1 >> 16) & 0xFF]) ^ expandedKey[0];
state1 = (gAtermAesEncryptTable3[next0 & 0xFF] ^
gAtermAesEncryptTable2[(next3 >> 8) & 0xFF]) ^
(gAtermAesEncryptTable0[next1 >> 24] ^
gAtermAesEncryptTable1[(next2 >> 16) & 0xFF]) ^ expandedKey[1];
state2 = (gAtermAesEncryptTable3[next1 & 0xFF] ^
gAtermAesEncryptTable2[(next0 >> 8) & 0xFF]) ^
(gAtermAesEncryptTable0[next2 >> 24] ^
gAtermAesEncryptTable1[(next3 >> 16) & 0xFF]) ^ expandedKey[2];
state3 = (gAtermAesEncryptTable3[next2 & 0xFF] ^
gAtermAesEncryptTable2[(next1 >> 8) & 0xFF]) ^
(gAtermAesEncryptTable0[next3 >> 24] ^
gAtermAesEncryptTable1[(next0 >> 16) & 0xFF]) ^ expandedKey[3];
}
{
const u32* finalTable = gAtermAesSubstitutionTable;
u32 result0 = (((finalTable[next0 >> 24] & 0xFF000000) ^
(finalTable[(next1 >> 16) & 0xFF] & 0x00FF0000) ^
(finalTable[(next2 >> 8) & 0xFF] & 0x0000FF00) ^
(finalTable[next3 & 0xFF] & 0x000000FF)) ^ expandedKey[0]);
u32 result1 = (((finalTable[next1 >> 24] & 0xFF000000) ^
(finalTable[(next2 >> 16) & 0xFF] & 0x00FF0000) ^
(finalTable[(next3 >> 8) & 0xFF] & 0x0000FF00) ^
(finalTable[next0 & 0xFF] & 0x000000FF)) ^ expandedKey[1]);
u32 result2 = (((finalTable[next2 >> 24] & 0xFF000000) ^
(finalTable[(next3 >> 16) & 0xFF] & 0x00FF0000) ^
(finalTable[(next0 >> 8) & 0xFF] & 0x0000FF00) ^
(finalTable[next1 & 0xFF] & 0x000000FF)) ^ expandedKey[2]);
u32 result3 = (((finalTable[next3 >> 24] & 0xFF000000) ^
(finalTable[(next0 >> 16) & 0xFF] & 0x00FF0000) ^
(finalTable[(next1 >> 8) & 0xFF] & 0x0000FF00) ^
(finalTable[next2 & 0xFF] & 0x000000FF)) ^ expandedKey[3]);
output[0] = result0 >> 24;
output[1] = result0 >> 16;
output[2] = result0 >> 8;
output[3] = result0;
output[4] = result1 >> 24;
output[5] = result1 >> 16;
output[6] = result1 >> 8;
output[7] = result1;
output[8] = result2 >> 24;
output[9] = result2 >> 16;
output[10] = result2 >> 8;
output[11] = result2;
output[12] = result3 >> 24;
output[13] = result3 >> 16;
output[14] = result3 >> 8;
output[15] = result3;
}
state0 = (gAtermAesSubstitutionTable[next0 >> 24] & 0xFF000000) ^
(gAtermAesSubstitutionTable[(next1 >> 16) & 0xFF] & 0x00FF0000) ^
(gAtermAesSubstitutionTable[(next2 >> 8) & 0xFF] & 0x0000FF00) ^
(gAtermAesSubstitutionTable[next3 & 0xFF] & 0x000000FF) ^ expandedKey[0];
output[0] = state0 >> 24;
output[1] = state0 >> 16;
output[2] = state0 >> 8;
output[3] = state0;
state1 = (gAtermAesSubstitutionTable[next1 >> 24] & 0xFF000000) ^
(gAtermAesSubstitutionTable[(next2 >> 16) & 0xFF] & 0x00FF0000) ^
(gAtermAesSubstitutionTable[(next3 >> 8) & 0xFF] & 0x0000FF00) ^
(gAtermAesSubstitutionTable[next0 & 0xFF] & 0x000000FF) ^ expandedKey[1];
output[4] = state1 >> 24;
output[5] = state1 >> 16;
output[6] = state1 >> 8;
output[7] = state1;
state2 = (gAtermAesSubstitutionTable[next2 >> 24] & 0xFF000000) ^
(gAtermAesSubstitutionTable[(next3 >> 16) & 0xFF] & 0x00FF0000) ^
(gAtermAesSubstitutionTable[(next0 >> 8) & 0xFF] & 0x0000FF00) ^
(gAtermAesSubstitutionTable[next1 & 0xFF] & 0x000000FF) ^ expandedKey[2];
output[8] = state2 >> 24;
output[9] = state2 >> 16;
output[10] = state2 >> 8;
output[11] = state2;
state3 = (gAtermAesSubstitutionTable[next3 >> 24] & 0xFF000000) ^
(gAtermAesSubstitutionTable[(next0 >> 16) & 0xFF] & 0x00FF0000) ^
(gAtermAesSubstitutionTable[(next1 >> 8) & 0xFF] & 0x0000FF00) ^
(gAtermAesSubstitutionTable[next2 & 0xFF] & 0x000000FF) ^ expandedKey[3];
output[12] = state3 >> 24;
output[13] = state3 >> 16;
output[14] = state3 >> 8;
output[15] = state3;
}
void ATERM_81405690(const u32* expandedKey, u32 rounds, const u8* input, u8* output) {
s32 roundPairs = (s32)rounds >> 1;
u32 state0 = (((u32)input[0] << 24) ^ ((u32)input[1] << 16) ^ ((u32)input[2] << 8) ^ input[3]) ^ expandedKey[0];
u32 state1 = (((u32)input[4] << 24) ^ ((u32)input[5] << 16) ^ ((u32)input[6] << 8) ^ input[7]) ^ expandedKey[1];
u32 state2 = (((u32)input[8] << 24) ^ ((u32)input[9] << 16) ^ ((u32)input[10] << 8) ^ input[11]) ^ expandedKey[2];
u32 state3 = (((u32)input[12] << 24) ^ ((u32)input[13] << 16) ^ ((u32)input[14] << 8) ^ input[15]) ^ expandedKey[3];
u32 state0, state1, state2, state3;
u32 next0, next1, next2, next3;
const u32* roundTable3 = gAtermAesDecryptTable3;
const u32* roundTable2 = gAtermAesDecryptTable2;
const u32* roundTable0 = gAtermAesDecryptTable0;
const u32* roundTable1 = gAtermAesDecryptTable1;
s32 roundPairs;
state0 = ((u32)input[0] << 24) ^ ((u32)input[1] << 16) ^
((u32)input[2] << 8) ^ (u32)input[3] ^ expandedKey[0];
state1 = ((u32)input[4] << 24) ^ ((u32)input[5] << 16) ^
((u32)input[6] << 8) ^ (u32)input[7] ^ expandedKey[1];
state2 = ((u32)input[8] << 24) ^ ((u32)input[9] << 16) ^
((u32)input[10] << 8) ^ (u32)input[11] ^ expandedKey[2];
state3 = ((u32)input[12] << 24) ^ ((u32)input[13] << 16) ^
((u32)input[14] << 8) ^ (u32)input[15] ^ expandedKey[3];
roundPairs = (s32)rounds >> 1;
for (;;) {
next0 = roundTable3[state1 & 0xFF] ^ roundTable2[(state2 >> 8) & 0xFF] ^ roundTable0[state0 >> 24] ^ roundTable1[(state3 >> 16) & 0xFF] ^ expandedKey[4];
next1 = roundTable3[state2 & 0xFF] ^ roundTable2[(state3 >> 8) & 0xFF] ^ roundTable0[state1 >> 24] ^ roundTable1[(state0 >> 16) & 0xFF] ^ expandedKey[5];
next2 = roundTable3[state3 & 0xFF] ^ roundTable2[(state0 >> 8) & 0xFF] ^ roundTable0[state2 >> 24] ^ roundTable1[(state1 >> 16) & 0xFF] ^ expandedKey[6];
next3 = roundTable3[state0 & 0xFF] ^ roundTable2[(state1 >> 8) & 0xFF] ^ roundTable0[state3 >> 24] ^ roundTable1[(state2 >> 16) & 0xFF] ^ expandedKey[7];
next0 = (gAtermAesDecryptTable3[state1 & 0xFF] ^
gAtermAesDecryptTable2[(state2 >> 8) & 0xFF]) ^
(gAtermAesDecryptTable0[state0 >> 24] ^
gAtermAesDecryptTable1[(state3 >> 16) & 0xFF]) ^ expandedKey[4];
next1 = (gAtermAesDecryptTable3[state2 & 0xFF] ^
gAtermAesDecryptTable2[(state3 >> 8) & 0xFF]) ^
(gAtermAesDecryptTable0[state1 >> 24] ^
gAtermAesDecryptTable1[(state0 >> 16) & 0xFF]) ^ expandedKey[5];
next2 = (gAtermAesDecryptTable3[state3 & 0xFF] ^
gAtermAesDecryptTable2[(state0 >> 8) & 0xFF]) ^
(gAtermAesDecryptTable0[state2 >> 24] ^
gAtermAesDecryptTable1[(state1 >> 16) & 0xFF]) ^ expandedKey[6];
next3 = (gAtermAesDecryptTable3[state0 & 0xFF] ^
gAtermAesDecryptTable2[(state1 >> 8) & 0xFF]) ^
(gAtermAesDecryptTable0[state3 >> 24] ^
gAtermAesDecryptTable1[(state2 >> 16) & 0xFF]) ^ expandedKey[7];
expandedKey += 8;
if (--roundPairs == 0) {
break;
}
state0 = roundTable3[next1 & 0xFF] ^ roundTable2[(next2 >> 8) & 0xFF] ^ roundTable0[next0 >> 24] ^ roundTable1[(next3 >> 16) & 0xFF] ^ expandedKey[0];
state1 = roundTable3[next2 & 0xFF] ^ roundTable2[(next3 >> 8) & 0xFF] ^ roundTable0[next1 >> 24] ^ roundTable1[(next0 >> 16) & 0xFF] ^ expandedKey[1];
state2 = roundTable3[next3 & 0xFF] ^ roundTable2[(next0 >> 8) & 0xFF] ^ roundTable0[next2 >> 24] ^ roundTable1[(next1 >> 16) & 0xFF] ^ expandedKey[2];
state3 = roundTable3[next0 & 0xFF] ^ roundTable2[(next1 >> 8) & 0xFF] ^ roundTable0[next3 >> 24] ^ roundTable1[(next2 >> 16) & 0xFF] ^ expandedKey[3];
state0 = (gAtermAesDecryptTable3[next1 & 0xFF] ^
gAtermAesDecryptTable2[(next2 >> 8) & 0xFF]) ^
(gAtermAesDecryptTable0[next0 >> 24] ^
gAtermAesDecryptTable1[(next3 >> 16) & 0xFF]) ^ expandedKey[0];
state1 = (gAtermAesDecryptTable3[next2 & 0xFF] ^
gAtermAesDecryptTable2[(next3 >> 8) & 0xFF]) ^
(gAtermAesDecryptTable0[next1 >> 24] ^
gAtermAesDecryptTable1[(next0 >> 16) & 0xFF]) ^ expandedKey[1];
state2 = (gAtermAesDecryptTable3[next3 & 0xFF] ^
gAtermAesDecryptTable2[(next0 >> 8) & 0xFF]) ^
(gAtermAesDecryptTable0[next2 >> 24] ^
gAtermAesDecryptTable1[(next1 >> 16) & 0xFF]) ^ expandedKey[2];
state3 = (gAtermAesDecryptTable3[next0 & 0xFF] ^
gAtermAesDecryptTable2[(next1 >> 8) & 0xFF]) ^
(gAtermAesDecryptTable0[next3 >> 24] ^
gAtermAesDecryptTable1[(next2 >> 16) & 0xFF]) ^ expandedKey[3];
}
{
const u32* finalTable = gAtermAesInverseSubstitutionTable;
u32 result0 = (((finalTable[next0 >> 24] & 0xFF000000) ^
(finalTable[(next3 >> 16) & 0xFF] & 0x00FF0000) ^
(finalTable[(next2 >> 8) & 0xFF] & 0x0000FF00) ^
(finalTable[next1 & 0xFF] & 0x000000FF)) ^ expandedKey[0]);
u32 result1 = (((finalTable[next1 >> 24] & 0xFF000000) ^
(finalTable[(next0 >> 16) & 0xFF] & 0x00FF0000) ^
(finalTable[(next3 >> 8) & 0xFF] & 0x0000FF00) ^
(finalTable[next2 & 0xFF] & 0x000000FF)) ^ expandedKey[1]);
u32 result2 = (((finalTable[next2 >> 24] & 0xFF000000) ^
(finalTable[(next1 >> 16) & 0xFF] & 0x00FF0000) ^
(finalTable[(next0 >> 8) & 0xFF] & 0x0000FF00) ^
(finalTable[next3 & 0xFF] & 0x000000FF)) ^ expandedKey[2]);
u32 result3 = (((finalTable[next3 >> 24] & 0xFF000000) ^
(finalTable[(next2 >> 16) & 0xFF] & 0x00FF0000) ^
(finalTable[(next1 >> 8) & 0xFF] & 0x0000FF00) ^
(finalTable[next0 & 0xFF] & 0x000000FF)) ^ expandedKey[3]);
output[0] = result0 >> 24;
output[1] = result0 >> 16;
output[2] = result0 >> 8;
output[3] = result0;
output[4] = result1 >> 24;
output[5] = result1 >> 16;
output[6] = result1 >> 8;
output[7] = result1;
output[8] = result2 >> 24;
output[9] = result2 >> 16;
output[10] = result2 >> 8;
output[11] = result2;
output[12] = result3 >> 24;
output[13] = result3 >> 16;
output[14] = result3 >> 8;
output[15] = result3;
}
state0 = (gAtermAesInverseSubstitutionTable[next0 >> 24] & 0xFF000000) ^
(gAtermAesInverseSubstitutionTable[(next3 >> 16) & 0xFF] & 0x00FF0000) ^
(gAtermAesInverseSubstitutionTable[(next2 >> 8) & 0xFF] & 0x0000FF00) ^
(gAtermAesInverseSubstitutionTable[next1 & 0xFF] & 0x000000FF) ^ expandedKey[0];
output[0] = state0 >> 24;
output[1] = state0 >> 16;
output[2] = state0 >> 8;
output[3] = state0;
state1 = (gAtermAesInverseSubstitutionTable[next1 >> 24] & 0xFF000000) ^
(gAtermAesInverseSubstitutionTable[(next0 >> 16) & 0xFF] & 0x00FF0000) ^
(gAtermAesInverseSubstitutionTable[(next3 >> 8) & 0xFF] & 0x0000FF00) ^
(gAtermAesInverseSubstitutionTable[next2 & 0xFF] & 0x000000FF) ^ expandedKey[1];
output[4] = state1 >> 24;
output[5] = state1 >> 16;
output[6] = state1 >> 8;
output[7] = state1;
state2 = (gAtermAesInverseSubstitutionTable[next2 >> 24] & 0xFF000000) ^
(gAtermAesInverseSubstitutionTable[(next1 >> 16) & 0xFF] & 0x00FF0000) ^
(gAtermAesInverseSubstitutionTable[(next0 >> 8) & 0xFF] & 0x0000FF00) ^
(gAtermAesInverseSubstitutionTable[next3 & 0xFF] & 0x000000FF) ^ expandedKey[2];
output[8] = state2 >> 24;
output[9] = state2 >> 16;
output[10] = state2 >> 8;
output[11] = state2;
state3 = (gAtermAesInverseSubstitutionTable[next3 >> 24] & 0xFF000000) ^
(gAtermAesInverseSubstitutionTable[(next2 >> 16) & 0xFF] & 0x00FF0000) ^
(gAtermAesInverseSubstitutionTable[(next1 >> 8) & 0xFF] & 0x0000FF00) ^
(gAtermAesInverseSubstitutionTable[next0 & 0xFF] & 0x000000FF) ^ expandedKey[3];
output[12] = state3 >> 24;
output[13] = state3 >> 16;
output[14] = state3 >> 8;
output[15] = state3;
}
void ATERM_81405D0C(u32 state[4], const u8 block[64]);
void ATERM_81405ACC(AtermMd5Context* context, const void* input, u32 length) {
const u8* data = (const u8*)input;
void ATERM_81405ACC(AtermMd5Context* context, void* input, u32 length) {
u8* data = (u8*)input;
u32 bufferIndex = (context->bitCountLow >> 3) & 0x3F;
u32 bytesToFill;
u32 copiedBytes;

View File

@@ -1419,8 +1419,8 @@ namespace ipl {
mpChangeLayout->FindPaneByName("N_Tra0")->SetVisible(true);
}
WWWRect* wideRect = NULL;
WWWRect* standardRect = NULL;
WWWRect* standardRect;
WWWRect* wideRect;
void* wideBuffer = browser->GetTextureBuffer(1, &wideRect);
void* standardBuffer = browser->GetTextureBuffer(0, &standardRect);
nw4r::ut::Rect projection4x3;
@@ -1434,8 +1434,8 @@ namespace ipl {
screenRect.bottom = -screenHeight / 2;
if (wideBuffer != NULL && standardBuffer != NULL) {
GXTexObj wideTexture;
GXTexObj standardTexture;
GXTexObj wideTexture;
GXInitTexObj(&wideTexture, wideBuffer, wideRect->w, wideRect->h, GX_TF_RGB565, GX_CLAMP, GX_CLAMP, GX_FALSE);
GXInitTexObj(&standardTexture, standardBuffer, standardRect->w, standardRect->h, GX_TF_RGB565, GX_CLAMP, GX_CLAMP, GX_FALSE);
GXInitTexObjLOD(&wideTexture, GX_LINEAR, GX_LINEAR, 0.0f, 0.0f, 0.0f, GX_FALSE, GX_FALSE, GX_ANISO_1);
@@ -1715,9 +1715,8 @@ namespace ipl {
memset(unk_0x938, 0, sizeof(unk_0x938));
}
keyboard::Manager* keyboardManager = System::getKeyboard();
if (productArea == 11) {
keyboardManager->memoFrm()->setZiDictionary(keyboardManager->getZiOemDic(), keyboardManager->getZiSystemDic());
System::getKeyboard()->memoFrm()->setZiDictionary(System::getKeyboard()->getZiOemDic(), System::getKeyboard()->getZiSystemDic());
}
keyboard::Manager::KeyboardSetting setting;
@@ -1725,12 +1724,12 @@ namespace ipl {
setting.wcString = reinterpret_cast<const wchar_t*>(unk_0x938);
setting.stringLimit = stringLimit;
setting.rowLimit = rowLimit;
keyboardManager->start(0, setting);
System::getKeyboard()->start(0, setting);
if (invalidInput != 0) {
setDefaultBackString();
} else {
keyboardManager->baseMgr()->setTitleText(L"");
System::getKeyboard()->baseMgr()->setTitleText(L"");
}
if (mpWiiSettingData->data[0x11] == 17) {
System::getKeyboard()->baseMgr()->setSecretInputMode(true);
@@ -1811,9 +1810,9 @@ namespace ipl {
ext_ead::www::SurfaceManager::GetInstance()->GetBrowserThread()->CommitIme(mpBrowserData, formText);
memset(mpStringBuffer->asterisks, 0, sizeof(mpStringBuffer->asterisks));
} else if (mpWiiSettingData->data[0x11] == 2 || mpWiiSettingData->data[0x11] == 22) {
s32 index = 0;
memcpy(mpStringBuffer->asterisks, mpStringBuffer->securityKey, sizeof(mpStringBuffer->securityKey));
mpStringBuffer->asterisks[0x41] = 0;
s32 index = 0;
while (mpStringBuffer->asterisks[index] != 0) {
mpStringBuffer->asterisks[index++] = '*';
}
@@ -1905,12 +1904,16 @@ namespace ipl {
case keyboard::Manager::STATE_HIDDEN:
case keyboard::Manager::STATE_APPEARING: {
u8 formId = mpWiiSettingData->data[0x11];
if (formId >= 1 && formId <= 22 && formId != 9 && formId != 21) {
if (!System::getKeyboard()->memoMgr()->isVacancy()) {
System::getKeyboard()->baseMgr()->setTitleText(L"");
} else {
switch (formId) {
case 1: case 2: case 3: case 4: case 5: case 6: case 7: case 8:
case 10: case 11: case 12: case 13: case 14: case 15: case 16:
case 17: case 18: case 19: case 20: case 22:
if (System::getKeyboard()->memoMgr()->isVacancy()) {
setDefaultBackString();
} else {
System::getKeyboard()->baseMgr()->setTitleText(L"");
}
break;
}
break;
@@ -2448,11 +2451,12 @@ namespace ipl {
void Setting::convertRevIP(u8* destination, const char* address) {
char ascii[20];
int count = 0;
int index;
memset(ascii, 0, sizeof(ascii));
utility::CharacterCode::UTF8ToANSI(reinterpret_cast<u8*>(ascii), address);
int componentStart = 0;
u8* output = destination;
for (int index = 0; index < 0x10; ++index) {
for (index = 0; index < 0x10; ++index) {
u8 character = static_cast<u8>(ascii[index]);
if (character == '.' || character == 0) {
if (character == 0) {
@@ -2714,9 +2718,10 @@ namespace ipl {
case 5:
mpPaneManager->update();
break;
case 6:
case 6: {
int animationIndex = unk_0x918;
unk_0xB9C = 1;
if (!mpMainLayout->getAnim(unk_0x918)->isPlaying()) {
if (!mpMainLayout->getAnim(animationIndex)->isPlaying()) {
unk_0x78 = 5;
setAPDraw();
if (unk_0x91C[0] != 0) {
@@ -2738,6 +2743,7 @@ namespace ipl {
mpMainLayout->FindPaneByName("N_AP7")->SetVisible(true);
}
break;
}
case 7:
unk_0xB9C = 1;
if (!mpMainLayout->getAnim(unk_0x918)->isPlaying()) {
@@ -3121,9 +3127,9 @@ namespace ipl {
}
bool Setting::validateEULA_() {
ESTmdView* titleView = NULL;
bool valid = false;
s32 result = utility::ESMisc::GetTmdView(System::getMem1Root(), mUpdateTitleId, &titleView);
ESTmdView* titleView = NULL;
s32 result = utility::ESMisc::GetTmdView(System::getTreasureHeap(), mUpdateTitleId, &titleView);
if (result == -0x401 || result == -0x6a) {
unk_0x7C = 0;
unk_0x74 = 0xd;
@@ -3141,7 +3147,7 @@ namespace ipl {
valid = true;
}
if (titleView != NULL) {
System::getMem1Root()->free(titleView);
System::getTreasureHeap()->free(titleView);
}
return valid;
}
@@ -3553,6 +3559,10 @@ namespace ipl {
}
}
static inline bool HasUSBAPResult(const u8* result) {
return *result != 0;
}
void Setting::setUSBAP() {
switch (unk_0x84) {
case 1:
@@ -3573,7 +3583,7 @@ namespace ipl {
}
break;
case 2:
if (unk_0x91C[1] != 0) {
if (HasUSBAPResult(&unk_0x91C[1])) {
www::wiisetting::setFuncResult(unk_0x91C[1]);
unk_0x84 = 1;
unk_0x91C[1] = 0;

View File

@@ -1,5 +1,6 @@
#define AutoLock(x) AutoLock(x) NO_INLINE
#define IPL_SOUND_RECT_OUT_OF_LINE
#define IPL_SOUND_MATCHING
#include "iplSound.h"
#include "sound/iplSound.h"
@@ -12,7 +13,10 @@
extern "C" void __ct__Q23EGG20SimpleAudioMgrWithFxFv();
extern "C" void __dt__Q34nw4r3snd11SoundHandleFv();
extern "C" void __dl__FPv();
extern "C" void __destroy_arr();
extern "C" {
void __destroy_arr();
void __dt__Q33ipl3snd10tagSSeInfoFv();
}
extern "C" void _seBlk__Q23ipl3snd();
extern "C" nw4r::snd::SoundHandle* _mainBGMHandle__Q23ipl3snd;
extern "C" const f32 lbl_816946A4;
@@ -20,7 +24,11 @@ extern "C" const f32 lbl_816946AC;
extern "C" const f32 lbl_816946A8;
extern "C" const f32 lbl_816946B0;
extern "C" const f32 lbl_816946B4;
extern "C" void _savegpr_29();
extern "C" {
void _savegpr_29();
void pauseOffSE__Q33ipl3snd6SystemFv();
void pauseOnSE__Q33ipl3snd6SystemFv();
}
extern "C" void _restgpr_29();
extern "C" void _savegpr_24();
extern "C" void _restgpr_24();
@@ -39,31 +47,12 @@ namespace ipl {
namespace snd {
extern "C" void __vt__Q33ipl3snd6System();
extern "C" asm void __ct__Q33ipl3snd6SystemFv() {
nofralloc
stwu r1, -0x10(r1)
mflr r0
stw r0, 0x14(r1)
stw r31, 0xc(r1)
mr r31, r3
bl __ct__Q23EGG20SimpleAudioMgrWithFxFv
lis r5, __vt__Q33ipl3snd6System@ha
mr r3, r31
addi r5, r5, __vt__Q33ipl3snd6System@l
addi r4, r5, 0x10
stw r5, 0x0(r31)
addi r0, r5, 0x20
stw r4, 0x4(r31)
stw r0, 0x34(r31)
lwz r31, 0xc(r1)
lwz r0, 0x14(r1)
mtlr r0
addi r1, r1, 0x10
blr
System::System() {
}
struct tagSSeInfo {
tagSSeInfo();
~tagSSeInfo();
nw4r::snd::SoundHandle handle;
const char* name;
@@ -77,63 +66,16 @@ namespace ipl {
struct tagSBgmInfo {
nw4r::snd::SoundHandle handle;
tagSBgmInfo();
~tagSBgmInfo();
};
tagSBgmInfo::tagSBgmInfo() {
}
extern "C" asm void __dt__Q33ipl3snd10tagSSeInfoFv() {
nofralloc
stwu r1, -0x10(r1)
mflr r0
cmpwi r3, 0
stw r0, 0x14(r1)
stw r31, 0xc(r1)
mr r31, r4
stw r30, 0x8(r1)
mr r30, r3
beq se_dtor_done
li r4, -1
bl __dt__Q34nw4r3snd11SoundHandleFv
cmpwi r31, 0
ble se_dtor_done
mr r3, r30
bl __dl__FPv
se_dtor_done:
mr r3, r30
lwz r31, 0xc(r1)
lwz r30, 0x8(r1)
lwz r0, 0x14(r1)
mtlr r0
addi r1, r1, 0x10
blr
tagSSeInfo::~tagSSeInfo() {
}
extern "C" asm void __dt__Q33ipl3snd11tagSBgmInfoFv() {
nofralloc
stwu r1, -0x10(r1)
mflr r0
cmpwi r3, 0
stw r0, 0x14(r1)
stw r31, 0xc(r1)
mr r31, r4
stw r30, 0x8(r1)
mr r30, r3
beq bgm_dtor_done
li r4, -1
bl __dt__Q34nw4r3snd11SoundHandleFv
cmpwi r31, 0
ble bgm_dtor_done
mr r3, r30
bl __dl__FPv
bgm_dtor_done:
mr r3, r30
lwz r31, 0xc(r1)
lwz r30, 0x8(r1)
lwz r0, 0x14(r1)
mtlr r0
addi r1, r1, 0x10
blr
tagSBgmInfo::~tagSBgmInfo() {
}
extern nw4r::snd::SoundHandle _bgmBlk;
@@ -160,211 +102,56 @@ namespace ipl {
1.0f,
};
extern "C" asm void stopBGM__Q33ipl3snd6SystemFi() {
nofralloc
lwz r3, _mainBGMHandle__Q23ipl3snd
cmpwi r3, 0
beqlr
lwz r0, 0(r3)
cmpwi r0, 0
beqlr
beqlr
lwz r3, 0(r3)
lwz r12, 0(r3)
lwz r12, 0x18(r12)
mtctr r12
bctr
blr
void System::stopBGM(int frames) {
if (_mainBGMHandle && _mainBGMHandle->IsAttachedSound()) {
_mainBGMHandle->Stop(frames);
}
}
extern "C" asm void muteOnBGM__Q33ipl3snd6SystemFi() {
nofralloc
lwz r3, _mainBGMHandle__Q23ipl3snd
cmpwi r3, 0
beqlr
lwz r3, 0(r3)
cmpwi r3, 0
beqlr
beqlr
lwz r12, 0(r3)
lfs f1, lbl_816946A4
lwz r12, 0x38(r12)
mtctr r12
bctr
blr
void System::muteOnBGM(int frames) {
nw4r::snd::SoundHandle* handle = _mainBGMHandle;
if (handle && handle->IsAttachedSound()) handle->SetVolume(0.0f, frames);
}
extern "C" asm void muteOffBGM__Q33ipl3snd6SystemFi() {
nofralloc
lwz r3, _mainBGMHandle__Q23ipl3snd
cmpwi r3, 0
beqlr
lwz r3, 0(r3)
cmpwi r3, 0
beqlr
beqlr
lwz r12, 0(r3)
lfs f1, lbl_816946AC
lwz r12, 0x38(r12)
mtctr r12
bctr
blr
void System::muteOffBGM(int frames) {
nw4r::snd::SoundHandle* handle = _mainBGMHandle;
if (handle && handle->IsAttachedSound()) handle->SetVolume(1.0f, frames);
}
extern "C" asm void pauseOnSE__Q33ipl3snd6SystemFv() {
nofralloc
stwu r1, -0x20(r1)
mflr r0
stw r0, 0x24(r1)
addi r11, r1, 0x20
bl _savegpr_29
lis r30, _seBlk__Q23ipl3snd@ha
li r29, 0
addi r30, r30, _seBlk__Q23ipl3snd@l
li r31, 0
pauseOnSE_loop:
lwzx r3, r30, r31
cmpwi r3, 0
beq pauseOnSE_next
beq pauseOnSE_next
lwz r12, 0(r3)
li r4, 1
li r5, 5
lwz r12, 0x1c(r12)
mtctr r12
bctrl
pauseOnSE_next:
addi r29, r29, 1
addi r31, r31, 0xc
cmpwi r29, 0x10
blt pauseOnSE_loop
addi r11, r1, 0x20
bl _restgpr_29
lwz r0, 0x24(r1)
mtlr r0
addi r1, r1, 0x20
blr
void System::pauseOnSE() {
for (int index = 0; index < 16; ++index) {
if (_seBlk[index].handle.IsAttachedSound()) {
_seBlk[index].handle.Pause(true, 5);
}
}
}
extern "C" asm void pauseOffSE__Q33ipl3snd6SystemFv() {
nofralloc
stwu r1, -0x20(r1)
mflr r0
stw r0, 0x24(r1)
addi r11, r1, 0x20
bl _savegpr_29
lis r30, _seBlk__Q23ipl3snd@ha
li r29, 0
addi r30, r30, _seBlk__Q23ipl3snd@l
li r31, 0
pauseOffSE_loop:
lwzx r3, r30, r31
cmpwi r3, 0
beq pauseOffSE_next
beq pauseOffSE_next
lwz r12, 0(r3)
li r4, 0
li r5, 5
lwz r12, 0x1c(r12)
mtctr r12
bctrl
pauseOffSE_next:
addi r29, r29, 1
addi r31, r31, 0xc
cmpwi r29, 0x10
blt pauseOffSE_loop
addi r11, r1, 0x20
bl _restgpr_29
lwz r0, 0x24(r1)
mtlr r0
addi r1, r1, 0x20
blr
void System::pauseOffSE() {
for (int index = 0; index < 16; ++index) {
if (_seBlk[index].handle.IsAttachedSound()) {
_seBlk[index].handle.Pause(false, 5);
}
}
}
extern "C" asm void pauseOnBGM__Q33ipl3snd6SystemFv() {
nofralloc
stwu r1, -0x10(r1)
mflr r0
stw r0, 0x14(r1)
stw r31, 0xc(r1)
mr r31, r3
lwz r4, _mainBGMHandle__Q23ipl3snd
cmpwi r4, 0
beq pauseOnBGM_done
lwz r0, 0(r4)
cmpwi r0, 0
beq pauseOnBGM_resume
beq pauseOnBGM_resume
lwz r3, 0(r4)
li r4, 1
li r5, 5
lwz r12, 0(r3)
lwz r12, 0x1c(r12)
mtctr r12
bctrl
pauseOnBGM_resume:
mr r3, r31
bl pauseOnSE__Q33ipl3snd6SystemFv
lis r3, sBannerSoundPlayer__Q23ipl3snd@ha
li r4, 1
addi r3, r3, sBannerSoundPlayer__Q23ipl3snd@l
bl pause__17BannerSoundPlayerFb
bl GetInstance__Q44nw4r3snd6detail9AxManagerFv
li r4, 0
li r5, 0xfa
bl ClearEffect__Q44nw4r3snd6detail9AxManagerFQ34nw4r3snd6AuxBusi
bl GetInstance__Q44nw4r3snd6detail9AxManagerFv
li r4, 1
li r5, 0xfa
bl ClearEffect__Q44nw4r3snd6detail9AxManagerFQ34nw4r3snd6AuxBusi
bl GetInstance__Q44nw4r3snd6detail9AxManagerFv
li r4, 2
li r5, 0xfa
bl ClearEffect__Q44nw4r3snd6detail9AxManagerFQ34nw4r3snd6AuxBusi
pauseOnBGM_done:
lwz r0, 0x14(r1)
lwz r31, 0xc(r1)
mtlr r0
addi r1, r1, 0x10
blr
void System::pauseOnBGM() {
if (_mainBGMHandle) {
if (_mainBGMHandle->IsAttachedSound()) _mainBGMHandle->Pause(true, 5);
pauseOnSE();
sBannerSoundPlayer.pause(true);
nw4r::snd::detail::AxManager::GetInstance().ClearEffect(nw4r::snd::AUX_A, 250);
nw4r::snd::detail::AxManager::GetInstance().ClearEffect(nw4r::snd::AUX_B, 250);
nw4r::snd::detail::AxManager::GetInstance().ClearEffect(nw4r::snd::AUX_C, 250);
}
}
extern "C" asm void pauseOffBGM__Q33ipl3snd6SystemFv() {
nofralloc
stwu r1, -0x10(r1)
mflr r0
stw r0, 0x14(r1)
stw r31, 0xc(r1)
mr r31, r3
lwz r0, _mainBGMHandle__Q23ipl3snd
cmpwi r0, 0
beq pauseOffBGM_done
bl initFx__Q33ipl3snd6SystemFv
lwz r3, _mainBGMHandle__Q23ipl3snd
lwz r0, 0(r3)
cmpwi r0, 0
beq pauseOffBGM_resume
beq pauseOffBGM_resume
lwz r3, 0(r3)
li r4, 0
li r5, 5
lwz r12, 0(r3)
lwz r12, 0x1c(r12)
mtctr r12
bctrl
pauseOffBGM_resume:
mr r3, r31
bl pauseOffSE__Q33ipl3snd6SystemFv
lis r3, sBannerSoundPlayer__Q23ipl3snd@ha
li r4, 0
addi r3, r3, sBannerSoundPlayer__Q23ipl3snd@l
bl pause__17BannerSoundPlayerFb
pauseOffBGM_done:
lwz r0, 0x14(r1)
lwz r31, 0xc(r1)
mtlr r0
addi r1, r1, 0x10
blr
void System::pauseOffBGM() {
if (_mainBGMHandle) {
initFx();
if (_mainBGMHandle->IsAttachedSound()) _mainBGMHandle->Pause(false, 5);
pauseOffSE();
sBannerSoundPlayer.pause(false);
}
}
extern "C" asm void stopSE__Q33ipl3snd6SystemFPQ34nw4r3snd11SoundHandlei() {
@@ -544,12 +331,15 @@ namespace ipl {
#pragma force_active on
extern "C" asm void __ct__Q34nw4r3snd11SoundHandleFv() {
nofralloc
li r0, 0
stw r0, 0(r3)
blr
}
}
}
namespace nw4r {
namespace snd {
SoundHandle::SoundHandle() : mSound(NULL) {}
}
}
namespace ipl {
namespace snd {
void System::calc() {
EGG::SimpleAudioMgr::calc();

File diff suppressed because it is too large Load Diff

View File

@@ -9,8 +9,8 @@ from pathlib import Path
EXPECTED_DOL_SHA1 = "26116613f624061ba99c8d1a299aaa6efa85670d"
EXPECTED_TOTAL_UNITS = 1026
EXPECTED_TOTAL_CODE = 2995172
EXPECTED_TOTAL_UNITS = 1027
EXPECTED_TOTAL_CODE = 2995188
EXPECTED_TOTAL_DATA = 1832684
EXPECTED_TOTAL_FUNCTIONS = 12563
INTEGER_PATTERN = re.compile(r"-?(0|[1-9][0-9]*)\Z")

View File

@@ -0,0 +1,106 @@
# AOSS continuation attempts
Baseline at 07b3a2b5: instruction-exact 15/21, objdiff exact 16/21, code 6436/16192, data 3896/3928, fuzzy 87.91403%. Quick gate passed. Pool identical; .data 368 bytes matches. Only data mismatch is .sbss (32 bytes, 42.857143%). Work lowest scoring functions first, stack frame and initial blocks first.
- AOSS_Init_old — baseline block and stack audit: 73.34911%; 1494/1584 instructions; frame ('stwu', 'r1, -0x100(r1)')/('clrlwi', 'r11, r1, 0x1b').
- AOSS_81401778 — baseline block and stack audit: 80.168495%; 276/273 instructions; frame ('stwu', 'r1, -0x60(r1)')/('stwu', 'r1, -0x60(r1)').
- AOSS_Init_old — align the network-settings local to 32 bytes as the target frame requires: 69.66288%; 1549/1584 instructions; frame ('clrlwi', 'r11, r1, 0x1b')/('clrlwi', 'r11, r1, 0x1b').
- AOSS_81401778 — derive hello payload after clearing the response buffer: 79.8022%; 276/273 instructions; frame ('stwu', 'r1, -0x60(r1)')/('stwu', 'r1, -0x60(r1)').
- AOSS_81401778 — reuse checksum accumulator throughout the CRC block: compiler rejected the variation.
- AOSS_81401778 — reuse checksum accumulator throughout CRC block with unchanged table name: 79.87546%; 276/273 instructions; frame ('stwu', 'r1, -0x60(r1)')/('stwu', 'r1, -0x60(r1)').
- AOSS_81401778 — decode both permutation indices before updating the schedule fields: 84.83883%; 270/273 instructions; frame ('stwu', 'r1, -0x60(r1)')/('stwu', 'r1, -0x60(r1)').
- AOSS_81401778 — align payload lifetime and share the CRC and checksum accumulator with a scoped table view: compiler rejected the variation.
- AOSS_81401778 — scope CRC table at block entry with shared checksum and aligned payload lifetime: 86.67033%; 270/273 instructions; frame ('stwu', 'r1, -0x60(r1)')/('stwu', 'r1, -0x60(r1)').
- AOSS_81401E80 — write packet XOR directly with key-mask operand first: 97.993195%; 147/147 instructions; frame ('stwu', 'r1, -0x40(r1)')/('stwu', 'r1, -0x40(r1)').
- AOSS_81401E80 — load packet and key-mask bytes separately then XOR into the mask result: 97.993195%; 147/147 instructions; frame ('stwu', 'r1, -0x40(r1)')/('stwu', 'r1, -0x40(r1)').
- AOSS_81401E80 — express the packet byte update as compound XOR without a temporary: 98.23129%; 147/147 instructions; frame ('stwu', 'r1, -0x40(r1)')/('stwu', 'r1, -0x40(r1)').
- AOSS_81401E80 — keep packet XOR temporary full-width until its byte store: 98.605446%; 147/147 instructions; frame ('stwu', 'r1, -0x40(r1)')/('stwu', 'r1, -0x40(r1)').
- AOSS_814013AC — reuse response-record cursor for nested options: 96.18421%; 114/114 instructions; frame ('stwu', 'r1, -0x30(r1)')/('stwu', 'r1, -0x30(r1)').
- AOSS_814013AC — initialize accumulated configuration flags after validating response length: 96.97369%; 114/114 instructions; frame ('stwu', 'r1, -0x30(r1)')/('stwu', 'r1, -0x30(r1)').
- AOSS_814013AC — translate response selection as a conditional while loop: 82.149124%; 115/114 instructions; frame ('stwu', 'r1, -0x30(r1)')/('stwu', 'r1, -0x30(r1)').
- AOSS_81400830 — initialize encrypted input cursor before plaintext output cursor: 97.0405%; 321/321 instructions; frame ('stwu', 'r1, -0x40(r1)')/('stwu', 'r1, -0x40(r1)').
- AOSS_81400830 — scope encrypted payload lifetime to the decryption blocks: 96.361374%; 321/321 instructions; frame ('stwu', 'r1, -0x40(r1)')/('stwu', 'r1, -0x40(r1)').
- AOSS_81400830 — split decrypted byte expression into encrypted-byte and key-byte temporaries: compiler rejected the variation.
- AOSS_81400830 — split byte XOR with temporaries declared at loop-block entry: 97.0405%; 321/321 instructions; frame ('stwu', 'r1, -0x40(r1)')/('stwu', 'r1, -0x40(r1)').
- AOSS_Init_old — translate the six target poll stores as two real socket poll descriptors: 73.00505%; 1496/1584 instructions; frame ('stwu', 'r1, -0x110(r1)')/('clrlwi', 'r11, r1, 0x1b').
- AOSS_Init_old — use signed timeout halfwords and compare the target minus-one sentinel directly: 73.85038%; 1494/1584 instructions; frame ('stwu', 'r1, -0x110(r1)')/('clrlwi', 'r11, r1, 0x1b').
Progress: all five objdiff-open AOSS functions have at least three distinct measured attempts. Retained hello permutation update ordering (80.168495 -> 86.67033%) and two typed poll descriptors with signed timeout sentinels (73.34911 -> 73.85038%). Both quick gates passed with zero regressions. The initializer remains 90 instructions short and has an unaligned frame versus the target aligned frame. Data audit and further block work continue.
- AOSS_814013AC — advance the formal response pointer directly through response and nested options: 95.08772%; 114/114 instructions; frame ('stwu', 'r1, -0x30(r1)')/('stwu', 'r1, -0x30(r1)').
Data audit: .bss: source/target sizes 3496/3496, alignments 8/8, raw section bytes identical. .data: source/target sizes 364/368, alignments 8/8, raw section bytes differ. .sdata2: source/target sizes 8/8, alignments 8/8, raw section bytes identical. .sdata: source/target sizes 24/24, alignments 8/8, raw section bytes identical. .sbss: source/target sizes 32/32, alignments 8/8, raw section bytes identical.
All .sbss globals have the target offsets and sizes (list 0, config 4, name 8/8 bytes, connection 0x10, error 0x14, socketStarted 0x18, response 0x1c). Raw NOBITS extent matches; objdiff .sbss score remains 42.857143%, with semantic source names versus extracted address labels. .data pool and generated tables are reported 100%; no placement objects or symbol renaming added.
- AOSS_81401778 — give runtime, packet-key and CRC objects their target global binding: 86.67033%; 270/273 instructions; frame ('stwu', 'r1, -0x60(r1)')/('stwu', 'r1, -0x60(r1)').
- AOSS_Init_old — represent connection and response waits as the target two-halfword array: 73.85038%; 1494/1584 instructions; frame ('stwu', 'r1, -0x110(r1)')/('clrlwi', 'r11, r1, 0x1b').
- AOSS_Init_old — use a whole-word wait pair with signed halfword views for target initialization stores: 73.85038%; 1494/1584 instructions; frame ('stwu', 'r1, -0x110(r1)')/('clrlwi', 'r11, r1, 0x1b').
The target-global-binding trial changed no instructions and regressed matched data 3896 -> 400, so it was reverted. Wait-array and whole-word wait-view trials changed no instructions and were reverted. All reverted experiments are absent from the source diff.
## Round-two final inventory
| Function | Target bytes | Compiled bytes before -> after | Objdiff % before -> after | Remaining difference |
| --- | ---: | ---: | ---: | --- |
| AOSS_Init_old | 6336 | 5976 -> 5976 | 73.34911 -> 73.85038 | Ninety instructions short; aligned frame and initial halfword stores differ. |
| AOSS_81400830 | 1284 | 1284 -> 1284 | 97.0405 -> 97.0405 | Register allocation and permutation-loop move order. |
| AOSS_814013AC | 456 | 456 -> 456 | 98.77193 -> 98.77193 | Registers and two entry moves exchanged. |
| AOSS_81401778 | 1092 | 1104 -> 1080 | 80.168495 -> 86.67033 | Three instructions short; merged global base, payload lifetime and CRC scheduling. |
| AOSS_81401E80 | 588 | 588 -> 588 | 98.605446 -> 98.605446 | XOR result and pointer registers. |
Instruction-exact 15/21 -> 15/21; objdiff exact 16/21 -> 16/21. Matched code 6436 -> 6436 of 16192 bytes; matched data 3896 -> 3896 of 3928 bytes. Fuzzy 87.91403 -> 88.54867%. No new instruction-exact function this round; this is partial progress, not unit completion.
All five nonmatching functions received at least three successful distinct source-level experiments. Changed or failed trials were measured and reverted unless they improved the retained state. No data placement, symbol-address names, artificial objects or inline assembly were introduced. Target-global binding and alternative wait views were discarded. The initializer's original local alignment is unresolved; no unsupported alignment was retained. The gate's CR1 branch normalization still undercounts one already-100% function, as in ATERM.
Full final gate:
```
full build: ok
main.dol sha1: 26116613f624061ba99c8d1a299aaa6efa85670d
[src/scene/setting/AOSS] pool: IDENTICAL
[src/scene/setting/AOSS] objdiff: code 6436/16192 data 3896/3928 functions 16/21 fuzzy 88.5487 linked code 0
[src/scene/setting/AOSS] instruction-exact functions: 15/21
[src/scene/setting/AOSS] section .bss size 3496 match 100.0
[src/scene/setting/AOSS] section .data size 368 match 100.0
[src/scene/setting/AOSS] section .sbss size 32 match 42.857143
[src/scene/setting/AOSS] section .sdata size 24 match 100.0
[src/scene/setting/AOSS] section .sdata2 size 8 match 100.0
[src/scene/setting/AOSS] section .text size 16192 match 88.54867
[src/scene/setting/AOSS] below 100: AOSS_Init_old 73.85038
[src/scene/setting/AOSS] below 100: AOSS_81400830 97.0405
[src/scene/setting/AOSS] below 100: AOSS_814013AC 98.77193
[src/scene/setting/AOSS] below 100: AOSS_81401778 86.67033
[src/scene/setting/AOSS] below 100: AOSS_81401E80 98.605446
[src/scene/setting/AOSS] baseline: code 6436/16192 data 3896 functions 16 fuzzy 87.9140
regressions vs baseline: 0
global matched_code_percent: 86.26884 -> 86.26884
global fuzzy_match_percent: 98.87921 -> 98.88315
global complete_code_percent: 60.34391 -> 60.34391
global matched_data_percent: 90.91213 -> 90.91213
forbidden patterns added (net, per file): 0
readability warnings (net, per file; must be 0 in the final result): 0
GATE PASS
```

View File

@@ -0,0 +1,332 @@
# ATERM matching attempts
Baseline: 3bfbb0c9. Target: Wii Menu 4.3U. All sizes are bytes.
Objdiff exact functions: 12/26 -> 15/26. Gate instruction-exact functions: 11/26 -> 14/26. Matched code: 6576/19204 -> 9296/19204. Matched data: 18504/18864 -> 18504/18864. Fuzzy code: 91.736305% -> 96.46365%.
Three functions reached exact matching. Eleven remain open; each has at least three distinct source attempts below. Failed and unchanged experiments were reverted. The remaining functions are not all registers-only.
| Function | Target bytes | Compiled bytes before -> after | Objdiff % before -> after | Final difference |
| --- | ---: | ---: | ---: | --- |
| ATERM_814021BC | 616 | 616 -> 616 | 96.61688 -> 97.91558 | Global address formation and load scheduling. |
| ATERM_8140276C | 696 | 696 -> 696 | 99.166664 -> 99.166664 | Register allocation only. |
| ATERM_81402A24 | 1052 | 1040 -> 1044 | 92.43346 -> 94.73384 | Two instructions short; scan loop and record addressing still differ. |
| ATERM_81402E40 | 384 | 384 -> 384 | 99.791664 -> 99.791664 | Two entry moves exchanged; CR1 branch differences in ctxdiff are an address-normalization artifact. |
| ATERM_814031DC | 532 | 516 -> 516 | 90.766914 -> 90.766914 | Four instructions short; formatting loops use branches rather than target CTR loops. |
| ATERM_814033F0 | 548 | 548 -> 548 | 99.56204 -> 99.56204 | Key cursor and zero constant swap r22/r23. |
| ATERM_814038C8 | 3804 | 3888 -> 3888 | 87.2755 -> 87.43323 | Twenty-one extra instructions; global base spills and local stack offsets differ. |
| ATERMi_AutoConfigThread | 160 | 160 -> 160 | 94.75 -> 94.75 | NOR destination register and global reload/shift scheduling. |
| ATERM_81404844 | 468 | 468 -> 468 | 99.0 -> 99.0 | Register allocation and block index/offset initialization order. |
| ATERM_81404BFC | 1072 | 1072 -> 1072 | 98.94403 -> 98.94403 | Initial byte-load/store scheduling and AES-128 table registers. |
| ATERM_8140502C | 552 | 552 -> 552 | 99.565216 -> 100.0 | Exact: 138 instructions, ctxdiff diffs 0. |
| ATERM_81405254 | 1084 | 1084 -> 1084 | 62.110703 -> 100.0 | Exact: 271 instructions, ctxdiff diffs 0. |
| ATERM_81405690 | 1084 | 1084 -> 1084 | 59.309963 -> 100.0 | Exact: 271 instructions, ctxdiff diffs 0. |
| ATERM_81405ACC | 576 | 556 -> 556 | 88.583336 -> 91.263885 | Five instructions short; byte-copy loops still use indexed rather than target pointer induction. |
Every retained function has the target stack-frame size. The main function still assigns different offsets to some locals.
## ATERM_814021BC
- use one network-settings aggregate pointer: 96.61688% (154/154 instructions, compiled/target).
- IP view scoped after clear: 96.61688% (154/154 instructions, compiled/target).
- host ID call before network zero conversion: 97.91558% (154/154 instructions, compiled/target).
- Retained result: Global address formation and load scheduling.
## ATERM_8140276C
- found/result/index before record pointer views: 98.56322% (174/174 instructions, compiled/target).
- initialize result before found: 98.965515% (174/174 instructions, compiled/target).
- signed traversal locals with original unsigned bounds: 99.166664% (174/174 instructions, compiled/target).
- Retained result: Register allocation only.
## ATERM_81402A24
- scan buffer alignment through wide unsigned address arithmetic: 93.78327% (261/263 instructions, compiled/target).
- retranslate descriptors with indexed record fields rather than interior cursor: 94.73384% (261/263 instructions, compiled/target).
- retranslate deadline comparison and counted MAC loop: 85.50571% (292/263 instructions, compiled/target).
- Retained result: Two instructions short; scan loop and record addressing still differ.
## ATERM_81402E40
- wire payload length unsigned int: 99.791664% (96/96 instructions, compiled/target).
- opaque payload formal with writable halfword view: 99.791664% (96/96 instructions, compiled/target).
- byte encryption key formal: 99.791664% (96/96 instructions, compiled/target).
- payload-header-typed-view: 99.583336% (96/96 instructions, compiled/target).
- Retained result: Two entry moves exchanged; CR1 branch differences in ctxdiff are an address-normalization artifact.
## ATERM_814031DC
- retranslate both MAC loops as six iterations with conditional separator: 53.969925% (191/133 instructions, compiled/target).
- MAC loops with final-iteration continue: 53.969925% (191/133 instructions, compiled/target).
- MAC loop bound from actual address field size: 53.969925% (191/133 instructions, compiled/target).
- mac-encoding-do-while-six-bytes: 90.22556% (131/133 instructions, compiled/target).
- mac-do-while-with-separate-index-increment: 90.22556% (131/133 instructions, compiled/target).
- mac-counted-loop-with-unsigned-bound-comparison: 53.969925% (191/133 instructions, compiled/target).
- Retained result: Four instructions short; formatting loops use branches rather than target CTR loops.
## ATERM_814033F0
- SSID-found flag initialized before cursor: 98.24818% (137/137 instructions, compiled/target).
- key pointer local to key options: 99.56204% (137/137 instructions, compiled/target).
- unsigned byte key view and unsigned found flag: 99.56204% (137/137 instructions, compiled/target).
- result-declared-before-key-with-explicit-init: 99.56204% (137/137 instructions, compiled/target).
- named-key-text-terminator-before-key: 99.56204% (137/137 instructions, compiled/target).
- indexed-source-byte-for-key-encoding: 95.985405% (139/137 instructions, compiled/target).
- Retained result: Key cursor and zero constant swap r22/r23.
## ATERM_814038C8
- block1 defer response and session pointer initialization after protocol state: 87.2755% (972/951 instructions, compiled/target).
- block1 direct global response and session key at each use: 86.11251% (974/951 instructions, compiled/target).
- block1 session key direct global while response stays typed local: 86.66246% (972/951 instructions, compiled/target).
- block1 packet buffer local view shared by send and receive paths: 84.303894% (979/951 instructions, compiled/target).
- retranslate MD5 count initialization and length encoding without snapshot array: 87.43323% (972/951 instructions, compiled/target).
- Retained result: Twenty-one extra instructions; global base spills and local stack offsets differ.
## ATERMi_AutoConfigThread
- signed equality intermediate and arithmetic: 94.75% (40/40 instructions, compiled/target).
- result reload before final state calculation: 91.45% (40/40 instructions, compiled/target).
- natural conditional completed state: 94.0% (40/40 instructions, compiled/target).
- completed state subtracts equality: 72.1% (39/40 instructions, compiled/target).
- state from nested signed expression: 94.75% (40/40 instructions, compiled/target).
- Retained result: NOR destination register and global reload/shift scheduling.
## ATERM_81404844
- signed AES round-count local: 99.0% (117/117 instructions, compiled/target).
- initialize wrapped-block index before byte offset: 98.97436% (117/117 instructions, compiled/target).
- destination byte view initialized with declarations: 98.74359% (117/117 instructions, compiled/target).
- wrapping-destination-index-derived-from-block-number: 95.44444% (116/117 instructions, compiled/target).
- wrapping-pass-base-computed-before-block-loop: 98.97436% (117/117 instructions, compiled/target).
- Retained result: Register allocation and block index/offset initialization order.
## ATERM_81404BFC
- initial key words as canonical big-endian XOR packing: 98.94403% (268/268 instructions, compiled/target).
- store each packed key word immediately: 98.01492% (268/268 instructions, compiled/target).
- initialize substitution view before round constants: 98.77612% (268/268 instructions, compiled/target).
- Retained result: Initial byte-load/store scheduling and AES-128 table registers.
## ATERM_8140502C
- canonical indexed round-key reversal: 99.565216% (138/138 instructions, compiled/target).
- reversal first index declared before last: 99.42029% (138/138 instructions, compiled/target).
- advance reversal indices after swaps: 99.565216% (138/138 instructions, compiled/target).
- canonical-indexed-reversal-with-shared-word: 100.0% (138/138 instructions, compiled/target).
- Retained result: Exact: 138 instructions, ctxdiff diffs 0.
## ATERM_81405254
- input word initialization in assembly scheduling order 1 2 0 3: 59.16236% (271/271 instructions, compiled/target).
- key xor precedes balanced big-endian packing and counter follows states: 53.553505% (271/271 instructions, compiled/target).
- full canonical AES input declarations then packing and direct round tables: 91.11808% (271/271 instructions, compiled/target).
- final AES round balanced low/high substitution pairs in target order: 91.11808% (271/271 instructions, compiled/target).
- final-interleaved-word-output: 100.0% (271/271 instructions, compiled/target).
- Retained result: Exact: 271 instructions, ctxdiff diffs 0.
## ATERM_81405690
- input word initialization in assembly scheduling order 1 2 0 3: 60.564575% (271/271 instructions, compiled/target).
- key xor precedes balanced big-endian packing and counter follows states: 55.583027% (271/271 instructions, compiled/target).
- full canonical AES input declarations then packing and direct round tables: 87.070114% (271/271 instructions, compiled/target).
- balanced inverse round and final substitution pairs in target order: 91.11808% (271/271 instructions, compiled/target).
- final-interleaved-word-output: 100.0% (271/271 instructions, compiled/target).
- Retained result: Exact: 271 instructions, ctxdiff diffs 0.
## ATERM_81405ACC
- retranslation copy blocks through destination/source byte pointers: 72.854164% (138/144 instructions, compiled/target).
- retranslation independent scoped byte copy views and lengths: 72.75% (138/144 instructions, compiled/target).
- retranslation incrementing copy pointers in each byte loop: 74.729164% (135/144 instructions, compiled/target).
- md5-byte-typed-input-formal: 88.583336% (139/144 instructions, compiled/target).
- md5-eight-byte-copy-blocks-followed-by-tail: objdiff score unavailable (267/144 instructions, compiled/target).
- md5-writable-input-formal: 91.263885% (139/144 instructions, compiled/target).
- md5-writable-input-and-scoped-copy-views: 74.6875% (138/144 instructions, compiled/target).
- md5-writable-copy-pointer-increments: 76.875% (135/144 instructions, compiled/target).
- md5-independent-copy-and-block-counters: 91.263885% (139/144 instructions, compiled/target).
- md5-copy-equality-bounds: 69.486115% (117/144 instructions, compiled/target).
- Retained result: Five instructions short; byte-copy loops still use indexed rather than target pointer induction.
## Exact translation evidence
- Encryption and decryption input packing and paired round bodies reached zero differences through instruction 198 before changing the final substitution block.
- Calculating and storing one final output word at a time made both AES functions instruction-exact.
- Indexed round-key reversal with one shared word temporary made ATERM_8140502C instruction-exact.
## Verification
```text
full build: ok
main.dol sha1: 26116613f624061ba99c8d1a299aaa6efa85670d
[src/scene/setting/ATERM] pool: IDENTICAL
[src/scene/setting/ATERM] objdiff: code 9296/19204 data 18504/18864 functions 15/26 fuzzy 96.4637 linked code 0
[src/scene/setting/ATERM] instruction-exact functions: 14/26
regressions vs baseline: 0
forbidden patterns added (net, per file): 0
readability warnings (net, per file; must be 0 in the final result): 0
GATE PASS
```
Full gate used a clean 43U build. Regression, forbidden-pattern and readability counts are zero. configure.py was unchanged; ATERM remains NonMatching.
## Open questions
- The remaining register-allocation choices and scheduling differences have no confirmed source-level fix.
- ATERM_81402FC0 is already 100% in objdiff. Correctly decoding the last branch operand confirms zero instruction differences; ctxdiff and the gate treat the CR1 operand as the destination address and undercount exact functions by one.
- The .data jump-table and .sbss scores remain below exact. No data placement changes were attempted.
## Source commits
- 04ea573a: host address polling order.
- 663b43b7: exact AES transforms, scan record indexing and MD5 length encoding.
- 7c0020a6: writable MD5 input formal to preserve byte-copy alias dependencies.
- e2a5fe66: exact inverse key reversal and source formatting.
## Continuation at 07b3a2b5
Baseline: instruction-exact 14/26, objdiff exact 15/26, code 9296/19204, data 18504/18864, fuzzy 96.46365%. Fresh quick gate passed. Remaining functions will receive new attempts in this round. Data audit first: .rodata tables match; .sdata matches including section tail alignment. .data contains three generated switch tables and MD5 padding. .sbss is 84 bytes versus 80; selected BSSID is used as a six-byte MAC address but declared eight bytes, imposing eight-byte alignment at offset 0x48 instead of target 0x44.
- Data attempt: declare selected BSSID with its actual six-byte MAC length. Compiled .sbss shrinks 84 -> 80 bytes, BSSID moves 0x48 -> 0x44, cancel flag moves 0x50 -> 0x4c, all matching target offsets. Quick gate passed with zero regressions; objdiff data score remains unchanged. Retained as a real layout correction.
- ATERM_81402A24 — round-two block alignment audit: 94.73384%; 261/263 instructions; frame ('stwu', 'r1, -0x90(r1)')/('stwu', 'r1, -0x90(r1)').
- ATERM_81402A24 — initialize scan iteration after allocation to match block 1 lifetime: 94.52471%; 261/263 instructions; frame ('stwu', 'r1, -0x90(r1)')/('stwu', 'r1, -0x90(r1)').
- ATERM_81402A24 — compare current time first as target scan block does: 94.79088%; 261/263 instructions; frame ('stwu', 'r1, -0x90(r1)')/('stwu', 'r1, -0x90(r1)').
- ATERM_81402A24 — translate positive scan edge and separate cleanup jump literally: 94.79088%; 261/263 instructions; frame ('stwu', 'r1, -0x90(r1)')/('stwu', 'r1, -0x90(r1)').
- ATERM_814031DC — bound MAC formatting by the input byte pointer rather than integer trip count: 91.53384%; 139/133 instructions; frame ('stwu', 'r1, -0x60(r1)')/('stwu', 'r1, -0x60(r1)').
- ATERM_814031DC — pointer endpoint equality for six-byte MAC formatting: 91.53384%; 139/133 instructions; frame ('stwu', 'r1, -0x60(r1)')/('stwu', 'r1, -0x60(r1)').
- ATERM_814031DC — count six bytes with equality instead of ordered loop bound: 53.969925%; 191/133 instructions; frame ('stwu', 'r1, -0x60(r1)')/('stwu', 'r1, -0x60(r1)').
- ATERM_814031DC — execute guaranteed nonempty MAC pointer loop as do-while: 93.44361%; 133/133 instructions; frame ('stwu', 'r1, -0x60(r1)')/('stwu', 'r1, -0x60(r1)').
Progress: MAC formatter now has 133/133 instructions, 93.44361% (from 129/133, 90.766914%). Pointer do-while loops preserve real six-byte bounds; branch control still differs from target CTR loops. Quick gate passed with zero regressions. Scan comparison improvement retained at 94.79088%. Next: initial global-base block of the protocol state machine.
- ATERM_814038C8 — initialize protocol state before all local addresses and scalar state: 87.43323%; 972/951 instructions; frame ('stwu', 'r1, -0x180(r1)')/('stwu', 'r1, -0x180(r1)').
- ATERM_814038C8 — use one typed configuration aggregate view for all members: 87.43323%; 972/951 instructions; frame ('stwu', 'r1, -0x180(r1)')/('stwu', 'r1, -0x180(r1)').
- ATERM_814038C8 — reverse alarm and message local declaration order to align the stack block: 87.432175%; 972/951 instructions; frame ('stwu', 'r1, -0x180(r1)')/('stwu', 'r1, -0x180(r1)').
- ATERM_81405ACC — name destination at partial block start before indexed byte copy: 83.34028%; 139/144 instructions; frame ('stwu', 'r1, -0x20(r1)')/('stwu', 'r1, -0x20(r1)').
- ATERM_81405ACC — increment partial destination index independently of source index: 71.46528%; 152/144 instructions; frame ('stwu', 'r1, -0x20(r1)')/('stwu', 'r1, -0x20(r1)').
- ATERM_81405ACC — translate copy blocks as while loops with explicit byte temporaries: 91.263885%; 139/144 instructions; frame ('stwu', 'r1, -0x20(r1)')/('stwu', 'r1, -0x20(r1)').
- ATERM_81405ACC — inline ordinary digest byte-copy helper at both copy blocks: 35.618057%; 59/144 instructions; frame ('stwu', 'r1, -0x20(r1)')/('stwu', 'r1, -0x20(r1)').
- ATERM_81402E40 — initialize checksum cursor before the payload call to alter formal lifetimes: 79.9375%; 88/96 instructions; frame ('stwu', 'r1, -0x30(r1)')/('stwu', 'r1, -0x20(r1)').
- ATERM_81402E40 — initialize checksum immediately before its loop instead of entry: 94.572914%; 96/96 instructions; frame ('stwu', 'r1, -0x20(r1)')/('stwu', 'r1, -0x20(r1)').
- ATERM_81402E40 — name the payload header separately from encrypted payload: 99.791664%; 96/96 instructions; frame ('stwu', 'r1, -0x20(r1)')/('stwu', 'r1, -0x20(r1)').
- ATERM_814033F0 — initialize option result after decoding the response end: 97.66423%; 137/137 instructions; frame ('stwu', 'r1, -0x30(r1)')/('stwu', 'r1, -0x30(r1)').
- ATERM_814033F0 — initialize decoded key view at entry to change zero and key lifetimes: 99.56204%; 137/137 instructions; frame ('stwu', 'r1, -0x30(r1)')/('stwu', 'r1, -0x30(r1)').
- ATERM_814033F0 — scope the decoded key view to the wireless-key option block: 99.56204%; 137/137 instructions; frame ('stwu', 'r1, -0x30(r1)')/('stwu', 'r1, -0x30(r1)').
- ATERM_8140276C — initialize record loop index at its loop and result before found flag: 99.05173%; 174/174 instructions; frame ('stwu', 'r1, -0x80(r1)')/('stwu', 'r1, -0x80(r1)').
- ATERM_8140276C — initialize previous record view before current record view: 98.93678%; 174/174 instructions; frame ('stwu', 'r1, -0x80(r1)')/('stwu', 'r1, -0x80(r1)').
- ATERM_8140276C — translate current-record iteration as a while loop with explicit index advance: 99.034485%; 174/174 instructions; frame ('stwu', 'r1, -0x80(r1)')/('stwu', 'r1, -0x80(r1)').
- ATERM_81404844 — initialize wrapping success before the integrity constants: 99.0%; 117/117 instructions; frame ('stwu', 'r1, -0x190(r1)')/('stwu', 'r1, -0x190(r1)').
- ATERM_81404844 — write integrity words in increasing array order: 98.9829%; 117/117 instructions; frame ('stwu', 'r1, -0x190(r1)')/('stwu', 'r1, -0x190(r1)').
- ATERM_81404844 — initialize block ordinal before output byte offset: 98.97436%; 117/117 instructions; frame ('stwu', 'r1, -0x190(r1)')/('stwu', 'r1, -0x190(r1)').
- ATERM_81404BFC — store each decoded key word before loading the next key word: 98.01492%; 268/268 instructions; frame ('stwu', 'r1, -0x30(r1)')/('stwu', 'r1, -0x30(r1)').
- ATERM_81404BFC — initialize substitution table before round constants in key schedules: 98.77612%; 268/268 instructions; frame ('stwu', 'r1, -0x30(r1)')/('stwu', 'r1, -0x30(r1)').
- ATERM_81404BFC — declare key words in input order and advance round counter as a statement: 98.73881%; 268/268 instructions; frame ('stwu', 'r1, -0x30(r1)')/('stwu', 'r1, -0x30(r1)').
- ATERM_814021BC — set socket-start flag directly before initializing success result: 96.51948%; 154/154 instructions; frame ('stwu', 'r1, -0xd0(r1)')/('stwu', 'r1, -0xd0(r1)').
- ATERM_814021BC — initialize interface configuration view before clearing it: 97.16883%; 154/154 instructions; frame ('stwu', 'r1, -0xd0(r1)')/('stwu', 'r1, -0xd0(r1)').
- ATERM_814021BC — advance interface polling counter at the for-loop edge: 96.61688%; 154/154 instructions; frame ('stwu', 'r1, -0xd0(r1)')/('stwu', 'r1, -0xd0(r1)').
- ATERMi_AutoConfigThread — reuse the completed thread result for its equality mask: 94.75%; 40/40 instructions; frame ('stwu', 'r1, -0x20(r1)')/('stwu', 'r1, -0x20(r1)').
- ATERMi_AutoConfigThread — compute completed state before storing the deadline sentinel: 94.75%; 40/40 instructions; frame ('stwu', 'r1, -0x20(r1)')/('stwu', 'r1, -0x20(r1)').
- ATERMi_AutoConfigThread — express the completion equality mask as a conditional: 84.475%; 42/40 instructions; frame ('stwu', 'r1, -0x20(r1)')/('stwu', 'r1, -0x20(r1)').
Progress: every remaining ATERM function received at least three new source-level attempts. Retained scan deadline, six-byte BSSID layout and MAC loop improvements; all other trials reverted after measurement. Remaining count mismatches: scan 261/263, protocol 972/951 and MD5 update 139/144. Seven near matches have register or scheduling differences with equal counts. Next: AOSS baseline and its two lowest-scoring functions.
- ATERMi_AutoConfigThread — read reported result before deriving the completed state: 91.45%; 40/40 instructions; frame ('stwu', 'r1, -0x20(r1)')/('stwu', 'r1, -0x20(r1)').
- ATERM_81405ACC — give both digest copy blocks their own source and destination array views: 74.93056%; 138/144 instructions; frame ('stwu', 'r1, -0x20(r1)')/('stwu', 'r1, -0x20(r1)').
Data audit: .bss: source/target sizes 8144/8160, alignments 8/32, raw section bytes differ. .rodata: source/target sizes 10280/10280, alignments 8/8, raw section bytes identical. .data: source/target sizes 280/280, alignments 8/8, raw section bytes identical. .sdata2: source/target sizes 7/8, alignments 8/8, raw section bytes differ. .sdata: source/target sizes 53/56, alignments 8/8, raw section bytes differ. .sbss: source/target sizes 80/80, alignments 8/8, raw section bytes identical.
ATERM .data generated switch-table addends remain dependent on nonmatching control-flow offsets. BSSID layout is corrected; raw .sbss extent matches but its symbol matching score remains 38.88889%. No manual tables, address labels or data padding added.
- ATERM_814021BC — declare network configuration with the target BSS alignment: 94.08442%; 153/154 instructions; frame ('stwu', 'r1, -0xd0(r1)')/('stwu', 'r1, -0xd0(r1)').
## Round-two final inventory
| Function | Target bytes | Compiled bytes before -> after | Objdiff % before -> after | Remaining difference |
| --- | ---: | ---: | ---: | --- |
| ATERM_814021BC | 616 | 616 -> 616 | 97.91558 -> 97.91558 | Global address formation and instruction scheduling. |
| ATERM_8140276C | 696 | 696 -> 696 | 99.166664 -> 99.166664 | Registers only. |
| ATERM_81402A24 | 1052 | 1044 -> 1044 | 94.73384 -> 94.79088 | Two instructions short; scan branch and address formation. |
| ATERM_81402E40 | 384 | 384 -> 384 | 99.791664 -> 99.791664 | Two entry moves exchanged. |
| ATERM_814031DC | 532 | 516 -> 532 | 90.766914 -> 93.44361 | Pointer loop branches versus target CTR; registers and scheduling. |
| ATERM_814033F0 | 548 | 548 -> 548 | 99.56204 -> 99.56204 | Key cursor and zero register swap. |
| ATERM_814038C8 | 3804 | 3888 -> 3888 | 87.43323 -> 87.43323 | Twenty-one extra instructions; global base spills and stack offsets. |
| ATERMi_AutoConfigThread | 160 | 160 -> 160 | 94.75 -> 94.75 | NOR destination and reload/shift scheduling. |
| ATERM_81404844 | 468 | 468 -> 468 | 99.0 -> 99.0 | Registers and block-counter initialization order. |
| ATERM_81404BFC | 1072 | 1072 -> 1072 | 98.94403 -> 98.94403 | Key-load scheduling and AES table registers. |
| ATERM_81405ACC | 576 | 556 -> 556 | 91.263885 -> 91.263885 | Five instructions short; byte-copy pointer induction. |
Instruction-exact 14/26 -> 14/26; objdiff exact 15/26 -> 15/26. Matched code 9296 -> 9296 of 19204 bytes; matched data 18504 -> 18504 of 18864 bytes. Fuzzy 96.46365 -> 96.54093%. No new instruction-exact function this round; this is partial progress, not unit completion.
The first-BSS-object alignment trial changed code generation (97.91558 -> 94.08442%) and was reverted. Whole-section .bss and small-data tail alignment is already accepted by objdiff at 100%; no padding added. Earlier raw-byte audit compares unrounded ELF section lengths; differing trailing zero extents do not imply new logical data objects.
Full final gate:
```
full build: ok
main.dol sha1: 26116613f624061ba99c8d1a299aaa6efa85670d
[src/scene/setting/ATERM] pool: IDENTICAL
[src/scene/setting/ATERM] objdiff: code 9296/19204 data 18504/18864 functions 15/26 fuzzy 96.5409 linked code 0
[src/scene/setting/ATERM] instruction-exact functions: 14/26
[src/scene/setting/ATERM] section .bss size 8160 match 100.0
[src/scene/setting/ATERM] section .data size 280 match None
[src/scene/setting/ATERM] section .rodata size 10280 match 100.0
[src/scene/setting/ATERM] section .sbss size 80 match 38.88889
[src/scene/setting/ATERM] section .sdata size 56 match 100.0
[src/scene/setting/ATERM] section .sdata2 size 8 match 100.0
[src/scene/setting/ATERM] section .text size 19204 match 96.54093
[src/scene/setting/ATERM] below 100: ATERM_814021BC 97.91558
[src/scene/setting/ATERM] below 100: ATERM_8140276C 99.166664
[src/scene/setting/ATERM] below 100: ATERM_81402A24 94.79088
[src/scene/setting/ATERM] below 100: ATERM_81402E40 99.791664
[src/scene/setting/ATERM] below 100: ATERM_814031DC 93.44361
[src/scene/setting/ATERM] below 100: ATERM_814033F0 99.56204
[src/scene/setting/ATERM] below 100: ATERM_814038C8 87.43323
[src/scene/setting/ATERM] below 100: ATERMi_AutoConfigThread 94.75
[src/scene/setting/ATERM] below 100: ATERM_81404844 99.0
[src/scene/setting/ATERM] below 100: ATERM_81404BFC 98.94403
[src/scene/setting/ATERM] below 100: ATERM_81405ACC 91.263885
[src/scene/setting/ATERM] baseline: code 9296/19204 data 18504 functions 15 fuzzy 96.4637
regressions vs baseline: 0
global matched_code_percent: 86.26884 -> 86.26884
global fuzzy_match_percent: 98.87921 -> 98.88315
global complete_code_percent: 60.34391 -> 60.34391
global matched_data_percent: 90.91213 -> 90.91213
forbidden patterns added (net, per file): 0
readability warnings (net, per file; must be 0 in the final result): 0
GATE PASS
```

View File

@@ -29,33 +29,3 @@ Additional Decrypt correction: restored 0x3E800 size limit, actual seek/read err
Remaining: CDBCryptBuffer 99.97479%, 119/119 instructions, three pool offsets; CDBRecordEncrypt 97.19014%, register allocation and one instruction; CDBRecordDecrypt 99.96789%, stack placement.
The four forced field accessors end with CDBUnlock and do not produce a CDBErr result. Their void declarations are gated by CDB_RECORD_IMPLEMENTATION, preserving all other translation units and avoiding fall-through non-void definitions.
## Wave: dead-helper emission decode (scene2 leaf)
Decoded MWCC literal-emission model via /tmp/tlit*.c experiments:
- Non-static fns emit literals + standalone .text bodies at DEF position, even uncalled.
- Static fns fully inlined at all call sites emit literals at FIRST-CALL parse position, no body.
- A call inside ANY runtime check materializes code at the inlined site — MWCC never
constant-folds `&local != NULL` (tlit10: `if(src==NULL)` w/ `&loc` arg emits addic+bne).
- A static called only from a body that never materializes emits literals but no .text.
Final structure (all helpers NON-STATIC dead impl fns at orig def positions):
- CDBRecordGetFileSize_ (def after Seek, before GetDataSize) -> emits @0x1b0
- ReduceFileSize_/ReduceDataSize_ before Remove -> 0x228-0x38c
- SetFileType_..GetCalenderTime_ before GetTypeForce -> 0x428-0x7d4
- CDBRecordDuplicate_ (pure key+field copies, called by BackupToSD_) -> inlines clean
- CDBRecordDuplicatePanic_ (dead, OSPanic __FILE__ pair) -> 0x8d8/0x8e4
- CDBRecordPrivateChangeOwner_ ({CDBReport_(3);OSReport(sjis)}, called by Decrypt) -> inlines
- CDBRecordPrivateChangeOwnerDebug_ (dead 5-OSReport debug block) -> 0x958-0x9b4
- Extra .text bodies of dead extern fns are score-neutral (objdiff counts orig fns only).
- Decrypt's first locked report = "can't get data size" (0x1ec, NOT modified-time; orig
Decrypt refs 0x1ec + SJIS 0x940 only). GetId refs 0x814 (CDBId) + 0x5b0 (maker code).
- Orig Encrypt refs base+0x1b0/0x1ec/0x178 (file-size/data-size/read reports, 3 refs ->
homes .data base in r25). Record struct field `file` is void* -> needs (CDBRecordFile*) cast.
Result: .data byte-identical (mod extraction tail pad), 28/29 fns at 100%.
Residual: CDBRecordEncrypt pure register-home permutation (153 diff lines, all REGNAME,
instruction-count-equal). Orig: base=r25, record=r26, buffer=r27, key/err=r24, size=r28,
encSize=r29, recordFile=r30, file=r31. Mine: base=r31, params shifted -1, key=r29.
Tried: recordFile decl order (worse, 159), recordFile load after memset (key->r24 fixed
but CR-field regressions, 155). Documented tie-break.

View File

@@ -1076,3 +1076,406 @@ GATE PASS
```
- Post-full-clean-build latest-main comparison repeated: zero project-wide matched/linked/function regressions; 121/121 Step jump relocations preserved.
- Local improvement commits: c4ae8bcc correct interpreter scratch object storage; 743f0580 improve chansvmstep code matching; f9928196 improve chansvmstep code matching; 572a7c04 improve chansvmaddexe code matching; 076645dc improve vmstringreplace code matching; 647f5007 improve vmstringreplace code matching; 5e75409f improve chansvm_8144b4d4 code matching; 179218d7 improve vmblobunpack code matching; d125aec2 improve vmblobunpack code matching; 051a713b read unpacked integers through their typed value.
CHANSVmNewObjData declaration order [0, 1, 2, 3, 4, 5]: structural/exact (0, 10)
CHANSVmNewObjData diagnosis: (0, 10); target size 384; declaration entries [' CHANSVmPrivate* pVm = (CHANSVmPrivate*)vm;\n', ' u32 idx;\n', ' u32 chunkIdx;\n', ' union {\n u32 off;\n ChunkEntry* entry;\n } u;\n', ' ChunkEntry* chunk;\n', ' u32 memSize;\n']
CHANSVmNewObjData declaration order [1, 0, 2, 3, 4, 5]: structural/exact (0, 10)
CHANSVmNewObjData declaration order [2, 1, 0, 3, 4, 5]: structural/exact (0, 10)
CHANSVmNewObjData declaration order [5, 1, 2, 3, 4, 0]: structural/exact (0, 7)
CHANSVmNewObjData result (0, 7), attempts 163, RESTORED
VmStringFromCharCode declaration order [0, 1, 2, 3, 4]: structural/exact (0, 6)
VmStringFromCharCode diagnosis: (0, 6); target size 236; declaration entries [' CHANSVmObjHdr* arg;\n', ' u32 offs;\n', ' u32 argc;\n', ' u32 ch;\n', ' u32 i;\n']
VmStringFromCharCode declaration order [1, 0, 2, 3, 4]: structural/exact (0, 6)
VmStringFromCharCode declaration order [2, 1, 0, 3, 4]: structural/exact (0, 9)
VmStringFromCharCode result (0, 6), attempts 90, RESTORED
VmWinEmuWrite declaration order [0, 1, 2, 3, 4, 5, 6, 7]: structural/exact (0, 5)
VmWinEmuWrite diagnosis: (0, 5); target size 268; declaration entries [' CHANSVmObjHdr* strObj;\n', ' u32 offset;\n', ' u32 totalLength;\n', ' u8 buf[VM_STRING_SIZE];\n', ' s32 outLen;\n', ' s32 inLen;\n', ' s32 result;\n', ' u32 remaining;\n']
VmWinEmuWrite declaration order [1, 0, 2, 3, 4, 5, 6, 7]: structural/exact (0, 5)
VmWinEmuWrite declaration order [2, 1, 0, 3, 4, 5, 6, 7]: structural/exact (0, 8)
VmWinEmuWrite declaration-order search stopped after 3+ distinct compiled orders without improvement; restored original source.
## 2026-10-01 215/233 baseline continuation
Target and current instructions have equal counts for all 18 open functions. Full structural ctxdiff was captured before each experiment. Baseline pool IDENTICAL, .data 100%, 121/121 jump relocations. Declaration-only trials above did not produce exactness.
vmBlobParsePackFormatString: distinct parameter digit scope then split accumulation; 116/116 instructions, 6 differences each; restored. Target preserves format character in r11 and uses distinct numeric digit r0.
vmBlobParsePackFormatString: u32 digit, decimal digit + paramValue * 10 - 0x30: 99.69827%; 116/116 insns; structural/exact (0, 6); .data 100.0%; RESTORED
vmBlobParsePackFormatString: u32 digit, decimal paramValue * 10 + (digit - 0x30): 99.69827%; 116/116 insns; structural/exact (0, 6); .data 100.0%; RESTORED
vmBlobParsePackFormatString: u32 digit, decimal paramValue * 10;
paramValue += digit;
paramValue -= 0x30: 99.82758%; 116/116 insns; structural/exact (0, 2); .data 100.0%; RESTORED
vmBlobParsePackFormatString: wchar_t digit, decimal digit + paramValue * 10 - 0x30: 99.69827%; 116/116 insns; structural/exact (0, 6); .data 100.0%; RESTORED
vmBlobParsePackFormatString: wchar_t digit, decimal paramValue * 10 + (digit - 0x30): 99.69827%; 116/116 insns; structural/exact (0, 6); .data 100.0%; RESTORED
vmBlobParsePackFormatString: wchar_t digit, decimal paramValue * 10;
paramValue += digit;
paramValue -= 0x30: 99.82758%; 116/116 insns; structural/exact (0, 2); .data 100.0%; RESTORED
vmBlobParsePackFormatString: s32 digit, decimal digit + paramValue * 10 - 0x30: 98.27586%; 116/116 insns; structural/exact (3, 6); .data 100.0%; RESTORED
vmBlobParsePackFormatString: s32 digit, decimal paramValue * 10 + (digit - 0x30): 98.27586%; 116/116 insns; structural/exact (3, 6); .data 100.0%; RESTORED
vmBlobParsePackFormatString: s32 digit, decimal paramValue * 10;
paramValue += digit;
paramValue -= 0x30: 98.27586%; 116/116 insns; structural/exact (3, 5); .data 100.0%; RESTORED
vmBlobParsePackFormatString: u16 digit, decimal digit + paramValue * 10 - 0x30: 99.69827%; 116/116 insns; structural/exact (0, 6); .data 100.0%; RESTORED
vmBlobParsePackFormatString: u16 digit, decimal paramValue * 10 + (digit - 0x30): 99.69827%; 116/116 insns; structural/exact (0, 6); .data 100.0%; RESTORED
vmBlobParsePackFormatString: u16 digit, decimal paramValue * 10;
paramValue += digit;
paramValue -= 0x30: 99.82758%; 116/116 insns; structural/exact (0, 2); .data 100.0%; RESTORED
vmBlobParsePackFormatString: u32 digit, decimal digit + paramValue * 10 - 0x30: 99.69827%; 116/116 insns; structural/exact (0, 6); .data 100.0%; RESTORED
vmBlobParsePackFormatString: u32 digit, decimal paramValue * 10 + (digit - 0x30): 99.69827%; 116/116 insns; structural/exact (0, 6); .data 100.0%; RESTORED
vmBlobParsePackFormatString: u32 digit, decimal paramValue * 10;
paramValue += digit;
paramValue -= 0x30: 99.82758%; 116/116 insns; structural/exact (0, 2); .data 100.0%; RESTORED
vmBlobParsePackFormatString: wchar_t digit, decimal digit + paramValue * 10 - 0x30: 99.69827%; 116/116 insns; structural/exact (0, 6); .data 100.0%; RESTORED
vmBlobParsePackFormatString: wchar_t digit, decimal paramValue * 10 + (digit - 0x30): 99.69827%; 116/116 insns; structural/exact (0, 6); .data 100.0%; RESTORED
vmBlobParsePackFormatString: wchar_t digit, decimal paramValue * 10;
paramValue += digit;
paramValue -= 0x30: 99.82758%; 116/116 insns; structural/exact (0, 2); .data 100.0%; RESTORED
vmBlobParsePackFormatString: s32 digit, decimal digit + paramValue * 10 - 0x30: 98.27586%; 116/116 insns; structural/exact (3, 6); .data 100.0%; RESTORED
vmBlobParsePackFormatString: s32 digit, decimal paramValue * 10 + (digit - 0x30): 98.27586%; 116/116 insns; structural/exact (3, 6); .data 100.0%; RESTORED
vmBlobParsePackFormatString: s32 digit, decimal paramValue * 10;
paramValue += digit;
paramValue -= 0x30: 98.27586%; 116/116 insns; structural/exact (3, 5); .data 100.0%; RESTORED
vmBlobParsePackFormatString: u16 digit, decimal digit + paramValue * 10 - 0x30: 99.69827%; 116/116 insns; structural/exact (0, 6); .data 100.0%; RESTORED
vmBlobParsePackFormatString: u16 digit, decimal paramValue * 10 + (digit - 0x30): 99.69827%; 116/116 insns; structural/exact (0, 6); .data 100.0%; RESTORED
vmBlobParsePackFormatString: u16 digit, decimal paramValue * 10;
paramValue += digit;
paramValue -= 0x30: 99.82758%; 116/116 insns; structural/exact (0, 2); .data 100.0%; RESTORED
vmBlobParsePackFormatString: split decimal with paramValue *= 10;
paramValue = digit + paramValue - 0x30;: 99.69827%; 116/116 insns; structural/exact (0, 6); .data 100.0%; RESTORED
vmBlobParsePackFormatString: split decimal with paramValue *= 10;
digit += paramValue;
paramValue = digit - 0x30;: 99.69827%; 116/116 insns; structural/exact (0, 6); .data 100.0%; RESTORED
vmBlobParsePackFormatString: split decimal with paramValue *= 10;
paramValue = (s32)(digit + paramValue) - 0x30;: 99.61207%; 116/116 insns; structural/exact (0, 7); .data 100.0%; RESTORED
vmBlobParsePackFormatString: split decimal with paramValue *= 10;
paramValue = (digit + paramValue);
paramValue -= 0x30;: 99.61207%; 116/116 insns; structural/exact (0, 7); .data 100.0%; RESTORED
vmBlobParsePackFormatString: split decimal with paramValue *= 10;
{
s32 sum = digit + paramValue;
paramValue = sum - 0x30;
}: 99.61207%; 116/116 insns; structural/exact (0, 7); .data 100.0%; RESTORED
vmBlobParsePackFormatString: split decimal with paramValue *= 10;
{
u32 sum = digit + paramValue;
paramValue = sum - 0x30;
}: 99.69827%; 116/116 insns; structural/exact (0, 6); .data 100.0%; RESTORED
vmBlobParsePackFormatString: decimal operand/cast paramValue *= 10;
paramValue += digit - 0x30;: 99.913795%; 116/116 insns; structural/exact (0, 1); .data 100.0%; RESTORED
vmBlobParsePackFormatString: decimal operand/cast paramValue *= 10;
paramValue = paramValue + digit - 0x30;: 99.69827%; 116/116 insns; structural/exact (0, 6); .data 100.0%; RESTORED
vmBlobParsePackFormatString: decimal operand/cast paramValue *= 10;
paramValue += (s32)digit;
paramValue -= 0x30;: 99.82758%; 116/116 insns; structural/exact (0, 2); .data 100.0%; RESTORED
vmBlobParsePackFormatString: decimal operand/cast paramValue *= 10;
digit = paramValue + digit;
paramValue = digit - 0x30;: 99.69827%; 116/116 insns; structural/exact (0, 6); .data 100.0%; RESTORED
vmBlobParsePackFormatString: decimal operand/cast paramValue *= 10;
paramValue = digit + (u32)paramValue;
paramValue -= 0x30;: 99.61207%; 116/116 insns; structural/exact (0, 7); .data 100.0%; RESTORED
vmBlobParsePackFormatString: decimal final operand paramValue = (digit - 0x30) + paramValue;: 99.69827%; 116/116 insns; structural/exact (0, 6); .data 100.0%; RESTORED
vmBlobParsePackFormatString: decimal final operand paramValue = digit - 0x30 + paramValue;: 99.69827%; 116/116 insns; structural/exact (0, 6); .data 100.0%; RESTORED
vmBlobParsePackFormatString: decimal final operand paramValue -= 0x30 - digit;: 97.75862%; 116/116 insns; structural/exact (3, 3); .data 100.0%; RESTORED
vmBlobParsePackFormatString: decimal final operand paramValue += digit + -0x30;: 99.913795%; 116/116 insns; structural/exact (0, 1); .data 100.0%; RESTORED
vmBlobParsePackFormatString: decimal final operand paramValue += (s32)digit - 0x30;: 99.913795%; 116/116 insns; structural/exact (0, 1); .data 100.0%; RESTORED
vmBlobParsePackFormatString: decimal final operand paramValue += (u32)(digit - 0x30);: 100.0%; 116/116 insns; structural/exact (0, 0); .data 100.0%; KEPT exact; quick GATE PASS
VmStringFromCharCode: character mask/cursor form 0: 99.40678%; 59/59 insns; structural/exact (0, 6); .data 100.0%; RESTORED
VmStringFromCharCode: character mask/cursor form 1: 99.40678%; 59/59 insns; structural/exact (0, 6); .data 100.0%; RESTORED
VmStringFromCharCode: character mask/cursor form 2: 94.32204%; 57/59 insns; structural/exact (9, 45); .data 100.0%; RESTORED
VmStringFromCharCode: character mask/cursor form 3: 94.32204%; 57/59 insns; structural/exact (9, 45); .data 100.0%; RESTORED
VmStringFromCharCode: character mask/cursor form 4: 99.32204%; 59/59 insns; structural/exact (0, 7); .data 100.0%; RESTORED
VmStringFromCharCode: character mask/cursor form 5: 99.40678%; 59/59 insns; structural/exact (0, 6); .data 100.0%; RESTORED
VmStringFromCharCode: character mask/cursor form 6: 99.40678%; 59/59 insns; structural/exact (0, 6); .data 100.0%; RESTORED
VmStringFromCharCode: character mask/cursor form 7: 99.40678%; 59/59 insns; structural/exact (0, 6); .data 100.0%; RESTORED
VmWinEmuWrite: size type: 99.62687%; 67/67 insns; structural/exact (0, 5); .data 100.0%; RESTORED
VmWinEmuWrite: signed size: 99.62687%; 67/67 insns; structural/exact (0, 5); .data 100.0%; RESTORED
VmWinEmuWrite: cache payload: COMPILE FAIL orm_dep.py build/43U/src/src/channelScript/CHANSVm.d build/43U/src/src/channelScript/CHANSVm.d
### mwcceppc.exe Compiler:
# File: src\channelScript\CHANSVm.c
# ------------------------------------
# 6073: strValue = strObj->value.wstring_v;
# Error: ^
# (10209) illegal implicit conversion from 'struct *' to
# 'struct *'
# Too many errors printed, aborting program
User break, cancelled...
ninja: build stopped: subcommand failed.
; RESTORED
VmWinEmuWrite: unmasked cached size: 99.62687%; 67/67 insns; structural/exact (0, 5); .data 100.0%; RESTORED
CHANSVmParseInt: one-slot end buffer: 94.69388%; 49/49 insns; structural/exact (2, 3); .data 100.0%; RESTORED
CHANSVmParseInt: parse scratch structure: 94.69388%; 49/49 insns; structural/exact (2, 3); .data 100.0%; RESTORED
CHANSVmParseInt: initialized parse end: 94.69388%; 49/49 insns; structural/exact (2, 3); .data 100.0%; RESTORED
CHANSVmParseInt: explicit type after end initialization: 83.67347%; 49/49 insns; structural/exact (4, 5); .data 100.0%; RESTORED
CHANSVm_8144B4D4: one-slot end buffer: 97.59036%; 83/83 insns; structural/exact (2, 2); .data 100.0%; RESTORED
CHANSVm_8144B4D4: parse scratch structure: 97.59036%; 83/83 insns; structural/exact (2, 2); .data 100.0%; RESTORED
CHANSVm_8144B4D4: initialized parse end: 97.59036%; 83/83 insns; structural/exact (2, 2); .data 100.0%; RESTORED
CHANSVm_8144B4D4: explicit type after end initialization: 95.180725%; 83/83 insns; structural/exact (2, 3); .data 100.0%; RESTORED
CHANSVmGetSourceLine: explicit source table and guards 0: 79.13043%; 54/46 insns; structural/exact (12, 52); .data 100.0%; RESTORED
CHANSVmGetSourceLine: explicit source table and guards 1: 79.13043%; 54/46 insns; structural/exact (12, 52); .data 100.0%; RESTORED
CHANSVmGetSourceLine: explicit source table and guards 2: 79.13043%; 54/46 insns; structural/exact (12, 52); .data 100.0%; RESTORED
CHANSVmGetSourceLine: explicit source table and guards 3: 79.13043%; 54/46 insns; structural/exact (12, 52); .data 100.0%; RESTORED
CHANSVmGetSourceLine: explicit source table and guards 4: 62.065216%; 50/46 insns; structural/exact (21, 48); .data 100.0%; RESTORED
CHANSVmGetSourceLine: explicit source table and guards 5: 79.13043%; 54/46 insns; structural/exact (12, 52); .data 100.0%; RESTORED
VmDateDtor: month and weekday pointer scopes: 94.96703%; 91/91 insns; structural/exact (5, 7); .data 100.0%; RESTORED
VmDateDtor: calendar by value fields: 89.14286%; 90/91 insns; structural/exact (11, 85); .data 100.0%; RESTORED
VmDateDtor: return format length directly to limit: 94.96703%; 91/91 insns; structural/exact (5, 7); .data 100.0%; RESTORED
VmDateDtor: month table indexed pointer expression: 94.96703%; 91/91 insns; structural/exact (5, 7); .data 100.0%; RESTORED
VmDateDtor: short-lived month pointer: 94.96703%; 91/91 insns; structural/exact (5, 7); .data 100.0%; RESTORED
CHANSVmGetSourceLine: module cached in null-guard scope 0: 97.82609%; 46/46 insns; structural/exact (0, 16); .data 100.0%; RESTORED
CHANSVmGetSourceLine: module cached in null-guard scope 1: 97.82609%; 46/46 insns; structural/exact (0, 18); .data 100.0%; RESTORED
CHANSVmGetSourceLine: module cached in null-guard scope 2: 97.82609%; 46/46 insns; structural/exact (0, 16); .data 100.0%; RESTORED
CHANSVmGetSourceLine: module cached in null-guard scope 3: 97.82609%; 46/46 insns; structural/exact (0, 16); .data 100.0%; RESTORED
CHANSVmGetSourceLine: module cached in null-guard scope 4: 97.82609%; 46/46 insns; structural/exact (0, 16); .data 100.0%; RESTORED
VmStringFromCharCode: integer argument helper: 99.40678%; 59/59 insns; structural/exact (0, 6); .data 100.0%; RESTORED
VmWinEmuWrite: string argument helper: 99.62687%; 67/67 insns; structural/exact (0, 5); .data 100.0%; RESTORED
VmStringReplace: two string argument helpers: 97.878784%; 132/132 insns; structural/exact (0, 40); .data 100.0%; RESTORED
VmStringSplit: string and integer argument helpers: 98.04054%; 222/222 insns; structural/exact (0, 66); .data 100.0%; RESTORED
VmBlobGetHexString: integer argument helper: 98.71951%; 82/82 insns; structural/exact (0, 14); .data 100.0%; RESTORED
VmBlobPackCommon: typed argument helper boundaries: COMPILE FAIL .py build/43U/src/src/channelScript/CHANSVm.d build/43U/src/src/channelScript/CHANSVm.d
### mwcceppc.exe Compiler:
# File: src\channelScript\CHANSVm.c
# ------------------------------------
# 4976: argArr = CHANSVmGetArgArray(VmInst, 1);
# Error: ^
# (10209) illegal implicit conversion from 'int' to
# 'struct CHANSVmObjHdr *'
# Too many errors printed, aborting program
User break, cancelled...
ninja: build stopped: subcommand failed.
; RESTORED
VmBlobUnpack: typed string argument helper boundary: 98.26886%; 517/517 insns; structural/exact (0, 156); .data 100.0%; RESTORED
CHANSVmNewObjData: separate index-offset and entry locals: 97.1875%; 95/96 insns; structural/exact (7, 59); .data 100.0%; RESTORED
CHANSVmNewObjData: scope computed chunk address: 99.427086%; 96/96 insns; structural/exact (0, 10); .data 100.0%; RESTORED
CHANSVmNewObjData: scope slot index to table scan: 99.583336%; 96/96 insns; structural/exact (0, 7); .data 100.0%; RESTORED
CHANSVmNewObjData: counted chunk traversal: 99.427086%; 96/96 insns; structural/exact (0, 10); .data 100.0%; RESTORED
VmStringReplace declaration order [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]: structural/exact (0, 40)
VmStringReplace diagnosis: (0, 40); target size 528; declaration entries [' CHANSVmObjHdr* arg0;\n', ' CHANSVmObjHdr* arg1;\n', ' vmString parentStr;\n', ' vmString searchStr;\n', ' vmString replaceStr;\n', ' u32 parentLen;\n', ' u32 srcOffs;\n', ' u32 dstOffs;\n', ' u32 searchLen;\n', ' u32 replaceLen;\n', ' u32 dstBufLen;\n', ' vmString newStr;\n', ' u32 segLen;\n']
VmStringReplace declaration order [1, 0, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]: structural/exact (0, 40)
VmStringReplace declaration order [2, 1, 0, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]: structural/exact (0, 40)
VmStringReplace declaration order [4, 1, 2, 3, 5, 6, 8, 7, 0, 9, 10, 11, 12]: structural/exact (0, 28)
VmStringReplace result (0, 28), attempts 29, RESTORED
VmStringSplit declaration order [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]: structural/exact (0, 66)
VmStringSplit diagnosis: (0, 66); target size 888; declaration entries [' CHANSVmObjHdr* arg0;\n', ' CHANSVmObjHdr* arg1;\n', ' u32 limit;\n', ' CHANSVmObjHdr* array;\n', ' vmString parentStr;\n', ' vmString delimStr;\n', ' u32 parentLen;\n', ' u32 delimLen;\n', ' u32 count;\n', ' u32 srcOffs;\n', ' u32 segStart;\n', ' u32 arrayCount;\n', ' u32 segLen;\n', ' u32 remaining;\n', ' CHANSVmObjHdr* elem;\n', ' u32 i;\n']
VmStringSplit declaration order [1, 0, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]: structural/exact (0, 66)
VmStringSplit declaration order [2, 1, 0, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]: structural/exact (0, 66)
VmStringSplit declaration order [14, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 0, 15]: structural/exact (0, 61)
VmStringSplit result (0, 61), attempts 29, RESTORED
CHANSVmAddExe declaration order [0, 1, 2, 3, 4, 5, 6]: structural/exact (0, 34)
CHANSVmAddExe diagnosis: (0, 34); target size 1016; declaration entries [' CHANSVmPrivate* pVm = (CHANSVmPrivate*)vm;\n', ' ModuleHeader* mod;\n', ' CHANSVmModule* header;\n', ' u32 maxEnd;\n', ' u32 size;\n', ' u32 cnt;\n', ' u32 ofs;\n']
CHANSVmAddExe declaration order [1, 0, 2, 3, 4, 5, 6]: structural/exact (0, 34)
CHANSVmAddExe declaration order [2, 1, 0, 3, 4, 5, 6]: structural/exact (0, 34)
CHANSVmAddExe result (0, 34), attempts 29, RESTORED
CHANSVmLinkModules declaration order [0, 1, 2, 3]: structural/exact (0, 43)
CHANSVmLinkModules diagnosis: (0, 43); target size 756; declaration entries [' CHANSVmPrivate* pVm = (CHANSVmPrivate*)vm;\n', ' CHANSVmModule* module;\n', ' u32 modIdx;\n', ' u32 i;\n']
CHANSVmLinkModules declaration order [1, 0, 2, 3]: structural/exact (0, 43)
CHANSVmLinkModules declaration order [2, 1, 0, 3]: structural/exact (0, 46)
CHANSVmLinkModules result (0, 43), attempts 19, RESTORED
VmCallMethod declaration order [0, 1, 2, 3]: structural/exact (4, 97)
VmCallMethod diagnosis: (4, 97); target size 1124; declaration entries [' CHANSVmPrivate* pVm = (CHANSVmPrivate*)vm;\n', ' CHANSVmObjHdr* acc;\n', ' u32 retVal;\n', ' CHANSVmNativeClass* target;\n']
VmCallMethod declaration order [1, 0, 2, 3]: structural/exact (4, 97)
VmCallMethod declaration order [2, 1, 0, 3]: structural/exact (4, 109)
VmCallMethod result (4, 97), attempts 19, RESTORED
VmBlobPackCommon declaration order [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26]: structural/exact (2, 246)
VmBlobPackCommon diagnosis: (2, 246); target size 2672; declaration entries [' u32 packBuf[2];\n', ' BlobHeader* parentBlob;\n', ' CHANSVmObjHdr* argStr;\n', ' const wchar_t* fmtStr;\n', ' u32 fmtLen;\n', ' CHANSVmObjHdr* argArr;\n', ' u32 fmtPos;\n', ' u32 argCount;\n', ' u32 totalSize;\n', ' s32 count;\n', ' u32 i;\n', ' CHANSVmObjHdr* obj;\n', ' BlobHeader* srcBlob;\n', ' s32 copySize;\n', ' u32 dataSize;\n', ' u32 srcOff;\n', ' CHANSVmObjHdr* strObj;\n', ' u8* srcData;\n', ' u32 charCount;\n', ' u32 strLen;\n', ' CHANSVmObjHdr* intObj;\n', ' u32 valLow;\n', ' u32 valHigh;\n', ' s32 bufSize;\n', ' u8* dest;\n', ' u32 ch;\n', ' CHANSVmExecutionCtx* execCtx;\n']
VmBlobPackCommon declaration order [1, 0, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26]: structural/exact (2, 246)
VmBlobPackCommon declaration order [2, 1, 0, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26]: structural/exact (2, 246)
VmBlobPackCommon declaration order [15, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 0, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26]: structural/exact (2, 244)
VmBlobPackCommon result (2, 244), attempts 29, RESTORED
VmBlobUnpack declaration order [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]: structural/exact (0, 156)
VmBlobUnpack diagnosis: (0, 156); target size 2068; declaration entries [' union {\n u64 value;\n u32 words[2];\n } unpackBuf;\n', ' BlobHeader* srcBlob;\n', ' CHANSVmObjHdr* argStr;\n', ' wchar_t* fmtStr;\n', ' u32 fmtLen;\n', ' u32 blobOff;\n', ' u32 argCount;\n', ' u32 fmtPos;\n', ' s32 count;\n', ' u32 elemIdx;\n', ' u32 iterIdx;\n', ' s64 value;\n', ' CHANSVmObjHdr* arrElem;\n']
VmBlobUnpack declaration order [1, 0, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]: structural/exact (0, 156)
VmBlobUnpack declaration order [2, 1, 0, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]: structural/exact (0, 156)
VmBlobUnpack declaration order [1, 9, 2, 3, 4, 5, 6, 7, 8, 0, 10, 11, 12]: structural/exact (0, 146)
VmBlobUnpack result (0, 146), attempts 29, RESTORED
CHANSVmNewObjData: offset before chunk scan initialization: 99.427086%; 96/96 insns; structural/exact (0, 10); .data 100.0%; RESTORED
CHANSVmNewObjData: declare scanned chunk inside block: 99.583336%; 96/96 insns; structural/exact (0, 7); .data 100.0%; RESTORED
CHANSVmNewObjData: aligned allocation declared in its lifetime: 99.427086%; 96/96 insns; structural/exact (0, 10); .data 100.0%; RESTORED
VmWinEmuWrite: use byte-string member for output address and length: 99.62687%; 67/67 insns; structural/exact (0, 5); .data 100.0%; RESTORED
VmWinEmuWrite: immutable converted string header: 99.62687%; 67/67 insns; structural/exact (0, 5); .data 100.0%; RESTORED
VmWinEmuWrite: cache wide-string payload: 96.49254%; 65/67 insns; structural/exact (6, 54); .data 100.0%; RESTORED
VmStringFromCharCode: scope byte offset to output creation: 98.72881%; 59/59 insns; structural/exact (0, 12); .data 100.0%; RESTORED
VmStringFromCharCode: immutable argument pointer for char conversion: COMPILE FAIL lScript/CHANSVm.d
### mwcceppc.exe Compiler:
# File: src\channelScript\CHANSVm.c
# ------------------------------------
# 2873: CHANSVmConvertObjectType(VmInst, CHANS_VM_OBJ_TYPE_INTEGER, arg);
# Error: ^
# (10209) illegal implicit conversion from 'const struct CHANSVmObjHdr *' to
# 'struct CHANSVmObjHdr *'
# Too many errors printed, aborting program
User break, cancelled...
ninja: build stopped: subcommand failed.
; RESTORED
VmStringFromCharCode: decrement argument count traversal: 96.10169%; 60/59 insns; structural/exact (7, 31); .data 100.0%; RESTORED
VmDateDtor: calendar format inline helper char* buffer, OSCalendarTime* date: 94.96703%; 91/91 insns; structural/exact (5, 7); .data 100.0%; RESTORED
VmDateDtor: calendar format inline helper OSCalendarTime* date, char* buffer: 94.96703%; 91/91 insns; structural/exact (5, 7); .data 100.0%; RESTORED
VmDateDtor: calendar format inline helper char* buffer, OSCalendarTime date: 72.98901%; 107/91 insns; structural/exact (52, 97); .data 100.0%; RESTORED
CHANSVm_8145049C: formatted string payload/character lifetime 0: 99.35035%; 430/431 insns; structural/exact (25, 142); .data 18.050066%; RESTORED
CHANSVm_8145049C: formatted string payload/character lifetime 1: COMPILE FAIL ript && "/usr/bin/python3" tools/transform_dep.py build/43U/src/src/channelScript/CHANSVm.d build/43U/src/src/channelScript/CHANSVm.d
### mwcceppc.exe Compiler:
# File: src\channelScript\CHANSVm.c
# ------------------------------------
# 3625: wchar_t* characterText = (wchar_t*)pad0;
# Error: ^^^^^^^
# (10141) expression syntax error
# Too many errors printed, aborting program
User break, cancelled...
ninja: build stopped: subcommand failed.
; RESTORED
CHANSVm_8145049C: formatted string payload/character lifetime 2: COMPILE FAIL ript && "/usr/bin/python3" tools/transform_dep.py build/43U/src/src/channelScript/CHANSVm.d build/43U/src/src/channelScript/CHANSVm.d
### mwcceppc.exe Compiler:
# File: src\channelScript\CHANSVm.c
# ------------------------------------
# 3625: wchar_t* characterText = (wchar_t*)pad0;
# Error: ^^^^^^^
# (10141) expression syntax error
# Too many errors printed, aborting program
User break, cancelled...
ninja: build stopped: subcommand failed.
; RESTORED
CHANSVm_8145049C: formatted string payload/character lifetime 3: COMPILE FAIL ript && "/usr/bin/python3" tools/transform_dep.py build/43U/src/src/channelScript/CHANSVm.d build/43U/src/src/channelScript/CHANSVm.d
### mwcceppc.exe Compiler:
# File: src\channelScript\CHANSVm.c
# ------------------------------------
# 3625: wchar_t* characterText = (wchar_t*)pad0;
# Error: ^^^^^^^
# (10141) expression syntax error
# Too many errors printed, aborting program
User break, cancelled...
ninja: build stopped: subcommand failed.
; RESTORED
CHANSVm_8145049C: formatted string payload/character lifetime 4: COMPILE FAIL ript && "/usr/bin/python3" tools/transform_dep.py build/43U/src/src/channelScript/CHANSVm.d build/43U/src/src/channelScript/CHANSVm.d
### mwcceppc.exe Compiler:
# File: src\channelScript\CHANSVm.c
# ------------------------------------
# 3625: wchar_t* characterText = (wchar_t*)pad0;
# Error: ^^^^^^^
# (10141) expression syntax error
# Too many errors printed, aborting program
User break, cancelled...
ninja: build stopped: subcommand failed.
; RESTORED
CHANSVm_8145049C: formatted string payload/character lifetime 5: 98.58237%; 431/431 insns; structural/exact (10, 42); .data 100.0%; RESTORED
CHANSVm_8145049C: formatted string payload/character lifetime 0: 99.35035%; 430/431 insns; structural/exact (25, 142); .data 18.050066%; RESTORED
CHANSVm_8145049C: formatted string payload/character lifetime 1: 96.960556%; 430/431 insns; structural/exact (25, 248); .data 18.050066%; RESTORED
CHANSVm_8145049C: formatted string payload/character lifetime 2: 97.4594%; 431/431 insns; structural/exact (0, 143); .data 100.0%; RESTORED
CHANSVm_8145049C: formatted string payload/character lifetime 3: 96.19257%; 431/431 insns; structural/exact (10, 170); .data 100.0%; RESTORED
CHANSVm_8145049C: formatted string payload/character lifetime 4: 94.967514%; 432/431 insns; structural/exact (46, 358); .data 18.050066%; RESTORED
CHANSVm_8145049C: formatted string payload/character lifetime 5: 98.58237%; 431/431 insns; structural/exact (10, 42); .data 100.0%; RESTORED
VmBlobGetHexString declaration order [0, 1, 2, 3, 4, 5, 6]: structural/exact (0, 14)
VmBlobGetHexString diagnosis: (0, 14); target size 328; declaration entries [' wchar_t* dest = (wchar_t*)VmGetStrFromObjHdr(VmReturnObj);\n', ' u8* src = blob->pData;\n', ' u32 offset = blob->offset;\n', ' u32 destOff = 0;\n', ' u32 i = 0;\n', ' char* hexTbl = lbl_816976E4;\n', ' u32 loop_i;\n']
VmBlobGetHexString declaration order [1, 0, 2, 3, 4, 5, 6]: structural/exact (4, 27)
VmBlobGetHexString declaration order [2, 1, 0, 3, 4, 5, 6]: structural/exact (8, 27)
VmBlobGetHexString result (0, 14), attempts 98, RESTORED
VmCallMethod: separate resolved method index and return status 0: 97.2242%; 281/281 insns; structural/exact (4, 97); .data 100.0%; RESTORED
VmCallMethod: separate resolved method index and return status 1: 97.2242%; 281/281 insns; structural/exact (4, 97); .data 100.0%; RESTORED
VmCallMethod: separate resolved method index and return status 2: 97.2242%; 281/281 insns; structural/exact (4, 97); .data 100.0%; RESTORED
VmCallMethod: separate resolved method index and return status 3: 97.29537%; 281/281 insns; structural/exact (2, 93); .data 100.0%; RESTORED
CHANSVm_8145049C: cache string data and explicit char terminator lifetime 0: 99.84919%; 431/431 insns; structural/exact (0, 13); .data 100.0%; RESTORED
CHANSVm_8145049C: cache string data and explicit char terminator lifetime 1: 99.35035%; 430/431 insns; structural/exact (25, 142); .data 18.050066%; RESTORED
CHANSVm_8145049C: cache string data and explicit char terminator lifetime 2: 99.35035%; 430/431 insns; structural/exact (25, 142); .data 18.050066%; RESTORED
CHANSVm_8145049C: cache string data and explicit char terminator lifetime 3: 99.35035%; 430/431 insns; structural/exact (25, 142); .data 18.050066%; RESTORED
CHANSVm_8145049C: cache string data and explicit char terminator lifetime 4: 99.35035%; 430/431 insns; structural/exact (25, 142); .data 18.050066%; RESTORED
CHANSVm_8145049C: cached string payload before memcpy and assign the formatting-object tag after UTF-16 terminator storage; 99.84919%; 431/431 instructions, 13 register-only differences, .data 100%; KEPT quick GATE PASS.
CHANSVm_8145049C declaration order [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19]: structural/exact (0, 13)
CHANSVm_8145049C diagnosis: (0, 13); target size 1724; declaration entries [' u32 halfMaxSize;\n', ' BOOL flag;\n', ' CHANSVmObjHdr* tempObj;\n', ' u32 argIdxCounter;\n', ' u32 totalLen;\n', ' u8* str;\n', ' u32 strLen;\n', ' u32 strPos;\n', ' u32 segStart;\n', ' u32 fmtBufPos;\n', ' u8* tmpBuf;\n', ' u32 maxSize;\n', ' u8* outputBuf;\n', ' u32 outputPos;\n', ' u32 maxLitLen;\n', ' u32 litLen;\n', ' u32 isEscaped;\n', ' CHANSVmObjHdr* cv;\n', ' CHANSVmPrivate* pVm;\n', ' CHANSVmObjHdr* argObj;\n']
CHANSVm_8145049C declaration order [1, 0, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19]: structural/exact (5, 18)
CHANSVm_8145049C declaration order [2, 1, 0, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19]: structural/exact (5, 18)
CHANSVm_8145049C result (0, 13), attempts 199, RESTORED
VmBlobGetHexString: hexadecimal nibble temporaries/cursor order 0: 98.71951%; 82/82 insns; structural/exact (0, 14); .data 100.0%; RESTORED
VmBlobGetHexString: hexadecimal nibble temporaries/cursor order 1: 98.71951%; 82/82 insns; structural/exact (0, 14); .data 100.0%; RESTORED
VmBlobGetHexString: hexadecimal nibble temporaries/cursor order 2: 98.71951%; 82/82 insns; structural/exact (0, 14); .data 100.0%; RESTORED
VmBlobGetHexString: hexadecimal nibble temporaries/cursor order 3: 96.15854%; 81/82 insns; structural/exact (8, 34); .data 100.0%; RESTORED
VmCallMethod: direct missing method/property conditional return: 97.29537%; 281/281 insns; structural/exact (2, 93); .data 100.0%; RESTORED
VmCallMethod: call argument/operand scheduling 0: 97.98933%; 281/281 insns; structural/exact (2, 95); .data 100.0%; RESTORED
VmCallMethod: call argument/operand scheduling 1: 98.0605%; 281/281 insns; structural/exact (0, 91); .data 100.0%; RESTORED
VmCallMethod: call argument/operand scheduling 2: 97.29537%; 281/281 insns; structural/exact (2, 93); .data 100.0%; RESTORED
CHANSVmStep: typed interpreter scratch layout 0: 96.452515%; 1253/1253 insns; structural/exact (71, 318); .data 100.0%; RESTORED
CHANSVmStep: typed interpreter scratch layout 1: 96.43735%; 1253/1253 insns; structural/exact (90, 332); .data 100.0%; RESTORED
CHANSVmStep: typed interpreter scratch layout 2: 96.440544%; 1253/1253 insns; structural/exact (86, 329); .data 100.0%; RESTORED
CHANSVmStep: entry count branch and pretested loop: 96.96728%; 1255/1253 insns; structural/exact (82, 1229); .data 18.050066%; RESTORED
CHANSVmStep: pretested countdown retaining default count arithmetic: 96.400635%; 1254/1253 insns; structural/exact (87, 1238); .data 18.050066%; RESTORED
CHANSVmStep: separate operand enums before copy headers: 96.43735%; 1253/1253 insns; structural/exact (90, 332); .data 100.0%; RESTORED
VmCallMethod: direct missing-method/property return and choose header argument at call boundary; 98.0605%; 281/281 instructions, 91 register-only differences, structural differences 0; .data 100%; KEPT quick GATE PASS.
CHANSVmStep: group actual type, floating-immediate, copy-header, load-header, and operand workspaces; all fields actively used, no padding or dummy fields; 96.452515%; 1253/1253 instructions, structural/exact 71/318; .data 100%; KEPT quick GATE PASS.
CHANSVmNewObjData: declaration-order coverage 164 distinct source orders; best structural/exact (0, 7); no new exact result, restored previous accepted source.
VmStringFromCharCode: declaration-order coverage 91 distinct source orders; best structural/exact (0, 6); no new exact result, restored previous accepted source.
VmWinEmuWrite: declaration-order coverage 85 distinct source orders; best structural/exact (0, 5); no new exact result, restored previous accepted source.
VmStringReplace: declaration-order coverage 30 distinct source orders; best structural/exact (0, 28); no new exact result, restored previous accepted source.
VmStringSplit: declaration-order coverage 30 distinct source orders; best structural/exact (0, 61); no new exact result, restored previous accepted source.
CHANSVmAddExe: declaration-order coverage 30 distinct source orders; best structural/exact (0, 34); no new exact result, restored previous accepted source.
CHANSVmLinkModules: declaration-order coverage 20 distinct source orders; best structural/exact (0, 43); no new exact result, restored previous accepted source.
VmCallMethod: declaration-order coverage 20 distinct source orders; best structural/exact (4, 97); no new exact result, restored previous accepted source.
VmBlobPackCommon: declaration-order coverage 30 distinct source orders; best structural/exact (2, 244); no new exact result, restored previous accepted source.
VmBlobUnpack: declaration-order coverage 30 distinct source orders; best structural/exact (0, 146); no new exact result, restored previous accepted source.
VmBlobGetHexString: declaration-order coverage 99 distinct source orders; best structural/exact (0, 14); no new exact result, restored previous accepted source.
CHANSVm_8145049C: declaration-order coverage 200 distinct source orders; best structural/exact (0, 13); no new exact result, restored previous accepted source.
## 2026-10-01 final handoff after clean full gate
Instruction-exact 215/233 -> 216/233; objdiff matched code 35020/53564 -> 35484/53564; data 6904/6904 -> 6904/6904; .data 100%. vmBlobParsePackFormatString is now 100% objdiff with 116/116 instructions and ctxdiff diffs 0. All 121 Step and all 89 formatter jump-table relocation offsets, types, and addends match after the clean rebuild.
| Open function | Objdiff % | Structural / raw differences | Distinct current-round attempts | Remaining difference |
|---|---:|---:|---:|---|
| CHANSVmGetSourceLine | 97.82609 | 0 / 16 | 11 | register allocation |
| CHANSVmNewObjData | 99.427086 | 0 / 10 | 171 | register allocation |
| CHANSVmParseInt | 94.69388 | 2 / 3 | 4 | parse-end store after parameter copies |
| CHANSVm_8144B4D4 | 97.59036 | 2 / 2 | 4 | parse-end store after type comparison |
| VmDateDtor | 94.96703 | 5 / 7 | 8 | month/day argument-load scheduling |
| VmStringFromCharCode | 99.40678 | 0 / 6 | 102 | register allocation |
| VmStringReplace | 97.878784 | 0 / 40 | 31 | register allocation |
| VmStringSplit | 98.04054 | 0 / 66 | 31 | register allocation |
| CHANSVm_8145049C | 99.84919 | 0 / 13 | 214 | register allocation |
| VmBlobGetHexString | 98.71951 | 0 / 14 | 104 | register allocation |
| VmBlobPackCommon | 97.934135 | 2 / 246 | 30 | register allocation and two operand-order differences |
| VmBlobUnpack | 98.26886 | 0 / 156 | 31 | register allocation |
| VmWinEmuWrite | 99.62687 | 0 / 5 | 92 | register allocation |
| CHANSVmAddExe | 99.15354 | 0 / 34 | 30 | register allocation |
| CHANSVmLinkModules | 98.677246 | 0 / 43 | 20 | register allocation |
| VmCallMethod | 98.0605 | 0 / 91 | 29 | register allocation |
| CHANSVmStep | 96.452515 | 71 / 318 | 7 | entry/countdown flow, result-table base, registers and remaining spills |
The unit remains partial with 17 open functions; all have at least three distinct compiled source-level attempts in this run. No linking/configuration changes. Compiler tie-breaks remain unresolved. Four local source commits: d6ec7d58, aa49bd1b, 9283affb, 9265fb79.
```text
full build: ok
main.dol sha1: 26116613f624061ba99c8d1a299aaa6efa85670d
[src/channelScript/CHANSVm] pool: IDENTICAL
[src/channelScript/CHANSVm] objdiff: code 35484/53564 data 6904/6904 functions 216/233 fuzzy 99.2720 linked code 0
[src/channelScript/CHANSVm] instruction-exact functions: 216/233
[src/channelScript/CHANSVm] section .data size 4672 match 100.0
[src/channelScript/CHANSVm] section .rodata size 1432 match 100.0
[src/channelScript/CHANSVm] section .sbss size 16 match 100.0
[src/channelScript/CHANSVm] section .sdata size 600 match 100.0
[src/channelScript/CHANSVm] section .sdata2 size 184 match 100.0
[src/channelScript/CHANSVm] section .text size 53564 match 99.27205
[src/channelScript/CHANSVm] below 100: CHANSVmGetSourceLine 97.82609
[src/channelScript/CHANSVm] below 100: CHANSVmNewObjData 99.427086
[src/channelScript/CHANSVm] below 100: CHANSVmParseInt 94.69388
[src/channelScript/CHANSVm] below 100: CHANSVm_8144B4D4 97.59036
[src/channelScript/CHANSVm] below 100: VmDateDtor 94.96703
[src/channelScript/CHANSVm] below 100: VmStringFromCharCode 99.40678
[src/channelScript/CHANSVm] below 100: VmStringReplace 97.878784
[src/channelScript/CHANSVm] below 100: VmStringSplit 98.04054
[src/channelScript/CHANSVm] below 100: CHANSVm_8145049C 99.84919
[src/channelScript/CHANSVm] below 100: VmBlobGetHexString 98.71951
[src/channelScript/CHANSVm] below 100: VmBlobPackCommon 97.934135
[src/channelScript/CHANSVm] below 100: VmBlobUnpack 98.26886
[src/channelScript/CHANSVm] below 100: VmWinEmuWrite 99.62687
[src/channelScript/CHANSVm] below 100: CHANSVmAddExe 99.15354
[src/channelScript/CHANSVm] below 100: CHANSVmLinkModules 98.677246
[src/channelScript/CHANSVm] below 100: VmCallMethod 98.0605
[src/channelScript/CHANSVm] below 100: CHANSVmStep 96.452515
[src/channelScript/CHANSVm] baseline: code 35020/53564 data 6904 functions 215 fuzzy 99.2097
regressions vs baseline: 0
global matched_code_percent: 86.68724 -> 86.70274
global fuzzy_match_percent: 99.30689 -> 99.30802
global complete_code_percent: 60.61288 -> 60.61288
global matched_data_percent: 91.11031 -> 91.11031
forbidden patterns added (net, per file): 0
readability warnings (net, per file; must be 0 in the final result): 0
GATE PASS
```

View File

@@ -0,0 +1,164 @@
# CHANSVm round 7 attempts
Baseline ab015200: 216/233 instruction-exact; code 35484/53564; data 6904/6904; all 121 .data relocations match.
Pool checked before code experiments. Source scope is CHANSVm.c.
Initial CHANSVmGetSourceLine: 97.826090%; instructions 46/46; structural 0; diffs 16.
Initial CHANSVmNewObjData: 99.583336%; instructions 96/96; structural 0; diffs 7.
Initial CHANSVmParseInt: 94.693880%; instructions 49/49; structural 2; diffs 3.
Initial CHANSVm_8144B4D4: 97.590360%; instructions 83/83; structural 2; diffs 2.
Initial VmDateDtor: 94.967030%; instructions 91/91; structural 5; diffs 7.
Initial VmStringFromCharCode: 99.406780%; instructions 59/59; structural 0; diffs 6.
Initial VmStringReplace: 97.878784%; instructions 132/132; structural 0; diffs 40.
Initial VmStringSplit: 98.040540%; instructions 222/222; structural 0; diffs 66.
Initial CHANSVm_8145049C: 99.849190%; instructions 431/431; structural 0; diffs 13.
Initial VmBlobGetHexString: 98.719510%; instructions 82/82; structural 0; diffs 14.
Initial VmBlobPackCommon: 97.934135%; instructions 668/668; structural 2; diffs 246.
Initial VmBlobUnpack: 98.268860%; instructions 517/517; structural 0; diffs 156.
Initial VmWinEmuWrite: 99.626870%; instructions 67/67; structural 0; diffs 5.
Initial CHANSVmAddExe: 99.153540%; instructions 254/254; structural 0; diffs 34.
Initial CHANSVmLinkModules: 98.677246%; instructions 189/189; structural 0; diffs 43.
Initial VmCallMethod: 98.060500%; instructions 281/281; structural 0; diffs 91.
Initial CHANSVmStep: 96.452515%; instructions 1253/1253; structural 71; diffs 318.
- CHANSVmNewObjData: chunk index scoped to chunk fallback scan; 99.583336%; instructions 96/96; structural 0; diffs 7; code 35484; data 6904/6904; restored.
- CHANSVmNewObjData: aligned allocation size scoped after entry selection; 99.427086%; instructions 96/96; structural 0; diffs 10; code 35484; data 6904/6904; restored.
- CHANSVmNewObjData: explicit chunk slot kept only across allocation; 99.583336%; instructions 96/96; structural 0; diffs 7; code 35484; data 6904/6904; restored.
- CHANSVmNewObjData: chunk table scanned with pointer and index; 90.020836%; instructions 96/96; structural 17; diffs 53; code 35484; data 6904/6904; restored.
- VmWinEmuWrite: aligned total length scoped inside valid string; 99.626870%; instructions 67/67; structural 0; diffs 5; code 35484; data 6904/6904; restored.
- VmWinEmuWrite: remaining and converted lengths scoped per conversion; 99.626870%; instructions 67/67; structural 0; diffs 5; code 35484; data 6904/6904; restored.
- VmWinEmuWrite: capture conversion return directly at declaration; 99.626870%; instructions 67/67; structural 0; diffs 5; code 35484; data 6904/6904; restored.
- VmWinEmuWrite: for loop owns the byte offset; COMPILE FAIL; restored. /43U/src/src/channelScript/CHANSVm.d ### mwcceppc.exe Compiler: # File: src\channelScript\CHANSVm.c # ------------------------------------ # 6072: for (u32 offset = 0; offset < totalLength; offset += 0x80) { # Error: ^^^ # (10141) expression syntax error # Too many errors printed, aborting program User break, cancelled... ninja: build stopped: subcommand failed.
- CHANSVmNewObjData: declaration-order search, 120 distinct compiling orders; best structural/diffs (0, 7); 99.583336%; data 6904/6904; restored.
- VmWinEmuWrite: declaration-order search, 120 distinct compiling orders; best structural/diffs (0, 5); 99.626870%; data 6904/6904; restored.
- CHANSVmParseInt: zero parser endpoint with memset; 77.020410%; instructions 53/49; structural 21; diffs 51; code 35484; data 6904/6904; restored.
- CHANSVm_8144B4D4: zero parser endpoint with memset; 93.915665%; instructions 86/83; structural 9; diffs 74; data 6904/6904; restored.
- CHANSVmParseInt: cache object type as unsigned full word; 94.693880%; instructions 49/49; structural 2; diffs 3; code 35484; data 6904/6904; restored.
- CHANSVm_8144B4D4: cache object type as unsigned full word; 97.590360%; instructions 83/83; structural 2; diffs 2; data 6904/6904; restored.
- CHANSVmParseInt: assign type at declaration after endpoint declaration; 94.693880%; instructions 49/49; structural 2; diffs 3; code 35484; data 6904/6904; restored.
- CHANSVm_8144B4D4: assign type at declaration after endpoint declaration; 97.590360%; instructions 83/83; structural 2; diffs 2; data 6904/6904; restored.
- CHANSVmParseInt: initialize endpoint and type in one expression; 94.693880%; instructions 49/49; structural 2; diffs 3; code 35484; data 6904/6904; restored.
- CHANSVm_8144B4D4: initialize endpoint and type in one expression; 97.590360%; instructions 83/83; structural 2; diffs 2; data 6904/6904; restored.
- CHANSVmParseInt: load object type directly after parser endpoint initialization; 83.673470%; instructions 49/49; structural 4; diffs 5; code 35484; data 6904/6904; restored.
- CHANSVm_8144B4D4: load object type directly after parser endpoint initialization; 95.180725%; instructions 83/83; structural 2; diffs 3; data 6904/6904; restored.
- VmStringFromCharCode: word value temporary before UTF16 character mask; 94.322040%; instructions 57/59; structural 9; diffs 45; code 35484; data 6904/6904; restored.
- VmStringFromCharCode: separate character index increment from byte cursor increment; 99.406780%; instructions 59/59; structural 0; diffs 6; code 35484; data 6904/6904; restored.
- VmStringFromCharCode: for traversal owns argument conversion scope; 99.322040%; instructions 59/59; structural 0; diffs 7; code 35484; data 6904/6904; restored.
- VmStringFromCharCode: mask wide character with typed word mask; 94.322040%; instructions 57/59; structural 9; diffs 45; code 35484; data 6904/6904; restored.
- VmStringFromCharCode: converted integer helper call boundary; 99.406780%; instructions 59/59; structural 0; diffs 6; code 35484; data 6904/6904; restored.
- VmDateDtor: month and day tables use explicit pointer addition; 94.967030%; instructions 91/91; structural 5; diffs 7; code 35484; data 6904/6904; restored.
- VmDateDtor: cache weekday index and month index at format branch; 94.967030%; instructions 91/91; structural 5; diffs 7; code 35484; data 6904/6904; restored.
- VmDateDtor: format using explicit year value beside table pointers; 94.967030%; instructions 91/91; structural 5; diffs 7; code 35484; data 6904/6904; restored.
- CHANSVmGetSourceLine: inline module source-line lookup helper, module before pc; 88.369570%; instructions 48/46; structural 8; diffs 26; code 35484; data 6904/6904; restored.
- CHANSVmGetSourceLine: inline module source-line lookup helper, pc before module; 88.369570%; instructions 48/46; structural 8; diffs 26; code 35484; data 6904/6904; restored.
- CHANSVmGetSourceLine: declare module/table/pc alongside context with checked loads; 97.391304%; instructions 46/46; structural 0; diffs 17; code 35484; data 6904/6904; restored.
- CHANSVmGetSourceLine: unsigned marker offset separated from line table pointer; 97.826090%; instructions 46/46; structural 0; diffs 16; code 35484; data 6904/6904; restored.
- VmWinEmuWrite: save raw argument before string conversion; 99.626870%; instructions 67/67; structural 0; diffs 5; code 35484; data 6904/6904; restored.
- VmWinEmuWrite: loop uses current total length and named converted object; 99.626870%; instructions 67/67; structural 0; diffs 5; code 35484; data 6904/6904; restored.
- CHANSVmNewObjData: reserve chunk inline helper variant 1; 99.843750%; instructions 96/96; structural 0; diffs 3; code 35484; data 6904/6904; restored.
- CHANSVmNewObjData: reserve chunk inline helper variant 2; 99.843750%; instructions 96/96; structural 0; diffs 3; code 35484; data 6904/6904; restored.
- CHANSVmNewObjData: reserve chunk inline helper variant 3; 99.427086%; instructions 96/96; structural 0; diffs 10; code 35484; data 6904/6904; restored.
- VmWinEmuWrite: inline converted string writer variant 1; 99.104480%; instructions 67/67; structural 5; diffs 13; code 35484; data 6904/6904; restored.
- VmWinEmuWrite: inline converted string writer variant 2; 96.388060%; instructions 67/67; structural 9; diffs 16; code 35484; data 6904/6904; restored.
- VmStringFromCharCode: inline integer character conversion variant 1; 99.406780%; instructions 59/59; structural 0; diffs 6; code 35484; data 6904/6904; restored.
- VmStringFromCharCode: inline integer character conversion variant 2; 99.406780%; instructions 59/59; structural 0; diffs 6; code 35484; data 6904/6904; restored.
- VmDateDtor: inline calendar formatting variant 1; 94.967030%; instructions 91/91; structural 5; diffs 7; code 35484; data 6904/6904; restored.
- VmDateDtor: inline calendar formatting variant 2; 94.967030%; instructions 91/91; structural 5; diffs 7; code 35484; data 6904/6904; restored.
- CHANSVmNewObjData: reserve chunk inline helper selected for refinement; 99.843750%; instructions 96/96; structural 0; diffs 3; code 35484; data 6904/6904; retained.
- CHANSVmNewObjData: allocated size declared after reserved entry; 99.843750%; instructions 96/96; structural 0; diffs 3; code 35484; data 6904/6904; restored.
- CHANSVmNewObjData: outer private VM reference drives allocation; 99.270836%; instructions 96/96; structural 0; diffs 14; code 35484; data 6904/6904; restored.
- CHANSVmNewObjData: allocation size declared inside allocation scope; 99.843750%; instructions 96/96; structural 0; diffs 3; code 35484; data 6904/6904; restored.
- CHANSVmNewObjData: inline allocator for a reserved chunk entry; COMPILE FAIL; restored. ceppc.exe Compiler: # File: src\channelScript\CHANSVm.c # ------------------------------------ # 384: object->value.ptr_v = entry; # Error: ^ # (10209) illegal implicit conversion from 'struct ChunkEntry *' to # 'void **' # Too many errors printed, aborting program User break, cancelled... ninja: build stopped: subcommand failed.
Restored whole-reservation helper pending a narrower scan boundary; its only surviving differences were three allocation-size registers, 99.843750%.
- CHANSVmNewObjData: reserve and allocate inline helper boundaries; 97.708336%; instructions 98/96; structural 6; diffs 13; code 35484; data 6904/6904; restored.
- CHANSVmNewObjData: reserve helper with typed aligned size named in outer scope; 99.843750%; instructions 96/96; structural 0; diffs 3; code 35484; data 6904/6904; restored.
- CHANSVmNewObjData: reserve helper with allocated byte count initialized at use; COMPILE FAIL; restored. /43U/src/src/channelScript/CHANSVm.d build/43U/src/src/channelScript/CHANSVm.d ### mwcceppc.exe Compiler: # File: src\channelScript\CHANSVm.c # ------------------------------------ # 390: u32 memSize = VM_ALIGN(length); # Error: ^^^ # (10141) expression syntax error # Too many errors printed, aborting program User break, cancelled... ninja: build stopped: subcommand failed.
- CHANSVmNewObjData: inline chunk fallback scan keeps allocation in caller; 94.583336%; instructions 99/96; structural 8; diffs 67; code 35484; data 6904/6904; restored.
- VmBlobGetHexString: hex pairs share one character index; 90.060974%; instructions 83/82; structural 10; diffs 38; code 35484; data 6904/6904; restored.
- VmBlobGetHexString: character index advances after both hex digits; 93.780490%; instructions 79/82; structural 10; diffs 37; code 35484; data 6904/6904; restored.
- VmBlobGetHexString: byte loop index determines both output positions; 93.780490%; instructions 79/82; structural 10; diffs 37; code 35484; data 6904/6904; restored.
- VmBlobGetHexString: first nibble scoped before output index arithmetic; 98.719510%; instructions 82/82; structural 0; diffs 14; code 35484; data 6904/6904; restored.
- VmStringFromCharCode: argument index determines the two byte positions; 100.000000%; instructions 59/59; structural 0; diffs 0; code 35720; data 6904/6904; restored.
- VmStringFromCharCode: argument index determines the two byte positions exact candidate; 100.000000%; instructions 59/59; structural 0; diffs 0; code 35720; data 6904/6904; retained.
- CHANSVmNewObjData: remove unobserved traversal-offset initialization and increments; 99.583336%; instructions 96/96; structural 0; diffs 7; code 35720; data 6904/6904; restored.
- CHANSVmNewObjData: typed chunk entry and direct global chunk index; 99.583336%; instructions 96/96; structural 0; diffs 7; code 35720; data 6904/6904; restored.
- CHANSVmNewObjData: first fallback slot declared at scan boundary; 99.583336%; instructions 96/96; structural 0; diffs 7; code 35720; data 6904/6904; restored.
- VmBlobGetHexString: byte iteration supplies first destination index; 98.719510%; instructions 82/82; structural 0; diffs 14; code 35720; data 6904/6904; restored.
- VmBlobGetHexString: byte iteration supplies second destination index; 95.536580%; instructions 81/82; structural 9; diffs 36; code 35720; data 6904/6904; restored.
- VmBlobGetHexString: hex second index is initialized before first index cursor; 98.719510%; instructions 82/82; structural 0; diffs 14; code 35720; data 6904/6904; restored.
- CHANSVmGetSourceLine: program-counter-derived source entry index with explicit marker limit; 97.826090%; instructions 46/46; structural 0; diffs 18; code 35720; data 6904/6904; restored.
- CHANSVm_8145049C: typed string-format payload/owner/count declaration location 1; 99.187935%; instructions 431/431; structural 0; diffs 53; code 35720; data 6904/6904; restored.
- CHANSVm_8145049C: typed string-format payload/owner/count declaration location 2; 99.187935%; instructions 431/431; structural 0; diffs 53; code 35720; data 6904/6904; restored.
- CHANSVm_8145049C: typed string-format payload/owner/count declaration location 3; 99.849190%; instructions 431/431; structural 0; diffs 13; code 35720; data 6904/6904; restored.
- VmStringReplace: source and search payloads cached as typed string values; 97.954544%; instructions 132/132; structural 0; diffs 45; code 35720; data 6904/6904; restored.
- VmStringReplace: scope parent/search lengths after string conversions; 97.878784%; instructions 132/132; structural 0; diffs 40; code 35720; data 6904/6904; restored.
- VmStringReplace: second conversion uses its own argument scope; 97.878784%; instructions 132/132; structural 0; diffs 40; code 35720; data 6904/6904; restored.
- VmStringReplace: tail copy derives segment length at the copy site; 97.878784%; instructions 132/132; structural 0; diffs 40; code 35720; data 6904/6904; restored.
- VmStringSplit: cache parent and delimiter string records; 97.567566%; instructions 222/222; structural 0; diffs 88; code 35720; data 6904/6904; restored.
- VmStringSplit: loop counts initialized before cursors; 98.040540%; instructions 222/222; structural 0; diffs 66; code 35720; data 6904/6904; restored.
- VmStringSplit: delimiter miss branches around matched-segment tail; 96.238740%; instructions 222/222; structural 8; diffs 82; code 35720; data 6904/6904; restored.
- VmStringSplit: empty-delimiter byte cursor derives from character index; 98.040540%; instructions 222/222; structural 0; diffs 66; code 35720; data 6904/6904; restored.
- VmBlobPackCommon: skip integer packing immediately when no elements remain; 97.634730%; instructions 670/668; structural 33; diffs 469; code 35720; data 6904/6904; restored.
- VmBlobPackCommon: integer elements use loop-tail continue into format parser; 97.934135%; instructions 668/668; structural 2; diffs 246; code 35720; data 6904/6904; restored.
- VmBlobPackCommon: integer pack loop uses explicitly tested do loop; 97.410180%; instructions 669/668; structural 35; diffs 468; code 35720; data 6904/6904; restored.
- VmBlobPackCommon: packing pass owns converted format and blob locals; 97.934135%; instructions 668/668; structural 2; diffs 246; code 35720; data 6904/6904; restored.
- VmBlobUnpack: decoded integer scoped to numeric unpack cases; 98.268860%; instructions 517/517; structural 0; diffs 156; code 35720; data 6904/6904; restored.
- VmBlobUnpack: counting pass owns index and cursor declarations; COMPILE FAIL; restored. d/43U/src/src/channelScript/CHANSVm.d build/43U/src/src/channelScript/CHANSVm.d ### mwcceppc.exe Compiler: # File: src\channelScript\CHANSVm.c # ------------------------------------ # 5484: u32 blobOff = srcBlob->offset; # Error: ^^^ # (10141) expression syntax error # Too many errors printed, aborting program User break, cancelled... ninja: build stopped: subcommand failed.
- VmBlobUnpack: string trimming separates remaining characters from byte pointer; 97.949710%; instructions 516/517; structural 51; diffs 258; code 35720; data 6904/6904; restored.
- VmBlobUnpack: hex output indexes derive from source-byte iteration; 96.847200%; instructions 520/517; structural 55; diffs 227; code 35720; data 6904/6904; restored.
- CHANSVmAddExe: module clearing uses typed module array index; 99.153540%; instructions 254/254; structural 0; diffs 34; code 35720; data 6904/6904; restored.
- CHANSVmAddExe: range macro counters declared at each table boundary; COMPILE FAIL; restored. d build/43U/src/src/channelScript/CHANSVm.d ### mwcceppc.exe Compiler: # File: src\channelScript\CHANSVm.c # ------------------------------------ # 6301: { u32 cnt = header->nameCount; if (cnt) { u32 ofs = (u32) header- # Error: ^ # (10121) declaration syntax error # Too many errors printed, aborting program User break, cancelled... ninja: build stopped: subcommand failed.
- CHANSVmAddExe: name pointer cached beside dispatch entry validation; 97.559050%; instructions 254/254; structural 7; diffs 42; code 35720; data 6904/6904; restored.
- CHANSVmAddExe: table traversal uses while loop with explicit increment; 97.618110%; instructions 254/254; structural 8; diffs 42; code 35720; data 6904/6904; restored.
- CHANSVmLinkModules: global and native dispatch loops own separate index scopes; COMPILE FAIL; restored. .py build/43U/src/src/channelScript/CHANSVm.d build/43U/src/src/channelScript/CHANSVm.d ### mwcceppc.exe Compiler: # File: src\channelScript\CHANSVm.c # ------------------------------------ # 6774: u32 i; # Error: ^^^ # (10141) expression syntax error # Too many errors printed, aborting program User break, cancelled... ninja: build stopped: subcommand failed.
- CHANSVmLinkModules: index-driven module loop uses for form; 98.677246%; instructions 189/189; structural 0; diffs 43; code 35720; data 6904/6904; restored.
- CHANSVmLinkModules: dispatch entry snapshots declared before nested index loop; COMPILE FAIL; restored. src/channelScript/CHANSVm.d build/43U/src/src/channelScript/CHANSVm.d ### mwcceppc.exe Compiler: # File: src\channelScript\CHANSVm.c # ------------------------------------ # 6779: u8* addr; # Error: ^^ # (10141) expression syntax error # Too many errors printed, aborting program User break, cancelled... ninja: build stopped: subcommand failed.
- VmCallMethod: method table selection compares method count first; 98.024910%; instructions 281/281; structural 1; diffs 92; code 35720; data 6904/6904; restored.
- VmCallMethod: property selector derives method-null after set flag; 98.060500%; instructions 281/281; structural 0; diffs 91; code 35720; data 6904/6904; restored.
- VmCallMethod: return-frame size uses conditional scalar temporary; 98.060500%; instructions 281/281; structural 0; diffs 91; code 35720; data 6904/6904; restored.
- CHANSVmLinkModules: global and native loop indices have independent lifetimes; COMPILE FAIL; restored. NSVm.d build/43U/src/src/channelScript/CHANSVm.d ### mwcceppc.exe Compiler: # File: src\channelScript\CHANSVm.c # ------------------------------------ # 6843: for (i = 0; i < module->nameCount; i++) { # Error: ^ # (10140) undefined identifier 'i' # Too many errors printed, aborting program User break, cancelled... ninja: build stopped: subcommand failed.
- CHANSVmLinkModules: dispatch snapshot declared before module passes; COMPILE FAIL; restored. src/channelScript/CHANSVm.d build/43U/src/src/channelScript/CHANSVm.d ### mwcceppc.exe Compiler: # File: src\channelScript\CHANSVm.c # ------------------------------------ # 6779: u8* addr; # Error: ^^ # (10141) expression syntax error # Too many errors printed, aborting program User break, cancelled... ninja: build stopped: subcommand failed.
- CHANSVmLinkModules: global address derived with pointer addition operand order; 98.677246%; instructions 189/189; structural 0; diffs 43; code 35720; data 6904/6904; restored.
- VmWinEmuWrite: aligned string length from inline payload accessor; 99.626870%; instructions 67/67; structural 0; diffs 5; code 35720; data 6904/6904; restored.
- VmWinEmuWrite: byte offset increment moved into for loop expression; 99.626870%; instructions 67/67; structural 0; diffs 5; code 35720; data 6904/6904; restored.
- VmWinEmuWrite: use byte length as signed nonnegative loop bound; 99.626870%; instructions 67/67; structural 0; diffs 5; code 35720; data 6904/6904; restored.
- CHANSVmParseInt: parser endpoint reset crosses an inline helper boundary; 94.693880%; instructions 49/49; structural 2; diffs 3; code 35720; data 6904/6904; restored.
- CHANSVmParseInt: typed object type loaded through inline helper; 94.693880%; instructions 49/49; structural 2; diffs 3; code 35720; data 6904/6904; restored.
- CHANSVmParseInt: base argument copied beside parser initialization; 94.693880%; instructions 49/49; structural 2; diffs 3; code 35720; data 6904/6904; restored.
- CHANSVmLinkModules: separate global/native indices while retaining local-function index; 98.677246%; instructions 189/189; structural 0; diffs 43; code 35720; data 6904/6904; restored.
- CHANSVmLinkModules: dispatch snapshots scoped before each index loop; 98.677246%; instructions 189/189; structural 0; diffs 43; code 35720; data 6904/6904; restored.
- CHANSVmLinkModules: snapshot declared across passes with address declaration first; 98.677246%; instructions 189/189; structural 0; diffs 43; code 35720; data 6904/6904; restored.
- CHANSVmStep: normalize zero step count with explicit conditional; 96.854750%; instructions 1254/1253; structural 66; diffs 1229; code 35720; data 2232/6904; restored.
- CHANSVmStep: pretested countdown loop and explicit zero normalization; 96.983240%; instructions 1255/1253; structural 63; diffs 1228; code 35720; data 2232/6904; restored.
- CHANSVmStep: result table accesses directly name constant fields; 96.308860%; instructions 1254/1253; structural 89; diffs 1094; code 35720; data 2232/6904; restored.
- CHANSVmStep: pretested countdown and direct result table fields; 96.772545%; instructions 1256/1253; structural 82; diffs 1231; code 35720; data 2232/6904; restored.
- CHANSVmStep: enumerated operand type addresses derive from index; 96.396645%; instructions 1254/1253; structural 75; diffs 1131; code 35720; data 2232/6904; restored.
- CHANSVmStep: operand type loads follow left then right source order; 96.452515%; instructions 1253/1253; structural 71; diffs 318; code 35720; data 6904/6904; restored.
- CHANSVmStep: conditional argument type declared at enumeration call; 96.452515%; instructions 1253/1253; structural 71; diffs 318; code 35720; data 6904/6904; restored.
- CHANSVmStep: direct tables, indexed enumeration, and pretested countdown combined; 96.604950%; instructions 1257/1253; structural 74; diffs 1220; code 35720; data 2232/6904; restored.
## Final audit
VmStringFromCharCode is the only retained source change: replace the redundant byte cursor with i * 2 and i * 2 + 1. It is 100.0% in objdiff, 59/59 instructions, ctxdiff diffs 0. All other experiments were restored, including the temporary reservation helper. That helper reached 99.843750% but retained three allocation-size register differences.
The completed source diff contains no added comments, assembly, data-placement changes, shared-header edits, compiler pragmas or uninitialized-value tricks. No configure.py changes were made.
Final full clean gate: PASS; exact 216/233 -> 217/233; code 35484/53564 -> 35720/53564; data 6904/6904 -> 6904/6904. Pools contain 125 identical strings. All 121 CHANSVmStep .data jump-table relocations are identical. DOL SHA1 26116613f624061ba99c8d1a299aaa6efa85670d. Regressions, forbidden patterns and readability warnings are zero.
Every remaining function has at least three compiling, distinct source-level attempts in this run. Failed compilations are excluded. The declaration-order searches add 120 NewObjData and 120 WinEmuWrite compiled permutations; JSON trial orders are in /tmp/chansvm-r7-decl-*.json.
CHANSVmGetSourceLine 97.826090%, module, entry, bitfield and line-offset registers; 46/46 instructions, structural 0, diffs 16; 5 distinct compiling source attempts.
CHANSVmNewObjData 99.583336%, seven chunk-index and table-slot register differences; 96/96 instructions, structural 0, diffs 7; 17 distinct compiling source attempts.
CHANSVmParseInt 94.693880%, three prologue positions schedule endpoint initialization after argument copies; 49/49 instructions, structural 2, diffs 3; 8 distinct compiling source attempts.
CHANSVm_8144B4D4 97.590360%, endpoint store and type comparison are scheduled in opposite order; 83/83 instructions, structural 2, diffs 2; 5 distinct compiling source attempts.
VmDateDtor 94.967030%, seven calendar table-load and variadic argument positions are scheduled differently; 91/91 instructions, structural 5, diffs 7; 5 distinct compiling source attempts.
VmStringReplace 97.878784%, source/search/replacement and traversal register allocation; 132/132 instructions, structural 0, diffs 40; 4 distinct compiling source attempts.
VmStringSplit 98.040540%, delimiter, cursor, array and element register allocation; 222/222 instructions, structural 0, diffs 66; 4 distinct compiling source attempts.
CHANSVm_8145049C 99.849190%, thirteen string-format payload and owner register differences; 431/431 instructions, structural 0, diffs 13; 3 distinct compiling source attempts.
VmBlobGetHexString 98.719510%, fourteen hex index, cursor and digit register differences; 82/82 instructions, structural 0, diffs 14; 7 distinct compiling source attempts.
VmBlobPackCommon 97.934135%, two branch destinations plus packing-state register allocation; 668/668 instructions, structural 2, diffs 246; 4 distinct compiling source attempts.
VmBlobUnpack 98.268860%, format, cursor and decoded-value register allocation; 517/517 instructions, structural 0, diffs 156; 3 distinct compiling source attempts.
VmWinEmuWrite 99.626870%, five converted-string and aligned-length register differences; 67/67 instructions, structural 0, diffs 5; 10 distinct compiling source attempts.
CHANSVmAddExe 99.153540%, module, size and relocation-loop register allocation; 254/254 instructions, structural 0, diffs 34; 3 distinct compiling source attempts.
CHANSVmLinkModules 98.677246%, module, dispatch and object-iterator register allocation; 189/189 instructions, structural 0, diffs 43; 5 distinct compiling source attempts.
VmCallMethod 98.060500%, call-frame, native target and property selector register allocation; 281/281 instructions, structural 0, diffs 91; 3 distinct compiling source attempts.
CHANSVmStep 96.452515%, countdown control flow, table-base addressing, operand-type spill and registers; 1253/1253 instructions, structural 71, diffs 318; 8 distinct compiling source attempts.
Disassembly note: disasm_fn.py stops at the first paired-single instruction in CHANSVmStep. Its complete target was read from build/43U/asm/src/channelScript/CHANSVm.s, and ctxdiff/declsearch compare all 1253 instructions. The compiler reason behind remaining register choices and scheduling is uncertain; the residual instruction differences are measured, not asserted impossible.

View File

@@ -0,0 +1,36 @@
full build: ok
main.dol sha1: 26116613f624061ba99c8d1a299aaa6efa85670d
[src/channelScript/CHANSVm] pool: IDENTICAL
[src/channelScript/CHANSVm] objdiff: code 35720/53564 data 6904/6904 functions 217/233 fuzzy 99.2758 linked code 0
[src/channelScript/CHANSVm] instruction-exact functions: 217/233
[src/channelScript/CHANSVm] section .data size 4672 match 100.0
[src/channelScript/CHANSVm] section .rodata size 1432 match 100.0
[src/channelScript/CHANSVm] section .sbss size 16 match 100.0
[src/channelScript/CHANSVm] section .sdata size 600 match 100.0
[src/channelScript/CHANSVm] section .sdata2 size 184 match 100.0
[src/channelScript/CHANSVm] section .text size 53564 match 99.27578
[src/channelScript/CHANSVm] below 100: CHANSVmGetSourceLine 97.82609
[src/channelScript/CHANSVm] below 100: CHANSVmNewObjData 99.583336
[src/channelScript/CHANSVm] below 100: CHANSVmParseInt 94.69388
[src/channelScript/CHANSVm] below 100: CHANSVm_8144B4D4 97.59036
[src/channelScript/CHANSVm] below 100: VmDateDtor 94.96703
[src/channelScript/CHANSVm] below 100: VmStringReplace 97.878784
[src/channelScript/CHANSVm] below 100: VmStringSplit 98.04054
[src/channelScript/CHANSVm] below 100: CHANSVm_8145049C 99.84919
[src/channelScript/CHANSVm] below 100: VmBlobGetHexString 98.71951
[src/channelScript/CHANSVm] below 100: VmBlobPackCommon 97.934135
[src/channelScript/CHANSVm] below 100: VmBlobUnpack 98.26886
[src/channelScript/CHANSVm] below 100: VmWinEmuWrite 99.62687
[src/channelScript/CHANSVm] below 100: CHANSVmAddExe 99.15354
[src/channelScript/CHANSVm] below 100: CHANSVmLinkModules 98.677246
[src/channelScript/CHANSVm] below 100: VmCallMethod 98.0605
[src/channelScript/CHANSVm] below 100: CHANSVmStep 96.452515
[src/channelScript/CHANSVm] baseline: code 35484/53564 data 6904 functions 216 fuzzy 99.2732
regressions vs baseline: 0
global matched_code_percent: 86.76230 -> 86.77018
global fuzzy_match_percent: 99.32123 -> 99.32127
global complete_code_percent: 60.61288 -> 60.61288
global matched_data_percent: 91.11620 -> 91.11620
forbidden patterns added (net, per file): 0
readability warnings (net, per file; must be 0 in the final result): 0
GATE PASS

View File

@@ -0,0 +1,37 @@
full build: ok
main.dol sha1: 26116613f624061ba99c8d1a299aaa6efa85670d
[src/channelScript/CHANSVm] pool: IDENTICAL
[src/channelScript/CHANSVm] objdiff: code 35720/53564 data 6904/6904 functions 217/233 fuzzy 99.2758 linked code 0
[src/channelScript/CHANSVm] instruction-exact functions: 217/233
[src/channelScript/CHANSVm] section .data size 4672 match 100.0
[src/channelScript/CHANSVm] section .rodata size 1432 match 100.0
[src/channelScript/CHANSVm] section .sbss size 16 match 100.0
[src/channelScript/CHANSVm] section .sdata size 600 match 100.0
[src/channelScript/CHANSVm] section .sdata2 size 184 match 100.0
[src/channelScript/CHANSVm] section .text size 53564 match 99.27578
[src/channelScript/CHANSVm] below 100: CHANSVmGetSourceLine 97.82609
[src/channelScript/CHANSVm] below 100: CHANSVmNewObjData 99.583336
[src/channelScript/CHANSVm] below 100: CHANSVmParseInt 94.69388
[src/channelScript/CHANSVm] below 100: CHANSVm_8144B4D4 97.59036
[src/channelScript/CHANSVm] below 100: VmDateDtor 94.96703
[src/channelScript/CHANSVm] below 100: VmStringReplace 97.878784
[src/channelScript/CHANSVm] below 100: VmStringSplit 98.04054
[src/channelScript/CHANSVm] below 100: CHANSVm_8145049C 99.84919
[src/channelScript/CHANSVm] below 100: VmBlobGetHexString 98.71951
[src/channelScript/CHANSVm] below 100: VmBlobPackCommon 97.934135
[src/channelScript/CHANSVm] below 100: VmBlobUnpack 98.26886
[src/channelScript/CHANSVm] below 100: VmWinEmuWrite 99.62687
[src/channelScript/CHANSVm] below 100: CHANSVmAddExe 99.15354
[src/channelScript/CHANSVm] below 100: CHANSVmLinkModules 98.677246
[src/channelScript/CHANSVm] below 100: VmCallMethod 98.0605
[src/channelScript/CHANSVm] below 100: CHANSVmStep 96.452515
[src/channelScript/CHANSVm] baseline: code 35484/53564 data 6904 functions 216 fuzzy 99.2732
regressions vs baseline: 0
global matched_code_percent: 86.76230 -> 86.77018
global fuzzy_match_percent: 99.32123 -> 99.32127
global complete_code_percent: 60.61288 -> 60.61288
global matched_data_percent: 91.11620 -> 91.11620
forbidden patterns added (net, per file): 0
readability warnings (net, per file; must be 0 in the final result): 0
GATE PASS

View File

@@ -0,0 +1,69 @@
GATE PASS
Instruction-exact 216/233 -> 217/233. Objdiff code 35484/53564 -> 35720/53564. Data 6904/6904 -> 6904/6904; .data 100.0%, all 121 interpreter jump-table relocations identical.
VmStringFromCharCode 100.0%; 59/59 instructions, ctxdiff diffs 0. Source commit 6f879ba3.
Remaining functions:
CHANSVmGetSourceLine 97.826090%, module, entry, bitfield and line-offset registers; 46/46 instructions, structural 0, diffs 16; 5 distinct compiling source attempts.
CHANSVmNewObjData 99.583336%, seven chunk-index and table-slot register differences; 96/96 instructions, structural 0, diffs 7; 17 distinct compiling source attempts.
CHANSVmParseInt 94.693880%, three prologue positions schedule endpoint initialization after argument copies; 49/49 instructions, structural 2, diffs 3; 8 distinct compiling source attempts.
CHANSVm_8144B4D4 97.590360%, endpoint store and type comparison are scheduled in opposite order; 83/83 instructions, structural 2, diffs 2; 5 distinct compiling source attempts.
VmDateDtor 94.967030%, seven calendar table-load and variadic argument positions are scheduled differently; 91/91 instructions, structural 5, diffs 7; 5 distinct compiling source attempts.
VmStringReplace 97.878784%, source/search/replacement and traversal register allocation; 132/132 instructions, structural 0, diffs 40; 4 distinct compiling source attempts.
VmStringSplit 98.040540%, delimiter, cursor, array and element register allocation; 222/222 instructions, structural 0, diffs 66; 4 distinct compiling source attempts.
CHANSVm_8145049C 99.849190%, thirteen string-format payload and owner register differences; 431/431 instructions, structural 0, diffs 13; 3 distinct compiling source attempts.
VmBlobGetHexString 98.719510%, fourteen hex index, cursor and digit register differences; 82/82 instructions, structural 0, diffs 14; 7 distinct compiling source attempts.
VmBlobPackCommon 97.934135%, two branch destinations plus packing-state register allocation; 668/668 instructions, structural 2, diffs 246; 4 distinct compiling source attempts.
VmBlobUnpack 98.268860%, format, cursor and decoded-value register allocation; 517/517 instructions, structural 0, diffs 156; 3 distinct compiling source attempts.
VmWinEmuWrite 99.626870%, five converted-string and aligned-length register differences; 67/67 instructions, structural 0, diffs 5; 10 distinct compiling source attempts.
CHANSVmAddExe 99.153540%, module, size and relocation-loop register allocation; 254/254 instructions, structural 0, diffs 34; 3 distinct compiling source attempts.
CHANSVmLinkModules 98.677246%, module, dispatch and object-iterator register allocation; 189/189 instructions, structural 0, diffs 43; 5 distinct compiling source attempts.
VmCallMethod 98.060500%, call-frame, native target and property selector register allocation; 281/281 instructions, structural 0, diffs 91; 3 distinct compiling source attempts.
CHANSVmStep 96.452515%, countdown control flow, table-base addressing, operand-type spill and registers; 1253/1253 instructions, structural 71, diffs 318; 8 distinct compiling source attempts.
Files changed: src/channelScript/CHANSVm.c; tools/decomp-assist/CHANSVm.round7-attempts.md; CHANSVm.round7-gates.txt; CHANSVm.round7-final-gate.txt; CHANSVm.round7-report.md.
Uncertain: compiler cause of remaining scheduling and register allocation.
Final full gate:
```text
full build: ok
main.dol sha1: 26116613f624061ba99c8d1a299aaa6efa85670d
[src/channelScript/CHANSVm] pool: IDENTICAL
[src/channelScript/CHANSVm] objdiff: code 35720/53564 data 6904/6904 functions 217/233 fuzzy 99.2758 linked code 0
[src/channelScript/CHANSVm] instruction-exact functions: 217/233
[src/channelScript/CHANSVm] section .data size 4672 match 100.0
[src/channelScript/CHANSVm] section .rodata size 1432 match 100.0
[src/channelScript/CHANSVm] section .sbss size 16 match 100.0
[src/channelScript/CHANSVm] section .sdata size 600 match 100.0
[src/channelScript/CHANSVm] section .sdata2 size 184 match 100.0
[src/channelScript/CHANSVm] section .text size 53564 match 99.27578
[src/channelScript/CHANSVm] below 100: CHANSVmGetSourceLine 97.82609
[src/channelScript/CHANSVm] below 100: CHANSVmNewObjData 99.583336
[src/channelScript/CHANSVm] below 100: CHANSVmParseInt 94.69388
[src/channelScript/CHANSVm] below 100: CHANSVm_8144B4D4 97.59036
[src/channelScript/CHANSVm] below 100: VmDateDtor 94.96703
[src/channelScript/CHANSVm] below 100: VmStringReplace 97.878784
[src/channelScript/CHANSVm] below 100: VmStringSplit 98.04054
[src/channelScript/CHANSVm] below 100: CHANSVm_8145049C 99.84919
[src/channelScript/CHANSVm] below 100: VmBlobGetHexString 98.71951
[src/channelScript/CHANSVm] below 100: VmBlobPackCommon 97.934135
[src/channelScript/CHANSVm] below 100: VmBlobUnpack 98.26886
[src/channelScript/CHANSVm] below 100: VmWinEmuWrite 99.62687
[src/channelScript/CHANSVm] below 100: CHANSVmAddExe 99.15354
[src/channelScript/CHANSVm] below 100: CHANSVmLinkModules 98.677246
[src/channelScript/CHANSVm] below 100: VmCallMethod 98.0605
[src/channelScript/CHANSVm] below 100: CHANSVmStep 96.452515
[src/channelScript/CHANSVm] baseline: code 35484/53564 data 6904 functions 216 fuzzy 99.2732
regressions vs baseline: 0
global matched_code_percent: 86.76230 -> 86.77018
global fuzzy_match_percent: 99.32123 -> 99.32127
global complete_code_percent: 60.61288 -> 60.61288
global matched_data_percent: 91.11620 -> 91.11620
forbidden patterns added (net, per file): 0
readability warnings (net, per file; must be 0 in the final result): 0
GATE PASS
```

View File

@@ -0,0 +1,164 @@
# CHANSVm round 8 attempts
Scope CHANSVm.c only; 43U matching, no link classification changes.
Unslop writing pass applied.
Baseline HEAD 0c554a16: instruction-exact 217/233; code 35720/53564; data 6904/6904.
Initial pool identical, 125 strings; .data 4672 bytes and 121 jump-table relocations 100%.
Default gate cannot find baseline-0c554a16.json. Nearest existing immutable ancestor baseline is f00336cc; gates use --base f00336cc and compare retained improvements separately against the fresh initial report.
Initial CHANSVmGetSourceLine: 97.826090%; instructions 46/46; structural 0; positional diffs 16.
Initial CHANSVmNewObjData: 99.583336%; instructions 96/96; structural 0; positional diffs 7.
Initial CHANSVmParseInt: 94.693880%; instructions 49/49; structural 2; positional diffs 3.
Initial CHANSVm_8144B4D4: 97.590360%; instructions 83/83; structural 2; positional diffs 2.
Initial VmDateDtor: 94.967030%; instructions 91/91; structural 5; positional diffs 7.
Initial VmStringReplace: 97.878784%; instructions 132/132; structural 0; positional diffs 40.
Initial VmStringSplit: 98.040540%; instructions 222/222; structural 0; positional diffs 66.
Initial CHANSVm_8145049C: 99.849190%; instructions 431/431; structural 0; positional diffs 13.
Initial VmBlobGetHexString: 98.719510%; instructions 82/82; structural 0; positional diffs 14.
Initial VmBlobPackCommon: 97.934135%; instructions 668/668; structural 2; positional diffs 246.
Initial VmBlobUnpack: 98.268860%; instructions 517/517; structural 0; positional diffs 156.
Initial VmWinEmuWrite: 99.626870%; instructions 67/67; structural 0; positional diffs 5.
Initial CHANSVmAddExe: 99.153540%; instructions 254/254; structural 0; positional diffs 34.
Initial CHANSVmLinkModules: 98.677246%; instructions 189/189; structural 0; positional diffs 43.
Initial VmCallMethod: 98.060500%; instructions 281/281; structural 0; positional diffs 91.
Initial CHANSVmStep: 96.452515%; instructions 1253/1253; structural 71; positional diffs 318.
- CHANSVm_8145049C: separate typed string payload from escaped flag and format count; 99.187935%; instructions 431/431; structural 0; diffs 53; data 6904/6904; regressions 0; restored.
- CHANSVm_8145049C: separate temporary string owner from literal byte length; 99.849190%; instructions 431/431; structural 0; diffs 13; data 6904/6904; regressions 0; restored.
- CHANSVm_8145049C: separate typed string payload and owner lifetimes; 99.187935%; instructions 431/431; structural 0; diffs 53; data 6904/6904; regressions 0; restored.
Diagnosis CHANSVmNewObjData: target/source frame 0x30, 96 instructions; branch graph and operand order identical. Only compiler-generated chunk-table slot r25/r26 and chunk counter r26/r25 are exchanged. Tried source boundaries before allocation coloring.
- CHANSVmNewObjData: signed chunk ordinal with unsigned bounds; 99.583336%; instructions 96/96; structural 0; diffs 7; data 6904/6904; regressions 0; restored.
- CHANSVmNewObjData: explicit typed chunk-table slot lifetime; 99.583336%; instructions 96/96; structural 0; diffs 7; data 6904/6904; regressions 0; restored.
- CHANSVmNewObjData: table-slot pointer plus offset initialized before ordinal; 99.583336%; instructions 96/96; structural 0; diffs 7; data 6904/6904; regressions 0; restored.
- CHANSVmNewObjData: inline reservation owns scan and selected-entry lifetime; 99.843750%; instructions 96/96; structural 0; diffs 3; data 6904/6904; regressions 0; restored.
- CHANSVmNewObjData: inline reservation and aligned size declared after selected entry; 99.843750%; instructions 96/96; structural 0; diffs 3; data 6904/6904; regressions 0; restored.
- CHANSVmNewObjData: inline reservation aligned allocation scoped beside payload; 99.843750%; instructions 96/96; structural 0; diffs 3; data 6904/6904; regressions 0; restored.
Diagnosis CHANSVm_8145049C: frame 0xe0, all 431 instructions and control flow match. Thirteen differences exchange the temporary string payload/length and object-owner registers only, beginning at char_body. Inner declaration lifetimes are the next lever.
- CHANSVm_8145049C: temporary string owner declared before temporary string length; 99.849190%; instructions 431/431; structural 0; diffs 13; data 6904/6904; regressions 0; restored.
- CHANSVm_8145049C: temporary string owner declared beside temporary string length; 99.849190%; instructions 431/431; structural 0; diffs 13; data 6904/6904; regressions 0; restored.
- CHANSVm_8145049C: payload result declared before literal length and nested owner before size; 99.756380%; instructions 431/431; structural 0; diffs 21; data 6904/6904; regressions 0; restored.
Diagnosis VmWinEmuWrite: frame 0xb0 and 67 instructions agree; branch and operand forms agree. Converted object r27 and aligned length r29 target are r29/r27 in source; five register differences. Tried typed argument/converted-owner reuse and branch ownership.
- VmWinEmuWrite: raw argument and converted string share object lifetime; 99.626870%; instructions 67/67; structural 0; diffs 5; data 6904/6904; regressions 0; restored.
- VmWinEmuWrite: converted string reuses the unused receiver parameter; 99.626870%; instructions 67/67; structural 0; diffs 5; data 6904/6904; regressions 0; restored.
- VmWinEmuWrite: converted string reuses the unused return-header parameter; 99.626870%; instructions 67/67; structural 0; diffs 5; data 6904/6904; regressions 0; restored.
- VmWinEmuWrite: conversion lengths declared before the conversion buffer; 99.552240%; instructions 67/67; structural 5; diffs 10; data 6904/6904; regressions 0; restored.
- VmWinEmuWrite: raw argument gets an independent typed temporary; 99.626870%; instructions 67/67; structural 0; diffs 5; data 6904/6904; regressions 0; restored.
- CHANSVmNewObjData: reservation and payload allocation have separate inline boundaries; 94.895836%; instructions 100/96; structural 8; diffs 88; data 6904/6904; regressions 0; restored.
- CHANSVmNewObjData: payload helper receives selected entry before header; 94.895836%; instructions 100/96; structural 8; diffs 88; data 6904/6904; regressions 0; restored.
- CHANSVmNewObjData: payload helper receives requested size before selected entry; 94.895836%; instructions 100/96; structural 8; diffs 88; data 6904/6904; regressions 0; restored.
Diagnosis CHANSVmParseInt: frame 0x70 and 49 instructions match; first type load matches, but endpoint zero store occurs three slots too late after base/output argument copies. CHANSVm_8144B4D4 has the same parser initialization issue inlined, with two adjacent endpoint-store/type-compare slots exchanged.
- CHANSVmParseInt: whole inline parser boundary, argument order obj, out, base; 94.693880%; instructions 49/49; structural 2; diffs 3; data 6904/6904; regressions 0; restored.
- CHANSVmParseInt: whole inline parser boundary, argument order base, obj, out; 94.693880%; instructions 49/49; structural 2; diffs 3; data 6904/6904; regressions 0; restored.
- CHANSVmParseInt: whole inline parser boundary, argument order out, obj, base; 94.693880%; instructions 49/49; structural 2; diffs 3; data 6904/6904; regressions 0; restored.
- CHANSVm_8144B4D4: parser endpoint initialized through const-qualified local pointer; 97.590360%; instructions 83/83; structural 2; diffs 2; data 6904/6904; regressions 0; restored.
- CHANSVm_8144B4D4: parser keyword conversion uses explicit success predicate; 97.590360%; instructions 83/83; structural 2; diffs 2; data 6904/6904; regressions 0; restored.
- CHANSVm_8144B4D4: parser result has scoped null-output handling; 95.060240%; instructions 85/83; structural 10; diffs 24; data 6904/6904; regressions 0; restored.
Diagnosis CHANSVmGetSourceLine: leaf frame, 46/46 instructions and normalized structure identical. Module, entry-offset, low PC byte, bitfield and line offset registers differ. Explicit named module and local declaration order are tested after verifying branch/operand forms.
- CHANSVmGetSourceLine: name the module loaded in the validation condition; 97.826090%; instructions 46/46; structural 0; diffs 16; data 6904/6904; regressions 0; restored.
- CHANSVmGetSourceLine: name the low program-counter byte before line-entry traversal; 97.391304%; instructions 46/46; structural 0; diffs 20; data 6904/6904; regressions 0; restored.
- CHANSVmGetSourceLine: loop index initialized only in its loop initializer; 97.826090%; instructions 46/46; structural 0; diffs 16; data 6904/6904; regressions 0; restored.
- CHANSVmGetSourceLine: named module and program-counter byte lifetimes; 97.391304%; instructions 46/46; structural 0; diffs 20; data 6904/6904; regressions 0; restored.
- CHANSVmGetSourceLine: inner declaration order lineOffset,i,bitfield; 97.282610%; instructions 46/46; structural 0; diffs 20; data 6904/6904; regressions 0; restored.
- CHANSVmGetSourceLine: inner declaration order bitfield,lineOffset,i; 97.826090%; instructions 46/46; structural 0; diffs 16; data 6904/6904; regressions 0; restored.
- CHANSVmGetSourceLine: inner declaration order bitfield,i,lineOffset; 97.826090%; instructions 46/46; structural 0; diffs 16; data 6904/6904; regressions 0; restored.
- CHANSVmGetSourceLine: inner declaration order i,lineOffset,bitfield; 97.282610%; instructions 46/46; structural 0; diffs 20; data 6904/6904; regressions 0; restored.
- CHANSVmGetSourceLine: inner declaration order i,bitfield,lineOffset; 97.282610%; instructions 46/46; structural 0; diffs 20; data 6904/6904; regressions 0; restored.
- CHANSVmParseInt: single-case object-type switch; 89.591835%; instructions 50/49; structural 6; diffs 43; data 6904/6904; regressions 0; restored.
- CHANSVmParseInt: object-type predicate computed before endpoint reset; 87.551020%; instructions 51/49; structural 7; diffs 45; data 6904/6904; regressions 0; restored.
- CHANSVmParseInt: parser endpoint lifetime inside parsing scope; 94.693880%; instructions 49/49; structural 2; diffs 3; data 6904/6904; regressions 0; restored.
- CHANSVm_8144B4D4: single-case object-type switch; 96.265060%; instructions 84/83; structural 4; diffs 69; data 6904/6904; regressions 0; restored.
- CHANSVm_8144B4D4: object-type predicate computed before endpoint reset; 94.939760%; instructions 85/83; structural 5; diffs 74; data 6904/6904; regressions 0; restored.
- CHANSVm_8144B4D4: parser endpoint lifetime inside parsing scope; 97.590360%; instructions 83/83; structural 2; diffs 2; data 6904/6904; regressions 0; restored.
Diagnosis VmBlobGetHexString: frame 0x20, 82/82 instructions, structural 0. Fourteen differences exchange character index, generated byte cursor and digit registers. Data/pool identical. Trial declarations, digit temporaries and loop operand forms.
- VmBlobGetHexString: declare character index before output index; 98.719510%; instructions 82/82; structural 0; diffs 14; data 6904/6904; regressions 0; restored.
- VmBlobGetHexString: explicit signed digit temporary before low-digit index; 98.719510%; instructions 82/82; structural 0; diffs 14; data 6904/6904; regressions 0; restored.
- VmBlobGetHexString: explicit signed digit temporary after low-digit index; 98.719510%; instructions 82/82; structural 0; diffs 14; data 6904/6904; regressions 0; restored.
- VmBlobGetHexString: source byte advancement in the low-digit expression; 98.719510%; instructions 82/82; structural 0; diffs 14; data 6904/6904; regressions 0; restored.
- VmBlobGetHexString: initialize character index immediately before traversal; 98.719510%; instructions 82/82; structural 0; diffs 14; data 6904/6904; regressions 0; restored.
Diagnosis VmStringReplace: frame 0x40, 132/132 instructions, structural 0. VM/return, conversion result, source/search/replacement strings and traversal registers differ; branch and operand forms already agree. Source ownership and declaration order are the tested class.
- VmStringReplace: declare traversal lengths before all source pointers; 97.878784%; instructions 132/132; structural 0; diffs 40; data 6904/6904; regressions 0; restored.
- VmStringReplace: declare search and replacement extents before traversal offsets; 97.803030%; instructions 132/132; structural 0; diffs 43; data 6904/6904; regressions 0; restored.
- VmStringReplace: explicit typed string payload owners for length and pointer loads; 97.878784%; instructions 132/132; structural 0; diffs 40; data 6904/6904; regressions 0; restored.
Diagnosis CHANSVmAddExe: frame and 254/254 instruction count match. Mostly module/context and loop-cursor registers; target also reverses addition operands for module end and native method name. Those operand forms are corrected before register search.
- CHANSVmAddExe: module-end and native-name addition follow target operand order; 99.232285%; instructions 254/254; structural 0; diffs 32; data 6904/6904; regressions 0; restored.
- CHANSVmAddExe: executable type copied before module-header read; 99.153540%; instructions 254/254; structural 0; diffs 34; data 6904/6904; regressions 0; restored.
- CHANSVmAddExe: table cursors declared before their traversal counters; 99.547240%; instructions 254/254; structural 0; diffs 18; data 6904/6904; regressions 0; restored.
- CHANSVmAddExe: target addition forms with cursors declared first; 99.625984%; instructions 254/254; structural 0; diffs 16; data 6904/6904; regressions 0; restored.
- CHANSVm_8145049C: record temporary owner before copying its payload; 96.925750%; instructions 431/431; structural 3; diffs 150; data 6904/6904; regressions 0; restored.
- CHANSVm_8145049C: record temporary owner before both character and string payloads; 96.426910%; instructions 430/431; structural 28; diffs 249; data 2232/6904; regressions 0; restored.
- CHANSVm_8145049C: literal extent reused for converted string length; 99.849190%; instructions 431/431; structural 0; diffs 13; data 6904/6904; regressions 0; restored.
- CHANSVm_8145049C: temporary owner is the direct allocation result; 97.389790%; instructions 431/431; structural 0; diffs 147; data 6904/6904; regressions 0; restored.
- CHANSVmAddExe: module header initialized in its declaration after cursor and operand fixes; 99.625984%; instructions 254/254; structural 0; diffs 16; data 6904/6904; regressions 0; restored.
- CHANSVmAddExe: module header declared after header and region extents after cursor and operand fixes; 99.507870%; instructions 254/254; structural 0; diffs 21; data 6904/6904; regressions 0; restored.
- CHANSVmAddExe: module size cached immediately at declaration after cursor and operand fixes; 99.625984%; instructions 254/254; structural 0; diffs 16; data 6904/6904; regressions 0; restored.
CHANSVmAddExe declaration-order search: declaration block: | CHANSVmPrivate* pVm = (CHANSVmPrivate*)vm; | ModuleHeader* mod; | CHANSVmModule* header; | u32 maxEnd; | u32 size; | u32 cnt; | u32 ofs; | start (0, 16) | best (0, 16) after 52 builds; source restored; best order was: | CHANSVmPrivate* pVm = (CHANSVmPrivate*)vm; | ModuleHeader* mod; | CHANSVmModule* header; | u32 maxEnd; | u32 size; | u32 cnt; | u32 ofs; |
Retained CHANSVmAddExe: 99.153540 -> 99.625984%, 34 -> 16 differing instructions; 254/254 instructions; .data and all data sections 100%. Full clean gate --base f00336cc PASS, regressions/forbidden/readability 0, DOL SHA1 26116613f624061ba99c8d1a299aaa6efa85670d. Exact count remains 217/233; this is a measured fuzzy improvement only.
Diagnosis VmDateDtor: frame 0x70 and 91/91 instructions match. Seven scheduling differences load weekday table before month table and place the year stack argument earlier than target. Month-first preparation, typed indexes and calendar helper boundary are tested.
- VmDateDtor: month-name lookup evaluated before weekday-name lookup; 94.967030%; instructions 91/91; structural 5; diffs 7; data 6904/6904; regressions 0; restored.
- VmDateDtor: year stack argument captured before the variadic call; 94.967030%; instructions 91/91; structural 5; diffs 7; data 6904/6904; regressions 0; restored.
- VmDateDtor: month and weekday table bases have explicit typed temporaries; 94.967030%; instructions 91/91; structural 5; diffs 7; data 6904/6904; regressions 0; restored.
Diagnosis VmStringSplit: target/source 222 instructions and normalized structure agree. Remaining differences are delimiter/limit, source/delimiter lengths, array ownership and traversal register allocation. Typed owner scopes and initialized array creation order are tested.
- VmStringSplit: parent and delimiter payloads get named typed owners; 98.040540%; instructions 222/222; structural 0; diffs 66; data 6904/6904; regressions 0; restored.
- VmStringSplit: optional limit conversion object scoped to the limit block; 98.040540%; instructions 222/222; structural 0; diffs 66; data 6904/6904; regressions 0; restored.
- VmStringSplit: result array starts null at its declaration; 96.666664%; instructions 222/222; structural 7; diffs 93; data 6904/6904; regressions 0; restored.
- VmStringSplit: delimiter and source extents declared before their pointers; 98.040540%; instructions 222/222; structural 0; diffs 66; data 6904/6904; regressions 0; restored.
Diagnosis VmCallMethod: frame 0x50 and 281/281 instructions agree. The target keeps the method/property selector in caller register r5 after memset and initializes the eventual callback pointer in r28 at entry. Source reuses retVal for both selector and error status across memset, holding it in r30, and leaves funcPtr uninitialized. Separate selector/error lifetimes and callback initialization are the structural-temporary class to test first.
- VmCallMethod: method/property selector has separate lifetime from call error status; 98.060500%; instructions 281/281; structural 0; diffs 91; data 6904/6904; regressions 0; restored.
- VmCallMethod: initialize callback pointer and delay selector initialization until after scratch clear; 98.113880%; instructions 282/281; structural 12; diffs 226; data 6904/6904; regressions 0; restored.
- VmCallMethod: selector reuses decoded operand, function calls explicitly select zero; 98.896800%; instructions 281/281; structural 0; diffs 54; data 6904/6904; regressions 0; restored.
Diagnosis VmCallMethod: frame 0x50 and 281/281 instructions agree. The target keeps the method/property selector in caller register r5 after memset and initializes the eventual callback pointer in r28 at entry. Source reuses retVal for both selector and error status across memset, holding it in r30, and leaves funcPtr uninitialized. Separate selector/error lifetimes and callback initialization are the structural-temporary class to test first.
- VmCallMethod: instruction and next-PC declared before callback and native target; 99.697510%; instructions 281/281; structural 0; diffs 14; data 6904/6904; regressions 0; restored.
- VmCallMethod: target lifetime order with selector-first comparisons and property flag order; 99.768684%; instructions 281/281; structural 0; diffs 12; data 6904/6904; regressions 0; restored.
- VmCallMethod: target lifetime order with explicit PC/module owners; 99.893240%; instructions 281/281; structural 0; diffs 5; data 6904/6904; regressions 0; restored.
- VmCallMethod: property null selector initialized before set flag; 99.893240%; instructions 281/281; structural 0; diffs 5; data 6904/6904; regressions 0; restored.
- VmCallMethod: set-property predicate has a named operation offset; 99.893240%; instructions 281/281; structural 0; diffs 5; data 6904/6904; regressions 0; restored.
- VmCallMethod: set-property predicate assigned after property-list lookup; 99.893240%; instructions 281/281; structural 0; diffs 5; data 6904/6904; regressions 0; restored.
- VmCallMethod: null-selector predicate assigned after push-depth selection; 100.000000%; instructions 281/281; structural 0; diffs 0; data 6904/6904; regressions 0; restored.
- VmCallMethod: inline property-mode predicate; 99.893240%; instructions 281/281; structural 0; diffs 5; data 6904/6904; regressions 0; restored.
- VmCallMethod: inline null-method predicate; 99.893240%; instructions 281/281; structural 0; diffs 5; data 6904/6904; regressions 0; restored.
- VmCallMethod: inline mode classifier sets both property flags; 99.893240%; instructions 281/281; structural 0; diffs 5; data 6904/6904; regressions 0; restored.
VmCallMethod exact candidate: separate decoded method selector from call-status return, initialize callback to null at entry, retain native target on function mode as the target assembly does, declare instruction/PC/callback before native target, name PC/module owners, compare selector before table index, and compute null-method flag after selecting pushDepth. No artificial/uninitialized values. 281/281 instructions, ctxdiff diffs 0, objdiff 100.0%, data 6904/6904; pending full clean gate.
VmCallMethod source review removed two dead selector assignments introduced by broad trial replacements, including one after a later scratch memset. Rebuild remains 100.0% and ctxdiff diffs 0; final source uses only live selector initialization and callbacks are initialized.
Accepted VmCallMethod after fresh reviewed full gate: GATE PASS, instruction-exact 217 -> 218 / 233, matched code 35720 -> 36844 / 53564, data 6904/6904 including .data 100%, pool identical. DOL SHA1 26116613f624061ba99c8d1a299aaa6efa85670d; regressions 0; forbidden patterns 0; readability warnings 0. Function objdiff 100%, 281/281 instructions and diffs 0.
Diagnosis CHANSVmLinkModules: target frame 0x40 and 189/189 instructions agree; only module/dispatch/global/native traversal registers differ. Target gives module r23, global dispatch r25/global node r26/index r27, then native dispatch r27/native node r26/index r25. Source shares one dispatch and one index across both passes; test distinct pass-local ownership before register permutations.
- CHANSVmLinkModules: global and native dispatch tables have independent lifetimes; 98.597885%; instructions 189/189; structural 0; diffs 45; data 6904/6904; regressions 0; restored.
- CHANSVmLinkModules: global and native table indices have independent lifetimes; 98.571430%; instructions 189/189; structural 0; diffs 46; data 6904/6904; regressions 0; restored.
- CHANSVmLinkModules: independent dispatch tables and pass indices; 98.571430%; instructions 189/189; structural 0; diffs 46; data 6904/6904; regressions 0; restored.
- CHANSVmLinkModules: module and dispatch owners declared together at function scope; 98.571430%; instructions 189/189; structural 0; diffs 46; data 6904/6904; regressions 0; restored.
- CHANSVmLinkModules: pass-local initialized table and iterator precede pass index; 98.677246%; instructions 189/189; structural 0; diffs 43; data 6904/6904; regressions 0; restored.
- CHANSVmLinkModules: native pass index precedes initialized table and iterator; 98.534390%; instructions 189/189; structural 2; diffs 46; data 6904/6904; regressions 0; restored.
- CHANSVmLinkModules: global iterator declared after pass index; 98.677246%; instructions 189/189; structural 0; diffs 43; data 6904/6904; regressions 0; restored.
Diagnosis VmBlobPackCommon: 668/668 instructions and frame agree, data/jump tables 100%. Two branch destinations differ before register tuning: zero-byte padding source still stores an unchanged offset while target branches directly to the parse loop; integer-count validation source checks negatives only in inferred-count branch while target shares the check after both branches. Packing-state register allocation also differs widely.
- VmBlobPackCommon: zero padding bypasses unchanged-offset store; 97.941620%; instructions 668/668; structural 1; diffs 245; data 6904/6904; regressions 0; restored.
- VmBlobPackCommon: integer count validation is shared by explicit and inferred counts; 97.941620%; instructions 668/668; structural 1; diffs 245; data 6904/6904; regressions 0; restored.
- VmBlobPackCommon: both target branch destinations preserved with common count validation; 97.949104%; instructions 668/668; structural 0; diffs 244; data 6904/6904; regressions 0; restored.
- VmBlobPackCommon: format owners declared after per-element work; 97.949104%; instructions 668/668; structural 0; diffs 244; data 6904/6904; regressions 0; restored.
- VmBlobPackCommon: pass counters declared before format owners; 97.949104%; instructions 668/668; structural 0; diffs 244; data 6904/6904; regressions 0; restored.
- VmBlobPackCommon: format-state declarations shared between counting and writing passes; 97.889220%; instructions 668/668; structural 40; diffs 277; data 6904/6904; regressions 0; restored.
Retained VmBlobPackCommon branch correction: target zero-padding bypass and shared count validation remove both structural differences, 668/668 instructions, 97.934135 -> 97.949104%, 246 -> 244 diffs; all remaining diffs are register/operand coloring. Data remains 6904/6904, pending gate.
VmBlobPackCommon retained branch correction passed full clean gate --base f00336cc. Instruction-exact 218/233, code 36844/53564, data 6904/6904, .data 100%, pool identical; no regressions, forbidden additions or readability warnings; correct DOL SHA1.
Diagnosis VmBlobUnpack: frame and all 517 instructions match structurally, but format cursor/count, blob owner, array element and decoded-value registers differ. Shared versus per-case array-element lifetimes, signed count treatment and type-specific decode temporaries are tested before register-only search.
- VmBlobUnpack: one array-element owner shared across integer/string/hex output cases; 98.452614%; instructions 517/517; structural 0; diffs 141; data 6904/6904; regressions 0; restored.
- VmBlobUnpack: decoded integer value scoped to each integer output iteration; 98.268860%; instructions 517/517; structural 0; diffs 156; data 6904/6904; regressions 0; restored.
- VmBlobUnpack: signed integer traversal counter with explicit unsigned bound; 98.268860%; instructions 517/517; structural 0; diffs 156; data 6904/6904; regressions 0; restored.
- VmBlobUnpack: format length read through named string-value owner; 96.392650%; instructions 526/517; structural 11; diffs 500; data 6904/6904; regressions 0; restored.
- CHANSVmNewObjData: chunk-table slot declared and initialized inside the scan iteration; 99.583336%; instructions 96/96; structural 0; diffs 7; data 6904/6904; regressions 0; restored.
- CHANSVmNewObjData: chunk scan bound has an unsigned named extent; 99.583336%; instructions 96/96; structural 0; diffs 7; data 6904/6904; regressions 0; restored.
- CHANSVmNewObjData: chunk scan ordinal and initialized slot share fallback scope; 99.583336%; instructions 96/96; structural 0; diffs 7; data 6904/6904; regressions 0; restored.
Retained VmBlobUnpack: one array-element variable used by every decode case, removing two shadow declarations. 98.268860 -> 98.452614%, 156 -> 141 positional differences, 517/517 instructions, structural 0, data 6904/6904; pending full gate.
VmBlobUnpack shared array-element owner passed full clean gate --base f00336cc: GATE PASS, exact 218/233, matched code 36844/53564, data 6904/6904, pools identical and .data 100%. DOL hash correct; regressions/forbidden/readability all 0.
Diagnosis CHANSVmStep last: frame 0xf0 and 1253 instructions agree, but 71 structural differences remain. Target uses explicit zero-count normalization and a pretested postdecrement loop, one shared rodata base for undefined constants and result-type tables, byte-offset enumeration rather than a moving enum pointer, different load-string error merge, and different property-result ownership. All 121 initial jump-table relocations are identical; any variant that moves them is rejected.
- CHANSVmStep: explicit zero normalization and pretested postdecrement interpreter loop; 96.983240%; instructions 1255/1253; structural 63; diffs 1228; data 2232/6904; regressions 0; restored.
- CHANSVmStep: result-type tables named directly for compiler rodata-base reuse; 96.308860%; instructions 1254/1253; structural 89; diffs 1094; data 2232/6904; regressions 0; restored.
- CHANSVmStep: enumerated type pointer derived from array index each iteration; 96.396645%; instructions 1254/1253; structural 75; diffs 1131; data 2232/6904; regressions 0; restored.
- CHANSVmStep: float index comparisons follow target operand direction; 96.452515%; instructions 1253/1253; structural 71; diffs 318; data 6904/6904; regressions 0; restored.
- CHANSVmStep: pretested countdown with direct tables and indexed type enumeration; 96.604950%; instructions 1257/1253; structural 74; diffs 1220; data 2232/6904; regressions 0; restored.
- CHANSVmStep: class test puts successful constructor selector before the error arm; 96.466080%; instructions 1253/1253; structural 65; diffs 313; data 6904/6904; regressions 0; restored.
- CHANSVmStep: indirect store addresses the second scratch header directly; 95.683160%; instructions 1251/1253; structural 78; diffs 1234; data 2232/6904; regressions 0; restored.
- CHANSVmStep: string load preserves deletion failures and merges the final result; 96.032720%; instructions 1253/1253; structural 75; diffs 318; data 6904/6904; regressions 0; restored.
- CHANSVmStep: constructor branch and direct indirect-store scratch address; 95.696730%; instructions 1251/1253; structural 72; diffs 1235; data 2232/6904; regressions 0; restored.
- CHANSVmStep: constructor branch, direct scratch address and merged string-load result; 95.450120%; instructions 1251/1253; structural 76; diffs 1235; data 2232/6904; regressions 0; restored.
Retained CHANSVmStep constructor-test direction: 96.452515 -> 96.466080%, 318 -> 313 diffs, structural 71 -> 65, unchanged 1253/1253 instructions and .data 100%. Only the positive class arm precedes the failure arm; no table relocations or strings move. Rejected every size/pool-regressing countdown/table/enumeration/indirect-store trial.
CHANSVmStep positive constructor branch passed full clean gate --base f00336cc: GATE PASS, exact 218/233, matched code 36844/53564, data 6904/6904 and .data 100%; no regressions, forbidden patterns or readability warnings. DOL hash correct.
Completeness audit PASS: every remaining open function has at least three distinct compiling source-level trials in this run. Declaration-order search added 52 builds. Accepted VmCallMethod is separately exact after a clean build; current exact count 218/233. Work remains partial because 15 functions are open.
Relocation audit correction: .data has 255 code relocations including method/function-pointer tables; all 255 normalized destinations are identical. Of these, the 121 CHANSVmStep interpreter jump-table relocations are identical. The earlier assertion mistakenly counted all code relocations as interpreter entries; no source or data changed.
Final independent unit comparison against fresh initial snapshot: preserves every one of the original 217 objdiff-exact functions, adds VmCallMethod at 100.0%, code 35720 -> 36844, data 6904 -> 6904. All 15 remaining functions have >=3 distinct compiling trials; full final gate PASS.

View File

@@ -0,0 +1,35 @@
full build: ok
main.dol sha1: 26116613f624061ba99c8d1a299aaa6efa85670d
[src/channelScript/CHANSVm] pool: IDENTICAL
[src/channelScript/CHANSVm] objdiff: code 36844/53564 data 6904/6904 functions 218/233 fuzzy 99.3346 linked code 0
[src/channelScript/CHANSVm] instruction-exact functions: 218/233
[src/channelScript/CHANSVm] section .data size 4672 match 100.0
[src/channelScript/CHANSVm] section .rodata size 1432 match 100.0
[src/channelScript/CHANSVm] section .sbss size 16 match 100.0
[src/channelScript/CHANSVm] section .sdata size 600 match 100.0
[src/channelScript/CHANSVm] section .sdata2 size 184 match 100.0
[src/channelScript/CHANSVm] section .text size 53564 match 99.33456
[src/channelScript/CHANSVm] below 100: CHANSVmGetSourceLine 97.82609
[src/channelScript/CHANSVm] below 100: CHANSVmNewObjData 99.583336
[src/channelScript/CHANSVm] below 100: CHANSVmParseInt 94.69388
[src/channelScript/CHANSVm] below 100: CHANSVm_8144B4D4 97.59036
[src/channelScript/CHANSVm] below 100: VmDateDtor 94.96703
[src/channelScript/CHANSVm] below 100: VmStringReplace 97.878784
[src/channelScript/CHANSVm] below 100: VmStringSplit 98.04054
[src/channelScript/CHANSVm] below 100: CHANSVm_8145049C 99.84919
[src/channelScript/CHANSVm] below 100: VmBlobGetHexString 98.71951
[src/channelScript/CHANSVm] below 100: VmBlobPackCommon 97.949104
[src/channelScript/CHANSVm] below 100: VmBlobUnpack 98.452614
[src/channelScript/CHANSVm] below 100: VmWinEmuWrite 99.62687
[src/channelScript/CHANSVm] below 100: CHANSVmAddExe 99.625984
[src/channelScript/CHANSVm] below 100: CHANSVmLinkModules 98.677246
[src/channelScript/CHANSVm] below 100: CHANSVmStep 96.46608
[src/channelScript/CHANSVm] baseline: code 35484/53564 data 6904 functions 216 fuzzy 99.2732
regressions vs baseline: 0
global matched_code_percent: 86.88876 -> 86.93417
global fuzzy_match_percent: 99.32283 -> 99.32392
global complete_code_percent: 60.61288 -> 60.61288
global matched_data_percent: 91.11620 -> 91.11620
forbidden patterns added (net, per file): 0
readability warnings (net, per file; must be 0 in the final result): 0
GATE PASS

View File

@@ -0,0 +1,97 @@
GATE PASS
Before -> after, measured against fresh initial HEAD 0c554a16:
Instruction-exact functions 217/233 -> 218/233.
Objdiff matched code bytes 35720/53564 -> 36844/53564.
Objdiff matched data bytes 6904/6904 -> 6904/6904.
.data 4672/4672 bytes, 100.0% -> 100.0%; all 121 interpreter jump-table relocations identical. All 255 .data code relocations also have identical normalized destinations. Pools identical at 125/125 strings.
VmCallMethod 98.060500% -> 100.0%; 281/281 instructions, ctxdiff diffs 0, independently rebuilt after the full clean gate.
Remaining non-matching functions, in object order:
CHANSVmGetSourceLine 97.826090%, module, entry, bitfield and line-offset registers; 46/46 instructions, structural 0, diffs 16, 9 compiling attempts.
CHANSVmNewObjData 99.583336%, chunk ordinal and compiler-generated table-slot registers; 96/96 instructions, structural 0, diffs 7, 12 compiling attempts.
CHANSVmParseInt 94.693880%, endpoint store scheduled after base/output argument copies; 49/49 instructions, structural 2, diffs 3, 6 compiling attempts.
CHANSVm_8144B4D4 97.590360%, endpoint store and object-type comparison scheduled in opposite order; 83/83 instructions, structural 2, diffs 2, 6 compiling attempts.
VmDateDtor 94.967030%, weekday/month table loads and variadic stack argument scheduling; 91/91 instructions, structural 5, diffs 7, 3 compiling attempts.
VmStringReplace 97.878784%, source/search/replacement strings and traversal registers; 132/132 instructions, structural 0, diffs 40, 3 compiling attempts.
VmStringSplit 98.040540%, delimiter, array/element ownership and traversal registers; 222/222 instructions, structural 0, diffs 66, 4 compiling attempts.
CHANSVm_8145049C 99.849190%, temporary formatted-string payload and owner registers; 431/431 instructions, structural 0, diffs 13, 10 compiling attempts.
VmBlobGetHexString 98.719510%, hex character index, byte cursor and digit registers; 82/82 instructions, structural 0, diffs 14, 5 compiling attempts.
VmBlobPackCommon 97.949104%, packing-state registers after both structural branch differences were removed; 668/668 instructions, structural 0, diffs 244, 6 compiling attempts.
VmBlobUnpack 98.452614%, format/cursor/decoded-value registers after array-element lifetime was shared; 517/517 instructions, structural 0, diffs 141, 4 compiling attempts.
VmWinEmuWrite 99.626870%, converted string and aligned byte-length registers; 67/67 instructions, structural 0, diffs 5, 5 compiling attempts.
CHANSVmAddExe 99.625984%, module/type registers, module-clear counter and one addition operand order; 254/254 instructions, structural 0, diffs 16, 7 compiling attempts.
CHANSVmLinkModules 98.677246%, module, dispatch, global/native iterator and index registers; 189/189 instructions, structural 0, diffs 43, 7 compiling attempts.
CHANSVmStep 96.466080%, countdown control flow, result-table base, operand-type spill, result merge and registers; 1253/1253 instructions, structural 65, diffs 313, 10 compiling attempts.
Files changed:
src/channelScript/CHANSVm.c
tools/decomp-assist/CHANSVm.round8-attempts.md
tools/decomp-assist/CHANSVm.round8-final-gate.txt
tools/decomp-assist/CHANSVm.round8-report.md
Source improvements were committed only after their full clean gates passed:
8a87f2c2 refine module table traversal ordering
15c33bf7 match vm method dispatch
802c636a align blob packing validation branches
407c0895 share unpacked array element lifetime
1019c675 align interpreter constructor branch
Final report/log commit is the next commit after these source commits.
Uncertain: exact compiler causes of the remaining scheduling/register choices are unconfirmed. The default gate has no immutable baseline for HEAD 0c554a16; full gates therefore use --base f00336cc, the nearest ancestor with an existing baseline. Its printed baseline is 216 functions/35484 code bytes. The fresh initial unit report separately proves this run improved 217 -> 218 without regressing any initial exact function. No baseline, config, header or other translation unit was changed.
Every remaining function has at least three distinct compiling source-level attempts; the declaration-order search also tried 52 orders. Size/data regressions were restored. This is partial matching progress, with 15 functions still open and the unit remaining NonMatching/unlinked as requested.
Final full gate summary, copied verbatim:
```text
[src/channelScript/CHANSVm] pool: IDENTICAL
[src/channelScript/CHANSVm] objdiff: code 36844/53564 data 6904/6904 functions 218/233 fuzzy 99.3346 linked code 0
[src/channelScript/CHANSVm] instruction-exact functions: 218/233
[src/channelScript/CHANSVm] section .data size 4672 match 100.0
GATE PASS
```
Final full non-quick gate:
```text
full build: ok
main.dol sha1: 26116613f624061ba99c8d1a299aaa6efa85670d
[src/channelScript/CHANSVm] pool: IDENTICAL
[src/channelScript/CHANSVm] objdiff: code 36844/53564 data 6904/6904 functions 218/233 fuzzy 99.3346 linked code 0
[src/channelScript/CHANSVm] instruction-exact functions: 218/233
[src/channelScript/CHANSVm] section .data size 4672 match 100.0
[src/channelScript/CHANSVm] section .rodata size 1432 match 100.0
[src/channelScript/CHANSVm] section .sbss size 16 match 100.0
[src/channelScript/CHANSVm] section .sdata size 600 match 100.0
[src/channelScript/CHANSVm] section .sdata2 size 184 match 100.0
[src/channelScript/CHANSVm] section .text size 53564 match 99.33456
[src/channelScript/CHANSVm] below 100: CHANSVmGetSourceLine 97.82609
[src/channelScript/CHANSVm] below 100: CHANSVmNewObjData 99.583336
[src/channelScript/CHANSVm] below 100: CHANSVmParseInt 94.69388
[src/channelScript/CHANSVm] below 100: CHANSVm_8144B4D4 97.59036
[src/channelScript/CHANSVm] below 100: VmDateDtor 94.96703
[src/channelScript/CHANSVm] below 100: VmStringReplace 97.878784
[src/channelScript/CHANSVm] below 100: VmStringSplit 98.04054
[src/channelScript/CHANSVm] below 100: CHANSVm_8145049C 99.84919
[src/channelScript/CHANSVm] below 100: VmBlobGetHexString 98.71951
[src/channelScript/CHANSVm] below 100: VmBlobPackCommon 97.949104
[src/channelScript/CHANSVm] below 100: VmBlobUnpack 98.452614
[src/channelScript/CHANSVm] below 100: VmWinEmuWrite 99.62687
[src/channelScript/CHANSVm] below 100: CHANSVmAddExe 99.625984
[src/channelScript/CHANSVm] below 100: CHANSVmLinkModules 98.677246
[src/channelScript/CHANSVm] below 100: CHANSVmStep 96.46608
[src/channelScript/CHANSVm] baseline: code 35484/53564 data 6904 functions 216 fuzzy 99.2732
regressions vs baseline: 0
global matched_code_percent: 86.88876 -> 86.93417
global fuzzy_match_percent: 99.32283 -> 99.32392
global complete_code_percent: 60.61288 -> 60.61288
global matched_data_percent: 91.11620 -> 91.11620
forbidden patterns added (net, per file): 0
readability warnings (net, per file; must be 0 in the final result): 0
GATE PASS
```

View File

@@ -0,0 +1,215 @@
# CHANSVm sol-low matching attempts
Baseline 699f8443: instruction-exact 216/233; code 35484/53564; data 6904/6904.
Pool identical, 125 strings; .data jump-table relocations must remain exact.
Initial CHANSVmGetSourceLine: 97.82609%; {'insns': '46/46', 'diffs': 16, 'structural': 0}
Initial CHANSVmNewObjData: 99.427086%; {'insns': '96/96', 'diffs': 10, 'structural': 0}
Initial CHANSVmParseInt: 94.69388%; {'insns': '49/49', 'diffs': 3, 'structural': 2}
Initial CHANSVm_8144B4D4: 97.59036%; {'insns': '83/83', 'diffs': 2, 'structural': 2}
Initial VmDateDtor: 94.96703%; {'insns': '91/91', 'diffs': 7, 'structural': 5}
Initial VmStringFromCharCode: 99.40678%; {'insns': '59/59', 'diffs': 6, 'structural': 0}
Initial VmStringReplace: 97.878784%; {'insns': '132/132', 'diffs': 40, 'structural': 0}
Initial VmStringSplit: 98.04054%; {'insns': '222/222', 'diffs': 66, 'structural': 0}
Initial CHANSVm_8145049C: 99.84919%; {'insns': '431/431', 'diffs': 13, 'structural': 0}
Initial VmBlobGetHexString: 98.71951%; {'insns': '82/82', 'diffs': 14, 'structural': 0}
Initial VmBlobPackCommon: 97.934135%; {'insns': '668/668', 'diffs': 246, 'structural': 2}
Initial VmBlobUnpack: 98.26886%; {'insns': '517/517', 'diffs': 156, 'structural': 0}
Initial VmWinEmuWrite: 99.62687%; {'insns': '67/67', 'diffs': 5, 'structural': 0}
Initial CHANSVmAddExe: 99.15354%; {'insns': '254/254', 'diffs': 34, 'structural': 0}
Initial CHANSVmLinkModules: 98.677246%; {'insns': '189/189', 'diffs': 43, 'structural': 0}
Initial VmCallMethod: 98.0605%; {'insns': '281/281', 'diffs': 91, 'structural': 0}
Initial CHANSVmStep: 96.452515%; {'insns': '1253/1253', 'diffs': 318, 'structural': 71}
- CHANSVmParseInt: initialize endpoint at declaration after cached type; 94.693880%; insns 49/49; structural 2; diffs 3; data 6904/6904; restored.
- CHANSVmParseInt: declare endpoint and initialize before type load; 83.673470%; insns 49/49; structural 4; diffs 5; data 6904/6904; restored.
- CHANSVmParseInt: load type immediately before null endpoint assignment; 94.693880%; insns 49/49; structural 2; diffs 3; data 6904/6904; restored.
- CHANSVmParseInt: assign endpoint within string-type condition; 94.693880%; insns 49/49; structural 2; diffs 3; data 6904/6904; restored.
- CHANSVmParseInt: scope endpoint within converted string block; 82.244896%; insns 51/49; structural 10; diffs 41; data 6904/6904; restored.
- CHANSVm_8144B4D4: initialize floating parser endpoint at declaration; 97.590360%; insns 83/83; structural 2; diffs 2; data 6904/6904; restored.
- CHANSVm_8144B4D4: float parser type loaded before endpoint in statements; 97.590360%; insns 83/83; structural 2; diffs 2; data 6904/6904; restored.
- CHANSVm_8144B4D4: float parser endpoint assignment in type condition; 97.590360%; insns 83/83; structural 2; diffs 2; data 6904/6904; restored.
- CHANSVm_8144B4D4: float parser endpoint initialized before type declaration; 95.180725%; insns 83/83; structural 2; diffs 3; data 6904/6904; restored.
- CHANSVmNewObjData: allocation extent before chunk traversal index; 99.583336%; insns 96/96; structural 0; diffs 7; data 6904/6904; restored.
- CHANSVmNewObjData: chunk before traversal counters; 99.427086%; insns 96/96; structural 0; diffs 10; data 6904/6904; restored.
- CHANSVmNewObjData: chunk traversal index after union entry; 99.427086%; insns 96/96; structural 0; diffs 10; data 6904/6904; restored.
- VmWinEmuWrite: aligned byte length declared before string object; 99.179110%; insns 67/67; structural 0; diffs 8; data 6904/6904; restored.
- VmWinEmuWrite: aligned length before byte offset; 99.179110%; insns 67/67; structural 0; diffs 8; data 6904/6904; restored.
- VmWinEmuWrite: remaining byte length before string object; 99.626870%; insns 67/67; structural 0; diffs 5; data 6904/6904; restored.
- VmStringFromCharCode: character value declared before byte cursor; 99.152540%; insns 59/59; structural 0; diffs 9; data 6904/6904; restored.
- VmStringFromCharCode: byte cursor declared after character index; 98.728810%; insns 59/59; structural 0; diffs 12; data 6904/6904; restored.
- VmStringFromCharCode: character value declared after character index; 99.406780%; insns 59/59; structural 0; diffs 6; data 6904/6904; restored.
- CHANSVm_8145049C: shared character and string payload use typed pointers; COMPILE FAIL; restored. ^ # (10209) illegal implicit conversion from 'char *' to # 'unsigned char *' # Too many errors printed, aborting program User break, cancelled... ninja: build stopped: subcommand failed.
- CHANSVm_8145049C: set shared string object before character buffer pointer; 99.350350%; insns 430/431; structural 25; diffs 142; data 2232/6904; restored.
- CHANSVm_8145049C: use separate source pointer for common string formatting; COMPILE FAIL; restored. ^ # (10209) illegal implicit conversion from 'char *' to # 'unsigned char *' # Too many errors printed, aborting program User break, cancelled... ninja: build stopped: subcommand failed.
- VmDateDtor: cache month name before variadic argument setup; 94.967030%; insns 91/91; structural 5; diffs 7; data 6904/6904; restored.
- VmDateDtor: cache day then month names before formatting; 94.967030%; insns 91/91; structural 5; diffs 7; data 6904/6904; restored.
- VmDateDtor: cache month then day names before formatting; 94.967030%; insns 91/91; structural 5; diffs 7; data 6904/6904; restored.
- VmDateDtor: month table lookup through scoped pointer; 94.967030%; insns 91/91; structural 5; diffs 7; data 6904/6904; restored.
- VmDateDtor: cache year after month name lookup; 94.967030%; insns 91/91; structural 5; diffs 7; data 6904/6904; restored.
- CHANSVmParseInt: group parser endpoint and character buffer in typed workspace; 94.693880%; insns 49/49; structural 2; diffs 3; data 6904/6904; restored.
- CHANSVm_8144B4D4: group float parser endpoint and buffer in typed workspace; 97.590360%; insns 83/83; structural 2; diffs 2; data 6904/6904; restored.
- CHANSVmParseInt: type mismatch jumps to shared failure return; 94.693880%; insns 49/49; structural 2; diffs 3; data 6904/6904; restored.
- CHANSVm_8144B4D4: float type mismatch jumps to shared failure return; 97.590360%; insns 83/83; structural 2; diffs 2; data 6904/6904; restored.
- CHANSVm_8144B4D4: allow automatic parser inlining; 97.590360%; insns 83/83; structural 2; diffs 2; data 6904/6904; restored.
- CHANSVmNewObjData: allocation extent before chunk traversal index; 99.583336%; insns 96/96; structural 0; diffs 7; data 6904/6904; retained.
- CHANSVmNewObjData: separate selected entry pointer from chunk index arithmetic; 97.187500%; insns 95/96; structural 7; diffs 59; data 6904/6904; restored.
- CHANSVmNewObjData: typed selected entry declared before counters; 97.187500%; insns 95/96; structural 7; diffs 59; data 6904/6904; restored.
- CHANSVmGetSourceLine: cache module before line table traversal; 97.826090%; insns 46/46; structural 0; diffs 16; data 6904/6904; restored.
- CHANSVmGetSourceLine: declare marker offset after bitfield pointer; 97.826090%; insns 46/46; structural 0; diffs 16; data 6904/6904; restored.
- CHANSVmGetSourceLine: cache low program-counter byte before line entry; 97.826090%; insns 46/46; structural 0; diffs 18; data 6904/6904; restored.
- CHANSVmGetSourceLine: traverse source markers with explicit while loop; 97.826090%; insns 46/46; structural 0; diffs 16; data 6904/6904; restored.
- VmStringFromCharCode: use named UTF16 mask declared before cursor; 99.406780%; insns 59/59; structural 0; diffs 6; data 6904/6904; restored.
- VmStringFromCharCode: scope byte cursor within allocated string block; 98.728810%; insns 59/59; structural 0; diffs 12; data 6904/6904; restored.
- VmStringFromCharCode: separate converted integer before truncation; 94.322040%; insns 57/59; structural 9; diffs 45; data 6904/6904; restored.
- VmWinEmuWrite: cache actual string payload for aligned length and conversion; 96.119400%; insns 65/67; structural 6; diffs 54; data 6904/6904; restored.
- VmWinEmuWrite: scope converted string within method body; 99.626870%; insns 67/67; structural 0; diffs 5; data 6904/6904; restored.
- VmStringReplace: search length declared ahead of parent length; 97.992424%; insns 132/132; structural 0; diffs 40; data 6904/6904; restored.
- VmStringReplace: declare output buffer ahead of source pointers; 96.818184%; insns 132/132; structural 0; diffs 61; data 6904/6904; restored.
- VmStringReplace: load search length before parent length; 97.992424%; insns 132/132; structural 0; diffs 40; data 6904/6904; restored.
- VmStringReplace: scope match pointer at comparison; 95.492424%; insns 132/132; structural 2; diffs 60; data 6904/6904; restored.
- VmStringSplit: delimited source length declared before source pointers; 97.927925%; insns 222/222; structural 0; diffs 69; data 6904/6904; restored.
- VmStringSplit: delimiter length before parent length; 97.927925%; insns 222/222; structural 0; diffs 69; data 6904/6904; restored.
- VmStringSplit: array declared after traversal counters; 98.063065%; insns 222/222; structural 0; diffs 68; data 6904/6904; restored.
- VmStringSplit: load delimiter pointer before parent pointer; 97.950450%; insns 222/222; structural 0; diffs 76; data 6904/6904; restored.
- VmBlobGetHexString: swap byte offset and character index declarations; 98.719510%; insns 82/82; structural 0; diffs 14; data 6904/6904; restored.
- VmBlobGetHexString: byte cursor initialized after hex character index; 98.719510%; insns 82/82; structural 0; diffs 14; data 6904/6904; restored.
- VmBlobGetHexString: cache first decoded nibble in word temporary; 98.719510%; insns 82/82; structural 0; diffs 14; data 6904/6904; restored.
- VmBlobGetHexString: loop counter declared before hex cursor; 98.719510%; insns 82/82; structural 0; diffs 14; data 6904/6904; restored.
- CHANSVmAddExe: source module declared after relocation counters; 99.035430%; insns 254/254; structural 0; diffs 39; data 6904/6904; restored.
- CHANSVmAddExe: executable size declared before module header; 99.035430%; insns 254/254; structural 0; diffs 39; data 6904/6904; restored.
- CHANSVmAddExe: counter before data bound; 99.153540%; insns 254/254; structural 0; diffs 34; data 6904/6904; restored.
- CHANSVmLinkModules: module declared after indices; 98.571430%; insns 189/189; structural 0; diffs 46; data 6904/6904; restored.
- CHANSVmLinkModules: global iterator before dispatch table; 98.677246%; insns 189/189; structural 0; diffs 43; data 6904/6904; restored.
- CHANSVmLinkModules: scope dispatch index within module loop; 98.677246%; insns 189/189; structural 0; diffs 43; data 6904/6904; restored.
- VmCallMethod: split frame push bounds into separate declarations; 98.060500%; insns 281/281; structural 0; diffs 91; data 6904/6904; restored.
- VmCallMethod: return value declared after native method target; 98.060500%; insns 281/281; structural 0; diffs 91; data 6904/6904; restored.
- VmCallMethod: instruction pointer declared ahead of frame metadata; 97.829180%; insns 281/281; structural 0; diffs 103; data 6904/6904; restored.
- VmBlobPackCommon: format position declared before input format; 97.934135%; insns 668/668; structural 2; diffs 246; data 6904/6904; restored.
- VmBlobPackCommon: argument array ahead of source format metadata; 97.934135%; insns 668/668; structural 2; diffs 246; data 6904/6904; restored.
- VmBlobPackCommon: reset element width before next-position output; 97.898200%; insns 668/668; structural 24; diffs 268; data 6904/6904; restored.
- VmBlobUnpack: format position before format string metadata; 98.268860%; insns 517/517; structural 0; diffs 156; data 6904/6904; restored.
- VmBlobUnpack: argument count ahead of blob cursor; 98.268860%; insns 517/517; structural 0; diffs 156; data 6904/6904; restored.
- VmBlobUnpack: signed unpacked integer declared ahead of loop counters; 98.268860%; insns 517/517; structural 0; diffs 156; data 6904/6904; restored.
- CHANSVm_8145049C: typed common string data and owned temporary object; 99.187935%; insns 431/431; structural 0; diffs 53; data 6904/6904; restored.
- CHANSVm_8145049C: separate common string data from escape flag; 99.187935%; insns 431/431; structural 0; diffs 53; data 6904/6904; restored.
- CHANSVm_8145049C: temporary string length scoped beside its owned object; 99.849190%; insns 431/431; structural 0; diffs 13; data 6904/6904; restored.
- CHANSVmNewObjData: name chunk table slot before allocator call; 99.583336%; insns 96/96; structural 0; diffs 7; data 6904/6904; restored.
- CHANSVmNewObjData: chunk table slot declared before chunk counter; 99.583336%; insns 96/96; structural 0; diffs 7; data 6904/6904; restored.
- CHANSVmNewObjData: byte table position replaces indexed chunk lookup; exploratory variant, fully restored; 99.583336%; insns 96/96; structural 0; diffs 7; data 6904/6904; restored.
- CHANSVmNewObjData: increment byte offset before chunk number; 99.583336%; insns 96/96; structural 0; diffs 7; data 6904/6904; restored.
- VmStringFromCharCode: mask unsigned integer before explicit null fallback; 93.644066%; insns 56/59; structural 9; diffs 45; data 6904/6904; restored.
- VmStringFromCharCode: apply unsigned character mask before width cast; 94.322040%; insns 57/59; structural 9; diffs 45; data 6904/6904; restored.
- VmStringFromCharCode: signed byte cursor with unsigned loop index; 99.406780%; insns 59/59; structural 0; diffs 6; data 6904/6904; restored.
- VmStringFromCharCode: promote mask to integer arithmetic width; 99.406780%; insns 59/59; structural 0; diffs 6; data 6904/6904; restored.
- VmWinEmuWrite: scope aligned total length within validated string block; COMPILE FAIL; restored. : u32 totalLength; # Error: ^^^ # (10141) expression syntax error # Too many errors printed, aborting program User break, cancelled... ninja: build stopped: subcommand failed.
- VmWinEmuWrite: fetch string before declaring loop metadata; 99.626870%; insns 67/67; structural 0; diffs 5; data 6904/6904; restored.
- CHANSVmGetSourceLine: explicit module/table/pc locals with shared failure return; 96.847824%; insns 46/46; structural 0; diffs 21; data 6904/6904; restored.
- CHANSVmStep: explicit zero step-count normalization; 96.854750%; insns 1254/1253; structural 66; diffs 1229; data 2232/6904; restored.
- CHANSVmStep: pre-tested interpreter countdown; 96.416600%; insns 1254/1253; structural 68; diffs 1238; data 2232/6904; restored.
- CHANSVmStep: direct typed result-table references; 96.308860%; insns 1254/1253; structural 89; diffs 1094; data 2232/6904; restored.
- CHANSVmStep: normalize count and pre-test interpreter loop; 96.983240%; insns 1255/1253; structural 63; diffs 1228; data 2232/6904; restored.
- CHANSVmStep: pre-tested loop with direct result table references; 96.772545%; insns 1256/1253; structural 82; diffs 1231; data 2232/6904; restored.
- CHANSVmStep: index typed operand workspace instead of carrying pointer; 96.388664%; insns 1254/1253; structural 75; diffs 1131; data 2232/6904; restored.
- CHANSVmStep: normalize pre-tested loop and index operand workspace; 96.596970%; insns 1257/1253; structural 74; diffs 1220; data 2232/6904; restored.
- CHANSVmParseInt: test type field directly after parse-end initialization; 83.673470%; insns 49/49; structural 4; diffs 5; data 6904/6904; restored.
- CHANSVmParseInt: initialize parse endpoint through pointer to local; 94.693880%; insns 49/49; structural 2; diffs 3; data 6904/6904; restored.
- CHANSVmParseInt: assign parse-end null after computing string predicate; COMPILE FAIL; restored. ^ # (10393) 'isString' is not a member of class 'struct CHANSVmObjHdr' # Too many errors printed, aborting program User break, cancelled... ninja: build stopped: subcommand failed.
- CHANSVm_8144B4D4: test type field directly after parse-end initialization; 95.180725%; insns 83/83; structural 2; diffs 3; data 6904/6904; restored.
- CHANSVm_8144B4D4: initialize parse endpoint through pointer to local; 97.590360%; insns 83/83; structural 2; diffs 2; data 6904/6904; restored.
- CHANSVm_8144B4D4: assign parse-end null after computing string predicate; COMPILE FAIL; restored. ^ # (10393) 'isString' is not a member of class 'struct CHANSVmObjHdr' # Too many errors printed, aborting program User break, cancelled... ninja: build stopped: subcommand failed.
- CHANSVmNewObjData: scope chunk scan state below fast-path lookup; 99.583336%; insns 96/96; structural 0; diffs 7; data 6904/6904; restored.
- CHANSVmNewObjData: express table scan with a for loop; 99.583336%; insns 96/96; structural 0; diffs 7; data 6904/6904; restored.
- CHANSVmNewObjData: outer allocation extent scoped only around allocation; 99.427086%; insns 96/96; structural 0; diffs 10; data 6904/6904; restored.
- VmStringFromCharCode: cast masked value through signed integer; 99.406780%; insns 59/59; structural 0; diffs 6; data 6904/6904; restored.
- VmStringFromCharCode: use unsigned mask on signed low-word value; 99.406780%; insns 59/59; structural 0; diffs 6; data 6904/6904; restored.
- VmStringFromCharCode: byte cursor before converted argument pointer; 99.406780%; insns 59/59; structural 0; diffs 6; data 6904/6904; restored.
- VmWinEmuWrite: declare string inside a block containing all processing; 99.626870%; insns 67/67; structural 0; diffs 5; data 6904/6904; restored.
- VmWinEmuWrite: alignment explicitly performed in signed word arithmetic; 99.626870%; insns 67/67; structural 0; diffs 5; data 6904/6904; restored.
- VmWinEmuWrite: preserve byte count then align total length; 99.477615%; insns 67/67; structural 0; diffs 6; data 6904/6904; restored.
- VmStringFromCharCode: helper for UTF16 truncation of non-null integer; 99.406780%; insns 59/59; structural 0; diffs 6; data 6904/6904; restored.
- VmStringFromCharCode: helper for nullable character argument; 86.016950%; insns 52/59; structural 13; diffs 44; data 6904/6904; restored.
- VmStringFromCharCode: early-return nullable character helper; 92.457630%; insns 59/59; structural 5; diffs 11; data 6904/6904; restored.
- VmWinEmuWrite: inline helper for aligned string byte length; 99.626870%; insns 67/67; structural 0; diffs 5; data 6904/6904; restored.
- VmWinEmuWrite: inline helper for argument conversion before processing; 99.626870%; insns 67/67; structural 0; diffs 5; data 6904/6904; restored.
- CHANSVmNewObjData: separate byte-table cursor and selected entry lifetimes; 97.656250%; insns 97/96; structural 6; diffs 74; data 6904/6904; restored.
- CHANSVmNewObjData: store selected chunk through header data pointer; 99.583336%; insns 96/96; structural 0; diffs 7; data 6904/6904; restored.
- CHANSVmParseInt: inline parser initializer combines type load and endpoint reset; 94.693880%; insns 49/49; structural 2; diffs 3; data 6904/6904; restored.
- CHANSVmParseInt: inline parser initializer returns string predicate; 94.693880%; insns 49/49; structural 2; diffs 3; data 6904/6904; restored.
- CHANSVm_8144B4D4: inline parser initializer combines type load and endpoint reset; 97.590360%; insns 83/83; structural 2; diffs 2; data 6904/6904; restored.
- CHANSVm_8144B4D4: inline parser initializer returns string predicate; 97.590360%; insns 83/83; structural 2; diffs 2; data 6904/6904; restored.
- VmDateDtor: inline calendar name lookup month; 94.967030%; insns 91/91; structural 5; diffs 7; data 6904/6904; restored.
- VmDateDtor: inline calendar name lookup day; 94.967030%; insns 91/91; structural 5; diffs 7; data 6904/6904; restored.
- VmDateDtor: inline calendar name lookup both; 94.967030%; insns 91/91; structural 5; diffs 7; data 6904/6904; restored.
Declaration search: CHANSVm_8145049C, 300 compiled permutations, best structural/exact 0/13; source restored.
The clean gate checks byte matching, regressions, pool, source patterns and DOL integrity. Its PASS alone does not imply that the requested exact-count increase was achieved.
## Final clean-build measurements
Instruction-exact 216/233 -> 216/233; matched code 35484/53564 -> 35484/53564; matched data 6904/6904 -> 6904/6904.
CHANSVmNewObjData 99.427086% -> 99.583336%, 10 -> 7 instruction differences, source commit f07fd85c.
The requested exact-count increase was not achieved. Remaining compiler/source tie-break causes are unresolved.
Fresh .data audit: all 121 CHANSVmStep jump-table relocation offsets, types and function-relative destinations match. No linking/configuration changes.
| Open function | Objdiff % | Instructions | Structural / positional diffs | Compiled attempts | Remaining difference |
|---|---:|---|---|---:|---|
| CHANSVmGetSourceLine | 97.82609 | 46/46 | 0 / 16 | 5 | module, marker and line-offset register allocation |
| CHANSVmNewObjData | 99.583336 | 96/96 | 0 / 7 | 15 | chunk counter and table-slot registers are swapped; 7 differing instructions |
| CHANSVmParseInt | 94.69388 | 49/49 | 2 / 3 | 11 | parse-end store follows parameter copies; 3 scheduling differences |
| CHANSVm_8144B4D4 | 97.59036 | 83/83 | 2 / 2 | 11 | parse-end store follows type comparison; 2 scheduling differences |
| VmDateDtor | 94.96703 | 91/91 | 5 / 7 | 8 | month/day table loads and variadic argument setup; 7 scheduling differences |
| VmStringFromCharCode | 99.40678 | 59/59 | 0 / 6 | 16 | UTF16 mask and byte-cursor registers are swapped |
| VmStringReplace | 97.878784 | 132/132 | 0 / 40 | 4 | argument, string pointer and traversal register allocation |
| VmStringSplit | 98.04054 | 222/222 | 0 / 66 | 4 | delimiter, array and traversal register allocation |
| CHANSVm_8145049C | 99.84919 | 431/431 | 0 / 13 | 4 | string pointer and temporary object/length register coalescing |
| VmBlobGetHexString | 98.71951 | 82/82 | 0 / 14 | 4 | hex index, byte cursor and digit register allocation |
| VmBlobPackCommon | 97.934135 | 668/668 | 2 / 246 | 3 | two branch targets and pack-state register allocation |
| VmBlobUnpack | 98.26886 | 517/517 | 0 / 156 | 3 | format, cursor and decoded-value register allocation |
| VmWinEmuWrite | 99.62687 | 67/67 | 0 / 5 | 11 | converted string and aligned byte-length registers are swapped |
| CHANSVmAddExe | 99.15354 | 254/254 | 0 / 34 | 3 | module, size and relocation-loop register allocation |
| CHANSVmLinkModules | 98.677246 | 189/189 | 0 / 43 | 3 | module, dispatch index and native/global iterator registers |
| VmCallMethod | 98.0605 | 281/281 | 0 / 91 | 3 | call-frame and native target register allocation |
| CHANSVmStep | 96.452515 | 1253/1253 | 71 / 318 | 7 | entry/countdown flow, constant table base, operand-type spills and registers |
The declaration search added 300 compiled formatter permutations beyond the per-function attempt counts above. Failed compilations are excluded. The single byte-offset lookup experiment was fully restored. All final source changes are the two declaration positions in CHANSVmNewObjData.
```text
full build: ok
main.dol sha1: 26116613f624061ba99c8d1a299aaa6efa85670d
[src/channelScript/CHANSVm] pool: IDENTICAL
[src/channelScript/CHANSVm] objdiff: code 35484/53564 data 6904/6904 functions 216/233 fuzzy 99.2732 linked code 0
[src/channelScript/CHANSVm] instruction-exact functions: 216/233
[src/channelScript/CHANSVm] section .data size 4672 match 100.0
[src/channelScript/CHANSVm] section .rodata size 1432 match 100.0
[src/channelScript/CHANSVm] section .sbss size 16 match 100.0
[src/channelScript/CHANSVm] section .sdata size 600 match 100.0
[src/channelScript/CHANSVm] section .sdata2 size 184 match 100.0
[src/channelScript/CHANSVm] section .text size 53564 match 99.27317
[src/channelScript/CHANSVm] below 100: CHANSVmGetSourceLine 97.82609
[src/channelScript/CHANSVm] below 100: CHANSVmNewObjData 99.583336
[src/channelScript/CHANSVm] below 100: CHANSVmParseInt 94.69388
[src/channelScript/CHANSVm] below 100: CHANSVm_8144B4D4 97.59036
[src/channelScript/CHANSVm] below 100: VmDateDtor 94.96703
[src/channelScript/CHANSVm] below 100: VmStringFromCharCode 99.40678
[src/channelScript/CHANSVm] below 100: VmStringReplace 97.878784
[src/channelScript/CHANSVm] below 100: VmStringSplit 98.04054
[src/channelScript/CHANSVm] below 100: CHANSVm_8145049C 99.84919
[src/channelScript/CHANSVm] below 100: VmBlobGetHexString 98.71951
[src/channelScript/CHANSVm] below 100: VmBlobPackCommon 97.934135
[src/channelScript/CHANSVm] below 100: VmBlobUnpack 98.26886
[src/channelScript/CHANSVm] below 100: VmWinEmuWrite 99.62687
[src/channelScript/CHANSVm] below 100: CHANSVmAddExe 99.15354
[src/channelScript/CHANSVm] below 100: CHANSVmLinkModules 98.677246
[src/channelScript/CHANSVm] below 100: VmCallMethod 98.0605
[src/channelScript/CHANSVm] below 100: CHANSVmStep 96.452515
[src/channelScript/CHANSVm] baseline: code 35484/53564 data 6904 functions 216 fuzzy 99.2720
regressions vs baseline: 0
global matched_code_percent: 86.76230 -> 86.76230
global fuzzy_match_percent: 99.31232 -> 99.31234
global complete_code_percent: 60.61288 -> 60.61288
global matched_data_percent: 91.11031 -> 91.11031
forbidden patterns added (net, per file): 0
readability warnings (net, per file; must be 0 in the final result): 0
GATE PASS
```

View File

@@ -0,0 +1,853 @@
# Inline assembly conversion attempts
Target: Wii Menu 4.3U. Keep a conversion only after ctxdiff reports zero differences and quick/full gates pass. Failed source experiments were restored. Baseline asm functions already count as exact; this task preserves their exact count while replacing their implementation.
The requested ghidra_decomp.txt has no functions from these five units. Temporary Ghidra exports of the original objects and the target assembly supplied the function bodies. Ghidra outputs and full experiment sources/build/ctx/pool/gate results are in /tmp/sol-low-asm.
## Attempts
libs/RevoEX/src/cdb/CDBDatabase :: CDBDatabaseInit :: attempt 1: direct initialization
POOL IDENTICAL up to 7 (mine=7 base=7); src 0x44 base 0x44 insns 17/17; diffs 0: []; KEPT; regressions vs baseline: 0; GATE PASS; evidence /tmp/sol-low-asm/CDBDatabaseInit-1
libs/RevoEX/src/cdb/CDBDatabase :: CDBDatabaseOpen :: attempt 1: preserve success default
POOL IDENTICAL up to 7 (mine=7 base=7); src 0x50 base 0x50 insns 20/20; diffs 0: []; KEPT; regressions vs baseline: 0; GATE PASS; evidence /tmp/sol-low-asm/CDBDatabaseOpen-1
libs/RevoEX/src/cdb/CDBDatabase :: CDBDatabaseClose :: attempt 1: literal report and typed instance
FIRST DIVERGENCE at index 1; src 0xac base 0xb0 insns 43/44; RESTORED ASM; evidence /tmp/sol-low-asm/CDBDatabaseClose-1
libs/RevoEX/src/cdb/CDBDatabase :: CDBDatabaseClose :: attempt 2: separate free status
FIRST DIVERGENCE at index 1; src 0xac base 0xb0 insns 43/44; RESTORED ASM; evidence /tmp/sol-low-asm/CDBDatabaseClose-2
libs/RevoEX/src/cdb/CDBDatabase :: CDBDatabaseClose :: attempt 3: success branch first
FIRST DIVERGENCE at index 1; src 0xac base 0xb0 insns 43/44; RESTORED ASM; evidence /tmp/sol-low-asm/CDBDatabaseClose-3
libs/RevoEX/src/cdb/CDBDatabase :: CDBDatabasePrivateCreateRecordAtOnce :: attempt 1: nested validation and captured codes
no string entries; # Error: ^; RESTORED ASM; evidence /tmp/sol-low-asm/CDBDatabasePrivateCreateRecordAtOnce-1
libs/RevoEX/src/cdb/CDBDatabase :: CDBDatabasePrivateCreateRecordAtOnce :: attempt 2: load converted codes after obtaining time
no string entries; # Error: ^; RESTORED ASM; evidence /tmp/sol-low-asm/CDBDatabasePrivateCreateRecordAtOnce-2
libs/RevoEX/src/cdb/CDBDatabase :: CDBDatabasePrivateCreateRecordAtOnce :: attempt 3: validate with cleanup label
no string entries; # Error: ^; RESTORED ASM; evidence /tmp/sol-low-asm/CDBDatabasePrivateCreateRecordAtOnce-3
libs/RevoEX/src/cdb/CDBDatabase :: CDBDatabaseCreateRecordAtOnce :: attempt 1: capture maker then game before time
no string entries; # Error: ^; RESTORED ASM; evidence /tmp/sol-low-asm/CDBDatabaseCreateRecordAtOnce-1
libs/RevoEX/src/cdb/CDBDatabase :: CDBDatabaseCreateRecordAtOnce :: attempt 2: capture game then maker before time
no string entries; # Error: ^; RESTORED ASM; evidence /tmp/sol-low-asm/CDBDatabaseCreateRecordAtOnce-2
libs/RevoEX/src/cdb/CDBDatabase :: CDBDatabaseCreateRecordAtOnce :: attempt 3: read codes after timestamp
no string entries; # Error: ^; RESTORED ASM; evidence /tmp/sol-low-asm/CDBDatabaseCreateRecordAtOnce-3
libs/RevoEX/src/cdb/CDBDatabase :: CDBDatabasePrivateCreateRecordAtOnce :: attempt 4: nested validation and captured codes
POOL IDENTICAL up to 7 (mine=7 base=7); src 0xec base 0xec insns 59/59; diffs 0: []; KEPT; regressions vs baseline: 0; GATE PASS; evidence /tmp/sol-low-asm/CDBDatabasePrivateCreateRecordAtOnce-4
libs/RevoEX/src/cdb/CDBDatabase :: CDBDatabaseCreateRecordAtOnce :: attempt 4: capture maker then game before time
POOL IDENTICAL up to 7 (mine=7 base=7); src 0x94 base 0x94 insns 37/37; diffs 8: [5, 7, 14, 15, 23, 24, 25, 26]; RESTORED ASM; evidence /tmp/sol-low-asm/CDBDatabaseCreateRecordAtOnce-4
libs/RevoEX/src/cdb/CDBDatabase :: CDBDatabaseCreateRecordAtOnce :: attempt 5: capture game then maker before time
POOL IDENTICAL up to 7 (mine=7 base=7); src 0x94 base 0x94 insns 37/37; diffs 8: [5, 7, 14, 15, 23, 24, 25, 26]; RESTORED ASM; evidence /tmp/sol-low-asm/CDBDatabaseCreateRecordAtOnce-5
libs/RevoEX/src/cdb/CDBDatabase :: CDBDatabaseCreateRecordAtOnce :: attempt 6: read codes after timestamp
POOL IDENTICAL up to 7 (mine=7 base=7); src 0x94 base 0x94 insns 37/37; diffs 12: [5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 25, 26]; RESTORED ASM; evidence /tmp/sol-low-asm/CDBDatabaseCreateRecordAtOnce-6
libs/RevoEX/src/cdb/CDBDatabase :: CDBDatabaseCreateRecordAtOnceEx :: attempt 1: calendar fields in argument order
POOL IDENTICAL up to 7 (mine=7 base=7); src 0xcc base 0xcc insns 51/51; diffs 12: [23, 24, 26, 27, 28, 29, 37, 38, 39, 40, 42, 45]; RESTORED ASM; evidence /tmp/sol-low-asm/CDBDatabaseCreateRecordAtOnceEx-1
libs/RevoEX/src/cdb/CDBDatabase :: CDBDatabaseCreateRecordAtOnceEx :: attempt 2: seconds first
POOL IDENTICAL up to 7 (mine=7 base=7); src 0xcc base 0xcc insns 51/51; diffs 21: [6, 10, 11, 13, 17, 19, 20, 21, 22, 23, 24, 26, 27, 28, 29, 37, 38, 39, 40, 42]; RESTORED ASM; evidence /tmp/sol-low-asm/CDBDatabaseCreateRecordAtOnceEx-2
libs/RevoEX/src/cdb/CDBDatabase :: CDBDatabaseCreateRecordAtOnceEx :: attempt 3: game code captured before maker
POOL IDENTICAL up to 7 (mine=7 base=7); src 0xcc base 0xcc insns 51/51; diffs 12: [23, 24, 26, 27, 28, 29, 37, 38, 39, 40, 42, 45]; RESTORED ASM; evidence /tmp/sol-low-asm/CDBDatabaseCreateRecordAtOnceEx-3
libs/RevoEX/src/cdb/CDBDatabase :: CDBDatabasePrivateCreateRecordAtOnceEx :: attempt 1: calendar fields in argument order
POOL IDENTICAL up to 7 (mine=7 base=7); src 0xb0 base 0xb0 insns 44/44; diffs 0: []; KEPT; regressions vs baseline: 0; GATE PASS; evidence /tmp/sol-low-asm/CDBDatabasePrivateCreateRecordAtOnceEx-1
libs/RevoEX/src/cdb/CDBDatabase :: CDBDatabasePrivateCreateRecordAtOnceEx_ :: attempt 1: calendar fields in argument order
POOL IDENTICAL up to 7 (mine=7 base=7); src 0x124 base 0x124 insns 73/73; diffs 12: [45, 46, 48, 49, 50, 51, 59, 60, 61, 62, 64, 66]; RESTORED ASM; evidence /tmp/sol-low-asm/CDBDatabasePrivateCreateRecordAtOnceEx_-1
libs/RevoEX/src/cdb/CDBDatabase :: CDBDatabasePrivateCreateRecordAtOnceEx_ :: attempt 2: converted codes held across time conversion
POOL IDENTICAL up to 7 (mine=7 base=7); src 0x124 base 0x124 insns 73/73; diffs 19: [39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 59, 60, 61, 62, 64, 66]; RESTORED ASM; evidence /tmp/sol-low-asm/CDBDatabasePrivateCreateRecordAtOnceEx_-2
libs/RevoEX/src/cdb/CDBDatabase :: CDBDatabasePrivateCreateRecordAtOnceEx_ :: attempt 3: reverse calendar assignment
POOL IDENTICAL up to 7 (mine=7 base=7); src 0x124 base 0x124 insns 73/73; diffs 18: [38, 40, 41, 42, 43, 44, 45, 46, 48, 49, 50, 51, 59, 60, 61, 62, 64, 66]; RESTORED ASM; evidence /tmp/sol-low-asm/CDBDatabasePrivateCreateRecordAtOnceEx_-3
libs/RevoEX/src/cdb/CDBDatabase :: CDBDatabaseCreateRecordImAtOnce_ :: attempt 1: closed check before read-only
no string entries; # Error: ^; RESTORED ASM; evidence /tmp/sol-low-asm/CDBDatabaseCreateRecordImAtOnce_-1
libs/RevoEX/src/cdb/CDBDatabase :: CDBDatabaseCreateRecordImAtOnce_ :: attempt 2: write bit first then closed status
no string entries; # Error: ^; RESTORED ASM; evidence /tmp/sol-low-asm/CDBDatabaseCreateRecordImAtOnce_-2
libs/RevoEX/src/cdb/CDBDatabase :: CDBDatabaseCreateRecordImAtOnce_ :: attempt 3: split quotient and date conversion
no string entries; # Error: ^; RESTORED ASM; evidence /tmp/sol-low-asm/CDBDatabaseCreateRecordImAtOnce_-3
libs/RevoEX/src/cdb/CDBDatabase :: CDBDatabaseFindByKey :: attempt 1: descriptor then existence branches
FIRST DIVERGENCE at index 0; src 0xe4 base 0xe4 insns 57/57; diffs 0: []; RESTORED ASM; regressions vs baseline: 0; GATE FAIL: full build failed; DOL hash 02347405ac466976c1a73c72e504f2cd7643ecbb != 26116613f624061ba99c8d1a299aaa6efa85670d; evidence /tmp/sol-low-asm/CDBDatabaseFindByKey-1
libs/RevoEX/src/cdb/CDBDatabase :: CDBDatabaseCreateRecordImAtOnce_ :: attempt 4: closed check before read-only
no string entries; # Error: ^; RESTORED ASM; evidence /tmp/sol-low-asm/CDBDatabaseCreateRecordImAtOnce_-4
libs/RevoEX/src/cdb/CDBDatabase :: CDBDatabaseCreateRecordImAtOnce_ :: attempt 5: write bit first then closed status
no string entries; # Error: ^; RESTORED ASM; evidence /tmp/sol-low-asm/CDBDatabaseCreateRecordImAtOnce_-5
libs/RevoEX/src/cdb/CDBDatabase :: CDBDatabaseFindByKey :: attempt 2: use cleanup on invalid key
FIRST DIVERGENCE at index 0; src 0xe4 base 0xe4 insns 57/57; diffs 0: []; RESTORED ASM; regressions vs baseline: 0; GATE FAIL: full build failed; DOL hash 02347405ac466976c1a73c72e504f2cd7643ecbb != 26116613f624061ba99c8d1a299aaa6efa85670d; evidence /tmp/sol-low-asm/CDBDatabaseFindByKey-2
libs/RevoEX/src/cdb/CDBDatabase :: CDBDatabaseCreateRecordImAtOnce_ :: attempt 6: split quotient and date conversion
no string entries; # Error: ^^^^^^; RESTORED ASM; evidence /tmp/sol-low-asm/CDBDatabaseCreateRecordImAtOnce_-6
libs/RevoEX/src/cdb/CDBDatabase :: CDBDatabaseFindByKey :: attempt 3: descriptor then existence branches
FIRST DIVERGENCE at index 0; src 0xe4 base 0xe4 insns 57/57; diffs 0: []; RESTORED ASM; regressions vs baseline: 0; GATE FAIL: full build failed; DOL hash 8a2ff623bf5f6611c9628eb03c921004772b758a != 26116613f624061ba99c8d1a299aaa6efa85670d; evidence /tmp/sol-low-asm/CDBDatabaseFindByKey-3
libs/RevoEX/src/cdb/CDBDatabase :: CDBDatabaseFindByKey :: attempt 3: assume success before existence test
POOL IDENTICAL up to 7 (mine=7 base=7); src 0xe4 base 0xe4 insns 57/57; diffs 0: []; RESTORED ASM; regressions vs baseline: 0; GATE FAIL: full build failed; DOL hash 02347405ac466976c1a73c72e504f2cd7643ecbb != 26116613f624061ba99c8d1a299aaa6efa85670d; evidence /tmp/sol-low-asm/CDBDatabaseFindByKey-3
libs/RevoEX/src/cdb/CDBDatabase :: CDBDatabaseFindByKey :: attempt 4: use cleanup on invalid key
no string entries; # Error: ^^^^^^; RESTORED ASM; evidence /tmp/sol-low-asm/CDBDatabaseFindByKey-4
libs/RevoEX/src/cdb/CDBDatabase :: CDBDatabaseFindByKey :: attempt 5: assume success before existence test
FIRST DIVERGENCE at index 0; src 0xe0 base 0xe4 insns 56/57; RESTORED ASM; evidence /tmp/sol-low-asm/CDBDatabaseFindByKey-5
libs/RevoEX/src/cdb/CDBDatabase :: CDBDatabaseCreateRecordImAtOnce_ :: attempt 7: closed check before read-only
FIRST DIVERGENCE at index 0; src 0x120 base 0x150 insns 72/84; RESTORED ASM; evidence /tmp/sol-low-asm/CDBDatabaseCreateRecordImAtOnce_-7
libs/RevoEX/src/cdb/CDBDatabase :: CDBDatabaseCreateRecordImAtOnce_ :: attempt 8: write bit first then closed status
FIRST DIVERGENCE at index 0; src 0x150 base 0x150 insns 84/84; diffs 2: [75, 76]; RESTORED ASM; evidence /tmp/sol-low-asm/CDBDatabaseCreateRecordImAtOnce_-8
libs/RevoEX/src/cdb/CDBDatabase :: CDBDatabaseCreateRecordImAtOnce_ :: attempt 9: split quotient and date conversion
FIRST DIVERGENCE at index 0; src 0x120 base 0x150 insns 72/84; RESTORED ASM; evidence /tmp/sol-low-asm/CDBDatabaseCreateRecordImAtOnce_-9
libs/RevoEX/src/cdb/CDBDatabase :: CDBDatabaseFindByKey :: attempt 6: descriptor then existence branches
FIRST DIVERGENCE at index 0; src 0xe4 base 0xe4 insns 57/57; diffs 0: []; RESTORED ASM; regressions vs baseline: 0; GATE FAIL: full build failed; DOL hash 02347405ac466976c1a73c72e504f2cd7643ecbb != 26116613f624061ba99c8d1a299aaa6efa85670d; evidence /tmp/sol-low-asm/CDBDatabaseFindByKey-6
libs/RevoEX/src/cdb/CDBDatabase :: CDBDatabaseFindByKey :: attempt 7: use cleanup on invalid key
FIRST DIVERGENCE at index 0; src 0xe4 base 0xe4 insns 57/57; diffs 0: []; RESTORED ASM; regressions vs baseline: 0; GATE FAIL: full build failed; DOL hash 02347405ac466976c1a73c72e504f2cd7643ecbb != 26116613f624061ba99c8d1a299aaa6efa85670d; evidence /tmp/sol-low-asm/CDBDatabaseFindByKey-7
libs/RevoEX/src/cdb/CDBDatabase :: CDBDatabaseFindByKey :: attempt 8: assume success before existence test
FIRST DIVERGENCE at index 0; src 0xe0 base 0xe4 insns 56/57; RESTORED ASM; evidence /tmp/sol-low-asm/CDBDatabaseFindByKey-8
libs/RevoEX/src/cdb/CDBDatabase :: CDBDatabaseSearchConditionsIsMatch :: attempt 1: early returns and typed search fields
POOL IDENTICAL up to 7 (mine=7 base=7); src 0x100 base 0x100 insns 64/64; diffs 12: [0, 2, 3, 6, 36, 39, 48, 51, 58, 59, 60, 62]; RESTORED ASM; evidence /tmp/sol-low-asm/CDBDatabaseSearchConditionsIsMatch-1
libs/RevoEX/src/cdb/CDBDatabase :: CDBDatabaseSearchConditionsIsMatch :: attempt 2: larger type buffer
POOL IDENTICAL up to 7 (mine=7 base=7); src 0x100 base 0x100 insns 64/64; diffs 6: [5, 10, 36, 39, 48, 51]; RESTORED ASM; evidence /tmp/sol-low-asm/CDBDatabaseSearchConditionsIsMatch-2
libs/RevoEX/src/cdb/CDBDatabase :: CDBDatabaseSearchConditionsIsMatch :: attempt 3: nested game-code validation
POOL IDENTICAL up to 7 (mine=7 base=7); src 0x100 base 0x100 insns 64/64; diffs 12: [0, 2, 3, 6, 36, 39, 48, 51, 58, 59, 60, 62]; RESTORED ASM; evidence /tmp/sol-low-asm/CDBDatabaseSearchConditionsIsMatch-3
libs/RevoEX/src/cdb/CDBDatabase :: CDBDatabaseSearchCallCallback :: attempt 1: open before callback with early errors
no string entries; # Error: ^; RESTORED ASM; evidence /tmp/sol-low-asm/CDBDatabaseSearchCallCallback-1
libs/RevoEX/src/cdb/CDBDatabase :: CDBDatabaseSearchCallCallback :: attempt 2: match failure returns immediately
no string entries; # Error: ^; RESTORED ASM; evidence /tmp/sol-low-asm/CDBDatabaseSearchCallCallback-2
libs/RevoEX/src/cdb/CDBDatabase :: CDBDatabaseSearchCallCallback :: attempt 3: read-only branch first
no string entries; # Error: ^; RESTORED ASM; evidence /tmp/sol-low-asm/CDBDatabaseSearchCallCallback-3
libs/RevoEX/src/cdb/CDBDatabase :: CDBDatabaseSearchConditionsIsMatch :: attempt 4: decoded key fields share a structured local
POOL IDENTICAL up to 7 (mine=7 base=7); src 0x100 base 0x100 insns 64/64; diffs 0: []; KEPT; regressions vs baseline: 0; GATE PASS; evidence /tmp/sol-low-asm/CDBDatabaseSearchConditionsIsMatch-4
libs/RevoEX/src/cdb/CDBDatabase :: CDBDatabaseSearchCallCallback :: attempt 4: open before callback with early errors
POOL IDENTICAL up to 7 (mine=7 base=7); src 0xf0 base 0xf4 insns 60/61; RESTORED ASM; evidence /tmp/sol-low-asm/CDBDatabaseSearchCallCallback-4
libs/RevoEX/src/cdb/CDBDatabase :: CDBDatabaseSearchCallCallback :: attempt 5: match failure returns immediately
POOL IDENTICAL up to 7 (mine=7 base=7); src 0xf8 base 0xf4 insns 62/61; RESTORED ASM; evidence /tmp/sol-low-asm/CDBDatabaseSearchCallCallback-5
libs/RevoEX/src/cdb/CDBDatabase :: CDBDatabaseSearchCallCallback :: attempt 6: read-only branch first
POOL IDENTICAL up to 7 (mine=7 base=7); src 0xf0 base 0xf4 insns 60/61; RESTORED ASM; evidence /tmp/sol-low-asm/CDBDatabaseSearchCallCallback-6
libs/RevoEX/src/cdb/CDBDatabase :: CDBDatabaseSearchRecordLayer :: attempt 1: typed record keys and directory traversal
POOL IDENTICAL up to 7 (mine=7 base=7); src 0x714 base 0x6fc insns 453/447; RESTORED ASM; evidence /tmp/sol-low-asm/CDBDatabaseSearchRecordLayer-1
libs/RevoEX/src/cdb/CDBDatabase :: CDBDatabaseSearchRecordLayer :: attempt 2: name variables per nested directory
POOL IDENTICAL up to 7 (mine=7 base=7); src 0x714 base 0x6fc insns 453/447; RESTORED ASM; evidence /tmp/sol-low-asm/CDBDatabaseSearchRecordLayer-2
libs/RevoEX/src/cdb/CDBDatabase :: CDBDatabaseSearchRecordLayer :: attempt 3: reverse iteration pre-decrement
POOL IDENTICAL up to 7 (mine=7 base=7); src 0x710 base 0x6fc insns 452/447; RESTORED ASM; evidence /tmp/sol-low-asm/CDBDatabaseSearchRecordLayer-3
libs/RevoEX/src/cdb/CDBDatabase :: CDBDatabaseSearchMinuteLayer :: attempt 1: typed directories and indexed traversal
POOL IDENTICAL up to 7 (mine=7 base=7); src 0x3a8 base 0x3a0 insns 234/232; RESTORED ASM; evidence /tmp/sol-low-asm/CDBDatabaseSearchMinuteLayer-1
libs/RevoEX/src/cdb/CDBDatabase :: CDBDatabaseSearchMinuteLayer :: attempt 2: forward traversal while loop
POOL IDENTICAL up to 7 (mine=7 base=7); src 0x3a8 base 0x3a0 insns 234/232; RESTORED ASM; evidence /tmp/sol-low-asm/CDBDatabaseSearchMinuteLayer-2
libs/RevoEX/src/cdb/CDBDatabase :: CDBDatabaseSearchMinuteLayer :: attempt 3: reverse traversal pre-decrement
POOL IDENTICAL up to 7 (mine=7 base=7); src 0x3a4 base 0x3a0 insns 233/232; RESTORED ASM; evidence /tmp/sol-low-asm/CDBDatabaseSearchMinuteLayer-3
libs/RevoEX/src/cdb/CDBDatabase :: CDBDatabaseSearchHourLayer :: attempt 1: typed directories and indexed traversal
POOL IDENTICAL up to 7 (mine=7 base=7); src 0x394 base 0x38c insns 229/227; RESTORED ASM; evidence /tmp/sol-low-asm/CDBDatabaseSearchHourLayer-1
libs/RevoEX/src/cdb/CDBDatabase :: CDBDatabaseSearchHourLayer :: attempt 2: forward traversal while loop
POOL IDENTICAL up to 7 (mine=7 base=7); src 0x394 base 0x38c insns 229/227; RESTORED ASM; evidence /tmp/sol-low-asm/CDBDatabaseSearchHourLayer-2
libs/RevoEX/src/cdb/CDBDatabase :: CDBDatabaseSearchHourLayer :: attempt 3: reverse traversal pre-decrement
POOL IDENTICAL up to 7 (mine=7 base=7); src 0x390 base 0x38c insns 228/227; RESTORED ASM; evidence /tmp/sol-low-asm/CDBDatabaseSearchHourLayer-3
libs/RevoEX/src/cdb/CDBDatabase :: CDBDatabaseSearchDayLayer :: attempt 1: typed directories and indexed traversal
POOL IDENTICAL up to 7 (mine=7 base=7); src 0x428 base 0x3f0 insns 266/252; RESTORED ASM; evidence /tmp/sol-low-asm/CDBDatabaseSearchDayLayer-1
libs/RevoEX/src/cdb/CDBDatabase :: CDBDatabaseSearchDayLayer :: attempt 2: forward traversal while loop
POOL IDENTICAL up to 7 (mine=7 base=7); src 0x428 base 0x3f0 insns 266/252; RESTORED ASM; evidence /tmp/sol-low-asm/CDBDatabaseSearchDayLayer-2
libs/RevoEX/src/cdb/CDBDatabase :: CDBDatabaseSearchDayLayer :: attempt 3: reverse traversal pre-decrement
POOL IDENTICAL up to 7 (mine=7 base=7); src 0x424 base 0x3f0 insns 265/252; RESTORED ASM; evidence /tmp/sol-low-asm/CDBDatabaseSearchDayLayer-3
libs/RevoEX/src/cdb/CDBDatabase :: CDBDatabaseSearchMonthLayer :: attempt 1: typed directories and indexed traversal
POOL IDENTICAL up to 7 (mine=7 base=7); src 0x408 base 0x3c0 insns 258/240; RESTORED ASM; evidence /tmp/sol-low-asm/CDBDatabaseSearchMonthLayer-1
libs/RevoEX/src/cdb/CDBDatabase :: CDBDatabaseSearchMonthLayer :: attempt 2: forward traversal while loop
POOL IDENTICAL up to 7 (mine=7 base=7); src 0x408 base 0x3c0 insns 258/240; RESTORED ASM; evidence /tmp/sol-low-asm/CDBDatabaseSearchMonthLayer-2
libs/RevoEX/src/cdb/CDBDatabase :: CDBDatabaseSearchMonthLayer :: attempt 3: reverse traversal pre-decrement
POOL IDENTICAL up to 7 (mine=7 base=7); src 0x404 base 0x3c0 insns 257/240; RESTORED ASM; evidence /tmp/sol-low-asm/CDBDatabaseSearchMonthLayer-3
libs/RevoEX/src/cdb/CDBDatabase :: CDBDatabaseSearchYearLayer :: attempt 1: typed directories and indexed traversal
POOL IDENTICAL up to 7 (mine=7 base=7); src 0x3d0 base 0x378 insns 244/222; RESTORED ASM; evidence /tmp/sol-low-asm/CDBDatabaseSearchYearLayer-1
libs/RevoEX/src/cdb/CDBDatabase :: CDBDatabaseSearchYearLayer :: attempt 2: forward traversal while loop
POOL IDENTICAL up to 7 (mine=7 base=7); src 0x3d0 base 0x378 insns 244/222; RESTORED ASM; evidence /tmp/sol-low-asm/CDBDatabaseSearchYearLayer-2
libs/RevoEX/src/cdb/CDBDatabase :: CDBDatabaseSearchYearLayer :: attempt 3: reverse traversal pre-decrement
POOL IDENTICAL up to 7 (mine=7 base=7); src 0x3cc base 0x378 insns 243/222; RESTORED ASM; evidence /tmp/sol-low-asm/CDBDatabaseSearchYearLayer-3
libs/RevoEX/src/cdb/CDBDatabase :: CDBDatabaseSearch :: attempt 1: typed forwarding under lock
POOL IDENTICAL up to 7 (mine=7 base=7); src 0xa0 base 0xa0 insns 40/40; diffs 0: []; KEPT; regressions vs baseline: 0; GATE PASS; evidence /tmp/sol-low-asm/CDBDatabaseSearch-1
libs/RevoEX/src/cdb/CDBDatabase :: CDBDatabaseSearch_ :: attempt 1: normalized date bounds and search state
POOL IDENTICAL up to 7 (mine=7 base=7); src 0xcc base 0xd4 insns 51/53; RESTORED ASM; evidence /tmp/sol-low-asm/CDBDatabaseSearch_-1
libs/RevoEX/src/cdb/CDBDatabase :: CDBDatabaseSearch_ :: attempt 2: explicit optional console id branches
POOL IDENTICAL up to 7 (mine=7 base=7); src 0xd0 base 0xd4 insns 52/53; RESTORED ASM; evidence /tmp/sol-low-asm/CDBDatabaseSearch_-2
libs/RevoEX/src/cdb/CDBDatabase :: CDBDatabaseSearch_ :: attempt 3: set minimum then maximum
POOL IDENTICAL up to 7 (mine=7 base=7); src 0xcc base 0xd4 insns 51/53; RESTORED ASM; evidence /tmp/sol-low-asm/CDBDatabaseSearch_-3
libs/RevoEX/src/cdb/CDBDatabase :: CDBDatabaseInstanceInit :: attempt 1: instance state and owner initialization
POOL IDENTICAL up to 7 (mine=7 base=7); src 0x18 base 0x18 insns 6/6; diffs 0: []; KEPT; regressions vs baseline: 0; GATE PASS; evidence /tmp/sol-low-asm/CDBDatabaseInstanceInit-1
libs/RevoEX/src/cdb/CDBDatabase :: CDBDatabaseInstanceIsUsed :: attempt 1: read instance allocation state
POOL IDENTICAL up to 7 (mine=7 base=7); src 0x8 base 0x8 insns 2/2; diffs 0: []; KEPT; regressions vs baseline: 0; GATE PASS; evidence /tmp/sol-low-asm/CDBDatabaseInstanceIsUsed-1
libs/RevoEX/src/cdb/CDBDatabase :: CDBIsSDAvailable :: attempt 1: explicit boolean availability default
POOL IDENTICAL up to 7 (mine=7 base=7); src 0x48 base 0x48 insns 18/18; diffs 0: []; KEPT; regressions vs baseline: 0; GATE PASS; evidence /tmp/sol-low-asm/CDBIsSDAvailable-1
libs/RevoEX/src/cdb/CDBDatabase :: CDBMountSD :: attempt 1: forward sd mount
POOL IDENTICAL up to 7 (mine=7 base=7); src 0x4 base 0x4 insns 1/1; diffs 0: []; KEPT; regressions vs baseline: 0; GATE PASS; evidence /tmp/sol-low-asm/CDBMountSD-1
libs/RevoEX/src/cdb/CDBDatabase :: CDBUnmountSDForce :: attempt 1: default success and propagate unmount status
POOL IDENTICAL up to 7 (mine=7 base=7); src 0x34 base 0x34 insns 13/13; diffs 0: []; KEPT; regressions vs baseline: 0; GATE PASS; evidence /tmp/sol-low-asm/CDBUnmountSDForce-1
libs/RevoEX/src/cdb/CDBDatabase :: CDBDatabaseCleanUpEmptyDirectoriesRecord :: attempt 1: typed directory and child counter
POOL IDENTICAL up to 7 (mine=7 base=7); src 0x10c base 0x10c insns 67/67; diffs 0: []; KEPT; regressions vs baseline: 0; GATE PASS; evidence /tmp/sol-low-asm/CDBDatabaseCleanUpEmptyDirectoriesRecord-1
libs/RevoEX/src/cdb/CDBDatabase :: CDBDatabaseCleanUpEmptyDirectoriesType :: attempt 1: typed directory and child counter
POOL IDENTICAL up to 7 (mine=7 base=7); src 0x15c base 0x15c insns 87/87; diffs 0: []; KEPT; regressions vs baseline: 0; GATE PASS; evidence /tmp/sol-low-asm/CDBDatabaseCleanUpEmptyDirectoriesType-1
libs/RevoEX/src/cdb/CDBDatabase :: CDBDatabaseCleanUpEmptyDirectoriesCode :: attempt 1: typed directory and child counter
POOL IDENTICAL up to 7 (mine=7 base=7); src 0x14c base 0x14c insns 83/83; diffs 0: []; KEPT; regressions vs baseline: 0; GATE PASS; evidence /tmp/sol-low-asm/CDBDatabaseCleanUpEmptyDirectoriesCode-1
libs/RevoEX/src/cdb/CDBDatabase :: CDBDatabaseCleanUpEmptyDirectoriesMinute :: attempt 1: typed directory and child counter
POOL IDENTICAL up to 7 (mine=7 base=7); src 0x140 base 0x140 insns 80/80; diffs 0: []; KEPT; regressions vs baseline: 0; GATE PASS; evidence /tmp/sol-low-asm/CDBDatabaseCleanUpEmptyDirectoriesMinute-1
libs/RevoEX/src/cdb/CDBDatabase :: CDBDatabaseCleanUpEmptyDirectoriesHour :: attempt 1: typed directory and child counter
POOL IDENTICAL up to 7 (mine=7 base=7); src 0x134 base 0x134 insns 77/77; diffs 0: []; KEPT; regressions vs baseline: 0; GATE PASS; evidence /tmp/sol-low-asm/CDBDatabaseCleanUpEmptyDirectoriesHour-1
libs/RevoEX/src/cdb/CDBDatabase :: CDBDatabaseCleanUpEmptyDirectoriesDay :: attempt 1: typed directory and child counter
POOL IDENTICAL up to 7 (mine=7 base=7); src 0x128 base 0x128 insns 74/74; diffs 0: []; KEPT; regressions vs baseline: 0; GATE PASS; evidence /tmp/sol-low-asm/CDBDatabaseCleanUpEmptyDirectoriesDay-1
libs/RevoEX/src/cdb/CDBDatabase :: CDBDatabaseCleanUpEmptyDirectoriesMonth :: attempt 1: typed directory and child counter
POOL IDENTICAL up to 7 (mine=7 base=7); src 0x124 base 0x124 insns 73/73; diffs 0: []; KEPT; regressions vs baseline: 0; GATE PASS; evidence /tmp/sol-low-asm/CDBDatabaseCleanUpEmptyDirectoriesMonth-1
libs/RevoEX/src/cdb/CDBDatabase :: CDBDatabaseCleanUpEmptyDirectories :: attempt 1: typed root traversal and inline availability
no string entries; # Error: ^; RESTORED ASM; evidence /tmp/sol-low-asm/CDBDatabaseCleanUpEmptyDirectories-1
libs/RevoEX/src/cdb/CDBDatabase :: CDBDatabaseCleanUpEmptyDirectories :: attempt 2: available check as nested condition
no string entries; # Error: ^; RESTORED ASM; evidence /tmp/sol-low-asm/CDBDatabaseCleanUpEmptyDirectories-2
libs/RevoEX/src/cdb/CDBDatabase :: CDBDatabaseCleanUpEmptyDirectories :: attempt 3: explicit mounted then ejected checks
no string entries; # Error: ^; RESTORED ASM; evidence /tmp/sol-low-asm/CDBDatabaseCleanUpEmptyDirectories-3
libs/RevoEX/src/cdb/CDBDatabase :: CDBDatabaseCleanUpEmptyDirectories :: attempt 4: typed root traversal and inline availability
FIRST DIVERGENCE at index 0; src 0x21c base 0x214 insns 135/133; RESTORED ASM; evidence /tmp/sol-low-asm/CDBDatabaseCleanUpEmptyDirectories-4
libs/RevoEX/src/cdb/CDBDatabase :: CDBDatabaseCleanUpEmptyDirectories :: attempt 5: available check as nested condition
FIRST DIVERGENCE at index 0; src 0x21c base 0x214 insns 135/133; RESTORED ASM; evidence /tmp/sol-low-asm/CDBDatabaseCleanUpEmptyDirectories-5
libs/RevoEX/src/cdb/CDBDatabase :: CDBDatabaseCleanUpEmptyDirectories :: attempt 6: explicit mounted then ejected checks
FIRST DIVERGENCE at index 0; src 0x21c base 0x214 insns 135/133; RESTORED ASM; evidence /tmp/sol-low-asm/CDBDatabaseCleanUpEmptyDirectories-6
src/sound/iplSound :: __ct__Q33ipl3snd6SystemFv :: attempt 1: implicit audio base constructor
POOL IDENTICAL up to 0 (mine=0 base=0); src 0x4c base 0x4c insns 19/19; diffs 0: []; KEPT; regressions vs baseline: 0; GATE PASS; evidence /tmp/sol-low-asm/__ct__Q33ipl3snd6SystemFv-1
src/sound/iplSound :: __dt__Q33ipl3snd10tagSSeInfoFv :: attempt 1: implicit member destruction
no string entries; # Error: ^; RESTORED ASM; evidence /tmp/sol-low-asm/__dt__Q33ipl3snd10tagSSeInfoFv-1
src/sound/iplSound :: __dt__Q33ipl3snd10tagSSeInfoFv :: attempt 2: out-of-line sound-handle destructor
no string entries; # Error: ^; RESTORED ASM; evidence /tmp/sol-low-asm/__dt__Q33ipl3snd10tagSSeInfoFv-2
src/sound/iplSound :: __dt__Q33ipl3snd10tagSSeInfoFv :: attempt 3: member destruction after local handle binding
no string entries; # Error: ^; RESTORED ASM; evidence /tmp/sol-low-asm/__dt__Q33ipl3snd10tagSSeInfoFv-3
src/sound/iplSound :: __dt__Q33ipl3snd11tagSBgmInfoFv :: attempt 1: implicit member destruction
POOL IDENTICAL up to 0 (mine=0 base=0); src 0x58 base 0x58 insns 22/22; diffs 0: []; KEPT; regressions vs baseline: 0; GATE PASS; evidence /tmp/sol-low-asm/__dt__Q33ipl3snd11tagSBgmInfoFv-1
src/sound/iplSound :: __dt__Q33ipl3snd6UnkClsFv :: attempt 1: reverse array destruction by index
no string entries; # Error: ^; RESTORED ASM; evidence /tmp/sol-low-asm/__dt__Q33ipl3snd6UnkClsFv-1
src/sound/iplSound :: __dt__Q33ipl3snd6UnkClsFv :: attempt 2: reverse array destruction by pointer
no string entries; # Error: ^; RESTORED ASM; evidence /tmp/sol-low-asm/__dt__Q33ipl3snd6UnkClsFv-2
src/sound/iplSound :: __dt__Q33ipl3snd6UnkClsFv :: attempt 3: forward array destruction
no string entries; # Error: ^; RESTORED ASM; evidence /tmp/sol-low-asm/__dt__Q33ipl3snd6UnkClsFv-3
src/sound/iplSound :: __dt__Q33ipl3snd10tagSSeInfoFv :: attempt 4: implicit member destruction
POOL IDENTICAL up to 0 (mine=0 base=0); src 0x58 base 0x58 insns 22/22; diffs 0: []; KEPT; regressions vs baseline: 0; GATE PASS; evidence /tmp/sol-low-asm/__dt__Q33ipl3snd10tagSSeInfoFv-4
src/sound/iplSound :: __dt__Q33ipl3snd6UnkClsFv :: attempt 4: reverse array destruction by index
POOL IDENTICAL up to 0 (mine=0 base=0); src 0x78 base 0x1c insns 30/7; RESTORED ASM; evidence /tmp/sol-low-asm/__dt__Q33ipl3snd6UnkClsFv-4
src/sound/iplSound :: __dt__Q33ipl3snd6UnkClsFv :: attempt 5: reverse array destruction by pointer
POOL IDENTICAL up to 0 (mine=0 base=0); src 0x7c base 0x1c insns 31/7; RESTORED ASM; evidence /tmp/sol-low-asm/__dt__Q33ipl3snd6UnkClsFv-5
src/sound/iplSound :: __dt__Q33ipl3snd6UnkClsFv :: attempt 6: forward array destruction
POOL IDENTICAL up to 0 (mine=0 base=0); src 0x7c base 0x1c insns 31/7; RESTORED ASM; evidence /tmp/sol-low-asm/__dt__Q33ipl3snd6UnkClsFv-6
src/sound/iplSound :: stopBGM__Q33ipl3snd6SystemFi :: attempt 1: normal handle methods
POOL IDENTICAL up to 0 (mine=0 base=0); src 0x34 base 0x34 insns 13/13; diffs 0: []; KEPT; regressions vs baseline: 0; GATE PASS; evidence /tmp/sol-low-asm/stopBGM__Q33ipl3snd6SystemFi-1
src/sound/iplSound :: muteOnBGM__Q33ipl3snd6SystemFi :: attempt 1: normal handle methods
POOL IDENTICAL up to 0 (mine=0 base=0); src 0x38 base 0x34 insns 14/13; RESTORED ASM; evidence /tmp/sol-low-asm/muteOnBGM__Q33ipl3snd6SystemFi-1
src/sound/iplSound :: muteOnBGM__Q33ipl3snd6SystemFi :: attempt 2: rely on handle attachment check
POOL IDENTICAL up to 0 (mine=0 base=0); src 0x34 base 0x34 insns 13/13; diffs 5: [3, 4, 6, 7, 8]; RESTORED ASM; evidence /tmp/sol-low-asm/muteOnBGM__Q33ipl3snd6SystemFi-2
src/sound/iplSound :: muteOnBGM__Q33ipl3snd6SystemFi :: attempt 3: local main handle
POOL IDENTICAL up to 0 (mine=0 base=0); src 0x34 base 0x34 insns 13/13; diffs 0: []; KEPT; regressions vs baseline: 0; GATE PASS; evidence /tmp/sol-low-asm/muteOnBGM__Q33ipl3snd6SystemFi-3
src/sound/iplSound :: muteOffBGM__Q33ipl3snd6SystemFi :: attempt 1: normal handle methods
POOL IDENTICAL up to 0 (mine=0 base=0); src 0x38 base 0x34 insns 14/13; RESTORED ASM; evidence /tmp/sol-low-asm/muteOffBGM__Q33ipl3snd6SystemFi-1
src/sound/iplSound :: muteOffBGM__Q33ipl3snd6SystemFi :: attempt 2: rely on handle attachment check
POOL IDENTICAL up to 0 (mine=0 base=0); src 0x34 base 0x34 insns 13/13; diffs 5: [3, 4, 6, 7, 8]; RESTORED ASM; evidence /tmp/sol-low-asm/muteOffBGM__Q33ipl3snd6SystemFi-2
src/sound/iplSound :: muteOffBGM__Q33ipl3snd6SystemFi :: attempt 3: local main handle
POOL IDENTICAL up to 0 (mine=0 base=0); src 0x34 base 0x34 insns 13/13; diffs 0: []; KEPT; regressions vs baseline: 0; GATE PASS; evidence /tmp/sol-low-asm/muteOffBGM__Q33ipl3snd6SystemFi-3
src/sound/iplSound :: pauseOnSE__Q33ipl3snd6SystemFv :: attempt 1: normal handle methods
POOL IDENTICAL up to 0 (mine=0 base=0); src 0x74 base 0x74 insns 29/29; diffs 0: []; KEPT; regressions vs baseline: 0; GATE PASS; evidence /tmp/sol-low-asm/pauseOnSE__Q33ipl3snd6SystemFv-1
src/sound/iplSound :: pauseOffSE__Q33ipl3snd6SystemFv :: attempt 1: normal handle methods
POOL IDENTICAL up to 0 (mine=0 base=0); src 0x74 base 0x74 insns 29/29; diffs 0: []; KEPT; regressions vs baseline: 0; GATE PASS; evidence /tmp/sol-low-asm/pauseOffSE__Q33ipl3snd6SystemFv-1
src/sound/iplSound :: pauseOnBGM__Q33ipl3snd6SystemFv :: attempt 1: normal handle methods
POOL IDENTICAL up to 0 (mine=0 base=0); src 0xa8 base 0xa8 insns 42/42; diffs 0: []; KEPT; regressions vs baseline: 0; GATE PASS; evidence /tmp/sol-low-asm/pauseOnBGM__Q33ipl3snd6SystemFv-1
src/sound/iplSound :: pauseOffBGM__Q33ipl3snd6SystemFv :: attempt 1: normal handle methods
POOL IDENTICAL up to 0 (mine=0 base=0); src 0x80 base 0x80 insns 32/32; diffs 0: []; KEPT; regressions vs baseline: 0; GATE PASS; evidence /tmp/sol-low-asm/pauseOffBGM__Q33ipl3snd6SystemFv-1
src/sound/iplSound :: stopSE__Q33ipl3snd6SystemFPQ34nw4r3snd11SoundHandlei :: attempt 1: normal handle methods
POOL IDENTICAL up to 0 (mine=0 base=0); src 0xa8 base 0xa8 insns 42/42; diffs 9: [12, 16, 19, 20, 22, 30, 31, 32, 34]; RESTORED ASM; evidence /tmp/sol-low-asm/stopSE__Q33ipl3snd6SystemFPQ34nw4r3snd11SoundHandlei-1
src/sound/iplSound :: stopSE__Q33ipl3snd6SystemFPQ34nw4r3snd11SoundHandlei :: attempt 2: early return for inactive handle
POOL IDENTICAL up to 0 (mine=0 base=0); src 0xac base 0xa8 insns 43/42; RESTORED ASM; evidence /tmp/sol-low-asm/stopSE__Q33ipl3snd6SystemFPQ34nw4r3snd11SoundHandlei-2
src/sound/iplSound :: stopSE__Q33ipl3snd6SystemFPQ34nw4r3snd11SoundHandlei :: attempt 3: iterate with pointer
POOL IDENTICAL up to 0 (mine=0 base=0); src 0xa0 base 0xa8 insns 40/42; RESTORED ASM; evidence /tmp/sol-low-asm/stopSE__Q33ipl3snd6SystemFPQ34nw4r3snd11SoundHandlei-3
src/sound/iplSound :: resetAllSound__Q33ipl3snd6SystemFv :: attempt 1: normal handle methods
POOL IDENTICAL up to 0 (mine=0 base=0); src 0x114 base 0x110 insns 69/68; RESTORED ASM; evidence /tmp/sol-low-asm/resetAllSound__Q33ipl3snd6SystemFv-1
src/sound/iplSound :: resetAllSound__Q33ipl3snd6SystemFv :: attempt 2: main handle checks attachment
POOL IDENTICAL up to 0 (mine=0 base=0); src 0x110 base 0x110 insns 68/68; diffs 7: [5, 9, 13, 21, 22, 23, 25]; RESTORED ASM; evidence /tmp/sol-low-asm/resetAllSound__Q33ipl3snd6SystemFv-2
src/sound/iplSound :: resetAllSound__Q33ipl3snd6SystemFv :: attempt 3: pointer traversal of sound blocks
POOL IDENTICAL up to 0 (mine=0 base=0); src 0x10c base 0x110 insns 67/68; RESTORED ASM; evidence /tmp/sol-low-asm/resetAllSound__Q33ipl3snd6SystemFv-3
src/sound/iplSound :: __ct__Q34nw4r3snd11SoundHandleFv :: attempt 1: out-of-line constructor member initializer
POOL IDENTICAL up to 0 (mine=0 base=0); src 0xc base 0xc insns 3/3; diffs 0: []; KEPT; regressions vs baseline: 0; GATE PASS; evidence /tmp/sol-low-asm/__ct__Q34nw4r3snd11SoundHandleFv-1
src/system/iplSaveDataManager :: hasChannel__Q33ipl8savedata7ManagerCFUxPiPi :: attempt 1: nested page and slot indices
POOL IDENTICAL up to 3 (mine=3 base=3); src 0x11c base 0x11c insns 71/71; diffs 58: [0, 2, 3, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21]; RESTORED ASM; evidence /tmp/sol-low-asm/hasChannel-1
src/system/iplSaveDataManager :: hasChannel__Q33ipl8savedata7ManagerCFUxPiPi :: attempt 2: mask conditional as explicit branches
POOL IDENTICAL up to 3 (mine=3 base=3); src 0x11c base 0x11c insns 71/71; diffs 58: [0, 2, 3, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21]; RESTORED ASM; evidence /tmp/sol-low-asm/hasChannel-2
src/system/iplSaveDataManager :: hasChannel__Q33ipl8savedata7ManagerCFUxPiPi :: attempt 3: local channel pointer
POOL IDENTICAL up to 3 (mine=3 base=3); src 0x11c base 0x11c insns 71/71; diffs 58: [0, 2, 3, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21]; RESTORED ASM; evidence /tmp/sol-low-asm/hasChannel-3
src/system/iplSaveDataManager :: getNumValidChannel__Q33ipl8savedata7ManagerCFv :: attempt 1: nested page and slot indices
POOL IDENTICAL up to 3 (mine=3 base=3); src 0x60 base 0x5c insns 24/23; RESTORED ASM; evidence /tmp/sol-low-asm/getNumValidChannel-1
src/system/iplSaveDataManager :: getNumValidChannel__Q33ipl8savedata7ManagerCFv :: attempt 2: split type and scene tests
POOL IDENTICAL up to 3 (mine=3 base=3); src 0x60 base 0x5c insns 24/23; RESTORED ASM; evidence /tmp/sol-low-asm/getNumValidChannel-2
src/system/iplSaveDataManager :: getNumValidChannel__Q33ipl8savedata7ManagerCFv :: attempt 3: row pointer and counted inner loop
POOL IDENTICAL up to 3 (mine=3 base=3); src 0x58 base 0x5c insns 22/23; RESTORED ASM; evidence /tmp/sol-low-asm/getNumValidChannel-3
src/system/iplSaveDataManager :: getNumValidChannel__Q33ipl8savedata7ManagerCFv :: attempt 4: direct member references avoid hoisting channel base
POOL IDENTICAL up to 3 (mine=3 base=3); src 0x5c base 0x5c insns 23/23; diffs 4: [4, 7, 8, 11]; RESTORED ASM; evidence /tmp/sol-low-asm/getNumValidChannel-4
src/system/iplSaveDataManager :: getNumValidChannel__Q33ipl8savedata7ManagerCFv :: attempt 5: page index declared before count
POOL IDENTICAL up to 3 (mine=3 base=3); src 0x5c base 0x5c insns 23/23; diffs 10: [0, 1, 4, 7, 8, 11, 14, 17, 19, 21]; RESTORED ASM; evidence /tmp/sol-low-asm/getNumValidChannel-5
src/system/iplSaveDataManager :: getNumValidChannel__Q33ipl8savedata7ManagerCFv :: attempt 6: increment count before page counter declaration
POOL IDENTICAL up to 3 (mine=3 base=3); src 0x5c base 0x5c insns 23/23; diffs 4: [4, 7, 8, 11]; RESTORED ASM; evidence /tmp/sol-low-asm/getNumValidChannel-6
src/system/iplSaveDataManager :: makePriorTitleIDList__Q33ipl8savedata7ManagerFPUxPUxUl :: attempt 1: direct title list traversal
POOL IDENTICAL up to 3 (mine=3 base=3); src 0x1ec base 0x214 insns 123/133; RESTORED ASM; evidence /tmp/sol-low-asm/makePriorTitleIDList-1
src/system/iplSaveDataManager :: makePriorTitleIDList__Q33ipl8savedata7ManagerFPUxPUxUl :: attempt 2: nested nonzero input body
POOL IDENTICAL up to 3 (mine=3 base=3); src 0x1ec base 0x214 insns 123/133; RESTORED ASM; evidence /tmp/sol-low-asm/makePriorTitleIDList-2
src/system/iplSaveDataManager :: makePriorTitleIDList__Q33ipl8savedata7ManagerFPUxPUxUl :: attempt 3: local input title snapshot
POOL IDENTICAL up to 3 (mine=3 base=3); src 0x1ec base 0x214 insns 123/133; RESTORED ASM; evidence /tmp/sol-low-asm/makePriorTitleIDList-3
src/system/iplSaveDataManager :: makeTmpList__Q33ipl8savedata7ManagerFPUxUlPUxUl :: attempt 1: direct title list traversal
POOL IDENTICAL up to 3 (mine=3 base=3); src 0x170 base 0x17c insns 92/95; RESTORED ASM; evidence /tmp/sol-low-asm/makeTmpList-1
src/system/iplSaveDataManager :: makeTmpList__Q33ipl8savedata7ManagerFPUxUlPUxUl :: attempt 2: pointer advances input titles
POOL IDENTICAL up to 3 (mine=3 base=3); src 0x168 base 0x17c insns 90/95; RESTORED ASM; evidence /tmp/sol-low-asm/makeTmpList-2
src/system/iplSaveDataManager :: makeTmpList__Q33ipl8savedata7ManagerFPUxUlPUxUl :: attempt 3: separate append and output count increment
POOL IDENTICAL up to 3 (mine=3 base=3); src 0x170 base 0x17c insns 92/95; RESTORED ASM; evidence /tmp/sol-low-asm/makeTmpList-3
src/system/iplSaveDataManager :: doUpdateChanInfos__Q33ipl8savedata7ManagerFPUx :: attempt 1: direct title list traversal
POOL IDENTICAL up to 3 (mine=3 base=3); src 0x104 base 0x10c insns 65/67; RESTORED ASM; evidence /tmp/sol-low-asm/doUpdateChanInfos-1
src/system/iplSaveDataManager :: doUpdateChanInfos__Q33ipl8savedata7ManagerFPUx :: attempt 2: read title halves directly from input array
POOL IDENTICAL up to 3 (mine=3 base=3); src 0x10c base 0x10c insns 67/67; diffs 54: [5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24]; RESTORED ASM; evidence /tmp/sol-low-asm/doUpdateChanInfos-2
src/system/iplSaveDataManager :: doUpdateChanInfos__Q33ipl8savedata7ManagerFPUx :: attempt 3: explicit changed-channel branch
POOL IDENTICAL up to 3 (mine=3 base=3); src 0x104 base 0x10c insns 65/67; RESTORED ASM; evidence /tmp/sol-low-asm/doUpdateChanInfos-3
src/system/iplSaveDataManager :: getAvailableInList__Q33ipl8savedata7ManagerFPCUxUl :: attempt 1: direct search and title comparison
POOL IDENTICAL up to 3 (mine=3 base=3); src 0x70 base 0x70 insns 28/28; diffs 10: [0, 2, 11, 12, 13, 14, 15, 16, 21, 23]; RESTORED ASM; evidence /tmp/sol-low-asm/getAvailableInList-1
src/system/iplSaveDataManager :: getAvailableInList__Q33ipl8savedata7ManagerFPCUxUl :: attempt 2: split quotient and remainder
POOL IDENTICAL up to 3 (mine=3 base=3); src 0x70 base 0x70 insns 28/28; diffs 10: [0, 2, 11, 12, 13, 14, 15, 16, 21, 23]; RESTORED ASM; evidence /tmp/sol-low-asm/getAvailableInList-2
src/system/iplSaveDataManager :: getAvailableInList__Q33ipl8savedata7ManagerFPCUxUl :: attempt 3: pointer input traversal
POOL IDENTICAL up to 3 (mine=3 base=3); src 0x68 base 0x70 insns 26/28; RESTORED ASM; evidence /tmp/sol-low-asm/getAvailableInList-3
src/system/iplSaveDataManager :: isEqualChannel__Q33ipl8savedata7ManagerFUxUx :: attempt 1: direct search and title comparison
POOL IDENTICAL up to 3 (mine=3 base=3); src 0x8c base 0x9c insns 35/39; RESTORED ASM; evidence /tmp/sol-low-asm/isEqualChannel-1
src/system/iplSaveDataManager :: isEqualChannel__Q33ipl8savedata7ManagerFUxUx :: attempt 2: base mismatch early return
POOL IDENTICAL up to 3 (mine=3 base=3); src 0x8c base 0x9c insns 35/39; RESTORED ASM; evidence /tmp/sol-low-asm/isEqualChannel-2
src/system/iplSaveDataManager :: isEqualChannel__Q33ipl8savedata7ManagerFUxUx :: attempt 3: region conditions use XOR
POOL IDENTICAL up to 3 (mine=3 base=3); src 0x98 base 0x9c insns 38/39; RESTORED ASM; evidence /tmp/sol-low-asm/isEqualChannel-3
src/system/iplSaveDataManager :: iplSavedata_813596B8__Q33ipl8savedata7ManagerFUx :: attempt 1: direct search and title comparison
POOL IDENTICAL up to 3 (mine=3 base=3); src 0xd8 base 0xe8 insns 54/58; RESTORED ASM; evidence /tmp/sol-low-asm/iplSavedata_813596B8-1
src/system/iplSaveDataManager :: iplSavedata_813596B8__Q33ipl8savedata7ManagerFUx :: attempt 2: separate excluded title checks
POOL IDENTICAL up to 3 (mine=3 base=3); src 0xd4 base 0xe8 insns 53/58; RESTORED ASM; evidence /tmp/sol-low-asm/iplSavedata_813596B8-2
src/system/iplSaveDataManager :: iplSavedata_813596B8__Q33ipl8savedata7ManagerFUx :: attempt 3: shift using source and destination indices
POOL IDENTICAL up to 3 (mine=3 base=3); src 0xe8 base 0xe8 insns 58/58; diffs 18: [24, 34, 37, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 50, 51, 52, 53, 54]; RESTORED ASM; evidence /tmp/sol-low-asm/iplSavedata_813596B8-3
libs/RVLMiddleware/TMC_JPEG/src/jpegdec/jdec_main :: TMCJPEGDEC_imagestart :: attempt 1: typed zigzag array stores
no string entries; src 0x188 base 0x190 insns 98/100; RESTORED ASM; evidence /tmp/sol-low-asm/TMCJPEGDEC_imagestart-1
libs/RVLMiddleware/TMC_JPEG/src/jpegdec/jdec_main :: TMCJPEGDEC_imagestart :: attempt 2: counted for loop
no string entries; src 0x188 base 0x190 insns 98/100; RESTORED ASM; evidence /tmp/sol-low-asm/TMCJPEGDEC_imagestart-2
libs/RVLMiddleware/TMC_JPEG/src/jpegdec/jdec_main :: TMCJPEGDEC_imagestart :: attempt 3: natural sequential zigzag stores
no string entries; src 0x188 base 0x190 insns 98/100; RESTORED ASM; evidence /tmp/sol-low-asm/TMCJPEGDEC_imagestart-3
libs/RVLMiddleware/TMC_JPEG/src/jpegdec/jdec_main :: TMCJPEGDEC_scan_varinit :: attempt 1: frame fields and sampling component index
no string entries; src 0x204 base 0x204 insns 129/129; diffs 9: [8, 9, 10, 11, 12, 13, 15, 20, 21]; RESTORED ASM; evidence /tmp/sol-low-asm/TMCJPEGDEC_scan_varinit-1
libs/RVLMiddleware/TMC_JPEG/src/jpegdec/jdec_main :: TMCJPEGDEC_scan_varinit :: attempt 2: ceil divisions as explicit increments
no string entries; src 0x1f8 base 0x204 insns 126/129; RESTORED ASM; evidence /tmp/sol-low-asm/TMCJPEGDEC_scan_varinit-2
libs/RVLMiddleware/TMC_JPEG/src/jpegdec/jdec_main :: TMCJPEGDEC_scan_varinit :: attempt 3: capture horizontal and vertical sampling before stores
no string entries; src 0x204 base 0x204 insns 129/129; diffs 18: [8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25]; RESTORED ASM; evidence /tmp/sol-low-asm/TMCJPEGDEC_scan_varinit-3
libs/RVLMiddleware/TMC_JPEG/src/jpegdec/jdec_main :: TMCJPEGDEC_restart_interval :: attempt 1: nested restart parsing
no string entries; src 0x16c base 0x174 insns 91/93; RESTORED ASM; evidence /tmp/sol-low-asm/TMCJPEGDEC_restart_interval-1
libs/RVLMiddleware/TMC_JPEG/src/jpegdec/jdec_main :: TMCJPEGDEC_restart_interval :: attempt 2: post-increment restart count
no string entries; src 0x16c base 0x174 insns 91/93; RESTORED ASM; evidence /tmp/sol-low-asm/TMCJPEGDEC_restart_interval-2
libs/RVLMiddleware/TMC_JPEG/src/jpegdec/jdec_main :: TMCJPEGDEC_restart_interval :: attempt 3: modulus for next MCU remainder
no string entries; src 0x16c base 0x174 insns 91/93; RESTORED ASM; evidence /tmp/sol-low-asm/TMCJPEGDEC_restart_interval-3
libs/RVLMiddleware/TMC_JPEG/src/jpegdec/jdec_main :: TMCJPEGDEC_parse_para :: attempt 1: marker switch with common error exit
no string entries; src 0x2c4 base 0x2dc insns 177/183; RESTORED ASM; evidence /tmp/sol-low-asm/TMCJPEGDEC_parse_para-1
libs/RVLMiddleware/TMC_JPEG/src/jpegdec/jdec_main :: TMCJPEGDEC_parse_para :: attempt 2: single negative-result clamp
no string entries; src 0x2bc base 0x2dc insns 175/183; RESTORED ASM; evidence /tmp/sol-low-asm/TMCJPEGDEC_parse_para-2
libs/RVLMiddleware/TMC_JPEG/src/jpegdec/jdec_main :: TMCJPEGDEC_parse_para :: attempt 3: stop flag bool conditions
no string entries; src 0x2c4 base 0x2dc insns 177/183; RESTORED ASM; evidence /tmp/sol-low-asm/TMCJPEGDEC_parse_para-3
libs/RVLMiddleware/TMC_JPEG/src/jpegdec/jdec_main :: TMCJPEGDEC_parse_dht :: attempt 1: Huffman lengths and symbol buffers
no string entries; src 0x1e0 base 0x1e0 insns 120/120; diffs 35: [6, 7, 10, 17, 21, 31, 34, 38, 39, 41, 51, 52, 56, 59, 61, 63, 65, 67, 69, 70]; RESTORED ASM; evidence /tmp/sol-low-asm/TMCJPEGDEC_parse_dht-1
libs/RVLMiddleware/TMC_JPEG/src/jpegdec/jdec_main :: TMCJPEGDEC_parse_dht :: attempt 2: loop sum of code counts
no string entries; src 0x1e0 base 0x1e0 insns 120/120; diffs 16: [6, 10, 17, 21, 30, 31, 32, 34, 38, 39, 41, 51, 52, 91, 99, 100]; RESTORED ASM; evidence /tmp/sol-low-asm/TMCJPEGDEC_parse_dht-2
libs/RVLMiddleware/TMC_JPEG/src/jpegdec/jdec_main :: TMCJPEGDEC_parse_dht :: attempt 3: count pointer follows index
no string entries; src 0x1e0 base 0x1e0 insns 120/120; diffs 35: [6, 7, 10, 17, 21, 31, 34, 38, 39, 41, 51, 52, 56, 59, 61, 63, 65, 67, 69, 70]; RESTORED ASM; evidence /tmp/sol-low-asm/TMCJPEGDEC_parse_dht-3
libs/RVLMiddleware/TMC_JPEG/src/jpegdec/jdec_main :: TMCJPEGDEC_parse_dqt :: attempt 1: typed quantization coefficients
no string entries; src 0x148 base 0x148 insns 82/82; diffs 8: [8, 17, 24, 30, 43, 45, 52, 62]; RESTORED ASM; evidence /tmp/sol-low-asm/TMCJPEGDEC_parse_dqt-1
libs/RVLMiddleware/TMC_JPEG/src/jpegdec/jdec_main :: TMCJPEGDEC_parse_dqt :: attempt 2: array copy using memcpy
no string entries; src 0x130 base 0x148 insns 76/82; RESTORED ASM; evidence /tmp/sol-low-asm/TMCJPEGDEC_parse_dqt-2
libs/RVLMiddleware/TMC_JPEG/src/jpegdec/jdec_main :: TMCJPEGDEC_parse_dqt :: attempt 3: advance zigzag pointer at read
no string entries; src 0x148 base 0x148 insns 82/82; diffs 35: [8, 17, 24, 25, 26, 30, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56]; RESTORED ASM; evidence /tmp/sol-low-asm/TMCJPEGDEC_parse_dqt-3
libs/RVLMiddleware/TMC_JPEG/src/jpegdec/jdec_main :: TMCJPEGDEC_parse_sof :: attempt 1: frame header fields and sample tables
no string entries; src 0x388 base 0x37c insns 226/223; RESTORED ASM; evidence /tmp/sol-low-asm/TMCJPEGDEC_parse_sof-1
libs/RVLMiddleware/TMC_JPEG/src/jpegdec/jdec_main :: TMCJPEGDEC_parse_sof :: attempt 2: split zero sample-factor checks
no string entries; src 0x390 base 0x37c insns 228/223; RESTORED ASM; evidence /tmp/sol-low-asm/TMCJPEGDEC_parse_sof-2
libs/RVLMiddleware/TMC_JPEG/src/jpegdec/jdec_main :: TMCJPEGDEC_parse_sof :: attempt 3: sampling maximum via conditional expression
no string entries; src 0x388 base 0x37c insns 226/223; RESTORED ASM; evidence /tmp/sol-low-asm/TMCJPEGDEC_parse_sof-3
libs/RVLMiddleware/TMC_JPEG/src/jpegdec/jdec_main :: TMCJPEGDEC_parse_sos :: attempt 1: named component and entropy table fields
no string entries; src 0x1d0 base 0x1c0 insns 116/112; RESTORED ASM; evidence /tmp/sol-low-asm/TMCJPEGDEC_parse_sos-1
libs/RVLMiddleware/TMC_JPEG/src/jpegdec/jdec_main :: TMCJPEGDEC_parse_sos :: attempt 2: component index instead of map pointer
no string entries; src 0x1c4 base 0x1c0 insns 113/112; RESTORED ASM; evidence /tmp/sol-low-asm/TMCJPEGDEC_parse_sos-2
libs/RVLMiddleware/TMC_JPEG/src/jpegdec/jdec_main :: TMCJPEGDEC_parse_sos :: attempt 3: clamp move result by sign branch
no string entries; src 0x1d0 base 0x1c0 insns 116/112; RESTORED ASM; evidence /tmp/sol-low-asm/TMCJPEGDEC_parse_sos-3
libs/RVLMiddleware/TMC_JPEG/src/jpegdec/jdec_main :: TMCJPEGDEC_err_restart :: attempt 1: restart scan with typed state fields
no string entries; src 0x1c0 base 0x1cc insns 112/115; RESTORED ASM; evidence /tmp/sol-low-asm/TMCJPEGDEC_err_restart-1
libs/RVLMiddleware/TMC_JPEG/src/jpegdec/jdec_main :: TMCJPEGDEC_err_restart :: attempt 2: combine restart distance arithmetic
no string entries; src 0x1bc base 0x1cc insns 111/115; RESTORED ASM; evidence /tmp/sol-low-asm/TMCJPEGDEC_err_restart-2
libs/RVLMiddleware/TMC_JPEG/src/jpegdec/jdec_main :: TMCJPEGDEC_err_restart :: attempt 3: remainder using modulus
no string entries; src 0x1c0 base 0x1cc insns 112/115; RESTORED ASM; evidence /tmp/sol-low-asm/TMCJPEGDEC_err_restart-3
libs/RVLMiddleware/TMC_JPEG/src/jpegdec/jdec_main :: TMCJPEGDEC_scan_varinit :: attempt 4: declare sampling index before factors
no string entries; src 0x204 base 0x204 insns 129/129; diffs 9: [8, 9, 10, 11, 12, 13, 15, 20, 21]; RESTORED ASM; evidence /tmp/sol-low-asm/TMCJPEGDEC_scan_varinit-4
libs/RVLMiddleware/TMC_JPEG/src/jpegdec/jdec_main :: TMCJPEGDEC_scan_varinit :: attempt 5: compute horizontal scale before vertical load
no string entries; src 0x204 base 0x204 insns 129/129; diffs 9: [8, 9, 10, 11, 12, 13, 15, 20, 21]; RESTORED ASM; evidence /tmp/sol-low-asm/TMCJPEGDEC_scan_varinit-5
libs/RVLMiddleware/TMC_JPEG/src/jpegdec/jdec_main :: TMCJPEGDEC_scan_varinit :: attempt 6: use promoted factors directly in division
no string entries; src 0x204 base 0x204 insns 129/129; diffs 13: [7, 8, 9, 10, 12, 13, 14, 15, 17, 18, 19, 21, 22]; RESTORED ASM; evidence /tmp/sol-low-asm/TMCJPEGDEC_scan_varinit-6
libs/RVLMiddleware/TMC_JPEG/src/jpegdec/jdec_main :: TMCJPEGDEC_parse_dqt :: attempt 4: nested scale view for quantization flags
no string entries; src 0x148 base 0x148 insns 82/82; diffs 6: [8, 17, 24, 30, 52, 62]; RESTORED ASM; evidence /tmp/sol-low-asm/TMCJPEGDEC_parse_dqt-4
libs/RVLMiddleware/TMC_JPEG/src/jpegdec/jdec_main :: TMCJPEGDEC_parse_dqt :: attempt 5: local coefficient copy declared before scale view
no string entries; src 0x148 base 0x148 insns 82/82; diffs 6: [8, 17, 24, 30, 52, 62]; RESTORED ASM; evidence /tmp/sol-low-asm/TMCJPEGDEC_parse_dqt-5
libs/RVLMiddleware/TMC_JPEG/src/jpegdec/jdec_main :: TMCJPEGDEC_parse_dqt :: attempt 6: use coefficient copy directly for scale multiplication
no string entries; src 0x148 base 0x148 insns 82/82; diffs 0: []; KEPT; regressions vs baseline: 0; GATE PASS; evidence /tmp/sol-low-asm/TMCJPEGDEC_parse_dqt-6
src/keyboard/tiInputForm :: draw__Q39textinput9inputform12LayoutByNW4RFv :: attempt 1: layout draw and named rectangle fields
POOL IDENTICAL up to 20 (mine=20 base=20); src 0x1c8 base 0x1c8 insns 114/114; diffs 38: [38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57]; RESTORED ASM; evidence /tmp/sol-low-asm/draw__Q39textinput9inputform12LayoutByNW4RFv-1
src/keyboard/tiInputForm :: draw__Q39textinput9inputform12LayoutByNW4RFv :: attempt 2: read scale before constructing rectangle
POOL IDENTICAL up to 20 (mine=20 base=20); src 0x1c8 base 0x1c8 insns 114/114; diffs 38: [38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57]; RESTORED ASM; evidence /tmp/sol-low-asm/draw__Q39textinput9inputform12LayoutByNW4RFv-2
src/keyboard/tiInputForm :: draw__Q39textinput9inputform12LayoutByNW4RFv :: attempt 3: rectangle extent temporary expressions
POOL IDENTICAL up to 20 (mine=20 base=20); src 0x1c8 base 0x1c8 insns 114/114; diffs 38: [38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57]; RESTORED ASM; evidence /tmp/sol-low-asm/draw__Q39textinput9inputform12LayoutByNW4RFv-3
src/keyboard/tiInputForm :: create__Q39textinput9inputform4BaseFP12MEMAllocatorPQ39textinput9inputform10EditBuffer :: attempt 1: allocator and row list insertion
POOL IDENTICAL up to 20 (mine=20 base=20); src 0x120 base 0x120 insns 72/72; diffs 26: [28, 30, 33, 34, 35, 36, 37, 38, 39, 40, 42, 43, 44, 46, 49, 51, 53, 54, 55, 56]; RESTORED ASM; evidence /tmp/sol-low-asm/create__Q39textinput9inputform4BaseFP12MEMAllocatorPQ39textinput9inputform10EditBuffer-1
src/keyboard/tiInputForm :: create__Q39textinput9inputform4BaseFP12MEMAllocatorPQ39textinput9inputform10EditBuffer :: attempt 2: selected row fields loaded before next row
POOL IDENTICAL up to 20 (mine=20 base=20); src 0x120 base 0x120 insns 72/72; diffs 23: [28, 30, 33, 34, 35, 38, 39, 40, 43, 44, 46, 49, 51, 53, 54, 55, 56, 57, 58, 59]; RESTORED ASM; evidence /tmp/sol-low-asm/create__Q39textinput9inputform4BaseFP12MEMAllocatorPQ39textinput9inputform10EditBuffer-2
src/keyboard/tiInputForm :: create__Q39textinput9inputform4BaseFP12MEMAllocatorPQ39textinput9inputform10EditBuffer :: attempt 3: explicit typed allocation byte count
POOL IDENTICAL up to 20 (mine=20 base=20); src 0x120 base 0x120 insns 72/72; diffs 26: [28, 30, 33, 34, 35, 36, 37, 38, 39, 40, 42, 43, 44, 46, 49, 51, 53, 54, 55, 56]; RESTORED ASM; evidence /tmp/sol-low-asm/create__Q39textinput9inputform4BaseFP12MEMAllocatorPQ39textinput9inputform10EditBuffer-3
src/keyboard/tiInputForm :: onPressLeft__Q39textinput9inputform4BaseFv :: attempt 1: typed cursor movement and input relation
POOL IDENTICAL up to 20 (mine=20 base=20); src 0x264 base 0x268 insns 153/154; RESTORED ASM; evidence /tmp/sol-low-asm/onPressLeft__Q39textinput9inputform4BaseFv-1
src/keyboard/tiInputForm :: onPressLeft__Q39textinput9inputform4BaseFv :: attempt 2: switch for kana confirmation
POOL IDENTICAL up to 20 (mine=20 base=20); src 0x268 base 0x268 insns 154/154; diffs 2: [89, 90]; RESTORED ASM; evidence /tmp/sol-low-asm/onPressLeft__Q39textinput9inputform4BaseFv-2
src/keyboard/tiInputForm :: onPressLeft__Q39textinput9inputform4BaseFv :: attempt 3: inline quote and prediction relation reset
POOL IDENTICAL up to 20 (mine=20 base=20); src 0x264 base 0x268 insns 153/154; RESTORED ASM; evidence /tmp/sol-low-asm/onPressLeft__Q39textinput9inputform4BaseFv-3
src/keyboard/tiInputForm :: onPressRight__Q39textinput9inputform4BaseFv :: attempt 1: typed cursor movement and input relation
POOL IDENTICAL up to 20 (mine=20 base=20); src 0x2d8 base 0x2e4 insns 182/185; RESTORED ASM; evidence /tmp/sol-low-asm/onPressRight__Q39textinput9inputform4BaseFv-1
src/keyboard/tiInputForm :: onPressRight__Q39textinput9inputform4BaseFv :: attempt 2: switch for kana confirmation
POOL IDENTICAL up to 20 (mine=20 base=20); src 0x2dc base 0x2e4 insns 183/185; RESTORED ASM; evidence /tmp/sol-low-asm/onPressRight__Q39textinput9inputform4BaseFv-2
src/keyboard/tiInputForm :: onPressRight__Q39textinput9inputform4BaseFv :: attempt 3: inline quote and prediction relation reset
POOL IDENTICAL up to 20 (mine=20 base=20); src 0x2d8 base 0x2e4 insns 182/185; RESTORED ASM; evidence /tmp/sol-low-asm/onPressRight__Q39textinput9inputform4BaseFv-3
src/keyboard/tiInputForm :: calc__Q39textinput9inputform4BaseFv :: attempt 1: scroll animation and named color components
POOL IDENTICAL up to 20 (mine=20 base=20); src 0x294 base 0x294 insns 165/165; diffs 13: [53, 126, 127, 128, 129, 130, 131, 132, 145, 151, 152, 153, 154]; RESTORED ASM; evidence /tmp/sol-low-asm/calc__Q39textinput9inputform4BaseFv-1
src/keyboard/tiInputForm :: calc__Q39textinput9inputform4BaseFv :: attempt 2: cache scroll value across fields
POOL IDENTICAL up to 20 (mine=20 base=20); src 0x290 base 0x294 insns 164/165; RESTORED ASM; evidence /tmp/sol-low-asm/calc__Q39textinput9inputform4BaseFv-2
src/keyboard/tiInputForm :: calc__Q39textinput9inputform4BaseFv :: attempt 3: explicit byte casts for color conversion
POOL IDENTICAL up to 20 (mine=20 base=20); src 0x294 base 0x294 insns 165/165; diffs 13: [53, 126, 127, 128, 129, 130, 131, 132, 145, 151, 152, 153, 154]; RESTORED ASM; evidence /tmp/sol-low-asm/calc__Q39textinput9inputform4BaseFv-3
src/keyboard/tiInputForm :: init__Q49textinput9inputform4Base14RowInfoManagerFv :: attempt 1: initialize bidirectional row and free lists
POOL IDENTICAL up to 20 (mine=20 base=20); src 0xb8 base 0x9c insns 46/39; RESTORED ASM; evidence /tmp/sol-low-asm/init__Q49textinput9inputform4Base14RowInfoManagerFv-1
src/keyboard/tiInputForm :: init__Q49textinput9inputform4Base14RowInfoManagerFv :: attempt 2: wide loop index with bounded access
POOL IDENTICAL up to 20 (mine=20 base=20); src 0xb8 base 0x9c insns 46/39; RESTORED ASM; evidence /tmp/sol-low-asm/init__Q49textinput9inputform4Base14RowInfoManagerFv-2
src/keyboard/tiInputForm :: init__Q49textinput9inputform4Base14RowInfoManagerFv :: attempt 3: store next before previous row link
POOL IDENTICAL up to 20 (mine=20 base=20); src 0xbc base 0x9c insns 47/39; RESTORED ASM; evidence /tmp/sol-low-asm/init__Q49textinput9inputform4Base14RowInfoManagerFv-3
src/keyboard/tiInputForm :: draw__Q39textinput9inputform12LayoutByNW4RFv :: attempt 4: direct scale temporary and rectangle before origin
POOL IDENTICAL up to 20 (mine=20 base=20); src 0x1c8 base 0x1c8 insns 114/114; diffs 12: [50, 56, 59, 60, 63, 64, 65, 66, 67, 69, 73, 75]; RESTORED ASM; evidence /tmp/sol-low-asm/draw__Q39textinput9inputform12LayoutByNW4RFv-4
src/keyboard/tiInputForm :: onPressLeft__Q39textinput9inputform4BaseFv :: attempt 4: switch false case preserves separate return branch
POOL IDENTICAL up to 20 (mine=20 base=20); src 0x26c base 0x268 insns 155/154; RESTORED ASM; evidence /tmp/sol-low-asm/onPressLeft__Q39textinput9inputform4BaseFv-4
src/keyboard/tiInputForm :: calc__Q39textinput9inputform4BaseFv :: attempt 4: color phase and blend operands in target order
POOL IDENTICAL up to 20 (mine=20 base=20); src 0x294 base 0x294 insns 165/165; diffs 13: [53, 126, 127, 128, 129, 130, 131, 132, 145, 151, 152, 153, 154]; RESTORED ASM; evidence /tmp/sol-low-asm/calc__Q39textinput9inputform4BaseFv-4
src/keyboard/tiInputForm :: calc__Q39textinput9inputform4BaseFv :: attempt 5: compute interpolated blue before phase then assign
POOL IDENTICAL up to 20 (mine=20 base=20); src 0x298 base 0x294 insns 166/165; RESTORED ASM; evidence /tmp/sol-low-asm/calc__Q39textinput9inputform4BaseFv-5
src/keyboard/tiInputForm :: init__Q49textinput9inputform4Base14RowInfoManagerFv :: attempt 4: reuse completed row index and end pointers
POOL IDENTICAL up to 20 (mine=20 base=20); src 0x98 base 0x9c insns 38/39; RESTORED ASM; evidence /tmp/sol-low-asm/init__Q49textinput9inputform4Base14RowInfoManagerFv-4
src/keyboard/tiInputForm :: init__Q49textinput9inputform4Base14RowInfoManagerFv :: attempt 5: decrement and restore loop index for end links
POOL IDENTICAL up to 20 (mine=20 base=20); src 0x98 base 0x9c insns 38/39; RESTORED ASM; evidence /tmp/sol-low-asm/init__Q49textinput9inputform4Base14RowInfoManagerFv-5
src/keyboard/tiInputForm :: init__Q49textinput9inputform4Base14RowInfoManagerFv :: attempt 6: cache row storage across both end link writes
POOL IDENTICAL up to 20 (mine=20 base=20); src 0x94 base 0x9c insns 37/39; RESTORED ASM; evidence /tmp/sol-low-asm/init__Q49textinput9inputform4Base14RowInfoManagerFv-6
## Remaining assembly audit
Each remaining function has at least three compiled, distinct source attempts. All remaining asm bodies retain their original instruction-exact implementation. No genuinely hand-written SDK assembly was changed.
libs/RevoEX/src/cdb/CDBDatabase.c: asm 33 -> 15
- CDBDatabaseClose: 3 compiled attempts; src 0xac base 0xb0 insns 43/44
- CDBDatabaseCreateRecordAtOnce: 3 compiled attempts; diffs 8: [5, 7, 14, 15, 23, 24, 25, 26] | diffs 12: [5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 25, 26]
- CDBDatabaseCreateRecordAtOnceEx: 3 compiled attempts; diffs 12: [23, 24, 26, 27, 28, 29, 37, 38, 39, 40, 42, 45] | diffs 21: [6, 10, 11, 13, 17, 19, 20, 21, 22, 23, 24, 26, 27, 28, 29, 37, 38, 39, 40, 42]
- CDBDatabasePrivateCreateRecordAtOnceEx_: 3 compiled attempts; diffs 19: [39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 59, 60, 61, 62, 64, 66] | diffs 18: [38, 40, 41, 42, 43, 44, 45, 46, 48, 49, 50, 51, 59, 60, 61, 62, 64, 66] | diffs 12: [45, 46, 48, 49, 50, 51, 59, 60, 61, 62, 64, 66]
- CDBDatabaseCreateRecordImAtOnce_: 3 compiled attempts; src 0x120 base 0x150 insns 72/84 | diffs 2: [75, 76]
- CDBDatabaseFindByKey: 7 compiled attempts; instruction exact but string/data regression | src 0xe0 base 0xe4 insns 56/57
- CDBDatabaseSearchCallCallback: 3 compiled attempts; src 0xf8 base 0xf4 insns 62/61 | src 0xf0 base 0xf4 insns 60/61
- CDBDatabaseSearchRecordLayer: 3 compiled attempts; src 0x710 base 0x6fc insns 452/447 | src 0x714 base 0x6fc insns 453/447
- CDBDatabaseSearchMinuteLayer: 3 compiled attempts; src 0x3a4 base 0x3a0 insns 233/232 | src 0x3a8 base 0x3a0 insns 234/232
- CDBDatabaseSearchHourLayer: 3 compiled attempts; src 0x390 base 0x38c insns 228/227 | src 0x394 base 0x38c insns 229/227
- CDBDatabaseSearchDayLayer: 3 compiled attempts; src 0x424 base 0x3f0 insns 265/252 | src 0x428 base 0x3f0 insns 266/252
- CDBDatabaseSearchMonthLayer: 3 compiled attempts; src 0x408 base 0x3c0 insns 258/240 | src 0x404 base 0x3c0 insns 257/240
- CDBDatabaseSearchYearLayer: 3 compiled attempts; src 0x3d0 base 0x378 insns 244/222 | src 0x3cc base 0x378 insns 243/222
- CDBDatabaseSearch_: 3 compiled attempts; src 0xcc base 0xd4 insns 51/53 | src 0xd0 base 0xd4 insns 52/53
- CDBDatabaseCleanUpEmptyDirectories: 3 compiled attempts; src 0x21c base 0x214 insns 135/133
src/sound/iplSound.cpp: asm 14 -> 3
- __dt__Q33ipl3snd6UnkClsFv: 3 compiled attempts; src 0x78 base 0x1c insns 30/7 | src 0x7c base 0x1c insns 31/7
- stopSE__Q33ipl3snd6SystemFPQ34nw4r3snd11SoundHandlei: 3 compiled attempts; src 0xa0 base 0xa8 insns 40/42 | src 0xac base 0xa8 insns 43/42 | diffs 9: [12, 16, 19, 20, 22, 30, 31, 32, 34]
- resetAllSound__Q33ipl3snd6SystemFv: 3 compiled attempts; src 0x10c base 0x110 insns 67/68 | diffs 7: [5, 9, 13, 21, 22, 23, 25] | src 0x114 base 0x110 insns 69/68
src/system/iplSaveDataManager.cpp: asm 8 -> 8
- hasChannel: 3 compiled attempts; diffs 58: [0, 2, 3, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21]
- getNumValidChannel: 6 compiled attempts; diffs 4: [4, 7, 8, 11] | diffs 10: [0, 1, 4, 7, 8, 11, 14, 17, 19, 21] | src 0x60 base 0x5c insns 24/23 | src 0x58 base 0x5c insns 22/23
- makePriorTitleIDList: 3 compiled attempts; src 0x1ec base 0x214 insns 123/133
- makeTmpList: 3 compiled attempts; src 0x170 base 0x17c insns 92/95 | src 0x168 base 0x17c insns 90/95
- doUpdateChanInfos: 3 compiled attempts; src 0x104 base 0x10c insns 65/67 | diffs 54: [5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24]
- getAvailableInList: 3 compiled attempts; diffs 10: [0, 2, 11, 12, 13, 14, 15, 16, 21, 23] | src 0x68 base 0x70 insns 26/28
- isEqualChannel: 3 compiled attempts; src 0x8c base 0x9c insns 35/39 | src 0x98 base 0x9c insns 38/39
- iplSavedata_813596B8: 3 compiled attempts; src 0xd4 base 0xe8 insns 53/58 | src 0xd8 base 0xe8 insns 54/58 | diffs 18: [24, 34, 37, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 50, 51, 52, 53, 54]
libs/RVLMiddleware/TMC_JPEG/src/jpegdec/jdec_main.c: asm 9 -> 8
- TMCJPEGDEC_imagestart: 3 compiled attempts; src 0x188 base 0x190 insns 98/100
- TMCJPEGDEC_scan_varinit: 6 compiled attempts; diffs 9: [8, 9, 10, 11, 12, 13, 15, 20, 21] | diffs 18: [8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25] | src 0x1f8 base 0x204 insns 126/129 | diffs 13: [7, 8, 9, 10, 12, 13, 14, 15, 17, 18, 19, 21, 22]
- TMCJPEGDEC_restart_interval: 3 compiled attempts; src 0x16c base 0x174 insns 91/93
- TMCJPEGDEC_parse_para: 3 compiled attempts; src 0x2c4 base 0x2dc insns 177/183 | src 0x2bc base 0x2dc insns 175/183
- TMCJPEGDEC_parse_dht: 3 compiled attempts; diffs 16: [6, 10, 17, 21, 30, 31, 32, 34, 38, 39, 41, 51, 52, 91, 99, 100] | diffs 35: [6, 7, 10, 17, 21, 31, 34, 38, 39, 41, 51, 52, 56, 59, 61, 63, 65, 67, 69, 70]
- TMCJPEGDEC_parse_sof: 3 compiled attempts; src 0x388 base 0x37c insns 226/223 | src 0x390 base 0x37c insns 228/223
- TMCJPEGDEC_parse_sos: 3 compiled attempts; src 0x1c4 base 0x1c0 insns 113/112 | src 0x1d0 base 0x1c0 insns 116/112
- TMCJPEGDEC_err_restart: 3 compiled attempts; src 0x1c0 base 0x1cc insns 112/115 | src 0x1bc base 0x1cc insns 111/115
src/keyboard/tiInputForm.cpp: asm 6 -> 6
- draw__Q39textinput9inputform12LayoutByNW4RFv: 4 compiled attempts; diffs 38: [38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57] | diffs 12: [50, 56, 59, 60, 63, 64, 65, 66, 67, 69, 73, 75]
- create__Q39textinput9inputform4BaseFP12MEMAllocatorPQ39textinput9inputform10EditBuffer: 3 compiled attempts; diffs 26: [28, 30, 33, 34, 35, 36, 37, 38, 39, 40, 42, 43, 44, 46, 49, 51, 53, 54, 55, 56] | diffs 23: [28, 30, 33, 34, 35, 38, 39, 40, 43, 44, 46, 49, 51, 53, 54, 55, 56, 57, 58, 59]
- onPressLeft__Q39textinput9inputform4BaseFv: 4 compiled attempts; src 0x26c base 0x268 insns 155/154 | src 0x264 base 0x268 insns 153/154 | diffs 2: [89, 90]
- onPressRight__Q39textinput9inputform4BaseFv: 3 compiled attempts; src 0x2dc base 0x2e4 insns 183/185 | src 0x2d8 base 0x2e4 insns 182/185
- calc__Q39textinput9inputform4BaseFv: 5 compiled attempts; diffs 13: [53, 126, 127, 128, 129, 130, 131, 132, 145, 151, 152, 153, 154] | src 0x290 base 0x294 insns 164/165 | src 0x298 base 0x294 insns 166/165
- init__Q49textinput9inputform4Base14RowInfoManagerFv: 6 compiled attempts; src 0xb8 base 0x9c insns 46/39 | src 0x98 base 0x9c insns 38/39 | src 0xbc base 0x9c insns 47/39 | src 0x94 base 0x9c insns 37/39
## Baseline below-100 functions
These pre-existing functions are outside the requested asm conversion scope and remain unchanged. None of the retained conversions reduces any exact count or matched bytes.
[src/sound/iplSound] below 100: __sinit_\iplSound_cpp None
[src/keyboard/tiInputForm] below 100: onCommand__Q39textinput9inputform4BaseFQ39textinput15CommandReceiver13INPUT_COMMANDPv 99.98295
[src/keyboard/tiInputForm] below 100: onCursor__Q39textinput9inputform4BaseFPQ49textinput10textdrawer4Base9CursorPos 99.915436
[src/keyboard/tiInputForm] below 100: calcCursorPos__Q39textinput9inputform4BaseFff 91.622696
[src/keyboard/tiInputForm] below 100: onPressUp__Q39textinput9inputform4BaseFv 99.55285
[src/keyboard/tiInputForm] below 100: onPressDown__Q39textinput9inputform4BaseFv 99.55285
[src/keyboard/tiInputForm] below 100: onPressDownHWKB__Q39textinput9inputform4BaseFv 98.35185
[src/keyboard/tiInputForm] below 100: onPressLeftHWKB__Q39textinput9inputform4BaseFv 99.97727
[src/keyboard/tiInputForm] below 100: onPressRightHWKB__Q39textinput9inputform4BaseFv 99.97818
[src/keyboard/tiInputForm] below 100: create__Q39textinput9inputform12LayoutByNW4RFP12MEMAllocatorPQ39textinput9inputform10EditBuffer 95.02809
[src/keyboard/tiInputForm] below 100: setLanguage__Q39textinput9inputform12LayoutByNW4RFQ29textinput8Language 96.44726
[src/keyboard/tiInputForm] below 100: isOverRowLimit__Q39textinput9inputform4BaseFUlPCw 97.184875
[src/keyboard/tiInputForm] below 100: isEnableCursorCache__Q39textinput10textdrawer4BaseCFvgetStartPos__Q39textinput10textdrawer4BaseCFv None
## Conversion commits
ea5a5663 convert cdbdatabaseinit to c
b5991780 convert cdbdatabaseopen to c
54eba73f convert cdbdatabaseprivatecreaterecordatonce to c
34193a8c convert cdbdatabaseprivatecreaterecordatonceex to c
53661dca convert cdbdatabasesearchconditionsismatch to c
53bf274d convert cdbdatabasesearch to c
d78969bc convert cdbdatabaseinstanceinit to c
74924f13 convert cdbdatabaseinstanceisused to c
d4b2ad59 convert cdbissdavailable to c
f3fae5b1 convert cdbmountsd to c
4c972a50 convert cdbunmountsdforce to c
29d80144 convert cdbdatabasecleanupemptydirectoriesrecord to c
6704be7e convert cdbdatabasecleanupemptydirectoriestype to c
008f9768 convert cdbdatabasecleanupemptydirectoriescode to c
50ad2a37 convert cdbdatabasecleanupemptydirectoriesminute to c
155cd177 convert cdbdatabasecleanupemptydirectorieshour to c
cf2cfb87 convert cdbdatabasecleanupemptydirectoriesday to c
3c0a062f convert cdbdatabasecleanupemptydirectoriesmonth to c
e3d2c924 convert to c
3d4b96f0 convert to c
4393f530 convert to c
05e30d7b convert stopbgm to c
a8041ecd convert muteonbgm to c
b350b724 convert muteoffbgm to c
059cc314 convert pauseonse to c
5bd82bee convert pauseoffse to c
37d9077f convert pauseonbgm to c
97a00a8f convert pauseoffbgm to c
ac02e745 convert ct to c
c1480dd8 convert tmcjpegdec_parse_dqt to c
## Review cleanup
Removed unused array view types and restored extern declarations used only by remaining CDB asm. Removed an unused JPEG table pointer. Rebuilt both objects; JPEG quantization remains 82/82 instructions with zero differences. Final full gate covers all five units.
## Scope uncertainty
The generic worker definition asks for a higher instruction-exact count. That is inapplicable to asm conversions already counted as exact; the task-specific acceptance rule is no drop. No new count increase is claimed. Untested compiler tie-break resolutions and pool ordering remain open in the restored asm functions.
Direct-call readability check: replaced the seven typed function-pointer calls with direct calls. All seven remain instruction exact; kept pending final full gate. Evidence: /tmp/sol-low-asm/*.direct.ctx
## Final validation
Fresh full build and full gate across all five units; all 30 retained conversions independently rechecked with ctxdiff after that build:
libs/RevoEX/src/cdb/CDBDatabase :: CDBDatabaseInit :: src 0x44 base 0x44 insns 17/17; diffs 0: []
libs/RevoEX/src/cdb/CDBDatabase :: CDBDatabaseOpen :: src 0x50 base 0x50 insns 20/20; diffs 0: []
libs/RevoEX/src/cdb/CDBDatabase :: CDBDatabasePrivateCreateRecordAtOnce :: src 0xec base 0xec insns 59/59; diffs 0: []
libs/RevoEX/src/cdb/CDBDatabase :: CDBDatabasePrivateCreateRecordAtOnceEx :: src 0xb0 base 0xb0 insns 44/44; diffs 0: []
libs/RevoEX/src/cdb/CDBDatabase :: CDBDatabaseSearchConditionsIsMatch :: src 0x100 base 0x100 insns 64/64; diffs 0: []
libs/RevoEX/src/cdb/CDBDatabase :: CDBDatabaseSearch :: src 0xa0 base 0xa0 insns 40/40; diffs 0: []
libs/RevoEX/src/cdb/CDBDatabase :: CDBDatabaseInstanceInit :: src 0x18 base 0x18 insns 6/6; diffs 0: []
libs/RevoEX/src/cdb/CDBDatabase :: CDBDatabaseInstanceIsUsed :: src 0x8 base 0x8 insns 2/2; diffs 0: []
libs/RevoEX/src/cdb/CDBDatabase :: CDBIsSDAvailable :: src 0x48 base 0x48 insns 18/18; diffs 0: []
libs/RevoEX/src/cdb/CDBDatabase :: CDBMountSD :: src 0x4 base 0x4 insns 1/1; diffs 0: []
libs/RevoEX/src/cdb/CDBDatabase :: CDBUnmountSDForce :: src 0x34 base 0x34 insns 13/13; diffs 0: []
libs/RevoEX/src/cdb/CDBDatabase :: CDBDatabaseCleanUpEmptyDirectoriesRecord :: src 0x10c base 0x10c insns 67/67; diffs 0: []
libs/RevoEX/src/cdb/CDBDatabase :: CDBDatabaseCleanUpEmptyDirectoriesType :: src 0x15c base 0x15c insns 87/87; diffs 0: []
libs/RevoEX/src/cdb/CDBDatabase :: CDBDatabaseCleanUpEmptyDirectoriesCode :: src 0x14c base 0x14c insns 83/83; diffs 0: []
libs/RevoEX/src/cdb/CDBDatabase :: CDBDatabaseCleanUpEmptyDirectoriesMinute :: src 0x140 base 0x140 insns 80/80; diffs 0: []
libs/RevoEX/src/cdb/CDBDatabase :: CDBDatabaseCleanUpEmptyDirectoriesHour :: src 0x134 base 0x134 insns 77/77; diffs 0: []
libs/RevoEX/src/cdb/CDBDatabase :: CDBDatabaseCleanUpEmptyDirectoriesDay :: src 0x128 base 0x128 insns 74/74; diffs 0: []
libs/RevoEX/src/cdb/CDBDatabase :: CDBDatabaseCleanUpEmptyDirectoriesMonth :: src 0x124 base 0x124 insns 73/73; diffs 0: []
src/sound/iplSound :: __ct__Q33ipl3snd6SystemFv :: src 0x4c base 0x4c insns 19/19; diffs 0: []
src/sound/iplSound :: __dt__Q33ipl3snd10tagSSeInfoFv :: src 0x58 base 0x58 insns 22/22; diffs 0: []
src/sound/iplSound :: __dt__Q33ipl3snd11tagSBgmInfoFv :: src 0x58 base 0x58 insns 22/22; diffs 0: []
src/sound/iplSound :: stopBGM__Q33ipl3snd6SystemFi :: src 0x34 base 0x34 insns 13/13; diffs 0: []
src/sound/iplSound :: muteOnBGM__Q33ipl3snd6SystemFi :: src 0x34 base 0x34 insns 13/13; diffs 0: []
src/sound/iplSound :: muteOffBGM__Q33ipl3snd6SystemFi :: src 0x34 base 0x34 insns 13/13; diffs 0: []
src/sound/iplSound :: pauseOnSE__Q33ipl3snd6SystemFv :: src 0x74 base 0x74 insns 29/29; diffs 0: []
src/sound/iplSound :: pauseOffSE__Q33ipl3snd6SystemFv :: src 0x74 base 0x74 insns 29/29; diffs 0: []
src/sound/iplSound :: pauseOnBGM__Q33ipl3snd6SystemFv :: src 0xa8 base 0xa8 insns 42/42; diffs 0: []
src/sound/iplSound :: pauseOffBGM__Q33ipl3snd6SystemFv :: src 0x80 base 0x80 insns 32/32; diffs 0: []
src/sound/iplSound :: __ct__Q34nw4r3snd11SoundHandleFv :: src 0xc base 0xc insns 3/3; diffs 0: []
libs/RVLMiddleware/TMC_JPEG/src/jpegdec/jdec_main :: TMCJPEGDEC_parse_dqt :: src 0x148 base 0x148 insns 82/82; diffs 0: []
full build: ok
main.dol sha1: 26116613f624061ba99c8d1a299aaa6efa85670d
[libs/RevoEX/src/cdb/CDBDatabase] pool: IDENTICAL
[libs/RevoEX/src/cdb/CDBDatabase] objdiff: code 12152/12152 data 312/312 functions 33/33 fuzzy 100.0000 linked code 12152
[libs/RevoEX/src/cdb/CDBDatabase] instruction-exact functions: 33/33
[libs/RevoEX/src/cdb/CDBDatabase] section .data size 312 match 100.0
[libs/RevoEX/src/cdb/CDBDatabase] section .text size 12152 match 100.0
[libs/RevoEX/src/cdb/CDBDatabase] baseline: code 12152/12152 data 312 functions 33 fuzzy 100.0000
[src/sound/iplSound] pool: IDENTICAL
[src/sound/iplSound] objdiff: code 5396/5576 data 144/3316 functions 56/57 fuzzy 96.7719 linked code 0
[src/sound/iplSound] instruction-exact functions: 56/57
[src/sound/iplSound] section .bss size 3128 match None
[src/sound/iplSound] section .ctors size 4 match None
[src/sound/iplSound] section .data size 120 match 100.0
[src/sound/iplSound] section .rodata size 24 match 100.0
[src/sound/iplSound] section .sbss size 16 match 50.0
[src/sound/iplSound] section .sdata2 size 24 match 60.000004
[src/sound/iplSound] section .text size 5576 match 96.77188
[src/sound/iplSound] below 100: __sinit_\iplSound_cpp None
[src/sound/iplSound] baseline: code 5396/5576 data 144 functions 56 fuzzy 96.7719
[src/system/iplSaveDataManager] pool: IDENTICAL
[src/system/iplSaveDataManager] objdiff: code 7172/7172 data 968/968 functions 35/35 fuzzy 100.0000 linked code 7172
[src/system/iplSaveDataManager] instruction-exact functions: 35/35
[src/system/iplSaveDataManager] section .data size 184 match 100.0
[src/system/iplSaveDataManager] section .rodata size 768 match 100.0
[src/system/iplSaveDataManager] section .sdata size 16 match 100.0
[src/system/iplSaveDataManager] section .text size 7172 match 100.0
[src/system/iplSaveDataManager] baseline: code 7172/7172 data 968 functions 35 fuzzy 100.0000
[libs/RVLMiddleware/TMC_JPEG/src/jpegdec/jdec_main] pool: IDENTICAL
[libs/RVLMiddleware/TMC_JPEG/src/jpegdec/jdec_main] objdiff: code 5604/5604 data 256/256 functions 13/13 fuzzy 100.0000 linked code 5604
[libs/RVLMiddleware/TMC_JPEG/src/jpegdec/jdec_main] instruction-exact functions: 13/13
[libs/RVLMiddleware/TMC_JPEG/src/jpegdec/jdec_main] section .rodata size 256 match 100.0
[libs/RVLMiddleware/TMC_JPEG/src/jpegdec/jdec_main] section .text size 5604 match 100.0
[libs/RVLMiddleware/TMC_JPEG/src/jpegdec/jdec_main] baseline: code 5604/5604 data 256 functions 13 fuzzy 100.0000
[src/keyboard/tiInputForm] pool: IDENTICAL
[src/keyboard/tiInputForm] objdiff: code 30712/50656 data 908/3772 functions 209/221 fuzzy 99.4500 linked code 0
[src/keyboard/tiInputForm] instruction-exact functions: 207/221
[src/keyboard/tiInputForm] section .bss size 96 match None
[src/keyboard/tiInputForm] section .ctors size 4 match 100.0
[src/keyboard/tiInputForm] section .data size 2736 match 65.53332
[src/keyboard/tiInputForm] section .rodata size 760 match 100.0
[src/keyboard/tiInputForm] section .sbss size 32 match 33.333336
[src/keyboard/tiInputForm] section .sdata size 40 match 100.0
[src/keyboard/tiInputForm] section .sdata2 size 104 match 100.0
[src/keyboard/tiInputForm] section .text size 50656 match 99.45001
[src/keyboard/tiInputForm] below 100: onCommand__Q39textinput9inputform4BaseFQ39textinput15CommandReceiver13INPUT_COMMANDPv 99.98295
[src/keyboard/tiInputForm] below 100: onCursor__Q39textinput9inputform4BaseFPQ49textinput10textdrawer4Base9CursorPos 99.915436
[src/keyboard/tiInputForm] below 100: calcCursorPos__Q39textinput9inputform4BaseFff 91.622696
[src/keyboard/tiInputForm] below 100: onPressUp__Q39textinput9inputform4BaseFv 99.55285
[src/keyboard/tiInputForm] below 100: onPressDown__Q39textinput9inputform4BaseFv 99.55285
[src/keyboard/tiInputForm] below 100: onPressDownHWKB__Q39textinput9inputform4BaseFv 98.35185
[src/keyboard/tiInputForm] below 100: onPressLeftHWKB__Q39textinput9inputform4BaseFv 99.97727
[src/keyboard/tiInputForm] below 100: onPressRightHWKB__Q39textinput9inputform4BaseFv 99.97818
[src/keyboard/tiInputForm] below 100: create__Q39textinput9inputform12LayoutByNW4RFP12MEMAllocatorPQ39textinput9inputform10EditBuffer 95.02809
[src/keyboard/tiInputForm] below 100: setLanguage__Q39textinput9inputform12LayoutByNW4RFQ29textinput8Language 96.44726
[src/keyboard/tiInputForm] below 100: isOverRowLimit__Q39textinput9inputform4BaseFUlPCw 97.184875
[src/keyboard/tiInputForm] below 100: isEnableCursorCache__Q39textinput10textdrawer4BaseCFvgetStartPos__Q39textinput10textdrawer4BaseCFv None
[src/keyboard/tiInputForm] baseline: code 30712/50656 data 908 functions 209 fuzzy 99.4500
regressions vs baseline: 0
global matched_code_percent: 86.44605 -> 86.44605
global fuzzy_match_percent: 98.92996 -> 98.92996
global complete_code_percent: 60.34391 -> 60.34391
global matched_data_percent: 90.91649 -> 90.91649
forbidden patterns added (net, per file): 0
readability warnings (net, per file; must be 0 in the final result): 0
GATE PASS
## Before and after
Unit | Asm bodies | Instruction-exact functions | Objdiff matched code bytes | Objdiff matched data bytes
--- | --- | --- | --- | ---
CDBDatabase | 33 -> 15 | 33 -> 33 | 12152 -> 12152 | 312 -> 312
iplSound | 14 -> 3 | 56 -> 56 | 5396 -> 5396 | 144 -> 144
iplSaveDataManager | 8 -> 8 | 35 -> 35 | 7172 -> 7172 | 968 -> 968
jdec_main | 9 -> 8 | 13 -> 13 | 5604 -> 5604 | 256 -> 256
tiInputForm | 6 -> 6 | 207 -> 207 | 30712 -> 30712 | 908 -> 908
Changed source: libs/RevoEX/src/cdb/CDBDatabase.c; src/sound/iplSound.cpp; libs/RVLMiddleware/TMC_JPEG/src/jpegdec/jdec_main.c. Headers: include/sound/iplSound.h; libs/NW4R/include/nw4r/snd/SoundHandle.h. Attempt log: tools/decomp-assist/asm-conversions.attempts.md. SaveDataManager and tiInputForm experiments were restored entirely.
40 remaining asm functions, each with at least 3 compiled distinct source-level attempts. 30 conversions committed individually after full gates. No regression, forbidden-pattern addition, or readability warning in the final gate.

View File

@@ -0,0 +1,107 @@
# Board continuation, 2026-10-01
Entry AOSS_Init_old: {'fuzzy': 92.73864, 'instructions': 1578, 'target': 1584, 'structural': 1480, 'diffs': 1494, 'code': '6436', 'data': '3896'}
Entry AOSS_81400830: {'fuzzy': 97.0405, 'instructions': 321, 'target': 321, 'structural': 2, 'diffs': 125, 'code': '6436', 'data': '3896'}
Entry AOSS_814013AC: {'fuzzy': 98.77193, 'instructions': 114, 'target': 114, 'structural': 0, 'diffs': 22, 'code': '6436', 'data': '3896'}
Entry AOSS_81401778: {'fuzzy': 91.83883, 'instructions': 271, 'target': 273, 'structural': 39, 'diffs': 254, 'code': '6436', 'data': '3896'}
Entry AOSS_81401E80: {'fuzzy': 98.605446, 'instructions': 147, 'target': 147, 'structural': 2, 'diffs': 36, 'code': '6436', 'data': '3896'}
Entry Zi8ChangeWordCase: {'fuzzy': 99.09091, 'instructions': 44, 'target': 44, 'structural': 0, 'diffs': 8, 'code': '5704', 'data': '72'}
Entry Zi8AlphaGetCandidates: {'fuzzy': 90.60111, 'instructions': 3947, 'target': 3946, 'structural': 1227, 'diffs': 3812, 'code': '5704', 'data': '72'}
- AOSS_Init_old: recover two separately addressed default wait constants; {'fuzzy': 92.73864, 'instructions': 1578, 'target': 1584, 'structural': 1480, 'diffs': 1494, 'code': '6436', 'data': '3896'} -> {'fuzzy': 92.56566, 'instructions': 1577, 'target': 1584, 'structural': 1473, 'diffs': 1443, 'code': '6436', 'data': '3888'}; regressions ['main/src/scene/setting/AOSS matched_data']; reverted.
- AOSS_Init_old: retain loaded input flags across runtime initialization; {'fuzzy': 92.73864, 'instructions': 1578, 'target': 1584, 'structural': 1480, 'diffs': 1494, 'code': '6436', 'data': '3896'} -> {'fuzzy': 92.67298, 'instructions': 1577, 'target': 1584, 'structural': 1473, 'diffs': 1399, 'code': '6436', 'data': '3896'}; regressions []; reverted.
- AOSS_Init_old: load response wait after the attempt limit check; {'fuzzy': 92.73864, 'instructions': 1578, 'target': 1584, 'structural': 1480, 'diffs': 1494, 'code': '6436', 'data': '3896'} -> {'fuzzy': 92.684975, 'instructions': 1578, 'target': 1584, 'structural': 1479, 'diffs': 1494, 'code': '6436', 'data': '3896'}; regressions []; reverted.
- AOSS_Init_old: remove repeated pre-sleep minimum and retain target post-call selection; {'fuzzy': 92.73864, 'instructions': 1578, 'target': 1584, 'structural': 1480, 'diffs': 1494, 'code': '6436', 'data': '3896'} -> {'fuzzy': 92.757576, 'instructions': 1576, 'target': 1584, 'structural': 1154, 'diffs': 1485, 'code': '6436', 'data': '3896'}; regressions []; retained.
- AOSS_Init_old: move first response-wait load after exhausted-attempt exit; {'fuzzy': 92.757576, 'instructions': 1576, 'target': 1584, 'structural': 1154, 'diffs': 1485, 'code': '6436', 'data': '3896'} -> {'fuzzy': 92.97854, 'instructions': 1576, 'target': 1584, 'structural': 1151, 'diffs': 1485, 'code': '6436', 'data': '3896'}; regressions []; retained.
- AOSS_Init_old: use target branch sense for elapsed connection attempts; {'fuzzy': 92.97854, 'instructions': 1576, 'target': 1584, 'structural': 1151, 'diffs': 1485, 'code': '6436', 'data': '3896'} -> {'fuzzy': 92.97854, 'instructions': 1576, 'target': 1584, 'structural': 1151, 'diffs': 1485, 'code': '6436', 'data': '3896'}; regressions []; reverted.
- AOSS_Init_old: normalize remaining waits to halfwords in the initial link loop; {'fuzzy': 92.97854, 'instructions': 1576, 'target': 1584, 'structural': 1151, 'diffs': 1485, 'code': '6436', 'data': '3896'} -> {'fuzzy': 93.14899, 'instructions': 1576, 'target': 1584, 'structural': 1151, 'diffs': 1479, 'code': '6436', 'data': '3896'}; regressions []; retained.
- AOSS_81400830: declsearch, 180 distinct declaration orders; 321/321, 97.0405 -> 97.74143%; strict differences 125 -> 89; retained checksum-first, control-before-length, input-before-output order.
- AOSS_81400830: XOR key-stream byte before consuming encrypted byte; {'fuzzy': 97.74143, 'instructions': 321, 'target': 321, 'structural': 2, 'diffs': 89, 'code': '6436', 'data': '3896'} -> {'fuzzy': 97.74143, 'instructions': 321, 'target': 321, 'structural': 2, 'diffs': 89, 'code': '6436', 'data': '3896'}; regressions []; reverted.
- AOSS_81400830: narrow permutation values to their byte element type; {'fuzzy': 97.74143, 'instructions': 321, 'target': 321, 'structural': 2, 'diffs': 89, 'code': '6436', 'data': '3896'} -> {'fuzzy': 97.74143, 'instructions': 321, 'target': 321, 'structural': 2, 'diffs': 89, 'code': '6436', 'data': '3896'}; regressions []; reverted.
- AOSS_81400830: declare state pointer after permutation indexes in the loop scope; {'fuzzy': 97.74143, 'instructions': 321, 'target': 321, 'structural': 2, 'diffs': 89, 'code': '6436', 'data': '3896'} -> {'fuzzy': 97.47664, 'instructions': 321, 'target': 321, 'structural': 2, 'diffs': 101, 'code': '6436', 'data': '3896'}; regressions []; reverted.
- AOSS_814013AC: use one response cursor for outer and nested options; {'fuzzy': 98.77193, 'instructions': 114, 'target': 114, 'structural': 0, 'diffs': 22, 'code': '6436', 'data': '3896'} -> {'fuzzy': 96.18421, 'instructions': 114, 'target': 114, 'structural': 2, 'diffs': 38, 'code': '6436', 'data': '3896'}; regressions []; reverted.
- AOSS_814013AC: defer flags initialization until response length validation; {'fuzzy': 98.77193, 'instructions': 114, 'target': 114, 'structural': 0, 'diffs': 22, 'code': '6436', 'data': '3896'} -> {'fuzzy': 96.97369, 'instructions': 114, 'target': 114, 'structural': 3, 'diffs': 26, 'code': '6436', 'data': '3896'}; regressions []; reverted.
- AOSS_814013AC: extend formal response length through validation before cursor setup; {'fuzzy': 98.77193, 'instructions': 114, 'target': 114, 'structural': 0, 'diffs': 22, 'code': '6436', 'data': '3896'} -> {'fuzzy': 96.97369, 'instructions': 114, 'target': 114, 'structural': 3, 'diffs': 27, 'code': '6436', 'data': '3896'}; regressions []; reverted.
- AOSS_81401778: walk the hello CRC as one eight-byte loop; {'fuzzy': 91.83883, 'instructions': 271, 'target': 273, 'structural': 39, 'diffs': 254, 'code': '6436', 'data': '3896'} -> {'fuzzy': 86.67033, 'instructions': 270, 'target': 273, 'structural': 49, 'diffs': 266, 'code': '6436', 'data': '3896'}; regressions []; reverted.
- AOSS_81401778: walk hello CRC with advancing cursor and end pointer; {'fuzzy': 91.83883, 'instructions': 271, 'target': 273, 'structural': 39, 'diffs': 254, 'code': '6436', 'data': '3896'} -> {'fuzzy': 81.490845, 'instructions': 292, 'target': 273, 'structural': 59, 'diffs': 285, 'code': '6436', 'data': '3896'}; regressions []; reverted.
- AOSS_81401778: walk hello CRC with postfix do-while indexing; {'fuzzy': 91.83883, 'instructions': 271, 'target': 273, 'structural': 39, 'diffs': 254, 'code': '6436', 'data': '3896'} -> {'fuzzy': 76.567764, 'instructions': 235, 'target': 273, 'structural': 77, 'diffs': 264, 'code': '6436', 'data': '3896'}; regressions []; reverted.
- AOSS_81401778: place destination after the identity local in source declaration order; {'fuzzy': 91.83883, 'instructions': 271, 'target': 273, 'structural': 39, 'diffs': 254, 'code': '6436', 'data': '3896'} -> {'fuzzy': 91.831505, 'instructions': 271, 'target': 273, 'structural': 38, 'diffs': 254, 'code': '6436', 'data': '3896'}; regressions []; reverted.
- AOSS_81401778: keep hello encryption XOR full-width through its store; {'fuzzy': 91.83883, 'instructions': 271, 'target': 273, 'structural': 39, 'diffs': 254, 'code': '6436', 'data': '3896'} -> {'fuzzy': 91.83883, 'instructions': 271, 'target': 273, 'structural': 39, 'diffs': 254, 'code': '6436', 'data': '3896'}; regressions []; reverted.
- AOSS_81401E80: keep packet XOR operand full-width until truncating the store; {'fuzzy': 98.605446, 'instructions': 147, 'target': 147, 'structural': 2, 'diffs': 36, 'code': '6436', 'data': '3896'} -> {'fuzzy': 98.605446, 'instructions': 147, 'target': 147, 'structural': 2, 'diffs': 36, 'code': '6436', 'data': '3896'}; regressions []; reverted.
- AOSS_81401E80: use signed native integer packet XOR temporary; {'fuzzy': 98.605446, 'instructions': 147, 'target': 147, 'structural': 2, 'diffs': 36, 'code': '6436', 'data': '3896'} -> {'fuzzy': 98.605446, 'instructions': 147, 'target': 147, 'structural': 2, 'diffs': 36, 'code': '6436', 'data': '3896'}; regressions []; reverted.
- AOSS_81401E80: express in-place packet mixing as compound XOR; {'fuzzy': 98.605446, 'instructions': 147, 'target': 147, 'structural': 2, 'diffs': 36, 'code': '6436', 'data': '3896'} -> {'fuzzy': 98.23129, 'instructions': 147, 'target': 147, 'structural': 2, 'diffs': 46, 'code': '6436', 'data': '3896'}; regressions []; reverted.
- AOSS_81401E80: load key-mask operand before packet operand and store the mixed result; {'fuzzy': 98.605446, 'instructions': 147, 'target': 147, 'structural': 2, 'diffs': 36, 'code': '6436', 'data': '3896'} -> {'fuzzy': 98.57143, 'instructions': 147, 'target': 147, 'structural': 2, 'diffs': 31, 'code': '6436', 'data': '3896'}; regressions []; reverted.
- AOSS_814013AC: declsearch, 150 declaration-order variants; 114/114, 98.77193%, 22 strict differences unchanged; all orders restored.
- AOSS_81401E80: declsearch, 100 declaration-order variants; 147/147, 98.605446%, 36 strict differences unchanged; all orders restored.
- AOSS_81401E80: load packet and key separately, updating the key-byte accumulator; {'fuzzy': 98.605446, 'instructions': 147, 'target': 147, 'structural': 2, 'diffs': 36, 'code': '6436', 'data': '3896'} -> {'fuzzy': 98.57143, 'instructions': 147, 'target': 147, 'structural': 2, 'diffs': 31, 'code': '6436', 'data': '3896'}; regressions []; reverted.
- AOSS_81401E80: write XOR of two full-width operand locals directly; {'fuzzy': 98.605446, 'instructions': 147, 'target': 147, 'structural': 2, 'diffs': 36, 'code': '6436', 'data': '3896'} -> {'fuzzy': 98.5034, 'instructions': 147, 'target': 147, 'structural': 2, 'diffs': 39, 'code': '6436', 'data': '3896'}; regressions []; reverted.
- Zi8AlphaGetCandidates: use typed workspace field view in its recovered scalar position; {'fuzzy': 90.60111, 'instructions': 3947, 'target': 3946, 'structural': 1227, 'diffs': 3812, 'code': '5704', 'data': '72'} -> {'fuzzy': 89.900406, 'instructions': 3948, 'target': 3946, 'structural': 1227, 'diffs': 3483, 'code': '5704', 'data': '0'}; regressions ['main/libs/RVLMiddleware/eZiText/src/clib/zi8alpha matched_data']; reverted.
- Zi8AlphaGetCandidates: use one generic dictionary workspace for all helper calls; {'fuzzy': 90.60111, 'instructions': 3947, 'target': 3946, 'structural': 1227, 'diffs': 3812, 'code': '5704', 'data': '72'} -> {'fuzzy': 89.35048, 'instructions': 3959, 'target': 3946, 'structural': 560, 'diffs': 3784, 'code': '5704', 'data': '72'}; regressions []; reverted.
- Zi8AlphaGetCandidates: make engine workspace parameter typed and remove repeated casts; {'fuzzy': 90.60111, 'instructions': 3947, 'target': 3946, 'structural': 1227, 'diffs': 3812, 'code': '5704', 'data': '72'} -> {'fuzzy': 89.94602, 'instructions': 3947, 'target': 3946, 'structural': 1227, 'diffs': 3829, 'code': '5704', 'data': '72'}; regressions []; reverted.
- AOSS_814013AC: reuse the nested-option variable while selecting the outer response; {'fuzzy': 98.77193, 'instructions': 114, 'target': 114, 'structural': 0, 'diffs': 22, 'code': '6436', 'data': '3896'} -> {'fuzzy': 95.833336, 'instructions': 114, 'target': 114, 'structural': 2, 'diffs': 44, 'code': '6436', 'data': '3896'}; regressions []; reverted.
- AOSS_814013AC: advance the formal response length directly; {'fuzzy': 98.77193, 'instructions': 114, 'target': 114, 'structural': 0, 'diffs': 22, 'code': '6436', 'data': '3896'} -> {'fuzzy': 98.20175, 'instructions': 114, 'target': 114, 'structural': 0, 'diffs': 32, 'code': '6436', 'data': '3896'}; regressions []; reverted.
- AOSS_814013AC: advance the formal response pointer across both record loops; {'fuzzy': 98.77193, 'instructions': 114, 'target': 114, 'structural': 0, 'diffs': 22, 'code': '6436', 'data': '3896'} -> {'fuzzy': 95.08772, 'instructions': 114, 'target': 114, 'structural': 5, 'diffs': 28, 'code': '6436', 'data': '3896'}; regressions []; reverted.
- Zi8ChangeWordCase: use a native integer selector for lower and upper case; {'fuzzy': 99.09091, 'instructions': 44, 'target': 44, 'structural': 0, 'diffs': 8, 'code': '5704', 'data': '72'} -> {'fuzzy': 99.09091, 'instructions': 44, 'target': 44, 'structural': 0, 'diffs': 8, 'code': '5704', 'data': '72'}; regressions []; reverted.
- Zi8ChangeWordCase: advance the word cursor in the loop continuation; {'fuzzy': 99.09091, 'instructions': 44, 'target': 44, 'structural': 0, 'diffs': 8, 'code': '5704', 'data': '72'} -> {'fuzzy': 94.545456, 'instructions': 44, 'target': 44, 'structural': 2, 'diffs': 11, 'code': '5704', 'data': '72'}; regressions []; reverted.
- Zi8ChangeWordCase: make case-conversion workspace formal typed; {'fuzzy': 99.09091, 'instructions': 44, 'target': 44, 'structural': 0, 'diffs': 8, 'code': '5704', 'data': '72'} -> {'fuzzy': 98.52273, 'instructions': 44, 'target': 44, 'structural': 0, 'diffs': 11, 'code': '5704', 'data': '72'}; regressions []; reverted.
- Zi8AlphaGetCandidates: name the context-table return before testing its high flag; {'fuzzy': 90.60111, 'instructions': 3947, 'target': 3946, 'structural': 1227, 'diffs': 3812, 'code': '5704', 'data': '72'} -> {'fuzzy': 88.31399, 'instructions': 3951, 'target': 3946, 'structural': 1242, 'diffs': 3769, 'code': '5704', 'data': '0'}; regressions ['main/libs/RVLMiddleware/eZiText/src/clib/zi8alpha matched_data']; reverted.
- Zi8AlphaGetCandidates: retain native width for the named context table count; {'fuzzy': 90.60111, 'instructions': 3947, 'target': 3946, 'structural': 1227, 'diffs': 3812, 'code': '5704', 'data': '72'} -> {'fuzzy': 88.25798, 'instructions': 3953, 'target': 3946, 'structural': 636, 'diffs': 3872, 'code': '5704', 'data': '0'}; regressions ['main/libs/RVLMiddleware/eZiText/src/clib/zi8alpha matched_data']; reverted.
- Zi8AlphaGetCandidates: use signed table flag temporary and explicit halfword mask; {'fuzzy': 90.60111, 'instructions': 3947, 'target': 3946, 'structural': 1227, 'diffs': 3812, 'code': '5704', 'data': '72'} -> {'fuzzy': 88.37557, 'instructions': 3955, 'target': 3946, 'structural': 620, 'diffs': 3808, 'code': '5704', 'data': '0'}; regressions ['main/libs/RVLMiddleware/eZiText/src/clib/zi8alpha matched_data']; reverted.
- Zi8AlphaGetCandidates: remove duplicate upper-bound test from next-dictionary selection; {'fuzzy': 90.60111, 'instructions': 3947, 'target': 3946, 'structural': 1227, 'diffs': 3812, 'code': '5704', 'data': '72'} -> {'fuzzy': 90.60137, 'instructions': 3945, 'target': 3946, 'structural': 1234, 'diffs': 3809, 'code': '5704', 'data': '72'}; regressions []; retained.
- Zi8AlphaGetCandidates: select punctuation dictionary with explicit dictionary-kind cases; {'fuzzy': 90.60137, 'instructions': 3945, 'target': 3946, 'structural': 1234, 'diffs': 3809, 'code': '5704', 'data': '72'} -> {'fuzzy': 90.565636, 'instructions': 3947, 'target': 3946, 'structural': 1226, 'diffs': 3812, 'code': '5704', 'data': '72'}; regressions []; reverted.
- Zi8AlphaGetCandidates: use target inclusive punctuation character bounds; {'fuzzy': 90.60137, 'instructions': 3945, 'target': 3946, 'structural': 1234, 'diffs': 3809, 'code': '5704', 'data': '72'} -> {'fuzzy': 90.60441, 'instructions': 3945, 'target': 3946, 'structural': 1230, 'diffs': 3809, 'code': '5704', 'data': '72'}; regressions []; retained.
- Zi8AlphaGetCandidates: compare exact word limit with the produced length first; {'fuzzy': 90.60441, 'instructions': 3945, 'target': 3946, 'structural': 1230, 'diffs': 3809, 'code': '5704', 'data': '72'} -> {'fuzzy': 90.605675, 'instructions': 3945, 'target': 3946, 'structural': 1229, 'diffs': 3809, 'code': '5704', 'data': '72'}; regressions []; retained.
- Zi8AlphaGetCandidates: compare produced length against option maximum in target operand order; {'fuzzy': 90.605675, 'instructions': 3945, 'target': 3946, 'structural': 1229, 'diffs': 3809, 'code': '5704', 'data': '72'} -> {'fuzzy': 90.56741, 'instructions': 3945, 'target': 3946, 'structural': 1224, 'diffs': 3810, 'code': '5704', 'data': '72'}; regressions []; reverted.
- Zi8AlphaGetCandidates: use target one-character key-layout cutoff; {'fuzzy': 90.605675, 'instructions': 3945, 'target': 3946, 'structural': 1229, 'diffs': 3809, 'code': '5704', 'data': '72'} -> {'fuzzy': 90.6072, 'instructions': 3945, 'target': 3946, 'structural': 1228, 'diffs': 3809, 'code': '5704', 'data': '72'}; regressions []; retained.
Gate normalization discrepancy: AOSS_81400E0C, objdiff 100%; corrected branch-relative disassembly identical=True.
## Final inventory
AOSS_Init_old: fuzzy 92.73864 -> 93.14899; instruction deficit 8 -> 8; at least 3 distinct measured source trials logged.
AOSS_81400830: fuzzy 97.0405 -> 97.74143; instruction deficit 0 -> 0; at least 3 distinct measured source trials logged.
AOSS_814013AC: fuzzy 98.77193 -> 98.77193; instruction deficit 0 -> 0; at least 3 distinct measured source trials logged.
AOSS_81401778: fuzzy 91.83883 -> 91.83883; instruction deficit 2 -> 2; at least 3 distinct measured source trials logged.
AOSS_81401E80: fuzzy 98.605446 -> 98.605446; instruction deficit 0 -> 0; at least 3 distinct measured source trials logged.
Zi8ChangeWordCase: fuzzy 99.09091 -> 99.09091; instruction deficit 0 -> 0; at least 3 distinct measured source trials logged.
Zi8AlphaGetCandidates: fuzzy 90.60111 -> 90.6072; instruction deficit 1 -> 1; at least 3 distinct measured source trials logged.
No instruction-exact count gain. Both units remain incomplete and NonMatching. Engine workspace snapshot and related scalar stack offsets remain unresolved; no artificial stack local was retained. AOSS default constant binding and hello shared global base remain unresolved.
```
full build: ok
main.dol sha1: 26116613f624061ba99c8d1a299aaa6efa85670d
[src/scene/setting/AOSS] pool: IDENTICAL
[src/scene/setting/AOSS] objdiff: code 6436/16192 data 3896/3928 functions 16/21 fuzzy 96.5045 linked code 0
[src/scene/setting/AOSS] instruction-exact functions: 15/21
[src/scene/setting/AOSS] section .bss size 3496 match 100.0
[src/scene/setting/AOSS] section .data size 368 match 100.0
[src/scene/setting/AOSS] section .sbss size 32 match 42.857143
[src/scene/setting/AOSS] section .sdata size 24 match 100.0
[src/scene/setting/AOSS] section .sdata2 size 8 match 100.0
[src/scene/setting/AOSS] section .text size 16192 match 96.50445
[src/scene/setting/AOSS] below 100: AOSS_Init_old 93.14899
[src/scene/setting/AOSS] below 100: AOSS_81400830 97.74143
[src/scene/setting/AOSS] below 100: AOSS_814013AC 98.77193
[src/scene/setting/AOSS] below 100: AOSS_81401778 91.83883
[src/scene/setting/AOSS] below 100: AOSS_81401E80 98.605446
[src/scene/setting/AOSS] baseline: code 6436/16192 data 3896 functions 16 fuzzy 96.2883
[libs/RVLMiddleware/eZiText/src/clib/zi8alpha] pool: IDENTICAL
[libs/RVLMiddleware/eZiText/src/clib/zi8alpha] objdiff: code 5704/21664 data 72/564 functions 10/12 fuzzy 93.1492 linked code 0
[libs/RVLMiddleware/eZiText/src/clib/zi8alpha] instruction-exact functions: 10/12
[libs/RVLMiddleware/eZiText/src/clib/zi8alpha] section .data size 48 match None
[libs/RVLMiddleware/eZiText/src/clib/zi8alpha] section .rodata size 336 match 99.0991
[libs/RVLMiddleware/eZiText/src/clib/zi8alpha] section .text size 21664 match 93.149185
[libs/RVLMiddleware/eZiText/src/clib/zi8alpha] section extab size 72 match 100.0
[libs/RVLMiddleware/eZiText/src/clib/zi8alpha] section extabindex size 108 match 99.07407
[libs/RVLMiddleware/eZiText/src/clib/zi8alpha] below 100: Zi8ChangeWordCase 99.09091
[libs/RVLMiddleware/eZiText/src/clib/zi8alpha] below 100: Zi8AlphaGetCandidates 90.6072
[libs/RVLMiddleware/eZiText/src/clib/zi8alpha] baseline: code 5704/21664 data 72 functions 10 fuzzy 93.1448
regressions vs baseline: 0
global matched_code_percent: 86.68724 -> 86.68724
global fuzzy_match_percent: 99.30689 -> 99.30809
global complete_code_percent: 60.61288 -> 60.61288
global matched_data_percent: 91.11031 -> 91.11031
forbidden patterns added (net, per file): 0
readability warnings (net, per file; must be 0 in the final result): 0
GATE PASS
```

View File

@@ -0,0 +1,52 @@
# clib leaf — round-2 findings (agent/w0929/clib)
## Solved this round
- **zi8cinfo → Matching (whole-unit 100%)**. `Zi8GetSInfo` needed two levers
together: `volatile int extraCount;` (forces the stack stw/lwz orig has)
and the fused decrement `outputBuffer[(ziU8)--outputCount] = 0;` (lets MWCC
schedule `li r3,0` before the `subi` — orig's order). 133/133 insn-identical.
- **zi8getc2 all data sections 100%** (`ziFuzzyZYPairs` struct sizing): orig's
`Zi8ZYdefaultFuzzyPairs` object is 8B, not 4B — the struct has 12 real bit
fields (added `dANDt`) plus `reserved : 20`. By-value param codegen
unchanged (verified instruction-identical); no regression on the ~20 other
units including zitypes.h.
- **zidawg1 GetGraphInfo 80.8 → ~95+**: three real levers —
(a) u16 pair compares must be `int`/`ziS32`-typed on the RHS cast (orig uses
`cmpw`, not `cmplw` + `clrlwi`);
(b) `entry >= end` operand order (orig `cmplw entry,end;bge`);
(c) early exits are `return 0` (orig emits `li r3,0` direct-return blocks),
not `result=0; goto done`.
Residual: `||` block layout + regalloc, ~4 insns.
- **zidawg1 GetChild 93.3 → ~97+**: orig folds `+0x8000` as `addis +1` /
`addi -0x8000` applied to `(hi<<16 + mid<<8)` BEFORE adding `b2` — the
two-statement form `offset = ... + 0x8000; offset += b2;` reproduces it.
Residual: pure regname/scheduling.
## Extraction artifacts (no source lever)
- **zikorean .data 17.2%**: orig's extracted zikorean.o contains a THIRD
jumptable at .data+0xf8 (10 entries) whose relocs target `Zi8_81483118` —
a zkokeyp function. orig's zkokeyp.o has NO .data at all. The table bytes
were attributed to zikorean's slice by the extractor; cannot be emitted
from zikorean.c (its 3 fns are already 100%).
- **extab/extabindex ~92-97% residuals** on several units — symbol-extent
artifacts (byte-identical content where comparable).
## Systematic tie-break family (documented, unfixed)
- **Callee-reg home shift**: orig homes the loop counter/local in the FIRST
callee reg (r26) and args after (r27+); MWCC homes args first. Recurs in
zi8dawg MatchROMdata1, zmtkey, zi8getc2 (2 fns), zoemdata Zi8MatchOEMdata
(4-way swap, 192/192 insn-identical otherwise), zi8match, zkokeyp fns.
- zi8alpha Zi8AlphaGetCandidates (3946 insns): mostly uniform +4 stack-slot
shift (orig has one more 4-byte local slot) + a few bound-form diffs
(`>0xF010` vs `>=0xF011`, `<=1` vs `<2`) + one missing subf-rewind block.
- ziswordw Zi8IsWordW 83.3: orig homes call result in callee reg + keeps a
selector var in r27; mine spills via ziU8 narrowing — needs deeper decode.
## Old-tip adoption notes
Old leaf tip f2afe0e8 beat upstream on: zoemdata +34.2, ziswordw +10.5,
zi8uwd +7.3, zidawg1 +1.7, zi8pud2 +0.7, zi81key/zmtkey marginal.
Upstream won on: zi8alpha +4.5, zi8cgetc +16, zconvert +0.4, zkokeyp +0.1.

View File

@@ -0,0 +1,194 @@
#!/usr/bin/env python3
"""Search local-declaration orders that improve a function's register allocation.
usage: declsearch.py <unit> <symbol> [--version 43U] [--max-evals N] [--lines START END] [--score-only]
unit path without extension, e.g. src/system/odh
symbol name as in the object, e.g. huffmanCoder__9CArGBAOdhFPUsP21SArCDJ_HuffmanRequest
MWCC colors registers partly in declaration order, so permuting the leading
declaration block of a function can turn a register-only diff into a match.
The search hill-climbs over swaps and moves of those lines, rebuilding the
object each time, and leaves the best order in the file (the original text is
restored on error or Ctrl-C). Run from the worktree root. Set NINJA to the
ninja binary if it is not on PATH. --lines takes 1-based inclusive line numbers
of the declaration block when the automatic detection picks the wrong lines.
"""
import argparse
import difflib
import itertools
import os
import re
import subprocess
import sys
from capstone import CS_ARCH_PPC, CS_MODE_32, CS_MODE_BIG_ENDIAN, Cs
from elftools.elf.elffile import ELFFile
BRANCHES = {"b", "bl", "beq", "bne", "bge", "blt", "ble", "bgt", "bdnz", "bdz", "bc"}
DECL = re.compile(r"^\s+(?!return\b|if\b|for\b|while\b|do\b|switch\b|goto\b)"
r"(const\s+|volatile\s+|unsigned\s+|signed\s+|struct\s+)*[A-Za-z_]\w*"
r"(\s*\*+\s*|\s+)\**\s*[A-Za-z_]\w*(\[[^\]]*\])*(\s*=.*)?;\s*$")
def find_symbol(path, name):
with open(path, "rb") as f:
elf = ELFFile(f)
for s in elf.get_section_by_name(".symtab").iter_symbols():
if s.name == name:
section = elf.get_section(s["st_shndx"])
return section.data()[s["st_value"]:s["st_value"] + s["st_size"]]
raise KeyError(f"{name} not in {path}")
def disassemble(code):
md = Cs(CS_ARCH_PPC, CS_MODE_32 + CS_MODE_BIG_ENDIAN)
md.detail = True
out = []
for pos in range(0, len(code), 4):
insns = list(md.disasm(code[pos:pos + 4], pos))
if not insns:
out.append((".long", code[pos:pos + 4].hex()))
continue
insn = insns[0]
operand = insn.op_str
if insn.mnemonic.rstrip("+-") in BRANCHES and insn.operands:
last = insn.operands[-1]
if last.type == 2: # immediate: make the target function-relative
operand = str(last.imm - pos)
out.append((insn.mnemonic, operand))
return out
def score(mine, target):
"""(structural diff ignoring register names, positional exact diff)."""
norm = lambda insns: [(m, re.sub(r"\b[rf]\d+\b", "r", o)) for m, o in insns]
sm = difflib.SequenceMatcher(None, norm(mine), norm(target), autojunk=False)
structural = sum(max(i2 - i1, j2 - j1) for tag, i1, i2, j1, j2 in sm.get_opcodes() if tag != "equal")
exact = sum(1 for x, y in zip(mine, target) if x != y) + abs(len(mine) - len(target))
return structural, exact
def source_for(unit):
for ext in (".c", ".cpp", ".cp"):
if os.path.exists(unit + ext):
return unit + ext
sys.exit(f"no source file for {unit}")
def function_name(symbol):
"""Regex for the definition name: Class::name for member functions, else name."""
m = re.match(r"(\w+?)__(Q(\d))?(\d.*)", symbol)
if not m:
return re.escape(symbol)
rest, names = m.group(4), []
for _ in range(int(m.group(3) or 1)):
length = re.match(r"\d+", rest)
if not length:
break
start = length.end()
names.append(rest[start:start + int(length.group())])
rest = rest[start + int(length.group()):]
if not names or not rest.startswith(("F", "C")):
return re.escape(m.group(1))
return rf"{names[-1]}::{m.group(1)}"
def declaration_block(lines, symbol):
pattern = re.compile(rf"^\s*[A-Za-z_].*\b{function_name(symbol)}\s*\(")
for start, line in enumerate(lines):
if pattern.match(line) and not line.rstrip().endswith(";"):
break
else:
sys.exit(f"definition of {symbol} not found")
body = next(i for i in range(start, len(lines)) if lines[i].rstrip().endswith("{")) + 1
end = body
while end < len(lines) and DECL.match(lines[end]):
end += 1
if end - body < 2:
sys.exit("fewer than two leading declarations; pass --lines START END")
return body, end
def main():
ap = argparse.ArgumentParser(description=__doc__.split("\n")[0])
ap.add_argument("unit")
ap.add_argument("symbol")
ap.add_argument("--version", default="43U")
ap.add_argument("--max-evals", type=int, default=300)
ap.add_argument("--lines", type=int, nargs=2, metavar=("START", "END"))
ap.add_argument("--score-only", action="store_true")
args = ap.parse_args()
ninja = os.environ.get("NINJA", "ninja")
built = f"build/{args.version}/src/{args.unit}.o"
target = disassemble(find_symbol(f"build/{args.version}/obj/{args.unit}.o", args.symbol))
def evaluate():
if subprocess.run([ninja, built], capture_output=True).returncode:
return (10**6, 10**6)
return score(disassemble(find_symbol(built, args.symbol)), target)
if args.score_only:
print("structural %d exact %d" % evaluate())
return
path = source_for(args.unit)
with open(path) as f:
original = f.read()
lines = original.split("\n")
if args.lines:
body, end = args.lines[0] - 1, args.lines[1]
else:
body, end = declaration_block(lines, args.symbol)
decls = lines[body:end]
print("declaration block:", *decls, sep="\n ")
cache = {}
def order_score(order):
if order not in cache:
text = lines[:body] + [decls[i] for i in order] + lines[end:]
with open(path, "w") as f:
f.write("\n".join(text))
cache[order] = evaluate()
return cache[order]
start = best = tuple(range(len(decls)))
finished = False
try:
best_score = order_score(best)
print("start", best_score, flush=True)
improved = True
while improved and best_score != (0, 0) and len(cache) < args.max_evals:
improved = False
candidates = []
for i, j in itertools.combinations(range(len(best)), 2):
swapped = list(best)
swapped[i], swapped[j] = swapped[j], swapped[i]
candidates.append(tuple(swapped))
for i, j in itertools.permutations(range(len(best)), 2):
moved = list(best)
moved.insert(j, moved.pop(i))
candidates.append(tuple(moved))
for cand in candidates:
if len(cache) >= args.max_evals:
break
s = order_score(cand)
if s < best_score:
best, best_score, improved = cand, s, True
print("improved", s, flush=True)
break
finished = True
finally:
keep = finished and best != start
with open(path, "w") as f:
f.write("\n".join(lines[:body] + [decls[i] for i in best] + lines[end:]) if keep else original)
subprocess.run([ninja, built], capture_output=True)
print(f"best {cache.get(best)} after {len(cache)} builds;",
"kept in source:" if keep else "source restored; best order was:")
print(*[decls[i] for i in best], sep="\n")
if __name__ == "__main__":
main()

View File

@@ -0,0 +1,295 @@
# Round 2 block matching attempts
Start: 98648d19; target instruction counts Init 1584, Hello 273, Candidates 3946.
Baseline signed deficits 74, 3, -3; fuzzy 76.132576, 86.67033, 87.00405.
Acceptance: smaller absolute instruction deficit OR higher fuzzy; gate must pass.
- init.gateway.publish: packet address word 4 receives settings.gatewayAddress, as target load/store shows. 74 -> 72; 76.132576 -> 76.125630. Kept, GATE PASS.
- init.scan.failure_first: place IP configuration failure before allocation, target call order. 72 -> 72; 76.125630 -> 76.683080. Kept, GATE PASS.
- init.record.typed: copy aoss request identities through typed records. Deficit 72 -> 74; fuzzy 76.68308 -> 76.821335. Kept, GATE PASS. Call-region counts: R0:+3, R1:+5, R2:+4, R4:-1, R7:+1, R16:+76, R21:+1, R25:-9, R27:+2, R29:-53, R32:+1, R35:+1, R37:+3, R41:+2, R43:+1, R47:+20, R51:+7, R56:+1, R63:+1, R66:+1, R69:+1, R101:+12, R102:+1, R105:+1, R107:-15, R109:+1, R110:-1, R130:+1, R133:+1, R136:+1, R147:-11, R149:+42, R152:-12, R156:+40, R157:-2, R159:-53.
- init.record.cursor: walk aoss request records with a current record pointer. Build failed; reverted.
- init.record.cursor: walk aoss request records with a current record pointer. Deficit 74 -> 74; fuzzy 76.821335 -> 76.821335. Reverted. Call-region counts: R0:+3, R1:+5, R2:+4, R4:-1, R7:+1, R16:+76, R21:+1, R25:-9, R27:+2, R29:-53, R32:+1, R35:+1, R37:+3, R41:+2, R43:+1, R47:+20, R51:+7, R56:+1, R63:+1, R66:+1, R69:+1, R101:+12, R102:+1, R105:+1, R107:-15, R109:+1, R110:-1, R130:+1, R133:+1, R136:+1, R147:-11, R149:+42, R152:-12, R156:+40, R157:-2, R159:-53.
- init.record.nonce: narrow aoss random transaction ids at their source. Deficit 74 -> 74; fuzzy 76.821335 -> 76.821335. Reverted. Call-region counts: R0:+3, R1:+5, R2:+4, R4:-1, R7:+1, R16:+76, R21:+1, R25:-9, R27:+2, R29:-53, R32:+1, R35:+1, R37:+3, R41:+2, R43:+1, R47:+20, R51:+7, R56:+1, R63:+1, R66:+1, R69:+1, R101:+12, R102:+1, R105:+1, R107:-15, R109:+1, R110:-1, R130:+1, R133:+1, R136:+1, R147:-11, R149:+42, R152:-12, R156:+40, R157:-2, R159:-53.
- init.poll.abi: use the signed 64 bit socket poll timeout. Deficit 74 -> 75; fuzzy 76.821335 -> 76.492424. Reverted. Call-region counts: R0:+3, R1:+5, R2:+4, R4:-1, R7:+1, R16:+76, R21:+1, R25:-9, R27:+2, R29:-53, R32:+1, R35:+1, R37:+3, R41:+2, R43:+1, R47:+20, R51:+7, R56:+1, R63:+1, R66:+1, R69:+1, R101:+13, R102:+1, R105:+1, R107:-15, R109:+1, R110:-1, R130:+1, R133:+1, R136:+1, R147:-11, R149:+42, R152:-12, R156:+40, R157:-2, R159:-53.
- init.frame.requests: align the aoss request records as in the target frame. Deficit 74 -> 27; fuzzy 76.821335 -> 73.91225. Kept, GATE PASS. Call-region counts: R4:-1, R6:-1, R7:+1, R9:-1, R10:+1, R11:-1, R12:+1, R14:-1, R15:+1, R16:+76, R21:+1, R23:-1, R24:+1, R25:-11, R26:+1, R27:+1, R28:+1, R29:-53, R30:-1, R31:+1, R33:+1, R36:+1, R37:+1, R38:+1, R39:-1, R40:+1, R44:-1, R45:-1, R46:+1, R47:-1, R48:+1, R53:+17, R56:-1, R57:+1, R58:-1, R59:-1, R60:+1, R62:-1, R63:+1, R66:-1, R67:+1, R69:+1, R72:+1, R74:-1, R75:+1, R80:-1, R81:+1, R84:-1, R86:-1, R100:-1, R101:+1, R103:+3, R104:-1, R105:+1, R108:+1, R109:-15, R111:+1, R112:-1, R114:-1, R115:+1, R119:-1, R120:+1, R121:-1, R122:+1, R124:-1, R125:+1, R126:-1, R127:+1, R129:-1, R130:+1, R133:-1, R134:+1, R136:+1, R139:+1, R143:-1, R144:+1, R149:-12, R150:+1, R151:+42, R152:-1, R153:+1, R154:-13, R156:-1, R157:+1, R158:+40, R159:-3, R160:+1, R161:-54.
- init.frame.addresses: align aoss network addresses in the local frame. Deficit 27 -> 27; fuzzy 73.91225 -> 73.915405. Kept, GATE PASS. Call-region counts: R4:-1, R6:-1, R7:+1, R9:-1, R10:+1, R11:-1, R12:+1, R14:-1, R15:+1, R16:+76, R21:+1, R23:-1, R24:+1, R25:-11, R26:+1, R27:+1, R28:+1, R29:-53, R30:-1, R31:+1, R33:+1, R36:+1, R37:+1, R38:+1, R39:-1, R40:+1, R44:-1, R45:-1, R46:+1, R47:-1, R48:+1, R53:+17, R56:-1, R57:+1, R58:-1, R59:-1, R60:+1, R62:-1, R63:+1, R66:-1, R67:+1, R69:+1, R72:+1, R74:-1, R75:+1, R80:-1, R81:+1, R84:-1, R86:-1, R100:-1, R101:+1, R103:+3, R104:-1, R105:+1, R108:+1, R109:-15, R111:+1, R112:-1, R114:-1, R115:+1, R119:-1, R120:+1, R121:-1, R122:+1, R124:-1, R125:+1, R126:-1, R127:+1, R129:-1, R130:+1, R133:-1, R134:+1, R136:+1, R139:+1, R143:-1, R144:+1, R149:-12, R150:+1, R151:+42, R152:-1, R153:+1, R154:-13, R156:-1, R157:+1, R158:+40, R159:-3, R160:+1, R161:-54.
- init.frame.settings: align aoss network settings in the local frame. Deficit 27 -> 27; fuzzy 73.915405 -> 73.915405. Reverted. Call-region counts: R4:-1, R6:-1, R7:+1, R9:-1, R10:+1, R11:-1, R12:+1, R14:-1, R15:+1, R16:+76, R21:+1, R23:-1, R24:+1, R25:-11, R26:+1, R27:+1, R28:+1, R29:-53, R30:-1, R31:+1, R33:+1, R36:+1, R37:+1, R38:+1, R39:-1, R40:+1, R44:-1, R45:-1, R46:+1, R47:-1, R48:+1, R53:+17, R56:-1, R57:+1, R58:-1, R59:-1, R60:+1, R62:-1, R63:+1, R66:-1, R67:+1, R69:+1, R72:+1, R74:-1, R75:+1, R80:-1, R81:+1, R84:-1, R86:-1, R100:-1, R101:+1, R103:+3, R104:-1, R105:+1, R108:+1, R109:-15, R111:+1, R112:-1, R114:-1, R115:+1, R119:-1, R120:+1, R121:-1, R122:+1, R124:-1, R125:+1, R126:-1, R127:+1, R129:-1, R130:+1, R133:-1, R134:+1, R136:+1, R139:+1, R143:-1, R144:+1, R149:-12, R150:+1, R151:+42, R152:-1, R153:+1, R154:-13, R156:-1, R157:+1, R158:+40, R159:-3, R160:+1, R161:-54.
- init.frame.poll: align aoss poll descriptors in the local frame. Deficit 27 -> 27; fuzzy 73.915405 -> 73.915405. Reverted. Call-region counts: R4:-1, R6:-1, R7:+1, R9:-1, R10:+1, R11:-1, R12:+1, R14:-1, R15:+1, R16:+76, R21:+1, R23:-1, R24:+1, R25:-11, R26:+1, R27:+1, R28:+1, R29:-53, R30:-1, R31:+1, R33:+1, R36:+1, R37:+1, R38:+1, R39:-1, R40:+1, R44:-1, R45:-1, R46:+1, R47:-1, R48:+1, R53:+17, R56:-1, R57:+1, R58:-1, R59:-1, R60:+1, R62:-1, R63:+1, R66:-1, R67:+1, R69:+1, R72:+1, R74:-1, R75:+1, R80:-1, R81:+1, R84:-1, R86:-1, R100:-1, R101:+1, R103:+3, R104:-1, R105:+1, R108:+1, R109:-15, R111:+1, R112:-1, R114:-1, R115:+1, R119:-1, R120:+1, R121:-1, R122:+1, R124:-1, R125:+1, R126:-1, R127:+1, R129:-1, R130:+1, R133:-1, R134:+1, R136:+1, R139:+1, R143:-1, R144:+1, R149:-12, R150:+1, R151:+42, R152:-1, R153:+1, R154:-13, R156:-1, R157:+1, R158:+40, R159:-3, R160:+1, R161:-54.
- init.frame.addresses.review_revert: target network addresses start at stack +0x88 and are not aligned 32. Reject speculative alignment despite its +0.003 score; retain alignment only for request records (+0xA0). Deficit 27; fuzzy 73.912250. GATE PASS.
- init.scan.wait_first: order aoss scan retries before the successful setup path. Deficit 27 -> 27; fuzzy 73.91225 -> 76.90783. Kept, GATE PASS. Call-region counts: R4:-1, R6:-1, R7:+1, R9:-1, R10:+1, R11:-1, R12:+1, R14:-1, R15:+1, R16:-1, R17:+1, R19:+1, R21:+16, R26:+1, R28:-1, R29:+1, R30:-11, R31:+1, R32:+4, R33:+1, R34:+3, R35:-1, R36:+1, R38:+1, R41:+1, R42:+1, R43:+1, R44:-1, R45:+1, R49:-1, R50:-1, R51:+1, R52:-1, R53:+1, R58:+17, R61:-1, R62:+1, R63:-1, R64:-1, R65:+1, R67:-1, R68:+1, R71:-1, R72:+1, R74:+1, R77:+1, R79:-1, R80:+1, R85:-1, R86:+1, R89:-1, R91:-1, R105:-1, R106:+1, R108:+3, R109:-1, R110:+1, R113:+1, R114:-15, R116:+1, R117:-1, R119:-1, R120:+1, R124:-1, R125:+1, R126:-1, R127:+1, R129:-1, R130:+1, R131:-1, R132:+1, R134:-1, R135:+1, R138:-1, R139:+1, R141:+1, R144:+1, R148:-1, R149:+1, R154:-12, R155:+1, R156:+42, R157:-1, R158:+1, R159:-13, R161:-1, R162:+1, R163:+40, R164:-3, R165:+1, R166:-54.
- init.scan.alloc_first: place aoss allocation failure before the wait loop. Deficit 27 -> 26; fuzzy 76.90783 -> 76.97096. Kept, GATE PASS. Call-region counts: R4:-1, R6:-1, R7:+1, R9:-1, R10:+1, R11:-1, R12:+1, R14:-1, R15:+1, R16:-1, R17:+1, R19:+1, R21:+16, R26:+1, R28:-1, R29:+1, R30:-17, R31:-5, R32:+10, R33:+9, R34:-1, R35:+1, R37:+1, R40:+1, R41:+1, R42:+1, R43:-1, R44:+1, R48:-1, R49:-1, R50:+1, R51:-1, R52:+1, R57:+17, R60:-1, R61:+1, R62:-1, R63:-1, R64:+1, R66:-1, R67:+1, R70:-1, R71:+1, R73:+1, R76:+1, R78:-1, R79:+1, R84:-1, R85:+1, R88:-1, R90:-1, R104:-1, R105:+1, R107:+3, R108:-1, R109:+1, R112:+1, R113:-15, R115:+1, R116:-1, R118:-1, R119:+1, R123:-1, R124:+1, R125:-1, R126:+1, R128:-1, R129:+1, R130:-1, R131:+1, R133:-1, R134:+1, R137:-1, R138:+1, R140:+1, R143:+1, R147:-1, R148:+1, R153:-12, R154:+1, R155:+42, R156:-1, R157:+1, R158:-13, R160:-1, R161:+1, R162:+40, R163:-3, R164:+1, R165:-54.
- init.defaults.unsigned: load aoss default wait halfwords without sign extension. Deficit 26 -> 26; fuzzy 76.97096 -> 76.97096. Reverted. Call-region counts: R4:-1, R6:-1, R7:+1, R9:-1, R10:+1, R11:-1, R12:+1, R14:-1, R15:+1, R16:-1, R17:+1, R19:+1, R21:+16, R26:+1, R28:-1, R29:+1, R30:-17, R31:-5, R32:+10, R33:+9, R34:-1, R35:+1, R37:+1, R40:+1, R41:+1, R42:+1, R43:-1, R44:+1, R48:-1, R49:-1, R50:+1, R51:-1, R52:+1, R57:+17, R60:-1, R61:+1, R62:-1, R63:-1, R64:+1, R66:-1, R67:+1, R70:-1, R71:+1, R73:+1, R76:+1, R78:-1, R79:+1, R84:-1, R85:+1, R88:-1, R90:-1, R104:-1, R105:+1, R107:+3, R108:-1, R109:+1, R112:+1, R113:-15, R115:+1, R116:-1, R118:-1, R119:+1, R123:-1, R124:+1, R125:-1, R126:+1, R128:-1, R129:+1, R130:-1, R131:+1, R133:-1, R134:+1, R137:-1, R138:+1, R140:+1, R143:+1, R147:-1, R148:+1, R153:-12, R154:+1, R155:+42, R156:-1, R157:+1, R158:-13, R160:-1, R161:+1, R162:+40, R163:-3, R164:+1, R165:-54.
- init.flags.unsigned: compare aoss required flags with their unsigned width. Deficit 26 -> 26; fuzzy 76.97096 -> 76.97096. Reverted. Call-region counts: R4:-1, R6:-1, R7:+1, R9:-1, R10:+1, R11:-1, R12:+1, R14:-1, R15:+1, R16:-1, R17:+1, R19:+1, R21:+16, R26:+1, R28:-1, R29:+1, R30:-17, R31:-5, R32:+10, R33:+9, R34:-1, R35:+1, R37:+1, R40:+1, R41:+1, R42:+1, R43:-1, R44:+1, R48:-1, R49:-1, R50:+1, R51:-1, R52:+1, R57:+17, R60:-1, R61:+1, R62:-1, R63:-1, R64:+1, R66:-1, R67:+1, R70:-1, R71:+1, R73:+1, R76:+1, R78:-1, R79:+1, R84:-1, R85:+1, R88:-1, R90:-1, R104:-1, R105:+1, R107:+3, R108:-1, R109:+1, R112:+1, R113:-15, R115:+1, R116:-1, R118:-1, R119:+1, R123:-1, R124:+1, R125:-1, R126:+1, R128:-1, R129:+1, R130:-1, R131:+1, R133:-1, R134:+1, R137:-1, R138:+1, R140:+1, R143:+1, R147:-1, R148:+1, R153:-12, R154:+1, R155:+42, R156:-1, R157:+1, R158:-13, R160:-1, R161:+1, R162:+40, R163:-3, R164:+1, R165:-54.
- init.poll.native: pass aoss poll timeout as one 64 bit value. Deficit 26 -> 27; fuzzy 76.97096 -> 76.74306. Reverted. Call-region counts: R4:-1, R6:-1, R7:+1, R9:-1, R10:+1, R11:-1, R12:+1, R14:-1, R15:+1, R16:-1, R17:+1, R19:+1, R21:+16, R26:+1, R28:-1, R29:+1, R30:-17, R31:-5, R32:+10, R33:+9, R34:-1, R35:+1, R37:+1, R40:+1, R41:+1, R42:+1, R43:-1, R44:+1, R48:-1, R49:-1, R50:+1, R51:-1, R52:+1, R57:+17, R60:-1, R61:+1, R62:-1, R63:-1, R64:+1, R66:-1, R67:+1, R70:-1, R71:+1, R73:+1, R76:+1, R78:-1, R79:+1, R84:-1, R85:+1, R88:-1, R90:-1, R104:-1, R105:+1, R107:+4, R108:-1, R109:+1, R112:+1, R113:-15, R115:+1, R116:-1, R118:-1, R119:+1, R123:-1, R124:+1, R125:-1, R126:+1, R128:-1, R129:+1, R130:-1, R131:+1, R133:-1, R134:+1, R137:-1, R138:+1, R140:+1, R143:+1, R147:-1, R148:+1, R153:-12, R154:+1, R155:+42, R156:-1, R157:+1, R158:-13, R160:-1, R161:+1, R162:+40, R163:-3, R164:+1, R165:-54.
- init.frame.decl_records_last: place aligned aoss request records after the socket locals. Deficit 26 -> 26; fuzzy 76.97096 -> 76.97096. Reverted. Call-region counts: R4:-1, R6:-1, R7:+1, R9:-1, R10:+1, R11:-1, R12:+1, R14:-1, R15:+1, R16:-1, R17:+1, R19:+1, R21:+16, R26:+1, R28:-1, R29:+1, R30:-17, R31:-5, R32:+10, R33:+9, R34:-1, R35:+1, R37:+1, R40:+1, R41:+1, R42:+1, R43:-1, R44:+1, R48:-1, R49:-1, R50:+1, R51:-1, R52:+1, R57:+17, R60:-1, R61:+1, R62:-1, R63:-1, R64:+1, R66:-1, R67:+1, R70:-1, R71:+1, R73:+1, R76:+1, R78:-1, R79:+1, R84:-1, R85:+1, R88:-1, R90:-1, R104:-1, R105:+1, R107:+3, R108:-1, R109:+1, R112:+1, R113:-15, R115:+1, R116:-1, R118:-1, R119:+1, R123:-1, R124:+1, R125:-1, R126:+1, R128:-1, R129:+1, R130:-1, R131:+1, R133:-1, R134:+1, R137:-1, R138:+1, R140:+1, R143:+1, R147:-1, R148:+1, R153:-12, R154:+1, R155:+42, R156:-1, R157:+1, R158:-13, R160:-1, R161:+1, R162:+40, R163:-3, R164:+1, R165:-54.
- init.frame.decl_records_first: declare aligned aoss request records before network settings. Deficit 26 -> 26; fuzzy 76.97096 -> 76.97096. Reverted. Call-region counts: R4:-1, R6:-1, R7:+1, R9:-1, R10:+1, R11:-1, R12:+1, R14:-1, R15:+1, R16:-1, R17:+1, R19:+1, R21:+16, R26:+1, R28:-1, R29:+1, R30:-17, R31:-5, R32:+10, R33:+9, R34:-1, R35:+1, R37:+1, R40:+1, R41:+1, R42:+1, R43:-1, R44:+1, R48:-1, R49:-1, R50:+1, R51:-1, R52:+1, R57:+17, R60:-1, R61:+1, R62:-1, R63:-1, R64:+1, R66:-1, R67:+1, R70:-1, R71:+1, R73:+1, R76:+1, R78:-1, R79:+1, R84:-1, R85:+1, R88:-1, R90:-1, R104:-1, R105:+1, R107:+3, R108:-1, R109:+1, R112:+1, R113:-15, R115:+1, R116:-1, R118:-1, R119:+1, R123:-1, R124:+1, R125:-1, R126:+1, R128:-1, R129:+1, R130:-1, R131:+1, R133:-1, R134:+1, R137:-1, R138:+1, R140:+1, R143:+1, R147:-1, R148:+1, R153:-12, R154:+1, R155:+42, R156:-1, R157:+1, R158:-13, R160:-1, R161:+1, R162:+40, R163:-3, R164:+1, R165:-54.
- init.frame.wait_decl: declare aoss wait settings after the default intervals. Deficit 26 -> 26; fuzzy 76.97096 -> 76.96717. Reverted. Call-region counts: R4:-1, R6:-1, R7:+1, R9:-1, R10:+1, R11:-1, R12:+1, R14:-1, R15:+1, R16:-1, R17:+1, R19:+1, R21:+16, R26:+1, R28:-1, R29:+1, R30:-17, R31:-5, R32:+10, R33:+9, R34:-1, R35:+1, R37:+1, R40:+1, R41:+1, R42:+1, R43:-1, R44:+1, R48:-1, R49:-1, R50:+1, R51:-1, R52:+1, R57:+17, R60:-1, R61:+1, R62:-1, R63:-1, R64:+1, R66:-1, R67:+1, R70:-1, R71:+1, R73:+1, R76:+1, R78:-1, R79:+1, R84:-1, R85:+1, R88:-1, R90:-1, R104:-1, R105:+1, R107:+3, R108:-1, R109:+1, R112:+1, R113:-15, R115:+1, R116:-1, R118:-1, R119:+1, R123:-1, R124:+1, R125:-1, R126:+1, R128:-1, R129:+1, R130:-1, R131:+1, R133:-1, R134:+1, R137:-1, R138:+1, R140:+1, R143:+1, R147:-1, R148:+1, R153:-12, R154:+1, R155:+42, R156:-1, R157:+1, R158:-13, R160:-1, R161:+1, R162:+40, R163:-3, R164:+1, R165:-54.
- init.scan.alloc_correct: corrected the trial transformer to split the entire allocation failure block; prior trial misnested its else. Current success reaches the wait loop and null allocation reaches cleanup. Deficit 27; fuzzy 77.048615. GATE PASS.
- init.cleanup.returns: return directly after aoss error cleanup. Deficit 27 -> 27; fuzzy 77.048615 -> 77.048615. Reverted. Call-region counts: R4:-1, R6:-1, R7:+1, R9:-1, R10:+1, R11:-1, R12:+1, R14:-1, R15:+1, R16:-1, R17:+1, R19:+1, R21:+16, R26:+1, R28:-1, R29:+1, R30:+17, R31:-1, R32:+1, R34:-19, R35:-1, R36:+1, R38:+1, R41:+1, R42:+1, R43:+1, R44:-1, R45:+1, R49:-1, R50:-1, R51:+1, R52:-1, R53:+1, R58:+17, R61:-1, R62:+1, R63:-1, R64:-1, R65:+1, R67:-1, R68:+1, R71:-1, R72:+1, R74:+1, R77:+1, R79:-1, R80:+1, R85:-1, R86:+1, R89:-1, R91:-1, R105:-1, R106:+1, R108:+3, R109:-1, R110:+1, R113:+1, R114:-15, R116:+1, R117:-1, R119:-1, R120:+1, R124:-1, R125:+1, R126:-1, R127:+1, R129:-1, R130:+1, R131:-1, R132:+1, R134:-1, R135:+1, R138:-1, R139:+1, R141:+1, R144:+1, R148:-1, R149:+1, R154:-12, R155:+1, R156:+42, R157:-1, R158:+1, R159:-13, R161:-1, R162:+1, R163:+40, R164:-3, R165:+1, R166:-54.
- init.cleanup.signed: use a signed aoss initialization result value. Deficit 27 -> 27; fuzzy 77.048615 -> 77.048615. Reverted. Call-region counts: R4:-1, R6:-1, R7:+1, R9:-1, R10:+1, R11:-1, R12:+1, R14:-1, R15:+1, R16:-1, R17:+1, R19:+1, R21:+16, R26:+1, R28:-1, R29:+1, R30:+17, R31:-1, R32:+1, R34:-19, R35:-1, R36:+1, R38:+1, R41:+1, R42:+1, R43:+1, R44:-1, R45:+1, R49:-1, R50:-1, R51:+1, R52:-1, R53:+1, R58:+17, R61:-1, R62:+1, R63:-1, R64:-1, R65:+1, R67:-1, R68:+1, R71:-1, R72:+1, R74:+1, R77:+1, R79:-1, R80:+1, R85:-1, R86:+1, R89:-1, R91:-1, R105:-1, R106:+1, R108:+3, R109:-1, R110:+1, R113:+1, R114:-15, R116:+1, R117:-1, R119:-1, R120:+1, R124:-1, R125:+1, R126:-1, R127:+1, R129:-1, R130:+1, R131:-1, R132:+1, R134:-1, R135:+1, R138:-1, R139:+1, R141:+1, R144:+1, R148:-1, R149:+1, R154:-12, R155:+1, R156:+42, R157:-1, R158:+1, R159:-13, R161:-1, R162:+1, R163:+40, R164:-3, R165:+1, R166:-54.
- init.cleanup.boolean: test aoss cleanup pointers directly. Deficit 27 -> 27; fuzzy 77.048615 -> 83.30051. Kept, GATE PASS. Call-region counts: R4:-1, R6:-1, R7:+1, R18:+1, R21:+16, R26:+1, R30:+17, R34:-19, R37:+1, R40:+1, R42:+2, R49:-1, R58:+17, R63:-1, R73:+1, R76:+1, R89:-1, R91:-1, R108:+3, R112:+1, R114:-15, R116:+1, R117:-1, R140:+1, R143:+1, R154:-11, R156:+42, R159:-13, R163:+40, R164:-2, R166:-54.
- init.poll.signed_halves: form aoss poll high and low words from the same sum. Deficit 27 -> 27; fuzzy 83.30051 -> 83.30051. Reverted. Call-region counts: R4:-1, R6:-1, R7:+1, R18:+1, R21:+16, R26:+1, R30:+17, R34:-19, R37:+1, R40:+1, R42:+2, R49:-1, R58:+17, R63:-1, R73:+1, R76:+1, R89:-1, R91:-1, R108:+3, R112:+1, R114:-15, R116:+1, R117:-1, R140:+1, R143:+1, R154:-11, R156:+42, R159:-13, R163:+40, R164:-2, R166:-54.
- init.poll.locals: retain aoss poll time components in a local timeval. Deficit 27 -> 25; fuzzy 83.30051 -> 83.31439. Kept, GATE PASS. Call-region counts: R4:-1, R6:-1, R7:+1, R18:+1, R21:+16, R26:+1, R30:+17, R34:-19, R37:+1, R40:+1, R42:+2, R49:-1, R58:+17, R63:-1, R73:+1, R76:+1, R89:-1, R91:-1, R108:+1, R112:+1, R114:-15, R116:+1, R117:-1, R140:+1, R143:+1, R154:-11, R156:+42, R159:-13, R163:+40, R164:-2, R166:-54.
- init.poll.sum_temp: calculate aoss poll ticks once before passing both words. Deficit 25 -> 26; fuzzy 83.31439 -> 83.44886. Kept, GATE PASS. Call-region counts: R4:-1, R6:-1, R7:+1, R18:+1, R21:+16, R26:+1, R30:+17, R34:-19, R37:+1, R40:+1, R42:+2, R49:-1, R58:+17, R63:-1, R73:+1, R76:+1, R89:-1, R91:-1, R108:+2, R112:+1, R114:-15, R116:+1, R117:-1, R140:+1, R143:+1, R154:-11, R156:+42, R159:-13, R163:+40, R164:-2, R166:-54.
- init.wait.limits: keep aoss scan attempt and duration comparisons unsigned. Deficit 26 -> 24; fuzzy 83.44886 -> 83.43624. Kept, GATE PASS. Call-region counts: R4:-1, R6:-1, R16:-1, R18:+1, R21:+16, R26:+1, R30:+17, R34:-19, R37:+1, R40:+1, R42:+2, R49:-1, R58:+17, R63:-1, R73:+1, R76:+1, R89:-1, R91:-1, R108:+2, R112:+1, R114:-15, R116:+1, R117:-1, R140:+1, R143:+1, R154:-11, R156:+42, R159:-13, R163:+40, R164:-2, R166:-54.
- init.wait.counter: retain signed aoss link attempt counter width. Deficit 24 -> 24; fuzzy 83.43624 -> 83.98485. Kept, GATE PASS. Call-region counts: R4:-1, R6:-1, R16:-1, R18:+1, R21:+16, R26:+1, R30:+17, R34:-19, R37:+1, R40:+1, R42:+2, R49:-1, R58:+17, R63:-1, R73:+1, R76:+1, R89:-1, R91:-1, R108:+2, R112:+1, R114:-15, R116:+1, R117:-1, R140:+1, R143:+1, R154:-11, R156:+42, R159:-13, R163:+40, R164:-2, R166:-54.
- init.wait.step_compound: decrement aoss wait counters with compound assignments. Deficit 24 -> 21; fuzzy 83.98485 -> 83.20581. Kept, GATE PASS. Call-region counts: R4:-1, R6:-1, R16:-1, R18:+1, R21:+16, R26:+1, R30:+17, R34:-19, R37:+1, R39:-1, R40:+1, R42:+2, R49:-1, R58:+17, R63:-1, R73:+1, R76:+1, R89:-1, R91:-1, R108:+2, R111:-1, R112:+1, R114:-15, R116:+1, R117:-1, R140:+1, R143:+1, R154:-11, R156:+41, R159:-13, R163:+40, R164:-2, R166:-54.
- init.receive.socket: restore the aoss receive dispatcher socket argument. Deficit 21 -> 20; fuzzy 83.20581 -> 83.53788. Kept, GATE PASS. Call-region counts: R4:-1, R6:-1, R16:-1, R18:+1, R21:+16, R26:+1, R30:+17, R34:-19, R37:+1, R39:-1, R40:+1, R42:+2, R49:-1, R58:+17, R63:-1, R73:+1, R76:+1, R89:-1, R91:-1, R108:+2, R111:-1, R112:+1, R114:-15, R117:-1, R140:+1, R143:+1, R154:-11, R156:+41, R159:-13, R163:+40, R164:-2, R166:-54.
- init.receive.active: preserve the signed aoss active flag tests. Deficit 20 -> 20; fuzzy 83.53788 -> 83.558716. Kept, GATE PASS. Call-region counts: R4:-1, R6:-1, R16:-1, R18:+1, R21:+16, R26:+1, R30:+17, R34:-19, R37:+1, R39:-1, R40:+1, R42:+2, R49:-1, R58:+17, R63:-1, R73:+1, R76:+1, R89:-1, R91:-1, R108:+2, R111:-1, R112:+1, R114:-15, R117:-1, R140:+1, R143:+1, R154:-11, R156:+41, R159:-13, R163:+40, R164:-2, R166:-54.
- init.poll.initial_zero: start aoss poll timeout addition from zero. Deficit 20 -> 18; fuzzy 83.558716 -> 83.65025. Kept, GATE PASS. Call-region counts: R4:-1, R6:-1, R16:-1, R18:+1, R21:+16, R26:+1, R30:+17, R34:-19, R37:+1, R39:-1, R40:+1, R42:+2, R49:-1, R58:+17, R63:-1, R73:+1, R76:+1, R89:-1, R91:-1, R111:-1, R112:+1, R114:-15, R117:-1, R140:+1, R143:+1, R154:-11, R156:+41, R159:-13, R163:+40, R164:-2, R166:-54.
- init.poll.signed_type: keep the aoss socket timeout accumulator signed. Deficit 18 -> 18; fuzzy 83.65025 -> 83.62437. Reverted. Call-region counts: R4:-1, R6:-1, R16:-1, R18:+1, R21:+16, R26:+1, R30:+17, R34:-19, R37:+1, R39:-1, R40:+1, R42:+2, R49:-1, R58:+17, R63:-1, R73:+1, R76:+1, R89:-1, R91:-1, R111:-1, R112:+1, R114:-15, R117:-1, R140:+1, R143:+1, R154:-11, R156:+41, R159:-13, R163:+40, R164:-2, R166:-54.
- init.wait.target_widths: restore signed aoss attempt limits and unsigned wait durations. Deficit 18 -> 17; fuzzy 83.65025 -> 83.39899. Kept, GATE PASS. Call-region counts: R4:-1, R6:-1, R7:+1, R18:+1, R20:-1, R21:+16, R26:+1, R30:+17, R34:-19, R37:+1, R39:-1, R40:+1, R42:+2, R49:-1, R58:+17, R63:-1, R73:+1, R75:-1, R76:+1, R89:-1, R91:-1, R111:-1, R112:+1, R114:-15, R117:-1, R140:+1, R142:-1, R143:+1, R154:-11, R156:+41, R159:-13, R163:+40, R164:-2, R166:-54.
- init.final.error_first: order aoss final protocol errors before publishing settings. Deficit 17 -> 17; fuzzy 83.39899 -> 83.3851. Reverted. Call-region counts: R4:-1, R6:-1, R7:+1, R18:+1, R20:-1, R21:+16, R26:+1, R30:+17, R34:-19, R37:+1, R39:-1, R40:+1, R42:+2, R49:-1, R58:+17, R63:-1, R73:+1, R75:-1, R76:+1, R89:-1, R91:-1, R111:-1, R112:+1, R114:-15, R117:-1, R140:+1, R142:-1, R143:+1, R154:-11, R156:+41, R159:-13, R166:-2, R168:-14.
- init.final.error_direct: write aoss protocol error status directly in each case. Deficit 17 -> 12; fuzzy 83.39899 -> 83.33586. Kept, GATE PASS. Call-region counts: R4:-1, R6:-1, R7:+1, R18:+1, R20:-1, R21:+16, R26:+1, R30:+17, R34:-19, R37:+1, R39:-1, R40:+1, R42:+2, R49:-1, R58:+17, R63:-1, R73:+1, R75:-1, R76:+1, R89:-1, R91:-1, R111:-1, R112:+1, R114:-15, R117:-1, R140:+1, R142:-1, R143:+1, R154:-11, R156:+41, R159:-13, R163:+40, R164:-2, R166:-59.
- init.final.outcome: separate the aoss protocol outcome from its poll duration. Deficit 12 -> 12; fuzzy 83.33586 -> 83.34533. Kept, GATE PASS. Call-region counts: R4:-1, R6:-1, R7:+1, R18:+1, R20:-1, R21:+16, R26:+1, R30:+17, R34:-19, R37:+1, R39:-1, R40:+1, R42:+2, R49:-1, R58:+17, R63:-1, R73:+1, R75:-1, R76:+1, R89:-1, R91:-1, R111:-1, R112:+1, R114:-15, R117:-1, R140:+1, R142:-1, R143:+1, R154:-11, R156:+41, R159:-13, R163:+40, R164:-2, R166:-59.
- init.defaults.halfwords: store aoss wait defaults using unsigned halfword fields. Deficit 12 -> 10; fuzzy 83.34533 -> 83.07702. Kept, GATE PASS. Call-region counts: R2:-2, R4:-1, R6:-1, R7:+1, R18:+1, R20:-1, R21:+16, R26:+1, R30:+17, R34:-19, R37:+1, R39:-1, R40:+1, R42:+2, R49:-1, R58:+17, R63:-1, R73:+1, R75:-1, R76:+1, R89:-1, R91:-1, R111:-1, R112:+1, R114:-15, R117:-1, R140:+1, R142:-1, R143:+1, R154:-11, R156:+41, R159:-13, R163:+40, R164:-2, R166:-59.
- init.defaults.full_unsigned: compare aoss wait sentinels as unsigned halfwords. Deficit 10 -> 12; fuzzy 83.07702 -> 83.304924. Kept, GATE PASS. Call-region counts: R4:-1, R6:-1, R7:+1, R18:+1, R20:-1, R21:+16, R26:+1, R30:+17, R34:-19, R37:+1, R39:-1, R40:+1, R42:+2, R49:-1, R58:+17, R63:-1, R73:+1, R75:-1, R76:+1, R89:-1, R91:-1, R111:-1, R112:+1, R114:-15, R117:-1, R140:+1, R142:-1, R143:+1, R154:-11, R156:+41, R159:-13, R163:+40, R164:-2, R166:-59.
- init.defaults.order: initialize aoss response wait before the connection wait. Deficit 12 -> 12; fuzzy 83.304924 -> 83.3327. Kept, GATE PASS. Call-region counts: R4:-1, R6:-1, R7:+1, R18:+1, R20:-1, R21:+16, R26:+1, R30:+17, R34:-19, R37:+1, R39:-1, R40:+1, R42:+2, R49:-1, R58:+17, R63:-1, R73:+1, R75:-1, R76:+1, R89:-1, R91:-1, R111:-1, R112:+1, R114:-15, R117:-1, R140:+1, R142:-1, R143:+1, R154:-11, R156:+41, R159:-13, R163:+40, R164:-2, R166:-59.
- init.record.full_cursor: keep the current aoss request record through nonce conversion. Deficit 12 -> 14; fuzzy 83.3327 -> 83.155304. Reverted. Call-region counts: R4:-1, R6:-1, R7:+1, R18:+1, R20:-1, R21:+16, R26:+1, R30:+17, R34:-19, R37:+1, R39:-1, R40:+1, R42:+2, R48:+1, R58:+17, R63:-1, R73:+1, R75:-1, R76:+1, R89:-1, R91:-1, R111:-1, R112:+1, R114:-15, R117:-1, R140:+1, R142:-1, R143:+1, R154:-11, R156:+41, R159:-13, R163:+40, R164:-2, R166:-59.
- init.record.for: initialize aoss identities with a typed record loop. Deficit 12 -> 14; fuzzy 83.3327 -> 83.155304. Reverted. Call-region counts: R4:-1, R6:-1, R7:+1, R18:+1, R20:-1, R21:+16, R26:+1, R30:+17, R34:-19, R37:+1, R39:-1, R40:+1, R42:+2, R48:+1, R58:+17, R63:-1, R73:+1, R75:-1, R76:+1, R89:-1, R91:-1, R111:-1, R112:+1, R114:-15, R117:-1, R140:+1, R142:-1, R143:+1, R154:-11, R156:+41, R159:-13, R163:+40, R164:-2, R166:-59.
- init.record.random_width: keep aoss transaction nonce as its native halfword. Deficit 12 -> 12; fuzzy 83.3327 -> 83.3327. Reverted. Call-region counts: R4:-1, R6:-1, R7:+1, R18:+1, R20:-1, R21:+16, R26:+1, R30:+17, R34:-19, R37:+1, R39:-1, R40:+1, R42:+2, R49:-1, R58:+17, R63:-1, R73:+1, R75:-1, R76:+1, R89:-1, R91:-1, R111:-1, R112:+1, R114:-15, R117:-1, R140:+1, R142:-1, R143:+1, R154:-11, R156:+41, R159:-13, R163:+40, R164:-2, R166:-59.
- init.bind.failure_first: order aoss bind failure before its protocol setup. Deficit 12 -> 28; fuzzy 83.3327 -> 84.20202. Kept, GATE PASS. Call-region counts: R4:-1, R6:-1, R7:+1, R18:+1, R20:-1, R21:+16, R26:+1, R30:+17, R34:-19, R37:+1, R39:-1, R40:+1, R42:+2, R49:-1, R58:+17, R63:-1, R73:+1, R75:-1, R76:+1, R89:-1, R91:-1, R111:-1, R112:+1, R114:+1, R117:-1, R140:+1, R142:-1, R143:+1, R154:-11, R156:+41, R159:-13, R163:+40, R164:-2, R166:-59.
- init.bind.inline_failure: restore aoss bind error cleanup before the request loop. Deficit 28 -> 12; fuzzy 84.20202 -> 85.16793. Kept, GATE PASS. Call-region counts: R4:-1, R6:-1, R7:+1, R18:+1, R20:-1, R21:+16, R26:+1, R30:+17, R34:-19, R37:+1, R39:-1, R40:+1, R42:+2, R49:-1, R60:+1, R65:-1, R75:+1, R77:-1, R78:+1, R91:-1, R93:-1, R113:-1, R114:+1, R116:+1, R119:-1, R142:+1, R144:-1, R145:+1, R156:-11, R158:+41, R161:-13, R165:+40, R166:-2, R168:-59.
- init.bind.status_save: preserve aoss initial bind status through its guard. Deficit 12 -> 12; fuzzy 85.16793 -> 85.16793. Reverted. Call-region counts: R4:-1, R6:-1, R7:+1, R18:+1, R20:-1, R21:+16, R26:+1, R30:+17, R34:-19, R37:+1, R39:-1, R40:+1, R42:+2, R49:-1, R60:+1, R65:-1, R75:+1, R77:-1, R78:+1, R91:-1, R93:-1, R113:-1, R114:+1, R116:+1, R119:-1, R142:+1, R144:-1, R145:+1, R156:-11, R158:+41, R161:-13, R165:+40, R166:-2, R168:-59.
- init.sleep.ternary: express aoss bounded sleep steps with conditional values. Deficit 12 -> 18; fuzzy 85.16793 -> 85.333336. Kept, GATE PASS. Call-region counts: R4:-1, R6:-1, R7:+1, R18:+1, R21:+16, R26:+1, R30:+17, R34:-19, R37:+1, R40:+1, R42:+2, R49:-1, R60:+1, R65:-1, R75:+1, R78:+1, R91:-1, R93:-1, R114:+1, R116:+1, R119:-1, R142:+1, R145:+1, R156:-11, R158:+42, R161:-13, R165:+40, R166:-2, R168:-59.
- init.sleep.direct: pass aoss bounded waits directly to the sleep callback. Deficit 18 -> 12; fuzzy 85.333336 -> 84.92614. Kept, GATE PASS. Call-region counts: R4:-1, R6:-1, R7:+1, R18:+1, R20:-1, R21:+16, R26:+1, R30:+17, R34:-19, R37:+1, R39:-1, R40:+1, R42:+2, R49:-1, R60:+1, R65:-1, R75:+1, R77:-1, R78:+1, R91:-1, R93:-1, R113:-1, R114:+1, R116:+1, R119:-1, R142:+1, R144:-1, R145:+1, R156:-11, R158:+41, R161:-13, R165:+40, R166:-2, R168:-59.
- init.sleep.reverse: order aoss bounded sleep steps with the short wait first. Deficit 12 -> 6; fuzzy 84.92614 -> 84.540405. Kept, GATE PASS. Call-region counts: R4:-1, R6:-1, R7:+1, R18:+1, R20:-1, R21:+15, R26:+1, R30:+17, R34:-19, R37:+1, R39:-1, R42:+2, R49:-1, R60:+1, R65:-1, R75:+1, R77:-1, R91:-1, R93:-1, R113:-1, R116:+1, R119:-1, R142:+1, R144:-1, R156:-11, R158:+41, R159:-1, R161:-13, R165:+40, R166:-2, R168:-59.
- init.sleep.increment: increment aoss wait attempt counters in place. Deficit 6 -> 6; fuzzy 84.540405 -> 84.6351. Kept, GATE PASS. Call-region counts: R4:-1, R6:-1, R7:+1, R16:-1, R18:+1, R20:-1, R21:+16, R26:+1, R30:+17, R34:-19, R37:+1, R39:-1, R42:+2, R49:-1, R60:+1, R65:-1, R75:+1, R77:-1, R91:-1, R93:-1, R113:-1, R116:+1, R119:-1, R142:+1, R144:-1, R156:-11, R158:+41, R159:-1, R161:-13, R165:+40, R166:-2, R168:-59.
- init.error.state_switch: select aoss retry exhaustion errors by protocol state. Deficit 6 -> 4; fuzzy 84.6351 -> 84.07576. Kept, GATE PASS. Call-region counts: R4:-1, R6:-1, R7:+1, R16:-1, R18:+1, R20:-1, R21:+16, R26:+1, R30:+17, R34:-19, R37:+1, R39:-1, R42:+2, R49:-1, R60:+1, R65:-1, R75:+1, R77:-1, R91:-1, R93:-1, R111:-2, R113:-1, R116:+1, R119:-1, R142:+1, R144:-1, R156:-11, R158:+41, R159:-1, R161:-13, R165:+40, R166:-2, R168:-59.
- init.bind.compare: compare aoss bind failure with zero as the first operand. Deficit 4 -> 4; fuzzy 84.07576 -> 84.07576. Reverted. Call-region counts: R4:-1, R6:-1, R7:+1, R16:-1, R18:+1, R20:-1, R21:+16, R26:+1, R30:+17, R34:-19, R37:+1, R39:-1, R42:+2, R49:-1, R60:+1, R65:-1, R75:+1, R77:-1, R91:-1, R93:-1, R111:-2, R113:-1, R116:+1, R119:-1, R142:+1, R144:-1, R156:-11, R158:+41, R159:-1, R161:-13, R165:+40, R166:-2, R168:-59.
- init.scan.cancel_inline: restore aoss scan cancellation cleanup at the retry boundary. Deficit 4 -> 5; fuzzy 84.07576 -> 84.772095. Kept, GATE PASS. Call-region counts: R4:-1, R6:-1, R7:+1, R16:-1, R18:+1, R20:-1, R28:+1, R30:+17, R36:-2, R39:+1, R41:-1, R44:+2, R51:-1, R62:+1, R67:-1, R77:+1, R79:-1, R93:-1, R95:-1, R113:-2, R115:-1, R118:+1, R121:-1, R144:+1, R146:-1, R158:-11, R160:+41, R161:-1, R163:-13, R167:+40, R168:-2, R170:-59.
- init.scan.ip_exit: exit immediately after aoss initial ip configuration failure. Deficit 5 -> 5; fuzzy 84.772095 -> 84.772095. Reverted. Call-region counts: R4:-1, R6:-1, R7:+1, R16:-1, R18:+1, R20:-1, R28:+1, R30:+17, R36:-2, R39:+1, R41:-1, R44:+2, R51:-1, R62:+1, R67:-1, R77:+1, R79:-1, R93:-1, R95:-1, R113:-2, R115:-1, R118:+1, R121:-1, R144:+1, R146:-1, R158:-11, R160:+41, R161:-1, R163:-13, R167:+40, R168:-2, R170:-59.
- init.final.outcome_errors: place aoss final error status before its success conversion. Deficit 5 -> 5; fuzzy 84.772095 -> 85.244316. Kept, GATE PASS. Call-region counts: R4:-1, R6:-1, R7:+1, R16:-1, R18:+1, R20:-1, R28:+1, R30:+17, R36:-2, R39:+1, R41:-1, R44:+2, R51:-1, R62:+1, R67:-1, R77:+1, R79:-1, R93:-1, R95:-1, R113:-2, R115:-1, R118:+1, R121:-1, R144:+1, R146:-1, R158:-11, R160:+41, R161:-1, R163:-13, R167:-5, R170:-2, R172:-14.
- init.frame.time_order: declare the aoss timeval with the poll argument arrays. Deficit 5 -> 5; fuzzy 85.244316 -> 85.244316. Reverted. Call-region counts: R4:-1, R6:-1, R7:+1, R16:-1, R18:+1, R20:-1, R28:+1, R30:+17, R36:-2, R39:+1, R41:-1, R44:+2, R51:-1, R62:+1, R67:-1, R77:+1, R79:-1, R93:-1, R95:-1, R113:-2, R115:-1, R118:+1, R121:-1, R144:+1, R146:-1, R158:-11, R160:+41, R161:-1, R163:-13, R167:-5, R170:-2, R172:-14.
- init.frame.time_alignment: preserve natural doubleword alignment for aoss poll time. Deficit 5 -> 5; fuzzy 85.244316 -> 85.244316. Reverted. Call-region counts: R4:-1, R6:-1, R7:+1, R16:-1, R18:+1, R20:-1, R28:+1, R30:+17, R36:-2, R39:+1, R41:-1, R44:+2, R51:-1, R62:+1, R67:-1, R77:+1, R79:-1, R93:-1, R95:-1, R113:-2, R115:-1, R118:+1, R121:-1, R144:+1, R146:-1, R158:-11, R160:+41, R161:-1, R163:-13, R167:-5, R170:-2, R172:-14.
- init.frame.time_array: store aoss poll time in a two element signed array. Deficit 5 -> 7; fuzzy 85.244316 -> 85.16099. Reverted. Call-region counts: R4:-1, R6:-1, R7:+1, R16:-1, R18:+1, R20:-1, R28:+1, R30:+17, R36:-2, R39:+1, R41:-1, R44:+2, R51:-1, R62:+1, R67:-1, R77:+1, R79:-1, R93:-1, R95:-1, R112:+2, R113:-2, R115:-1, R118:+1, R121:-1, R144:+1, R146:-1, R158:-11, R160:+41, R161:-1, R163:-13, R167:-5, R170:-2, R172:-14.
- init.frame.wait_address: initialize the aoss received count before the wait word. Deficit 5 -> 5; fuzzy 85.244316 -> 85.24369. Reverted. Call-region counts: R4:-1, R6:-1, R7:+1, R16:-1, R18:+1, R20:-1, R28:+1, R30:+17, R36:-2, R39:+1, R41:-1, R44:+2, R51:-1, R62:+1, R67:-1, R77:+1, R79:-1, R93:-1, R95:-1, R113:-2, R115:-1, R118:+1, R121:-1, R144:+1, R146:-1, R158:-11, R160:+41, R161:-1, R163:-13, R167:-5, R170:-2, R172:-14.
- init.manufacturer.length: save the aoss manufacturer length before narrowing it. Deficit 5 -> 5; fuzzy 85.244316 -> 85.244316. Reverted. Call-region counts: R4:-1, R6:-1, R7:+1, R16:-1, R18:+1, R20:-1, R28:+1, R30:+17, R36:-2, R39:+1, R41:-1, R44:+2, R51:-1, R62:+1, R67:-1, R77:+1, R79:-1, R93:-1, R95:-1, R113:-2, R115:-1, R118:+1, R121:-1, R144:+1, R146:-1, R158:-11, R160:+41, R161:-1, R163:-13, R167:-5, R170:-2, R172:-14.
- init.final.return: return the aoss settings conversion outcome directly. Deficit 5 -> 5; fuzzy 85.244316 -> 85.244316. Reverted. Call-region counts: R4:-1, R6:-1, R7:+1, R16:-1, R18:+1, R20:-1, R28:+1, R30:+17, R36:-2, R39:+1, R41:-1, R44:+2, R51:-1, R62:+1, R67:-1, R77:+1, R79:-1, R93:-1, R95:-1, R113:-2, R115:-1, R118:+1, R121:-1, R144:+1, R146:-1, R158:-11, R160:+41, R161:-1, R163:-13, R167:-5, R170:-2, R172:-14.
- init.frame.byte_records: use aligned byte storage for the aoss request record view. Build failed; reverted.
- init.manufacturer.bound: preserve the inclusive aoss manufacturer length limit. Deficit 5 -> 5; fuzzy 85.244316 -> 85.24495. Kept, GATE PASS. Call-region counts: R4:-1, R6:-1, R7:+1, R16:-1, R18:+1, R20:-1, R28:+1, R30:+17, R36:-2, R39:+1, R41:-1, R44:+2, R51:-1, R62:+1, R67:-1, R77:+1, R79:-1, R93:-1, R95:-1, R113:-2, R115:-1, R118:+1, R121:-1, R144:+1, R146:-1, R158:-11, R160:+41, R161:-1, R163:-13, R167:-5, R170:-2, R172:-14.
- init.frame.byte_records: use aligned byte storage for the aoss request record view. Deficit 5 -> 4; fuzzy 85.24495 -> 84.382576. Kept, GATE PASS. Call-region counts: R1:-1, R4:-1, R6:-1, R7:+1, R16:-1, R18:+1, R20:-1, R28:+1, R30:+17, R36:-2, R39:+1, R41:-1, R44:+2, R48:+2, R51:-1, R67:-1, R77:+1, R79:-1, R93:-1, R95:-1, R112:-1, R113:-2, R115:-1, R118:+1, R121:-1, R144:+1, R146:-1, R158:-11, R160:+41, R161:-1, R163:-13, R167:-5, R170:-2, R172:-14.
- init.manufacturer.failure: skip aoss manufacturer copying before its success block. Deficit 4 -> 4; fuzzy 84.382576 -> 84.382576. Reverted. Call-region counts: R1:-1, R4:-1, R6:-1, R7:+1, R16:-1, R18:+1, R20:-1, R28:+1, R30:+17, R36:-2, R39:+1, R41:-1, R44:+2, R48:+2, R51:-1, R67:-1, R77:+1, R79:-1, R93:-1, R95:-1, R112:-1, R113:-2, R115:-1, R118:+1, R121:-1, R144:+1, R146:-1, R158:-11, R160:+41, R161:-1, R163:-13, R167:-5, R170:-2, R172:-14.
- init.defaults.signed_checks: load signed aoss option sentinels before storing their halfwords. Deficit 4 -> 2; fuzzy 84.382576 -> 84.083336. Kept, GATE PASS. Call-region counts: R1:-1, R2:-2, R4:-1, R6:-1, R7:+1, R16:-1, R18:+1, R20:-1, R28:+1, R30:+17, R36:-2, R39:+1, R41:-1, R44:+2, R48:+2, R51:-1, R67:-1, R77:+1, R79:-1, R93:-1, R95:-1, R112:-1, R113:-2, R115:-1, R118:+1, R121:-1, R144:+1, R146:-1, R158:-11, R160:+41, R161:-1, R163:-13, R167:-5, R170:-2, R172:-14.
- init.record.address_view: copy aoss request identities through the raw address cursor. Deficit 2 -> 0; fuzzy 84.083336 -> 83.99811. Kept, GATE PASS. Call-region counts: R1:-1, R2:-2, R4:-1, R6:-1, R7:+1, R16:-1, R18:+1, R20:-1, R28:+1, R30:+17, R36:-2, R39:+1, R41:-1, R44:+2, R48:+1, R51:-2, R67:-1, R77:+1, R79:-1, R93:-1, R95:-1, R112:-1, R113:-2, R115:-1, R118:+1, R121:-1, R144:+1, R146:-1, R158:-11, R160:+41, R161:-1, R163:-13, R167:-5, R170:-2, R172:-14.
- init.frame.byte_memset: clear aligned aoss request storage using its byte array. Deficit 0 -> 0; fuzzy 83.99811 -> 83.99811. Reverted. Call-region counts: R1:-1, R2:-2, R4:-1, R6:-1, R7:+1, R16:-1, R18:+1, R20:-1, R28:+1, R30:+17, R36:-2, R39:+1, R41:-1, R44:+2, R48:+1, R51:-2, R67:-1, R77:+1, R79:-1, R93:-1, R95:-1, R112:-1, R113:-2, R115:-1, R118:+1, R121:-1, R144:+1, R146:-1, R158:-11, R160:+41, R161:-1, R163:-13, R167:-5, R170:-2, R172:-14.
- init.record.length_bound: limit aoss identity initialization by the actual record count. Deficit 0 -> 0; fuzzy 83.99811 -> 83.99495. Reverted. Call-region counts: R1:-1, R2:-2, R4:-1, R6:-1, R7:+1, R16:-1, R18:+1, R20:-1, R28:+1, R30:+17, R36:-2, R39:+1, R41:-1, R44:+2, R48:+1, R51:-2, R67:-1, R77:+1, R79:-1, R93:-1, R95:-1, R112:-1, R113:-2, R115:-1, R118:+1, R121:-1, R144:+1, R146:-1, R158:-11, R160:+41, R161:-1, R163:-13, R167:-5, R170:-2, R172:-14.
- hello.crc.loop: update the aoss hello checksum with an indexed byte loop. Deficit 3 -> 3; fuzzy 86.67033 -> 86.67033. Reverted. Call-region counts: R0:-2, R3:+1, R4:+2, R8:+1, R23:+1.
- hello.crc.pointer: walk the aoss hello checksum bytes with an end pointer. Deficit 3 -> 39; fuzzy 86.67033 -> 77.08059. Reverted. Call-region counts: R0:-2, R3:+1, R5:+38, R8:+1, R23:+1.
- hello.crc.narrow_index: bound the aoss hello crc walk with a byte index. Deficit 3 -> 3; fuzzy 86.67033 -> 86.67033. Reverted. Call-region counts: R0:-2, R3:+1, R4:+2, R8:+1, R23:+1.
- hello.crc.global: read the aoss hello crc table through its named array. Deficit 3 -> 3; fuzzy 86.67033 -> 86.67033. Reverted. Call-region counts: R0:-2, R3:+1, R4:+2, R8:+1, R23:+1.
- hello.crc.signed: retain the aoss hello checksum as a signed work value. Deficit 3 -> 3; fuzzy 86.67033 -> 86.67033. Reverted. Call-region counts: R0:-2, R3:+1, R4:+2, R8:+1, R23:+1.
- hello.globals.runtime: retain a named runtime view while constructing the aoss hello. Deficit 3 -> 3; fuzzy 86.67033 -> 84.56044. Reverted. Call-region counts: R0:-3, R3:+1, R4:+2, R8:+1, R23:+2.
- hello.globals.nonce: retain the aoss packet nonce view through key initialization. Deficit 3 -> 3; fuzzy 86.67033 -> 86.67033. Reverted. Call-region counts: R0:-2, R3:+1, R4:+2, R8:+1, R23:+1.
- hello.globals.send: read the aoss runtime view in the destination scope. Deficit 3 -> 3; fuzzy 86.67033 -> 86.67033. Reverted. Call-region counts: R0:-2, R3:+1, R4:+2, R8:+1, R23:+1.
- hello.rc4.indices: publish aoss key schedule indices when they are computed. Deficit 3 -> 3; fuzzy 86.67033 -> 82.91209. Reverted. Call-region counts: R0:-2, R3:+1, R4:+2, R8:+1, R23:+1.
- hello.rc4.array: store aoss encrypted bytes through their payload field. Deficit 3 -> 3; fuzzy 86.67033 -> 86.67033. Reverted. Call-region counts: R0:-2, R3:+1, R4:+2, R8:+1, R23:+1.
- hello.rc4.input: load the aoss plaintext byte before its key stream byte. Deficit 3 -> 3; fuzzy 86.67033 -> 86.59707. Reverted. Call-region counts: R0:-2, R3:+1, R4:+2, R8:+1, R23:+1.
- hello.send.length: derive aoss hello send length immediately before sending. Deficit 3 -> 4; fuzzy 86.67033 -> 85.24176. Reverted. Call-region counts: R0:-2, R3:+1, R4:+2, R8:+1, R21:+2, R23:+1, R24:-1.
- hello.send.unsigned: keep the aoss hello payload length unsigned. Deficit 3 -> 3; fuzzy 86.67033 -> 86.67033. Reverted. Call-region counts: R0:-2, R3:+1, R4:+2, R8:+1, R23:+1.
- hello.send.encrypt_success: order the aoss hello identity success path first. Deficit 3 -> 3; fuzzy 86.67033 -> 86.67033. Reverted. Call-region counts: R0:-2, R3:+1, R4:+2, R8:+1, R23:+1.
- hello.send.full_length: carry the aoss hello length in a full width local. Deficit 3 -> 3; fuzzy 86.67033 -> 86.67033. Reverted. Call-region counts: R0:-2, R3:+1, R4:+2, R8:+1, R23:+1.
- hello.send.full_send: narrow the aoss hello send length at the socket call. Deficit 3 -> 4; fuzzy 86.67033 -> 85.95605. Reverted. Call-region counts: R0:-2, R3:+1, R4:+2, R8:+1, R21:+1, R23:+1.
- hello.send.sequence: carry the aoss hello sequence as an unsigned halfword. Deficit 3 -> 3; fuzzy 86.67033 -> 86.67033. Reverted. Call-region counts: R0:-2, R3:+1, R4:+2, R8:+1, R23:+1.
- hello.crc.split: calculate the aoss hello crc in two four byte passes. Deficit 3 -> 3; fuzzy 86.67033 -> 89.14652. Kept, GATE PASS. Call-region counts: R0:-2, R3:+1, R4:+1, R5:+1, R8:+1, R23:+1.
- hello.crc.decrement: walk the aoss hello crc bytes with a remaining count. Build failed; reverted.
- hello.crc.table_scope: acquire the aoss crc table after initializing it. Deficit 3 -> 3; fuzzy 89.14652 -> 88.15751. Reverted. Call-region counts: R0:-2, R3:+1, R4:+2, R8:+1, R23:+1.
- hello.crc.cut1: split aoss crc traversal after 1 bytes. Deficit 3 -> 3; fuzzy 89.14652 -> 89.62637. Kept, GATE PASS. Call-region counts: R0:-2, R3:+1, R4:+1, R5:+1, R8:+1, R23:+1.
- hello.crc.second_index: start the second aoss crc pass from its first byte. Deficit 3 -> 21; fuzzy 89.62637 -> 84.7033. Reverted. Call-region counts: R0:-2, R3:+1, R4:+2, R5:+18, R8:+1, R23:+1.
- hello.crc.cut2: split aoss crc traversal after 2 bytes. Deficit 3 -> 3; fuzzy 89.62637 -> 88.871796. Reverted. Call-region counts: R0:-2, R3:+1, R4:+1, R5:+1, R8:+1, R23:+1.
- hello.crc.cut3: split aoss crc traversal after 3 bytes. Deficit 3 -> 3; fuzzy 89.62637 -> 89.091576. Reverted. Call-region counts: R0:-2, R3:+1, R4:+1, R5:+1, R8:+1, R23:+1.
- hello.crc.cut4: split aoss crc traversal after 4 bytes. Deficit 3 -> 3; fuzzy 89.62637 -> 89.14652. Reverted. Call-region counts: R0:-2, R3:+1, R4:+1, R5:+1, R8:+1, R23:+1.
- hello.crc.cut5: split aoss crc traversal after 5 bytes. Deficit 3 -> 3; fuzzy 89.62637 -> 87.81319. Reverted. Call-region counts: R0:-2, R3:+1, R4:+1, R5:+1, R8:+1, R23:+1.
- hello.crc.cut6: split aoss crc traversal after 6 bytes. Deficit 3 -> 3; fuzzy 89.62637 -> 85.827835. Reverted. Call-region counts: R0:-2, R3:+1, R4:+1, R5:+1, R8:+1, R23:+1.
- hello.crc.cut7: split aoss crc traversal after 7 bytes. Deficit 3 -> 3; fuzzy 89.62637 -> 86.57876. Reverted. Call-region counts: R0:-2, R3:+1, R4:+1, R5:+1, R8:+1, R23:+1.
- hello.crc.restart: restart the second aoss crc pass at its split boundary. Deficit 3 -> 3; fuzzy 89.62637 -> 86.67033. Reverted. Call-region counts: R0:-2, R3:+1, R4:+2, R8:+1, R23:+1.
- hello.crc.nested_parts: calculate the aoss hello crc as two indexed halves. Deficit 3 -> 2; fuzzy 89.62637 -> 89.78022. Kept, GATE PASS. Call-region counts: R0:-2, R3:+1, R5:+1, R8:+1, R23:+1.
- hello.crc.parts1: calculate aoss crc in 1 equal parts. Deficit 2 -> 2; fuzzy 89.78022 -> 87.69963. Reverted. Call-region counts: R0:-2, R3:+1, R5:+1, R8:+1, R23:+1.
- hello.crc.parts4: calculate aoss crc in 4 equal parts. Deficit 2 -> 2; fuzzy 89.78022 -> 89.78022. Reverted. Call-region counts: R0:-2, R3:+1, R5:+1, R8:+1, R23:+1.
- hello.crc.parts8: calculate aoss crc in 8 equal parts. Deficit 2 -> 2; fuzzy 89.78022 -> 91.40659. Kept, GATE PASS. Call-region counts: R0:-2, R3:+1, R5:+1, R8:+1, R23:+1.
- hello.crc.parts_signed: use signed indices for the aoss crc halves. Deficit 2 -> 2; fuzzy 91.40659 -> 91.40659. Reverted. Call-region counts: R0:-2, R3:+1, R5:+1, R8:+1, R23:+1.
- hello.crc.simple_index: walk aoss crc bytes with a dedicated checksum index. Deficit 2 -> 3; fuzzy 91.40659 -> 86.67033. Reverted. Call-region counts: R0:-2, R3:+1, R4:+2, R8:+1, R23:+1.
- hello.crc.word_parts: simplify the aoss crc half traversal into byte indices. Deficit 2 -> 3; fuzzy 91.40659 -> 86.67033. Reverted. Call-region counts: R0:-2, R3:+1, R4:+2, R8:+1, R23:+1.
- hello.crc.review_halves: retain two four-byte checksum passes; reject eight one-byte parts because the inner one-iteration loop is redundant source. Deficit 2; fuzzy 89.780220, above the 86.670330 entry. GATE PASS. The earlier second_index trial was invalid after its split changed to 1 and is excluded from exhaustion evidence.
- zi.minimum.native: compare candidate word length with its native minimum field. Deficit -3 -> 0; fuzzy 87.00405 -> 86.92727. Kept, GATE PASS. Call-region counts: R1:+1, R4:+1, R8:-1, R13:-2, R25:+1, R26:+1, R35:-1, R37:+1, R41:-1, R42:-1, R44:+1, R46:+1, R47:-1, R51:+1, R55:+2, R57:-6, R59:-1, R60:+105, R61:+1, R62:-1, R64:+1, R65:+1, R66:+1, R67:-104, R68:+1, R70:-1.
- zi.entry.workspace: read candidate workspace fields through a typed local. Deficit 0 -> -1; fuzzy 86.92727 -> 86.21642. Reverted. Call-region counts: R3:+1, R7:-1, R12:-2, R24:+1, R25:+1, R34:-1, R36:+1, R40:-1, R41:-1, R43:+1, R45:+1, R46:-1, R50:+1, R54:+2, R56:-6, R58:-1, R59:+105, R60:+1, R61:-1, R63:+1, R64:+1, R65:+1, R66:-104, R67:+1, R69:-1.
- zi.entry.bounds: use native byte input counts in candidate normalization. Deficit 0 -> 0; fuzzy 86.92727 -> 86.92727. Reverted. Call-region counts: R1:+1, R4:+1, R8:-1, R13:-2, R25:+1, R26:+1, R35:-1, R37:+1, R41:-1, R42:-1, R44:+1, R46:+1, R47:-1, R51:+1, R55:+2, R57:-6, R59:-1, R60:+105, R61:+1, R62:-1, R64:+1, R65:+1, R66:+1, R67:-104, R68:+1, R70:-1.
- zi.entry.increments: increment candidate normalization cursors in place. Deficit 0 -> 0; fuzzy 86.92727 -> 86.92727. Reverted. Call-region counts: R1:+1, R4:+1, R8:-1, R13:-2, R25:+1, R26:+1, R35:-1, R37:+1, R41:-1, R42:-1, R44:+1, R46:+1, R47:-1, R51:+1, R55:+2, R57:-6, R59:-1, R60:+105, R61:+1, R62:-1, R64:+1, R65:+1, R66:+1, R67:-104, R68:+1, R70:-1.
- zi.prefix.comparisons: compare native candidate prefix and suffix lengths first. Deficit 0 -> 0; fuzzy 86.92727 -> 86.92093. Reverted. Call-region counts: R1:+1, R4:+1, R8:-1, R13:-2, R25:+1, R26:+1, R35:-1, R37:+1, R41:-1, R42:-1, R44:+1, R46:+1, R47:-1, R51:+1, R55:+2, R57:-6, R59:-1, R60:+105, R61:+1, R62:-1, R64:+1, R65:+1, R66:+1, R67:-104, R68:+1, R70:-1.
- zi.prefix.characters: name each copied candidate prefix and suffix character. Deficit 0 -> -8; fuzzy 86.92727 -> 84.69032. Reverted. Call-region counts: R3:+1, R7:-1, R12:-2, R20:-2, R21:-2, R24:+1, R25:+1, R28:+1, R30:-1, R33:-1, R34:-1, R36:+1, R37:-1, R40:-1, R43:+1, R45:+1, R46:-1, R49:+1, R50:+1, R51:-1, R54:+2, R56:-6, R58:-1, R59:+105, R60:+1, R61:-1, R63:+1, R64:+1, R65:+1, R66:-104, R67:+1, R69:-1, R71:-2.
- zi.dictionary.bounds: use the native candidate dictionary count in traversal. Deficit 0 -> 0; fuzzy 86.92727 -> 86.92727. Reverted. Call-region counts: R1:+1, R4:+1, R8:-1, R13:-2, R25:+1, R26:+1, R35:-1, R37:+1, R41:-1, R42:-1, R44:+1, R46:+1, R47:-1, R51:+1, R55:+2, R57:-6, R59:-1, R60:+105, R61:+1, R62:-1, R64:+1, R65:+1, R66:+1, R67:-104, R68:+1, R70:-1.
- zi.dictionary.exact: set candidate exact matching before selecting each dictionary. Deficit 0 -> 0; fuzzy 86.92727 -> 86.833755. Reverted. Call-region counts: R1:+1, R4:+1, R8:-1, R13:-2, R25:+1, R26:+1, R35:-1, R37:+1, R41:-1, R42:-1, R44:+1, R46:+1, R47:-1, R51:+1, R55:+2, R57:-6, R59:-1, R60:+105, R61:+1, R62:-1, R64:+1, R65:+1, R66:+1, R67:-104, R68:+1, R70:-1.
- zi.dictionary.kind: dispatch candidate dictionary kinds as unsigned values. Deficit 0 -> 0; fuzzy 86.92727 -> 86.92727. Reverted. Call-region counts: R1:+1, R4:+1, R8:-1, R13:-2, R25:+1, R26:+1, R35:-1, R37:+1, R41:-1, R42:-1, R44:+1, R46:+1, R47:-1, R51:+1, R55:+2, R57:-6, R59:-1, R60:+105, R61:+1, R62:-1, R64:+1, R65:+1, R66:+1, R67:-104, R68:+1, R70:-1.
- zi.emit.bounds: compare the candidate count against its native maximum. Deficit 0 -> 0; fuzzy 86.92727 -> 86.92727. Reverted. Call-region counts: R1:+1, R4:+1, R8:-1, R13:-2, R25:+1, R26:+1, R35:-1, R37:+1, R41:-1, R42:-1, R44:+1, R46:+1, R47:-1, R51:+1, R55:+2, R57:-6, R59:-1, R60:+105, R61:+1, R62:-1, R64:+1, R65:+1, R66:+1, R67:-104, R68:+1, R70:-1.
- zi.retry.signed: compare candidate workspace prefix lengths as signed integers. Deficit 0 -> 0; fuzzy 86.92727 -> 86.90142. Reverted. Call-region counts: R1:+1, R4:+1, R8:-1, R13:-2, R25:+1, R26:+1, R35:-1, R37:+1, R41:-1, R42:-1, R44:+1, R46:+1, R47:-1, R51:+1, R55:+2, R57:-6, R59:-1, R60:+105, R61:+1, R62:-1, R64:+1, R65:+1, R66:+1, R67:-104, R68:+1, R70:-1.
- zi.retry.native_loop: copy alternate candidate prefixes using their native count. Deficit 0 -> 0; fuzzy 86.92727 -> 86.92727. Reverted. Call-region counts: R1:+1, R4:+1, R8:-1, R13:-2, R25:+1, R26:+1, R35:-1, R37:+1, R41:-1, R42:-1, R44:+1, R46:+1, R47:-1, R51:+1, R55:+2, R57:-6, R59:-1, R60:+105, R61:+1, R62:-1, R64:+1, R65:+1, R66:+1, R67:-104, R68:+1, R70:-1.
- zi.retry.swap: order alternate candidate prefixes before punctuation extension. Deficit 0 -> -2; fuzzy 86.92727 -> 90.08895. Kept, GATE PASS. Call-region counts: R1:+1, R4:+1, R8:-1, R13:-2, R25:+1, R26:+1, R35:-1, R37:+1, R42:-1, R44:+1, R46:+1, R51:+1, R55:+3, R57:-6, R59:-1, R60:-1, R62:-1, R66:+1, R67:+1, R68:+1, R69:-1, R70:-1.
- zi.retry.native_signed: compare native candidate retry prefix counts after dispatch. Deficit -2 -> -2; fuzzy 90.08895 -> 90.12266. Kept, GATE PASS. Call-region counts: R1:+1, R4:+1, R8:-1, R13:-2, R25:+1, R26:+1, R35:-1, R37:+1, R42:-1, R44:+1, R46:+1, R51:+1, R55:+3, R57:-6, R59:-1, R60:-1, R62:-1, R66:+1, R67:+1, R68:+1, R69:-1, R70:-1.
- zi.minimum.reverse: compare the candidate minimum length before the word length. Deficit -2 -> -2; fuzzy 90.12266 -> 90.19742. Kept, GATE PASS. Call-region counts: R1:+1, R4:+1, R8:-1, R13:-2, R25:+1, R26:+1, R35:-1, R37:+1, R42:-1, R44:+1, R46:+1, R51:+1, R55:+3, R57:-6, R59:-1, R60:-1, R62:-1, R66:+1, R67:+1, R68:+1, R69:-1, R70:-1.
- zi.finish.increments: advance candidate output and count indices in place. Deficit -2 -> -2; fuzzy 90.19742 -> 90.19742. Reverted. Call-region counts: R1:+1, R4:+1, R8:-1, R13:-2, R25:+1, R26:+1, R35:-1, R37:+1, R42:-1, R44:+1, R46:+1, R51:+1, R55:+3, R57:-6, R59:-1, R60:-1, R62:-1, R66:+1, R67:+1, R68:+1, R69:-1, R70:-1.
- zi.finish.dict_bound: compare candidate dictionary indices at their native width. Deficit -2 -> -2; fuzzy 90.19742 -> 90.19742. Reverted. Call-region counts: R1:+1, R4:+1, R8:-1, R13:-2, R25:+1, R26:+1, R35:-1, R37:+1, R42:-1, R44:+1, R46:+1, R51:+1, R55:+3, R57:-6, R59:-1, R60:-1, R62:-1, R66:+1, R67:+1, R68:+1, R69:-1, R70:-1.
- zi.finish.terminator: write the candidate terminator at its explicit prefix start. Deficit -2 -> -2; fuzzy 90.19742 -> 90.12468. Reverted. Call-region counts: R1:+1, R4:+1, R8:-1, R13:-2, R25:+1, R26:+1, R35:-1, R37:+1, R42:-1, R44:+1, R46:+1, R51:+1, R55:+3, R57:-6, R59:-1, R60:-1, R62:-1, R66:+1, R67:+1, R68:+1, R69:-1, R70:-1.
- zi.punctuation.increment: advance candidate punctuation cursors in place. Deficit -2 -> -2; fuzzy 90.19742 -> 90.19742. Reverted. Call-region counts: R1:+1, R4:+1, R8:-1, R13:-2, R25:+1, R26:+1, R35:-1, R37:+1, R42:-1, R44:+1, R46:+1, R51:+1, R55:+3, R57:-6, R59:-1, R60:-1, R62:-1, R66:+1, R67:+1, R68:+1, R69:-1, R70:-1.
- zi.punctuation.bound: compare candidate punctuation upper bounds in native order. Deficit -2 -> -2; fuzzy 90.19742 -> 90.19742. Reverted. Call-region counts: R1:+1, R4:+1, R8:-1, R13:-2, R25:+1, R26:+1, R35:-1, R37:+1, R42:-1, R44:+1, R46:+1, R51:+1, R55:+3, R57:-6, R59:-1, R60:-1, R62:-1, R66:+1, R67:+1, R68:+1, R69:-1, R70:-1.
- zi.case.work: use a typed workspace while choosing word case. Build failed; reverted.
- zi.case.type_int: carry word case selection in a int local. Deficit 0 -> 0; fuzzy 99.09091 -> 99.09091. Reverted. Call-region counts: .
- zi.case.type_unsigned: carry word case selection in a unsigned local. Deficit 0 -> 0; fuzzy 99.09091 -> 99.09091. Reverted. Call-region counts: .
- zi.case.type_byte: carry word case selection in a byte local. Deficit 0 -> 0; fuzzy 99.09091 -> 99.09091. Reverted. Call-region counts: .
- zi.case.type_bool: carry word case selection in a bool local. Deficit 0 -> 0; fuzzy 99.09091 -> 99.09091. Reverted. Call-region counts: .
- zi.case.cursor: advance case conversion cursor after each character call. Deficit 0 -> 0; fuzzy 99.09091 -> 90.0. Reverted. Call-region counts: R0:+1, R2:-1.
- zi.case.work: use a typed workspace while choosing word case. Deficit 0 -> 3; fuzzy 99.09091 -> 81.36364. Reverted. Call-region counts: R0:+1, R2:+2.
- zi.case.mode: name the current word case mode before dispatch. Deficit 0 -> 3; fuzzy 99.09091 -> 80.568184. Reverted. Call-region counts: R0:+1, R2:+2.
- zi.maximum.reverse: compare candidate word and prefix length before its maximum. Deficit -2 -> -2; fuzzy 90.19742 -> 90.19742. Reverted. Call-region counts: R1:+1, R4:+1, R8:-1, R13:-2, R25:+1, R26:+1, R35:-1, R37:+1, R42:-1, R44:+1, R46:+1, R51:+1, R55:+3, R57:-6, R59:-1, R60:-1, R62:-1, R66:+1, R67:+1, R68:+1, R69:-1, R70:-1.
- zi.shortest.reverse: compare candidate shortest bounds before the combined length. Deficit -2 -> -2; fuzzy 90.19742 -> 90.12139. Reverted. Call-region counts: R1:+1, R4:+1, R8:-1, R13:-2, R25:+1, R26:+1, R35:-1, R37:+1, R42:-1, R44:+1, R46:+1, R51:+1, R55:+3, R57:-6, R59:-1, R60:-1, R62:-1, R63:-1, R64:+1, R66:+1, R67:+1, R68:+1, R69:-1, R70:-1.
- zi.longest.reverse: compare the combined candidate length before the longest bound. Deficit -2 -> -2; fuzzy 90.19742 -> 90.119865. Reverted. Call-region counts: R1:+1, R4:+1, R8:-1, R13:-2, R25:+1, R26:+1, R35:-1, R37:+1, R42:-1, R44:+1, R46:+1, R51:+1, R55:+3, R57:-6, R59:-1, R60:-1, R62:-1, R66:+1, R67:+1, R68:+1, R69:-1, R70:-1.
- zi.phonetic.append: restore the target phonetic suffix index and length increment. Deficit -2 -> -2; fuzzy 90.19742 -> 90.19361. Reverted. Call-region counts: R1:+1, R4:+1, R8:-1, R13:-2, R25:+1, R26:+1, R35:-1, R37:+1, R42:-1, R44:+1, R46:+1, R51:+1, R55:+3, R57:-6, R59:-1, R60:-1, R62:-1, R66:+1, R67:+1, R68:+1, R69:-1, R70:-1.
- zi.phonetic.native_length: compare phonetic candidate lengths at their native byte width. Deficit -2 -> -3; fuzzy 90.19742 -> 90.141914. Reverted. Call-region counts: R1:+1, R4:+1, R8:-1, R13:-2, R25:+1, R26:+1, R35:-1, R37:+1, R42:-1, R44:+1, R46:+1, R53:-1, R54:+1, R55:+3, R57:-6, R59:-1, R60:-1, R62:-1, R66:+1, R67:+1, R68:+1, R69:-1, R70:-1.
- zi.finish.pointer: test the candidate highlighted word pointer directly. Deficit -2 -> -1; fuzzy 90.19742 -> 90.22073. Kept, GATE PASS. Call-region counts: R1:+1, R4:+1, R8:-1, R13:-2, R25:+1, R26:+1, R35:-1, R37:+1, R42:-1, R44:+1, R46:+1, R51:+1, R55:+3, R57:-6, R59:-1, R60:-1, R62:-1, R66:+1, R67:+1, R68:+1, R69:-1.
- zi.retry.last_punctuation: restore the target punctuation test before candidate completion. Deficit -1 -> -1; fuzzy 90.22073 -> 90.21946. Reverted. Call-region counts: R1:+1, R4:+1, R8:-1, R13:-2, R25:+1, R26:+1, R35:-1, R37:+1, R42:-1, R44:+1, R46:+1, R51:+1, R55:+3, R57:-6, R59:-1, R60:-1, R62:-1, R66:+1, R67:+1, R68:+1, R69:-1.
- zi.retry.next_punctuation: restore the next element index in the candidate punctuation retry. Deficit -1 -> -1; fuzzy 90.22073 -> 90.21946. Reverted. Call-region counts: R1:+1, R4:+1, R8:-1, R13:-2, R25:+1, R26:+1, R35:-1, R37:+1, R42:-1, R44:+1, R46:+1, R51:+1, R55:+3, R57:-6, R59:-1, R60:-1, R62:-1, R66:+1, R67:+1, R68:+1, R69:-1.
- zi.retry.native_lengths: use native prefix and suffix byte lengths in candidate retry tests. Deficit -1 -> -1; fuzzy 90.22073 -> 90.22073. Reverted. Call-region counts: R1:+1, R4:+1, R8:-1, R13:-2, R25:+1, R26:+1, R35:-1, R37:+1, R42:-1, R44:+1, R46:+1, R51:+1, R55:+3, R57:-6, R59:-1, R60:-1, R62:-1, R66:+1, R67:+1, R68:+1, R69:-1.
- zi.phonetic.increment: restore phonetic suffix length with an in place increment. Deficit -1 -> -1; fuzzy 90.22073 -> 90.21693. Reverted. Call-region counts: R1:+1, R4:+1, R8:-1, R13:-2, R25:+1, R26:+1, R35:-1, R37:+1, R42:-1, R44:+1, R46:+1, R51:+1, R55:+3, R57:-6, R59:-1, R60:-1, R62:-1, R66:+1, R67:+1, R68:+1, R69:-1.
- zi.phonetic.increment_assign: restore phonetic suffix length with a compound increment. Deficit -1 -> -1; fuzzy 90.22073 -> 90.21693. Reverted. Call-region counts: R1:+1, R4:+1, R8:-1, R13:-2, R25:+1, R26:+1, R35:-1, R37:+1, R42:-1, R44:+1, R46:+1, R51:+1, R55:+3, R57:-6, R59:-1, R60:-1, R62:-1, R66:+1, R67:+1, R68:+1, R69:-1.
- zi.phonetic.saved_length: restore the target phonetic suffix through its next position. Deficit -1 -> -2; fuzzy 90.22073 -> 90.16473. Reverted. Call-region counts: R1:+1, R4:+1, R8:-1, R13:-2, R25:+1, R26:+1, R35:-1, R37:+1, R42:-1, R44:+1, R46:+1, R53:-1, R54:+1, R55:+3, R57:-6, R59:-1, R60:-1, R62:-1, R66:+1, R67:+1, R68:+1, R69:-1.
- zi.table.saved_result: name the primary candidate table flags before testing context. Deficit -1 -> -5; fuzzy 90.22073 -> 87.95515. Reverted. Call-region counts: R7:-1, R12:-2, R24:+1, R25:+1, R34:-1, R36:+1, R41:-1, R43:+1, R45:+1, R50:+1, R54:+3, R56:-6, R58:-1, R59:-1, R61:-1, R65:+1, R66:+1, R67:+1, R68:-1, R71:-2.
- zi.table.integer_result: carry primary candidate table flags in an integer local. Deficit -1 -> -7; fuzzy 90.22073 -> 87.95337. Reverted. Call-region counts: R3:-1, R7:-1, R12:-2, R24:+1, R25:+1, R34:-1, R36:+1, R40:-1, R41:-1, R43:+1, R44:-1, R45:+1, R50:+1, R54:+3, R56:-6, R58:-1, R59:-1, R61:-1, R65:+1, R66:+1, R67:+1, R68:-1, R69:+1, R71:-2.
- zi.table.initial_flags: use saved primary table flags for candidate context selection. Deficit -1 -> -2; fuzzy 90.22073 -> 90.21819. Reverted. Call-region counts: R1:+1, R8:-1, R13:-2, R25:+1, R26:+1, R35:-1, R37:+1, R42:-1, R44:+1, R46:+1, R51:+1, R55:+3, R57:-6, R59:-1, R60:-1, R62:-1, R66:+1, R67:+1, R68:+1, R69:-1.
- zi.pointers.boolean: test candidate input and layout pointers directly. Build failed; reverted.
- zi.finish.count_loop: compare remaining candidate dictionary counts with zero. Deficit -1 -> -1; fuzzy 90.22073 -> 90.21921. Reverted. Call-region counts: R1:+1, R4:+1, R8:-1, R13:-2, R25:+1, R26:+1, R35:-1, R37:+1, R42:-1, R44:+1, R46:+1, R51:+1, R55:+3, R57:-6, R59:-1, R60:-1, R62:-1, R66:+1, R67:+1, R68:+1, R69:-1.
- zi.finish.limit_reverse: compare remaining candidate dictionary counts with the bound first. Deficit -1 -> -1; fuzzy 90.22073 -> 90.178154. Reverted. Call-region counts: R1:+1, R4:+1, R8:-1, R13:-2, R25:+1, R26:+1, R35:-1, R37:+1, R42:-1, R44:+1, R46:+1, R51:+1, R55:+3, R57:-6, R59:-1, R60:-1, R62:-1, R66:+1, R67:+1, R68:+1, R69:-1.
- zi.layout.native_counts: use native byte counts in candidate key layout traversal. Deficit -1 -> -1; fuzzy 90.22073 -> 90.22073. Reverted. Call-region counts: R1:+1, R4:+1, R8:-1, R13:-2, R25:+1, R26:+1, R35:-1, R37:+1, R42:-1, R44:+1, R46:+1, R51:+1, R55:+3, R57:-6, R59:-1, R60:-1, R62:-1, R66:+1, R67:+1, R68:+1, R69:-1.
- zi.layout.increment: advance candidate key layout cursors in place. Deficit -1 -> -1; fuzzy 90.22073 -> 90.22073. Reverted. Call-region counts: R1:+1, R4:+1, R8:-1, R13:-2, R25:+1, R26:+1, R35:-1, R37:+1, R42:-1, R44:+1, R46:+1, R51:+1, R55:+3, R57:-6, R59:-1, R60:-1, R62:-1, R66:+1, R67:+1, R68:+1, R69:-1.
- zi.emit.capacity: compare candidate output capacity with matched length first. Deficit -1 -> -1; fuzzy 90.22073 -> 90.21946. Reverted. Call-region counts: R1:+1, R4:+1, R8:-1, R13:-2, R25:+1, R26:+1, R35:-1, R37:+1, R42:-1, R44:+1, R46:+1, R51:+1, R55:+3, R57:-6, R59:-1, R60:-1, R62:-1, R66:+1, R67:+1, R68:+1, R69:-1.
- zi.emit.count_update: increment successful candidate counts in place. Deficit -1 -> -1; fuzzy 90.22073 -> 90.22073. Reverted. Call-region counts: R1:+1, R4:+1, R8:-1, R13:-2, R25:+1, R26:+1, R35:-1, R37:+1, R42:-1, R44:+1, R46:+1, R51:+1, R55:+3, R57:-6, R59:-1, R60:-1, R62:-1, R66:+1, R67:+1, R68:+1, R69:-1.
- zi.match.mode_unsigned: dispatch candidate match modes as unsigned dictionary kinds. Deficit -1 -> -1; fuzzy 90.22073 -> 90.22073. Reverted. Call-region counts: R1:+1, R4:+1, R8:-1, R13:-2, R25:+1, R26:+1, R35:-1, R37:+1, R42:-1, R44:+1, R46:+1, R51:+1, R55:+3, R57:-6, R59:-1, R60:-1, R62:-1, R66:+1, R67:+1, R68:+1, R69:-1.
- zi.match.retry_result: test candidate vowel exclusions with their byte result width. Deficit -1 -> -3; fuzzy 90.22073 -> 89.87228. Reverted. Call-region counts: R1:+1, R4:+1, R8:-1, R9:-1, R13:-2, R15:-1, R21:-1, R25:+1, R26:+1, R28:-1, R35:-1, R37:+1, R38:-1, R39:-1, R44:+1, R46:+1, R48:+1, R49:-1, R50:+1, R51:+1, R52:-1, R54:+1, R55:+3, R56:-1, R57:-6, R59:-2, R60:-1, R61:+1, R62:-1, R64:+1, R66:+1, R67:+2, R68:+1.
- zi.match.inplace_length: keep candidate normalization length in a compound update. Deficit -1 -> -1; fuzzy 90.22073 -> 90.22073. Reverted. Call-region counts: R1:+1, R4:+1, R8:-1, R13:-2, R25:+1, R26:+1, R35:-1, R37:+1, R42:-1, R44:+1, R46:+1, R51:+1, R55:+3, R57:-6, R59:-1, R60:-1, R62:-1, R66:+1, R67:+1, R68:+1, R69:-1.
- zi.pointers.boolean: test candidate input and layout pointers directly. Deficit -1 -> -1; fuzzy 90.22073 -> 90.22073. Reverted. Call-region counts: R1:+1, R4:+1, R8:-1, R13:-2, R25:+1, R26:+1, R35:-1, R37:+1, R42:-1, R44:+1, R46:+1, R51:+1, R55:+3, R57:-6, R59:-1, R60:-1, R62:-1, R66:+1, R67:+1, R68:+1, R69:-1.
- zi.return.table_width: declare the wide character count helper with its actual word return. Deficit -1 -> -1; fuzzy 90.22073 -> 90.22073. Reverted. Call-region counts: R1:+1, R4:+1, R8:-1, R13:-2, R25:+1, R26:+1, R35:-1, R37:+1, R42:-1, R44:+1, R46:+1, R51:+1, R55:+3, R57:-6, R59:-1, R60:-1, R62:-1, R66:+1, R67:+1, R68:+1, R69:-1.
- zi.return.exclusion_native: test candidate exclusion results as native integers. Deficit -1 -> -1; fuzzy 90.22073 -> 90.22073. Reverted. Call-region counts: R1:+1, R4:+1, R8:-1, R13:-2, R25:+1, R26:+1, R35:-1, R37:+1, R42:-1, R44:+1, R46:+1, R51:+1, R55:+3, R57:-6, R59:-1, R60:-1, R62:-1, R66:+1, R67:+1, R68:+1, R69:-1.
- zi.return.punctuation: compare candidate punctuation helper results with integer zero. Deficit -1 -> -1; fuzzy 90.22073 -> 90.22073. Reverted. Call-region counts: R1:+1, R4:+1, R8:-1, R13:-2, R25:+1, R26:+1, R35:-1, R37:+1, R42:-1, R44:+1, R46:+1, R51:+1, R55:+3, R57:-6, R59:-1, R60:-1, R62:-1, R66:+1, R67:+1, R68:+1, R69:-1.
- zi.return.vowel: test candidate vowel helper results directly. Deficit -1 -> -1; fuzzy 90.22073 -> 90.22073. Reverted. Call-region counts: R1:+1, R4:+1, R8:-1, R13:-2, R25:+1, R26:+1, R35:-1, R37:+1, R42:-1, R44:+1, R46:+1, R51:+1, R55:+3, R57:-6, R59:-1, R60:-1, R62:-1, R66:+1, R67:+1, R68:+1, R69:-1.
- zi.retry.next_prefix: restore the next element marker in the candidate prefix guard. Deficit -1 -> -1; fuzzy 90.22073 -> 90.21819. Reverted. Call-region counts: R1:+1, R4:+1, R8:-1, R13:-2, R25:+1, R26:+1, R35:-1, R37:+1, R42:-1, R44:+1, R46:+1, R51:+1, R55:+3, R57:-6, R59:-1, R60:-1, R62:-1, R66:+1, R67:+1, R68:+1, R69:-1.
- zi.emit.skip_first: order skipped candidate entries before writing returned candidates. Deficit -1 -> -1; fuzzy 90.22073 -> 90.14648. Reverted. Call-region counts: R1:+1, R4:+1, R8:-1, R13:-2, R25:+1, R26:+1, R27:-1, R29:+1, R35:-1, R37:+1, R38:-1, R39:-1, R42:-1, R44:+1, R46:+1, R49:-1, R50:+1, R51:+1, R55:-1, R56:-1, R57:-1, R58:+1, R59:-1, R60:-2, R61:+1, R65:-1, R66:+1, R67:+1, R68:+1, R69:-1, R70:+1.
- zi.emit.skip_decrement: decrement skipped candidate indices in place. Deficit -1 -> -1; fuzzy 90.22073 -> 90.22073. Reverted. Call-region counts: R1:+1, R4:+1, R8:-1, R13:-2, R25:+1, R26:+1, R35:-1, R37:+1, R42:-1, R44:+1, R46:+1, R51:+1, R55:+3, R57:-6, R59:-1, R60:-1, R62:-1, R66:+1, R67:+1, R68:+1, R69:-1.
- zi.emit.skip_compare: compare skipped candidate indices with zero first. Deficit -1 -> -1; fuzzy 90.22073 -> 90.22073. Reverted. Call-region counts: R1:+1, R4:+1, R8:-1, R13:-2, R25:+1, R26:+1, R35:-1, R37:+1, R42:-1, R44:+1, R46:+1, R51:+1, R55:+3, R57:-6, R59:-1, R60:-1, R62:-1, R66:+1, R67:+1, R68:+1, R69:-1.
- zi.dictionary.loop_bound: compare candidate dictionary traversal bounds with count first. Deficit -1 -> -1; fuzzy 90.22073 -> 90.19108. Reverted. Call-region counts: R1:+1, R4:+1, R8:-1, R13:-2, R25:+1, R26:+1, R35:-1, R37:+1, R42:-1, R44:+1, R46:+1, R51:+1, R55:+3, R57:-6, R59:-1, R60:-1, R62:-1, R66:+1, R67:+1, R68:+1, R69:-1.
- zi.dictionary.increment: advance candidate dictionary traversal indices in place. Deficit -1 -> -1; fuzzy 90.22073 -> 90.22073. Reverted. Call-region counts: R1:+1, R4:+1, R8:-1, R13:-2, R25:+1, R26:+1, R35:-1, R37:+1, R42:-1, R44:+1, R46:+1, R51:+1, R55:+3, R57:-6, R59:-1, R60:-1, R62:-1, R66:+1, R67:+1, R68:+1, R69:-1.
- zi.entry.initial_count: initialize the safe candidate dictionary index with other counters. Deficit -1 -> -7; fuzzy 90.22073 -> 90.04207. Reverted. Call-region counts: R1:-1, R4:+1, R8:-1, R15:-1, R21:-1, R25:+1, R27:-1, R35:-1, R37:+1, R41:-1, R44:+1, R45:-1, R50:+1, R51:+1, R55:+2, R56:-1, R57:-6, R59:-2, R60:-1, R61:+1, R66:+1, R68:+1, R69:-1, R70:+1.
- zi.entry.initial_index: initialize candidate dictionary traversal before duplicate tracking. Deficit -1 -> -1; fuzzy 90.22073 -> 90.22073. Reverted. Call-region counts: R1:+1, R4:+1, R8:-1, R12:-2, R25:+1, R26:+1, R35:-1, R37:+1, R42:-1, R44:+1, R46:+1, R51:+1, R55:+3, R57:-6, R59:-1, R60:-1, R62:-1, R66:+1, R67:+1, R68:+1, R69:-1.
- zi.entry.dictionary_index_type: retain candidate dictionary traversal as a signed short. Deficit -1 -> -5; fuzzy 90.22073 -> 89.48657. Reverted. Call-region counts: R1:+1, R4:+1, R8:-1, R13:-2, R25:+1, R26:+1, R27:-1, R29:+1, R35:-1, R37:+1, R38:-1, R39:-1, R42:-1, R44:+1, R49:-1, R50:+1, R51:+1, R52:-1, R55:+3, R56:-1, R57:-7, R58:+1, R59:-2, R60:-2, R61:+1, R65:-1, R66:+1, R67:+2, R68:+1, R69:-1, R70:+1.
- init.frame.socket_alignment: align the aoss bind address in its target stack slot. Deficit 0 -> 1; fuzzy 83.99811 -> 84.76136. Kept, GATE PASS. Call-region counts: R2:-2, R4:-1, R6:-1, R7:+1, R16:-1, R18:+1, R20:-1, R28:+1, R30:+17, R36:-2, R39:+1, R41:-1, R44:+2, R48:-1, R51:-2, R62:+1, R67:-1, R77:+1, R79:-1, R93:-1, R95:-1, R113:-2, R115:-1, R118:+1, R121:-1, R144:+1, R146:-1, R158:-11, R160:+41, R161:-1, R163:-13, R167:-5, R170:-2, R172:-14.
- init.frame.reply_alignment: align the aoss reply address while keeping request records ordinary. Build failed; reverted.
- init.frame.received_alignment: align the aoss received address while keeping request records ordinary. Build failed; reverted.
- init.wait.signed_views: interpret aoss wire wait defaults through signed limit views. Deficit 1 -> 3; fuzzy 84.76136 -> 85.378784. Kept, GATE PASS. Call-region counts: R4:-1, R6:-1, R7:+1, R16:-1, R18:+1, R20:-1, R28:+1, R30:+17, R36:-2, R39:+1, R41:-1, R44:+2, R48:-1, R51:-2, R62:+1, R67:-1, R77:+1, R79:-1, R93:-1, R95:-1, R113:-2, R115:-1, R118:+1, R121:-1, R144:+1, R146:-1, R158:-11, R160:+41, R161:-1, R163:-13, R167:-5, R170:-2, R172:-14.
- init.frame.reply_alignment: test aoss reply address alignment against the existing bind frame. Deficit 3 -> 3; fuzzy 85.378784 -> 85.36806. Reverted. Call-region counts: R4:-1, R6:-1, R7:+1, R16:-1, R18:+1, R20:-1, R28:+1, R30:+17, R36:-2, R39:+1, R41:-1, R44:+2, R48:-1, R51:-2, R62:+1, R67:-1, R77:+1, R79:-1, R93:-1, R95:-1, R113:-2, R115:-1, R118:+1, R121:-1, R144:+1, R146:-1, R158:-11, R160:+41, R161:-1, R163:-13, R167:-5, R170:-2, R172:-14.
- init.frame.received_alignment: test aoss received address alignment against the existing bind frame. Deficit 3 -> 3; fuzzy 85.378784 -> 85.35669. Reverted. Call-region counts: R4:-1, R6:-1, R7:+1, R16:-1, R18:+1, R20:-1, R28:+1, R30:+17, R36:-2, R39:+1, R41:-1, R44:+2, R48:-1, R51:-2, R62:+1, R67:-1, R77:+1, R79:-1, R93:-1, R95:-1, R113:-2, R115:-1, R118:+1, R121:-1, R144:+1, R146:-1, R158:-11, R160:+41, R161:-1, R163:-13, R167:-5, R170:-2, R172:-14.
- aoss.options.native_state: treat aoss config state as an unsigned table selector. Deficit 0 -> 0; fuzzy 98.77193 -> 98.77193. Reverted. Call-region counts: .
- aoss.options.flags_order: initialize accumulated aoss config flags after validating length. Deficit 0 -> 0; fuzzy 98.77193 -> 96.97369. Reverted. Call-region counts: .
- aoss.options.network_order: derive the aoss network config view after the key views. Deficit 0 -> 0; fuzzy 98.77193 -> 98.77193. Reverted. Call-region counts: .
- aoss.xor.compound: xor aoss packet bytes directly through the packet field. Deficit 0 -> 0; fuzzy 98.605446 -> 98.23129. Reverted. Call-region counts: .
- aoss.xor.key_first: read aoss key mask bytes before the packet bytes. Deficit 0 -> 0; fuzzy 98.605446 -> 98.57143. Reverted. Call-region counts: .
- aoss.xor.full_value: carry aoss xor values at full width before byte storage. Deficit 0 -> 0; fuzzy 98.605446 -> 98.605446. Reverted. Call-region counts: .
- aoss.options.cursor: reuse the aoss reply cursor for its nested option records. Deficit 0 -> 0; fuzzy 98.77193 -> 96.18421. Reverted. Call-region counts: .
- aoss.decrypt.xor: name aoss encrypted input and key stream bytes before xor. Build failed; reverted.
- aoss.decrypt.index: retain signed aoss permutation traversal indices. Deficit 0 -> 0; fuzzy 97.0405 -> 97.0405. Reverted. Call-region counts: .
- aoss.decrypt.increment: advance aoss crc and permutation indices in place. Deficit 0 -> 0; fuzzy 97.0405 -> 97.0405. Reverted. Call-region counts: .
- init.record.saved_record: retain the aoss record pointer across nonce generation. Deficit 3 -> 4; fuzzy 85.378784 -> 85.41414. Kept, GATE PASS. Call-region counts: R4:-1, R6:-1, R7:+1, R16:-1, R18:+1, R20:-1, R28:+1, R30:+17, R36:-2, R39:+1, R41:-1, R44:+2, R48:-2, R50:+1, R51:-1, R62:+1, R67:-1, R77:+1, R79:-1, R93:-1, R95:-1, R113:-2, R115:-1, R118:+1, R121:-1, R144:+1, R146:-1, R158:-11, R160:+41, R161:-1, R163:-13, R167:-5, R170:-2, R172:-14.
- init.record.local_nonce: keep aoss transaction nonces separate from network address arithmetic. Deficit 4 -> 4; fuzzy 85.41414 -> 85.41414. Reverted. Call-region counts: R4:-1, R6:-1, R7:+1, R16:-1, R18:+1, R20:-1, R28:+1, R30:+17, R36:-2, R39:+1, R41:-1, R44:+2, R48:-2, R50:+1, R51:-1, R62:+1, R67:-1, R77:+1, R79:-1, R93:-1, R95:-1, R113:-2, R115:-1, R118:+1, R121:-1, R144:+1, R146:-1, R158:-11, R160:+41, R161:-1, R163:-13, R167:-5, R170:-2, R172:-14.
- init.record.local_native_nonce: use a native halfword aoss transaction nonce local. Deficit 4 -> 4; fuzzy 85.41414 -> 85.41414. Reverted. Call-region counts: R4:-1, R6:-1, R7:+1, R16:-1, R18:+1, R20:-1, R28:+1, R30:+17, R36:-2, R39:+1, R41:-1, R44:+2, R48:-2, R50:+1, R51:-1, R62:+1, R67:-1, R77:+1, R79:-1, R93:-1, R95:-1, R113:-2, R115:-1, R118:+1, R121:-1, R144:+1, R146:-1, R158:-11, R160:+41, R161:-1, R163:-13, R167:-5, R170:-2, R172:-14.
- aoss.decrypt.xor: name aoss encrypted input and key stream bytes before xor. Deficit 0 -> 0; fuzzy 97.0405 -> 97.0405. Reverted. Call-region counts: .
- init.dispatch.unsigned: dispatch aoss protocol state with an unsigned selector. Deficit 4 -> 4; fuzzy 85.41414 -> 85.41414. Reverted. Call-region counts: R4:-1, R6:-1, R7:+1, R16:-1, R18:+1, R20:-1, R28:+1, R30:+17, R36:-2, R39:+1, R41:-1, R44:+2, R48:-2, R50:+1, R51:-1, R62:+1, R67:-1, R77:+1, R79:-1, R93:-1, R95:-1, R113:-2, R115:-1, R118:+1, R121:-1, R144:+1, R146:-1, R158:-11, R160:+41, R161:-1, R163:-13, R167:-5, R170:-2, R172:-14.
- init.dispatch.socket: retain the request socket explicitly through aoss dispatch. Build failed; reverted.
- init.dispatch.no_zero_copy: assign the aoss packet send result before constructing the packet. Deficit 4 -> 4; fuzzy 85.41414 -> 85.41414. Reverted. Call-region counts: R4:-1, R6:-1, R7:+1, R16:-1, R18:+1, R20:-1, R28:+1, R30:+17, R36:-2, R39:+1, R41:-1, R44:+2, R48:-2, R50:+1, R51:-1, R62:+1, R67:-1, R77:+1, R79:-1, R93:-1, R95:-1, R113:-2, R115:-1, R118:+1, R121:-1, R144:+1, R146:-1, R158:-11, R160:+41, R161:-1, R163:-13, R167:-5, R170:-2, R172:-14.
- init.record.local_nonce_correct: keep aoss random transaction ids in a separate word local. Deficit 4 -> 4; fuzzy 85.41414 -> 85.41414. Reverted. Call-region counts: R4:-1, R6:-1, R7:+1, R16:-1, R18:+1, R20:-1, R28:+1, R30:+17, R36:-2, R39:+1, R41:-1, R44:+2, R48:-2, R50:+1, R51:-1, R62:+1, R67:-1, R77:+1, R79:-1, R93:-1, R95:-1, R113:-2, R115:-1, R118:+1, R121:-1, R144:+1, R146:-1, R158:-11, R160:+41, R161:-1, R163:-13, R167:-5, R170:-2, R172:-14.
- init.record.nonce_halfword_correct: keep aoss random transaction ids in a separate halfword local. Deficit 4 -> 3; fuzzy 85.41414 -> 85.22159. Kept, GATE PASS. Call-region counts: R4:-1, R6:-1, R7:+1, R16:-1, R18:+1, R20:-1, R28:+1, R30:+17, R36:-2, R39:+1, R41:-1, R44:+2, R48:-2, R51:-1, R62:+1, R67:-1, R77:+1, R79:-1, R93:-1, R95:-1, R113:-2, R115:-1, R118:+1, R121:-1, R144:+1, R146:-1, R158:-11, R160:+41, R161:-1, R163:-13, R167:-5, R170:-2, R172:-14.
- review.format: remove unused protocol status temporary and obsolete label; indent the final error branch. Deficit 3 -> 3; fuzzy 85.22159 -> 85.22159; both-unit quick GATE PASS.
- init.dispatch.socket_scoped: retain a named socket across aoss protocol packet dispatch. Deficit 3 -> 3; fuzzy 85.22159 -> 85.22159. Reverted. Call-region counts: R4:-1, R6:-1, R7:+1, R16:-1, R18:+1, R20:-1, R28:+1, R30:+17, R36:-2, R39:+1, R41:-1, R44:+2, R48:-2, R51:-1, R62:+1, R67:-1, R77:+1, R79:-1, R93:-1, R95:-1, R113:-2, R115:-1, R118:+1, R121:-1, R144:+1, R146:-1, R158:-11, R160:+41, R161:-1, R163:-13, R167:-5, R170:-2, R172:-14.
- init.dispatch.conditions: dispatch aoss packet states with explicit ordered conditions. Deficit 3 -> 6; fuzzy 85.22159 -> 84.61174. Reverted. Call-region counts: R4:-1, R6:-1, R7:+1, R16:-1, R18:+1, R20:-1, R28:+1, R30:+17, R36:-2, R39:+1, R41:-1, R44:+2, R48:-2, R51:-1, R62:+1, R67:-1, R77:+1, R79:-1, R91:+7, R93:-3, R95:-3, R113:-2, R115:-1, R118:+1, R121:-1, R144:+1, R146:-1, R158:-11, R160:+41, R161:-1, R163:-13, R167:-5, R170:-2, R172:-14.
- aoss.options.initial_cursor: retain the initial aoss response cursor before validating its length. Deficit 0 -> 0; fuzzy 98.77193 -> 96.88596. Reverted. Call-region counts: .
- aoss.options.initial_length: assign the aoss response length after validating the input length. Deficit 0 -> 0; fuzzy 98.77193 -> 97.01755. Reverted. Call-region counts: .
- aoss.options.record_while: scan aoss reply records with an explicit type condition. Build failed; reverted.
- hello.frame.record_scope: limit the aoss hello record lifetime to payload construction. Deficit 2 -> 2; fuzzy 89.78022 -> 89.750916. Reverted. Call-region counts: R0:-2, R3:+1, R5:+1, R8:+1, R23:+1.
- hello.frame.schedule_scope: limit the aoss key schedule lifetime to the encrypted hello. Deficit 2 -> 2; fuzzy 89.78022 -> 89.78022. Reverted. Call-region counts: R0:-2, R3:+1, R5:+1, R8:+1, R23:+1.
- hello.crc.half_cursor: name each aoss crc half before traversing its bytes. Deficit 2 -> 2; fuzzy 89.78022 -> 89.78022. Reverted. Call-region counts: R0:-2, R3:+1, R5:+1, R8:+1, R23:+1.
- aoss.options.record_while_correct: scan aoss reply records with an explicit type condition. Deficit 0 -> -1; fuzzy 98.77193 -> 82.149124. Reverted. Call-region counts: R1:+3, R2:-4.
- init.defaults.aggregate: initialize aoss connection and response defaults as a local aggregate. Deficit 3 -> 4; fuzzy 85.22159 -> 85.47601. Reverted. Call-region counts: R1:+1, R4:-1, R6:-1, R7:+1, R16:-1, R18:+1, R20:-1, R28:+1, R30:+17, R36:-2, R39:+1, R41:-1, R44:+2, R48:-2, R51:-1, R62:+1, R67:-1, R77:+1, R79:-1, R93:-1, R95:-1, R113:-2, R115:-1, R118:+1, R121:-1, R144:+1, R146:-1, R158:-11, R160:+41, R161:-1, R163:-13, R167:-5, R170:-2, R172:-14.
- init.defaults.named_fields: read aoss default intervals through their named constant fields. Deficit 3 -> 3; fuzzy 85.22159 -> 85.22159. Reverted. Call-region counts: R4:-1, R6:-1, R7:+1, R16:-1, R18:+1, R20:-1, R28:+1, R30:+17, R36:-2, R39:+1, R41:-1, R44:+2, R48:-2, R51:-1, R62:+1, R67:-1, R77:+1, R79:-1, R93:-1, R95:-1, R113:-2, R115:-1, R118:+1, R121:-1, R144:+1, R146:-1, R158:-11, R160:+41, R161:-1, R163:-13, R167:-5, R170:-2, R172:-14.
- init.defaults.scalars: name the separate aoss connection and response default intervals. Deficit 3 -> 4; fuzzy 85.22159 -> 85.28661. Reverted. Call-region counts: R1:+1, R4:-1, R6:-1, R7:+1, R16:-1, R18:+1, R20:-1, R28:+1, R30:+17, R36:-2, R39:+1, R41:-1, R44:+2, R48:-2, R51:-1, R62:+1, R67:-1, R77:+1, R79:-1, R93:-1, R95:-1, R113:-2, R115:-1, R118:+1, R121:-1, R144:+1, R146:-1, R158:-11, R160:+41, R161:-1, R163:-13, R167:-5, R170:-2, R172:-14.
- init.receive.bind_inline: keep the final aoss bind failure cleanup beside its bind call. Deficit 3 -> 4; fuzzy 85.22159 -> 86.81313. Kept, GATE PASS. Call-region counts: R4:-1, R6:-1, R7:+1, R16:-1, R18:+1, R20:-1, R28:+1, R30:+17, R36:-2, R39:+1, R41:-1, R44:+2, R48:-2, R51:-1, R62:+1, R67:-1, R77:+1, R79:-1, R93:-1, R95:-1, R113:-2, R115:-1, R118:+1, R121:-1, R144:+1, R146:-1, R158:-1, R160:+17, R162:-1, R163:-1, R165:-13, R169:-5, R172:-2, R174:+2.
- init.receive.error_first: handle received aoss packet retry exhaustion before its sleep loop. Deficit 4 -> 3; fuzzy 86.81313 -> 88.554924. Kept, GATE PASS. Call-region counts: R4:-1, R6:-1, R7:+1, R16:-1, R18:+1, R20:-1, R28:+1, R30:+17, R36:-2, R39:+1, R41:-1, R44:+2, R48:-2, R51:-1, R62:+1, R67:-1, R77:+1, R79:-1, R93:-1, R95:-1, R113:-2, R115:-1, R118:+1, R121:-1, R144:+1, R146:-1, R158:-1, R160:+3, R162:-1, R163:-1, R169:-5, R172:-2, R174:+2.
- init.receive.retry_switch: dispatch received aoss packet exhaustion errors by protocol state. Deficit 3 -> 1; fuzzy 88.554924 -> 88.17235. Kept, GATE PASS. Call-region counts: R4:-1, R6:-1, R7:+1, R16:-1, R18:+1, R20:-1, R28:+1, R30:+17, R36:-2, R39:+1, R41:-1, R44:+2, R48:-2, R51:-1, R62:+1, R67:-1, R77:+1, R79:-1, R93:-1, R95:-1, R113:-2, R115:-1, R118:+1, R121:-1, R144:+1, R146:-1, R158:-1, R160:+1, R162:-1, R163:-1, R169:-5, R172:-2, R174:+2.
- init.receive.delay_late_correct: load the received aoss packet retry delay after testing exhaustion. Deficit 1 -> 1; fuzzy 88.17235 -> 88.301765. Kept, GATE PASS. Call-region counts: R4:-1, R6:-1, R7:+1, R16:-1, R18:+1, R20:-1, R28:+1, R30:+17, R36:-2, R39:+1, R41:-1, R44:+2, R48:-2, R51:-1, R62:+1, R67:-1, R77:+1, R79:-1, R93:-1, R95:-1, R113:-2, R115:-1, R118:+1, R121:-1, R144:+1, R146:-1, R158:-1, R160:+1, R162:-1, R163:-1, R169:-5, R172:-2, R174:+2.
- init.receive.state_after_bind: update the aoss protocol state only after the final bind succeeds. Deficit 1 -> 0; fuzzy 88.301765 -> 88.48801. Kept, GATE PASS. Call-region counts: R4:-1, R6:-1, R7:+1, R16:-1, R18:+1, R20:-1, R28:+1, R30:+17, R36:-2, R39:+1, R41:-1, R44:+2, R48:-2, R51:-1, R62:+1, R67:-1, R77:+1, R79:-1, R93:-1, R95:-1, R113:-2, R115:-1, R118:+1, R121:-1, R144:+1, R146:-1, R160:-1, R162:-1, R163:-1, R169:-5, R172:-2, R174:+2.
- init.receive.state_before_retry: retain the received aoss protocol state before retry callbacks. Deficit 0 -> 0; fuzzy 88.48801 -> 88.607956. Kept, GATE PASS. Call-region counts: R4:-1, R6:-1, R7:+1, R16:-1, R18:+1, R20:-1, R28:+1, R30:+17, R36:-2, R39:+1, R41:-1, R44:+2, R48:-2, R51:-1, R62:+1, R67:-1, R77:+1, R79:-1, R93:-1, R95:-1, R113:-2, R115:-1, R118:+1, R121:-1, R144:+1, R146:-1, R160:-2, R162:-1, R169:-5, R172:-2, R174:+2.
- init.receive.delay_word: carry the aoss retry sleep step as a full unsigned duration. Deficit 0 -> 0; fuzzy 88.607956 -> 89.022095. Kept, GATE PASS. Call-region counts: R4:-1, R6:-1, R7:+1, R16:-1, R18:+1, R20:-1, R28:+1, R30:+17, R36:-2, R39:+1, R41:-1, R44:+2, R48:-2, R51:-1, R62:+1, R67:-1, R77:+1, R79:-1, R93:-1, R95:-1, R113:-2, R115:-1, R118:+1, R121:-1, R144:+1, R146:-1, R160:-2, R162:-1, R169:-5, R172:-2, R174:+2.
- hello.runtime.external: preserve external visibility for the aoss runtime state object. Deficit 2 -> 2; fuzzy 89.78022 -> 89.78022. Reverted. Call-region counts: R0:-2, R3:+1, R5:+1, R8:+1, R23:+1.
- hello.crc.external: preserve external visibility for the aoss crc table object. Deficit 2 -> 2; fuzzy 89.78022 -> 89.78022. Reverted. Call-region counts: R0:-2, R3:+1, R5:+1, R8:+1, R23:+1.
- hello.key.external: preserve external visibility for the aoss packet key object. Deficit 2 -> 2; fuzzy 89.78022 -> 89.78022. Reverted. Call-region counts: R0:-2, R3:+1, R5:+1, R8:+1, R23:+1.
- review.receive_format: indent the retained final bind and retry error paths and remove their unnecessary compound scope. Deficit 0 -> 0; fuzzy 89.022095 -> 89.022095; both-unit quick GATE PASS.
## Final audit
Final full gate: `python3 /mnt/drive2/projects/wii-ipl-workers/_restore0928-tools/gate.py src/scene/setting/AOSS libs/RVLMiddleware/eZiText/src/clib/zi8alpha`.
Clean build, identical pools, zero regressions, zero forbidden additions and zero readability warnings. The complete output is in `fix-board-r2.final-gate.txt`.
| Open function | Target / built instructions | Signed deficit before -> after | Fuzzy before -> after | Remaining evidence |
| --- | --- | --- | --- | --- |
| AOSS_Init_old | 1584 / 1584 | 74 -> 0 | 76.132576 -> 89.022095 | Frame and saved-register range now agree; a redundant target IP-failure branch, several wait branches, stack slots and live registers differ. |
| AOSS_81400830 | 321 / 321 | 0 -> 0 | 97.0405 -> 97.0405 | Equal counts and call sequence; CRC/cipher operand registers and scheduling differ. |
| AOSS_814013AC | 114 / 114 | 0 -> 0 | 98.77193 -> 98.77193 | Equal counts and call sequence; response/option cursor, flags and remaining-length register allocation differ. |
| AOSS_81401778 | 273 / 271 | 3 -> 2 | 86.67033 -> 89.78022 | Frame agrees; target saves r25 upward, build saves r24 upward. CRC scheduling, common BSS base and destination/identity stack lifetimes differ. |
| AOSS_81401E80 | 147 / 147 | 0 -> 0 | 98.605446 -> 98.605446 | Equal counts and opcode sequence; XOR inputs and key bytes use different work registers. |
| Zi8ChangeWordCase | 44 / 44 | 0 -> 0 | 99.09091 -> 99.09091 | Equal counts and opcode sequence; workspace and case-mode roles exchange r29/r30. |
| Zi8AlphaGetCandidates | 3946 / 3947 | -3 -> -1 | 87.00405 -> 90.22073 | Frame and saved registers agree. Retry blocks now align; emission, next-element arithmetic, load/store choices and operand scheduling remain. |
Instruction-exact count reported by the gate: AOSS 15 -> 16, Zi8 10 -> 10. Objdiff matched functions remain 16 and 10, matched code remains 12,140 bytes, and matched data remains 3,968 bytes. No primary function reached 100%.
The extra gate-exact function is AOSS_81400E0C, which was already 100% in objdiff. Its five CR1 branch differences reported by odiff/ctxdiff disappeared when earlier instruction sizes restored its target start offset. This is an address-normalization limitation in that helper, not a new byte match.
Gate-rejected aggregate/scalar default trials each reduced matched data 3896 -> 3888; both were restored despite raising fuzzy. The current source retains the baseline constant object.
Exclude failed builds, the misnested initial allocation transformer, the unused-only local_nonce/local_native_nonce trials, the redundant no_zero_copy cast, the invalid second CRC restart, concurrent parts1/parts4 measurements and the rejected redundant parts8 loop from attempt coverage. Corrected trials are logged separately.
The final Init frame is the target aligned 0x160 frame with _savegpr_14; entry was an unaligned 0x110 frame. Only the real bind-address object retains 32-byte alignment: it starts at +0x40 and the following timeval starts at +0x60. Request records use ordinary alignment.
The target Init branch following successful IP setup reuses the previous compare flags and contains an additional cleanup path. The source checks the IP result once and has no counterpart to this extra branch. No redundant test was added only to fill the gap. Its positive region count is balanced elsewhere, so total deficit zero does not imply a byte match. The initial r14 negative-result guard also remains unexplained; initializationResult retains its defined zero initialization.
The target phonetic suffix and final prefix/punctuation guards contain +1 index arithmetic where the current source has -1. Three suffix and three next-element variants lowered fuzzy without shrinking the absolute deficit, so they were restored; the intended indexing remains uncertain.
| Function / region family | Final region IDs | Three distinct valid source trials |
| --- | --- | --- |
| AOSS_Init_old: entry and defaults | R1, R2 | init.defaults.halfwords; init.defaults.order; init.wait.signed_views |
| AOSS_Init_old: initial flags, status and scan cleanup | R4, R6, R7, R8, R16, R18, R21 | init.cleanup.returns; init.cleanup.signed; init.cleanup.boolean |
| AOSS_Init_old: scan sleep | R20 | init.sleep.ternary; init.sleep.direct; init.sleep.reverse |
| AOSS_Init_old: manufacturer fields | R27, R28 | init.manufacturer.length; init.manufacturer.bound; init.manufacturer.failure |
| AOSS_Init_old: IP and allocation failure cleanup | R30 | init.scan.failure_first; init.scan.alloc_correct; init.scan.ip_exit |
| AOSS_Init_old: initial link attempts and cancellation | R36, R39, R41, R42, R44 | init.wait.limits; init.wait.counter; init.wait.target_widths |
| AOSS_Init_old: request identities and nonces | R48, R50, R51 | init.record.typed; init.record.for; init.record.nonce_halfword_correct |
| AOSS_Init_old: bind and reconnect setup | R62, R63, R65, R67, R71 | init.bind.failure_first; init.bind.inline_failure; init.receive.active |
| AOSS_Init_old: reconnect sleep | R77, R79, R80 | init.sleep.ternary; init.sleep.direct; init.sleep.reverse |
| AOSS_Init_old: protocol dispatch and final packet construction | R93, R95, R98, R99 | init.dispatch.unsigned; init.dispatch.socket_scoped; init.dispatch.conditions |
| AOSS_Init_old: poll ABI, timeval and ticks | R112 | init.poll.abi; init.poll.locals; init.poll.sum_temp |
| AOSS_Init_old: poll exhaustion and retry sleep | R113, R115, R116 | init.error.state_switch; init.sleep.reverse; init.receive.delay_word |
| AOSS_Init_old: received packet and socket transitions | R118, R121, R127 | init.receive.socket; init.receive.active; init.receive.bind_inline |
| AOSS_Init_old: received link attempts and cancellation | R138, R144, R146, R147 | init.wait.limits; init.wait.counter; init.wait.target_widths |
| AOSS_Init_old: received retry exhaustion and sleep | R160, R162, R163 | init.receive.error_first; init.receive.delay_late_correct; init.receive.retry_switch |
| AOSS_Init_old: final socket cleanup, statuses and returns | R167, R169, R172, R174 | init.final.error_direct; init.final.outcome; init.final.outcome_errors |
| AOSS_81400830: CRC and permutation operands | R2, R3, R7, R13 | aoss.decrypt.xor; aoss.decrypt.index; aoss.decrypt.increment |
| AOSS_814013AC: response cursor, flags and option registers | R1 | aoss.options.flags_order; aoss.options.network_order; aoss.options.cursor |
| AOSS_81401778: entry, runtime base and record frame | R0, R3 | hello.globals.runtime; hello.frame.record_scope; hello.frame.schedule_scope |
| AOSS_81401778: CRC traversal and allocation | R4, R5 | hello.crc.split; hello.crc.nested_parts; hello.crc.half_cursor |
| AOSS_81401778: nonce, key and RC4 state | R8, R9 | hello.globals.nonce; hello.rc4.indices; hello.rc4.input |
| AOSS_81401778: identity, destination and send | R15, R23 | hello.send.length; hello.send.full_send; hello.globals.send |
| AOSS_81401E80: XOR operands and key byte scheduling | whole function operand comparison | aoss.xor.compound; aoss.xor.key_first; aoss.xor.full_value |
| Zi8ChangeWordCase: case mode and workspace registers | whole function operand comparison | zi.case.type_unsigned; zi.case.cursor; zi.case.work |
| Zi8AlphaGetCandidates: input normalization | R1 | zi.entry.workspace; zi.entry.bounds; zi.entry.increments |
| Zi8AlphaGetCandidates: language setup and saved counters | R4 | zi.entry.initial_count; zi.entry.initial_index; zi.entry.dictionary_index_type |
| Zi8AlphaGetCandidates: primary table flags and dictionary setup | R8, R20, R25 | zi.table.saved_result; zi.table.integer_result; zi.table.initial_flags |
| Zi8AlphaGetCandidates: prefix/suffix copying and punctuation | R13, R14 | zi.prefix.comparisons; zi.prefix.characters; zi.entry.workspace |
| Zi8AlphaGetCandidates: dictionary dispatch, key layout and retry | R26, R42, R44, R45, R46 | zi.dictionary.exact; zi.dictionary.kind; zi.match.mode_unsigned |
| Zi8AlphaGetCandidates: exclusions and vowel tests | R35, R37 | zi.match.retry_result; zi.return.exclusion_native; zi.return.vowel |
| Zi8AlphaGetCandidates: detokenization and phonetic spelling | R50, R51 | zi.phonetic.append; zi.phonetic.increment; zi.phonetic.increment_assign |
| Zi8AlphaGetCandidates: candidate length, duplicate and layout checks | R53, R54, R58 | zi.layout.native_counts; zi.layout.increment; zi.maximum.reverse |
| Zi8AlphaGetCandidates: candidate emission and skipped candidates | R55, R56, R57 | zi.emit.skip_first; zi.emit.skip_decrement; zi.emit.skip_compare |
| Zi8AlphaGetCandidates: alternate prefixes and completion retry | R59, R60, R62, R65 | zi.retry.swap; zi.retry.native_signed; zi.retry.native_loop |
| Zi8AlphaGetCandidates: next-element punctuation and prefix guards | R66, R67, R68 | zi.retry.last_punctuation; zi.retry.next_punctuation; zi.retry.next_prefix |
| Zi8AlphaGetCandidates: final count and output | R69 | zi.finish.count_loop; zi.finish.limit_reverse; zi.finish.terminator |
Coverage audit passed: every open function has at least three valid source trials, and every final unequal call-aligned region belongs to an audited family. Trials that compile identically remain honest source attempts; no failed build is counted.

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,36 @@
full build: ok
main.dol sha1: 26116613f624061ba99c8d1a299aaa6efa85670d
[src/scene/setting/AOSS] pool: IDENTICAL
[src/scene/setting/AOSS] objdiff: code 6436/16192 data 3896/3928 functions 16/21 fuzzy 94.6952 linked code 0
[src/scene/setting/AOSS] instruction-exact functions: 16/21
[src/scene/setting/AOSS] section .bss size 3496 match 100.0
[src/scene/setting/AOSS] section .data size 368 match 100.0
[src/scene/setting/AOSS] section .sbss size 32 match 42.857143
[src/scene/setting/AOSS] section .sdata size 24 match 100.0
[src/scene/setting/AOSS] section .sdata2 size 8 match 100.0
[src/scene/setting/AOSS] section .text size 16192 match 94.69516
[src/scene/setting/AOSS] below 100: AOSS_Init_old 89.022095
[src/scene/setting/AOSS] below 100: AOSS_81400830 97.0405
[src/scene/setting/AOSS] below 100: AOSS_814013AC 98.77193
[src/scene/setting/AOSS] below 100: AOSS_81401778 89.78022
[src/scene/setting/AOSS] below 100: AOSS_81401E80 98.605446
[src/scene/setting/AOSS] baseline: code 6436/16192 data 3896 functions 16 fuzzy 89.4417
[libs/RVLMiddleware/eZiText/src/clib/zi8alpha] pool: IDENTICAL
[libs/RVLMiddleware/eZiText/src/clib/zi8alpha] objdiff: code 5704/21664 data 72/564 functions 10/12 fuzzy 92.8676 linked code 0
[libs/RVLMiddleware/eZiText/src/clib/zi8alpha] instruction-exact functions: 10/12
[libs/RVLMiddleware/eZiText/src/clib/zi8alpha] section .data size 48 match None
[libs/RVLMiddleware/eZiText/src/clib/zi8alpha] section .rodata size 336 match 99.0991
[libs/RVLMiddleware/eZiText/src/clib/zi8alpha] section .text size 21664 match 92.867615
[libs/RVLMiddleware/eZiText/src/clib/zi8alpha] section extab size 72 match 100.0
[libs/RVLMiddleware/eZiText/src/clib/zi8alpha] section extabindex size 108 match 99.07407
[libs/RVLMiddleware/eZiText/src/clib/zi8alpha] below 100: Zi8ChangeWordCase 99.09091
[libs/RVLMiddleware/eZiText/src/clib/zi8alpha] below 100: Zi8AlphaGetCandidates 90.22073
[libs/RVLMiddleware/eZiText/src/clib/zi8alpha] baseline: code 5704/21664 data 72 functions 10 fuzzy 90.5240
regressions vs baseline: 0
global matched_code_percent: 86.41694 -> 86.41694
global fuzzy_match_percent: 98.92994 -> 98.97530
global complete_code_percent: 60.34391 -> 60.34391
global matched_data_percent: 90.91649 -> 90.91649
forbidden patterns added (net, per file): 0
readability warnings (net, per file; must be 0 in the final result): 0
GATE PASS

View File

@@ -0,0 +1,326 @@
# Round 3 matching attempts
Baseline 539693c76a98e07f9e0e5e88698eb566c68938b5. Walk from entry through non-register differences, then register allocation. Each accepted trial must shrink absolute instruction deficit or increase fuzzy and pass the gate.
- init.defaults.public_scalars: read the two aoss default intervals as externally visible constants. Deficit 0 -> 1; fuzzy 89.022095 -> 89.08712. Restored; GATE FAIL: 1 regressions vs main. Region counts: R1:+1, R4:-1, R6:-1, R7:+1, R16:-1, R18:+1, R20:-1, R28:+1, R30:+17, R36:-2, R39:+1, R41:-1, R44:+2, R48:-2, R51:-1, R62:+1, R67:-1, R77:+1, R79:-1, R93:-1, R95:-1, R113:-2, R115:-1, R118:+1, R121:-1, R144:+1, R146:-1, R160:-2, R162:-1, R169:-5, R172:-2, R174:+2.
- init.defaults.named_values: load both aoss default intervals before publishing their fields. Deficit 0 -> 0; fuzzy 89.022095 -> 89.02904. Kept, GATE PASS. Region counts: R4:-1, R6:-1, R7:+1, R16:-1, R18:+1, R20:-1, R28:+1, R30:+17, R36:-2, R39:+1, R41:-1, R44:+2, R48:-2, R51:-1, R62:+1, R67:-1, R77:+1, R79:-1, R93:-1, R95:-1, R113:-2, R115:-1, R118:+1, R121:-1, R144:+1, R146:-1, R160:-2, R162:-1, R169:-5, R172:-2, R174:+2.
- init.defaults.connection_first: load the aoss connection default before its response default. Trial error AssertionError: init.defaults.connection_first did not change source; restored and excluded from coverage.
- init.defaults.response_first: read the aoss response default before the connection default. Deficit 0 -> 0; fuzzy 89.02904 -> 89.022095. Restored. Region counts: R4:-1, R6:-1, R7:+1, R16:-1, R18:+1, R20:-1, R28:+1, R30:+17, R36:-2, R39:+1, R41:-1, R44:+2, R48:-2, R51:-1, R62:+1, R67:-1, R77:+1, R79:-1, R93:-1, R95:-1, R113:-2, R115:-1, R118:+1, R121:-1, R144:+1, R146:-1, R160:-2, R162:-1, R169:-5, R172:-2, R174:+2.
- init.defaults.response_store: publish the aoss response default before its connection default. Deficit 0 -> 0; fuzzy 89.02904 -> 89.02904. Restored. Region counts: R4:-1, R6:-1, R7:+1, R16:-1, R18:+1, R20:-1, R28:+1, R30:+17, R36:-2, R39:+1, R41:-1, R44:+2, R48:-2, R51:-1, R62:+1, R67:-1, R77:+1, R79:-1, R93:-1, R95:-1, R113:-2, R115:-1, R118:+1, R121:-1, R144:+1, R146:-1, R160:-2, R162:-1, R169:-5, R172:-2, R174:+2.
- init.frame.count_first: group aoss received counts and wait settings with count first layout. Deficit 0 -> -1; fuzzy 89.02904 -> 89.06881. Kept, GATE PASS. Region counts: R4:-1, R6:-1, R16:-1, R18:+1, R20:-1, R28:+1, R30:+17, R36:-2, R39:+1, R41:-1, R44:+2, R48:-2, R51:-1, R62:+1, R67:-1, R77:+1, R79:-1, R93:-1, R95:-1, R113:-2, R115:-1, R118:+1, R121:-1, R144:+1, R146:-1, R160:-2, R162:-1, R169:-5, R172:-2, R174:+2.
- init.frame.settings_first: group aoss received counts and wait settings with settings first layout. Trial error ValueError: substring not found; restored and excluded from coverage.
- init.frame.intervals_first: group aoss received counts and wait settings with intervals first layout. Trial error ValueError: substring not found; restored and excluded from coverage.
- init.frame.review_restore: reject the retained aggregate despite its +0.03977 fuzzy, because it enlarged the already-correct frame 0x160 -> 0x180 and moved the control fields to +0x70. Restore scalar control locals; deficit -1 -> 0, fuzzy 89.06881 -> 89.02904.
- init.frame.settings_first: group aoss received counts and wait settings with settings first layout. Deficit 0 -> -1; fuzzy 89.02904 -> 89.06881. Restored; target frame differs. Region counts: R4:-1, R6:-1, R16:-1, R18:+1, R20:-1, R28:+1, R30:+17, R36:-2, R39:+1, R41:-1, R44:+2, R48:-2, R51:-1, R62:+1, R67:-1, R77:+1, R79:-1, R93:-1, R95:-1, R113:-2, R115:-1, R118:+1, R121:-1, R144:+1, R146:-1, R160:-2, R162:-1, R169:-5, R172:-2, R174:+2.
- init.frame.intervals_first: group aoss received counts and wait settings with intervals first layout. Deficit 0 -> -1; fuzzy 89.02904 -> 89.06881. Restored; target frame differs. Region counts: R4:-1, R6:-1, R16:-1, R18:+1, R20:-1, R28:+1, R30:+17, R36:-2, R39:+1, R41:-1, R44:+2, R48:-2, R51:-1, R62:+1, R67:-1, R77:+1, R79:-1, R93:-1, R95:-1, R113:-2, R115:-1, R118:+1, R121:-1, R144:+1, R146:-1, R160:-2, R162:-1, R169:-5, R172:-2, R174:+2.
- init.stack.count_init_first: initialize the received count before the wait interval defaults. Deficit 0 -> 0; fuzzy 89.02904 -> 88.99053. Restored. Region counts: R4:-1, R6:-1, R7:+1, R16:-1, R18:+1, R20:-1, R28:+1, R30:+17, R36:-2, R39:+1, R41:-1, R44:+2, R48:-2, R51:-1, R62:+1, R67:-1, R77:+1, R79:-1, R93:-1, R95:-1, R113:-2, R115:-1, R118:+1, R121:-1, R144:+1, R146:-1, R160:-2, R162:-1, R169:-5, R172:-2, R174:+2.
- init.stack.settings_init_first: initialize the wait settings before the interval defaults. Deficit 0 -> 0; fuzzy 89.02904 -> 88.99053. Restored. Region counts: R4:-1, R6:-1, R7:+1, R16:-1, R18:+1, R20:-1, R28:+1, R30:+17, R36:-2, R39:+1, R41:-1, R44:+2, R48:-2, R51:-1, R62:+1, R67:-1, R77:+1, R79:-1, R93:-1, R95:-1, R113:-2, R115:-1, R118:+1, R121:-1, R144:+1, R146:-1, R160:-2, R162:-1, R169:-5, R172:-2, R174:+2.
- init.stack.count_settings_first: initialize received count and wait settings before intervals. Deficit 0 -> 0; fuzzy 89.02904 -> 88.86806. Restored. Region counts: R4:-1, R6:-1, R7:+1, R16:-1, R18:+1, R20:-1, R28:+1, R30:+17, R36:-2, R39:+1, R41:-1, R44:+2, R48:-2, R51:-1, R62:+1, R67:-1, R77:+1, R79:-1, R93:-1, R95:-1, R113:-2, R115:-1, R118:+1, R121:-1, R144:+1, R146:-1, R160:-2, R162:-1, R169:-5, R172:-2, R174:+2.
- init.flags.unsigned: compare the aoss enable flag as an unsigned bit mask. Deficit 0 -> 0; fuzzy 89.02904 -> 89.02904. Restored. Region counts: R4:-1, R6:-1, R7:+1, R16:-1, R18:+1, R20:-1, R28:+1, R30:+17, R36:-2, R39:+1, R41:-1, R44:+2, R48:-2, R51:-1, R62:+1, R67:-1, R77:+1, R79:-1, R93:-1, R95:-1, R113:-2, R115:-1, R118:+1, R121:-1, R144:+1, R146:-1, R160:-2, R162:-1, R169:-5, R172:-2, R174:+2.
- init.flags.snapshot: capture the aoss input flags before publishing runtime state. Deficit 0 -> 1; fuzzy 89.02904 -> 88.69381. Restored. Region counts: R6:-1, R7:+1, R16:-1, R18:+1, R20:-1, R28:+1, R30:+17, R36:-2, R39:+1, R41:-1, R44:+2, R48:-2, R51:-1, R62:+1, R67:-1, R77:+1, R79:-1, R93:-1, R95:-1, R113:-2, R115:-1, R118:+1, R121:-1, R144:+1, R146:-1, R160:-2, R162:-1, R169:-5, R172:-2, R174:+2.
- init.flags.test_before_stores: calculate the aoss enable flag before writing runtime fields. Deficit 0 -> 0; fuzzy 89.02904 -> 88.81124. Restored. Region counts: R4:-1, R6:-1, R7:+1, R16:-1, R18:+1, R20:-1, R28:+1, R30:+17, R36:-2, R39:+1, R41:-1, R44:+2, R48:-2, R51:-1, R62:+1, R67:-1, R77:+1, R79:-1, R93:-1, R95:-1, R113:-2, R115:-1, R118:+1, R121:-1, R144:+1, R146:-1, R160:-2, R162:-1, R169:-5, R172:-2, R174:+2.
- init.runtime.state_last: write the runtime state after the address and active flag. Deficit 0 -> 0; fuzzy 89.02904 -> 88.877525. Restored. Region counts: R4:-1, R6:-1, R7:+1, R16:-1, R18:+1, R20:-1, R28:+1, R30:+17, R36:-2, R39:+1, R41:-1, R44:+2, R48:-2, R51:-1, R62:+1, R67:-1, R77:+1, R79:-1, R93:-1, R95:-1, R113:-2, R115:-1, R118:+1, R121:-1, R144:+1, R146:-1, R160:-2, R162:-1, R169:-5, R172:-2, R174:+2.
- init.runtime.active_first: write the inactive runtime flag before its state and address. Deficit 0 -> 0; fuzzy 89.02904 -> 88.96591. Restored. Region counts: R4:-1, R6:-1, R7:+1, R16:-1, R18:+1, R20:-1, R28:+1, R30:+17, R36:-2, R39:+1, R41:-1, R44:+2, R48:-2, R51:-1, R62:+1, R67:-1, R77:+1, R79:-1, R93:-1, R95:-1, R113:-2, R115:-1, R118:+1, R121:-1, R144:+1, R146:-1, R160:-2, R162:-1, R169:-5, R172:-2, R174:+2.
- init.scan.limit_after_status: read the scan wait limit after status publication. Deficit 0 -> 0; fuzzy 89.02904 -> 89.14836. Kept, GATE PASS. Region counts: R4:-1, R16:-1, R18:+1, R20:-1, R28:+1, R30:+17, R36:-2, R39:+1, R41:-1, R44:+2, R48:-2, R51:-1, R62:+1, R67:-1, R77:+1, R79:-1, R93:-1, R95:-1, R113:-2, R115:-1, R118:+1, R121:-1, R144:+1, R146:-1, R160:-2, R162:-1, R169:-5, R172:-2, R174:+2.
- init.stack.decl_intervals_settings_count: declare aoss wait locals in intervals settings count order. Deficit 0 -> 0; fuzzy 89.14836 -> 89.157196. Kept, GATE PASS. Region counts: R4:-1, R16:-1, R18:+1, R20:-1, R28:+1, R30:+17, R36:-2, R39:+1, R41:-1, R44:+2, R48:-2, R51:-1, R62:+1, R67:-1, R77:+1, R79:-1, R93:-1, R95:-1, R113:-2, R115:-1, R118:+1, R121:-1, R144:+1, R146:-1, R160:-2, R162:-1, R169:-5, R172:-2, R174:+2.
- init.stack.decl_settings_intervals_count: declare aoss wait locals in settings intervals count order. Deficit 0 -> 0; fuzzy 89.157196 -> 89.14646. Restored. Region counts: R4:-1, R16:-1, R18:+1, R20:-1, R28:+1, R30:+17, R36:-2, R39:+1, R41:-1, R44:+2, R48:-2, R51:-1, R62:+1, R67:-1, R77:+1, R79:-1, R93:-1, R95:-1, R113:-2, R115:-1, R118:+1, R121:-1, R144:+1, R146:-1, R160:-2, R162:-1, R169:-5, R172:-2, R174:+2.
- init.stack.decl_count_intervals_settings: declare aoss wait locals in count intervals settings order. Deficit 0 -> 0; fuzzy 89.157196 -> 89.14331. Restored. Region counts: R4:-1, R16:-1, R18:+1, R20:-1, R28:+1, R30:+17, R36:-2, R39:+1, R41:-1, R44:+2, R48:-2, R51:-1, R62:+1, R67:-1, R77:+1, R79:-1, R93:-1, R95:-1, R113:-2, R115:-1, R118:+1, R121:-1, R144:+1, R146:-1, R160:-2, R162:-1, R169:-5, R172:-2, R174:+2.
- init.flags.halfword: keep the aoss enable mask in an unsigned halfword. Deficit 0 -> 0; fuzzy 89.157196 -> 89.008835. Restored. Region counts: R4:-1, R16:-1, R18:+1, R20:-1, R28:+1, R30:+17, R36:-2, R39:+1, R41:-1, R44:+2, R48:-2, R51:-1, R62:+1, R67:-1, R77:+1, R79:-1, R93:-1, R95:-1, R113:-2, R115:-1, R118:+1, R121:-1, R144:+1, R146:-1, R160:-2, R162:-1, R169:-5, R172:-2, R174:+2.
- init.flags.cast_halfword: compare the aoss enable bit after a halfword conversion. Deficit 0 -> 0; fuzzy 89.157196 -> 89.157196. Restored. Region counts: R4:-1, R16:-1, R18:+1, R20:-1, R28:+1, R30:+17, R36:-2, R39:+1, R41:-1, R44:+2, R48:-2, R51:-1, R62:+1, R67:-1, R77:+1, R79:-1, R93:-1, R95:-1, R113:-2, R115:-1, R118:+1, R121:-1, R144:+1, R146:-1, R160:-2, R162:-1, R169:-5, R172:-2, R174:+2.
- init.flags.cast_byte: compare the aoss enable bit after a byte conversion. Deficit 0 -> 0; fuzzy 89.157196 -> 89.157196. Restored. Region counts: R4:-1, R16:-1, R18:+1, R20:-1, R28:+1, R30:+17, R36:-2, R39:+1, R41:-1, R44:+2, R48:-2, R51:-1, R62:+1, R67:-1, R77:+1, R79:-1, R93:-1, R95:-1, R113:-2, R115:-1, R118:+1, R121:-1, R144:+1, R146:-1, R160:-2, R162:-1, R169:-5, R172:-2, R174:+2.
- init.scan.sleep_word: carry the scan sleep decrement as an unsigned word. Deficit 0 -> 0; fuzzy 89.157196 -> 90.181816. Kept, GATE PASS. Region counts: R4:-1, R16:-1, R18:+1, R20:-1, R28:+1, R30:+17, R36:-2, R39:+1, R41:-1, R44:+2, R48:-2, R51:-1, R67:-1, R77:+1, R79:-1, R95:-1, R113:-2, R115:-1, R118:+1, R121:-1, R144:+1, R146:-1, R160:-2, R162:-1, R169:-5, R172:-2, R174:+2.
- init.link.sleep_word: carry the link wait decrement as an unsigned word. Deficit 0 -> 1; fuzzy 90.181816 -> 90.50631. Kept, GATE PASS. Region counts: R4:-1, R16:-1, R18:+1, R20:-1, R28:+1, R30:+17, R36:-2, R39:+1, R41:-1, R42:+1, R44:+2, R48:-2, R51:-1, R67:-1, R77:+1, R79:-1, R95:-1, R113:-2, R115:-1, R118:+1, R121:-1, R144:+1, R146:-1, R160:-2, R162:-1, R169:-5, R172:-2, R174:+2.
- init.scan.sleep_reuse: use the chosen scan sleep interval for the sleep call. Deficit 1 -> 2; fuzzy 90.50631 -> 90.219696. Restored. Region counts: R4:-1, R16:-1, R18:+1, R28:+1, R30:+17, R36:-2, R39:+1, R41:-1, R42:+1, R44:+2, R48:-2, R51:-1, R67:-1, R77:+1, R79:-1, R95:-1, R113:-2, R115:-1, R118:+1, R121:-1, R144:+1, R146:-1, R160:-2, R162:-1, R169:-5, R172:-2, R174:+2.
- init.scan.sleep_after: choose the scan countdown decrement after the sleep returns. Deficit 1 -> 2; fuzzy 90.50631 -> 90.39331. Restored. Region counts: R4:-1, R16:-1, R18:+1, R28:+1, R30:+17, R36:-2, R39:+1, R41:-1, R42:+1, R44:+2, R48:-2, R51:-1, R67:-1, R77:+1, R79:-1, R95:-1, R113:-2, R115:-1, R118:+1, R121:-1, R144:+1, R146:-1, R160:-2, R162:-1, R169:-5, R172:-2, R174:+2.
- init.scan.sleep_branch: choose the scan sleep interval with an explicit branch. Deficit 1 -> 1; fuzzy 90.50631 -> 90.50631. Restored. Region counts: R4:-1, R16:-1, R18:+1, R20:-1, R28:+1, R30:+17, R36:-2, R39:+1, R41:-1, R42:+1, R44:+2, R48:-2, R51:-1, R67:-1, R77:+1, R79:-1, R95:-1, R113:-2, R115:-1, R118:+1, R121:-1, R144:+1, R146:-1, R160:-2, R162:-1, R169:-5, R172:-2, R174:+2.
- init.link.sleep_reuse: pass the link countdown interval directly to sleep. Deficit 1 -> 2; fuzzy 90.50631 -> 90.222855. Restored. Region counts: R4:-1, R16:-1, R18:+1, R20:-1, R28:+1, R30:+17, R36:-2, R39:+1, R42:+1, R44:+2, R48:-2, R51:-1, R67:-1, R77:+1, R79:-1, R95:-1, R113:-2, R115:-1, R118:+1, R121:-1, R144:+1, R146:-1, R160:-2, R162:-1, R169:-5, R172:-2, R174:+2.
- init.link.sleep_after: choose the initial link decrement after the sleep returns. Deficit 1 -> 2; fuzzy 90.50631 -> 90.48485. Restored. Region counts: R4:-1, R16:-1, R18:+1, R20:-1, R28:+1, R30:+17, R36:-2, R39:+1, R42:+1, R44:+2, R48:-2, R51:-1, R67:-1, R77:+1, R79:-1, R95:-1, R113:-2, R115:-1, R118:+1, R121:-1, R144:+1, R146:-1, R160:-2, R162:-1, R169:-5, R172:-2, R174:+2.
- init.link.sleep_branch: choose the initial link decrement with an explicit branch. Deficit 1 -> 1; fuzzy 90.50631 -> 90.50631. Restored. Region counts: R4:-1, R16:-1, R18:+1, R20:-1, R28:+1, R30:+17, R36:-2, R39:+1, R41:-1, R42:+1, R44:+2, R48:-2, R51:-1, R67:-1, R77:+1, R79:-1, R95:-1, R113:-2, R115:-1, R118:+1, R121:-1, R144:+1, R146:-1, R160:-2, R162:-1, R169:-5, R172:-2, R174:+2.
- init.manufacturer.local_length: keep the manufacturer length in a local before publishing it. Deficit 1 -> 1; fuzzy 90.50631 -> 90.50631. Restored. Region counts: R4:-1, R16:-1, R18:+1, R20:-1, R28:+1, R30:+17, R36:-2, R39:+1, R41:-1, R42:+1, R44:+2, R48:-2, R51:-1, R67:-1, R77:+1, R79:-1, R95:-1, R113:-2, R115:-1, R118:+1, R121:-1, R144:+1, R146:-1, R160:-2, R162:-1, R169:-5, R172:-2, R174:+2.
- init.manufacturer.branch_skip: skip the manufacturer copy when the name exceeds capacity. Deficit 1 -> 1; fuzzy 90.50631 -> 90.50631. Restored. Region counts: R4:-1, R16:-1, R18:+1, R20:-1, R28:+1, R30:+17, R36:-2, R39:+1, R41:-1, R42:+1, R44:+2, R48:-2, R51:-1, R67:-1, R77:+1, R79:-1, R95:-1, R113:-2, R115:-1, R118:+1, R121:-1, R144:+1, R146:-1, R160:-2, R162:-1, R169:-5, R172:-2, R174:+2.
- init.scan.guard_order: compare scan attempts against the connection limit in count order. Deficit 1 -> 1; fuzzy 90.50631 -> 90.51263. Kept, GATE PASS. Region counts: R4:-1, R16:-1, R18:+1, R20:-1, R28:+1, R30:+17, R36:-2, R39:+1, R41:-1, R42:+1, R44:+2, R48:-2, R51:-1, R67:-1, R77:+1, R79:-1, R95:-1, R113:-2, R115:-1, R118:+1, R121:-1, R144:+1, R146:-1, R160:-2, R162:-1, R169:-5, R172:-2, R174:+2.
- init.scan.delay_late: read the scan retry duration after the attempt guard. Deficit 1 -> 1; fuzzy 90.51263 -> 90.36995. Restored. Region counts: R4:-1, R20:-1, R28:+1, R30:+17, R36:-2, R39:+1, R41:-1, R42:+1, R44:+2, R48:-2, R51:-1, R67:-1, R77:+1, R79:-1, R95:-1, R113:-2, R115:-1, R118:+1, R121:-1, R144:+1, R146:-1, R160:-2, R162:-1, R169:-5, R172:-2, R174:+2.
- init.scan.explicit_narrow: narrow the scan countdown after subtracting its sleep interval. Deficit 1 -> 1; fuzzy 90.51263 -> 90.51263. Restored. Region counts: R4:-1, R16:-1, R18:+1, R20:-1, R28:+1, R30:+17, R36:-2, R39:+1, R41:-1, R42:+1, R44:+2, R48:-2, R51:-1, R67:-1, R77:+1, R79:-1, R95:-1, R113:-2, R115:-1, R118:+1, R121:-1, R144:+1, R146:-1, R160:-2, R162:-1, R169:-5, R172:-2, R174:+2.
- init.scan.sleep_calls: express the two scan sleep durations as separate call branches. Deficit 1 -> 0; fuzzy 90.51263 -> 90.2702. Kept, GATE PASS. Region counts: R4:-1, R16:-1, R18:+1, R20:+1, R21:-3, R28:+1, R30:+17, R36:-2, R39:+1, R41:-1, R42:+1, R44:+2, R48:-2, R51:-1, R67:-1, R77:+1, R79:-1, R95:-1, R113:-2, R115:-1, R118:+1, R121:-1, R144:+1, R146:-1, R160:-2, R162:-1, R169:-5, R172:-2, R174:+2.
- init.scan.sleep_local: name the scan sleep duration separately from its decrement. Deficit 0 -> 0; fuzzy 90.2702 -> 90.2702. Restored. Region counts: R4:-1, R16:-1, R18:+1, R20:+1, R21:-3, R28:+1, R30:+17, R36:-2, R39:+1, R41:-1, R42:+1, R44:+2, R48:-2, R51:-1, R67:-1, R77:+1, R79:-1, R95:-1, R113:-2, R115:-1, R118:+1, R121:-1, R144:+1, R146:-1, R160:-2, R162:-1, R169:-5, R172:-2, R174:+2.
- init.link.bottom_test: place the initial link loop test after its retry body. Deficit 0 -> 1; fuzzy 90.2702 -> 90.53725. Kept, GATE PASS. Region counts: R4:-1, R16:-1, R18:+1, R20:+1, R21:-3, R28:+1, R30:+17, R36:+1, R39:+1, R41:-1, R42:+1, R48:-2, R51:-1, R67:-1, R77:+1, R79:-1, R95:-1, R113:-2, R115:-1, R118:+1, R121:-1, R144:+1, R146:-1, R160:-2, R162:-1, R169:-5, R172:-2, R174:+2.
- init.link.signed_count: compare the initial link completion count as a signed halfword. Deficit 1 -> 1; fuzzy 90.53725 -> 90.388885. Restored. Region counts: R4:-1, R16:-1, R18:+1, R20:+1, R21:-3, R28:+1, R30:+17, R36:+1, R39:+1, R41:-1, R42:+1, R48:-2, R51:-1, R67:-1, R77:+1, R79:-1, R95:-1, R113:-2, R115:-1, R118:+1, R121:-1, R144:+1, R146:-1, R160:-2, R162:-1, R169:-5, R172:-2, R174:+2.
- init.link.status_unsigned: compare the initial link status word as an unsigned value. Deficit 1 -> 1; fuzzy 90.53725 -> 90.388885. Restored. Region counts: R4:-1, R16:-1, R18:+1, R20:+1, R21:-3, R28:+1, R30:+17, R36:+1, R39:+1, R41:-1, R42:+1, R48:-2, R51:-1, R67:-1, R77:+1, R79:-1, R95:-1, R113:-2, R115:-1, R118:+1, R121:-1, R144:+1, R146:-1, R160:-2, R162:-1, R169:-5, R172:-2, R174:+2.
- init.link.delay_late: read the initial link delay after testing connection success. Deficit 1 -> 1; fuzzy 90.53725 -> 90.47411. Restored. Region counts: R4:-1, R16:-1, R18:+1, R20:+1, R21:-3, R28:+1, R30:+17, R36:+1, R39:+1, R41:-1, R42:+1, R48:-2, R51:-1, R67:-1, R77:+1, R79:-1, R95:-1, R113:-2, R115:-1, R118:+1, R121:-1, R144:+1, R146:-1, R160:-2, R162:-1, R169:-5, R172:-2, R174:+2.
- init.records.copy_field: copy request identity bytes through the current request record. Deficit 1 -> 4; fuzzy 90.53725 -> 90.86301. Kept, GATE PASS. Region counts: R4:-1, R16:-1, R18:+1, R20:+1, R21:-3, R28:+1, R30:+17, R36:+1, R39:+1, R41:-1, R42:+1, R67:-1, R77:+1, R79:-1, R95:-1, R113:-2, R115:-1, R118:+1, R121:-1, R144:+1, R146:-1, R160:-2, R162:-1, R169:-5, R172:-2, R174:+2.
- init.records.offset_record: select the current request record through its byte stride. Deficit 4 -> 4; fuzzy 90.86301 -> 90.85038. Restored. Region counts: R4:-1, R16:-1, R18:+1, R20:+1, R21:-3, R28:+1, R30:+17, R36:+1, R39:+1, R41:-1, R42:+1, R67:-1, R77:+1, R79:-1, R95:-1, R113:-2, R115:-1, R118:+1, R121:-1, R144:+1, R146:-1, R160:-2, R162:-1, R169:-5, R172:-2, R174:+2.
- init.records.single_index: derive request byte offsets from the request record index. Deficit 4 -> 4; fuzzy 90.86301 -> 90.86301. Restored. Region counts: R4:-1, R16:-1, R18:+1, R20:+1, R21:-3, R28:+1, R30:+17, R36:+1, R39:+1, R41:-1, R42:+1, R67:-1, R77:+1, R79:-1, R95:-1, R113:-2, R115:-1, R118:+1, R121:-1, R144:+1, R146:-1, R160:-2, R162:-1, R169:-5, R172:-2, R174:+2.
- init.ip.named_result: retain the initial network configuration result under its own name. Deficit 4 -> 3; fuzzy 90.86301 -> 90.84659. Kept, GATE PASS. Region counts: R4:-1, R16:-1, R18:+1, R20:+1, R21:-3, R28:+1, R30:+16, R36:+1, R39:+1, R41:-1, R42:+1, R67:-1, R77:+1, R79:-1, R95:-1, R113:-2, R115:-1, R118:+1, R121:-1, R144:+1, R146:-1, R160:-2, R162:-1, R169:-5, R172:-2, R174:+2.
- init.ip.result_guard: test the named initial network configuration result directly. Trial error AssertionError: init.ip.result_guard did not change source; restored and excluded from coverage.
- init.ip.switch: dispatch initial network configuration success by its result code. Trial error ValueError: substring not found; restored and excluded from coverage.
- init.link.test_order: compare the initial link attempt count before its limit. Deficit 3 -> 3; fuzzy 90.84659 -> 90.84028. Restored. Region counts: R4:-1, R16:-1, R18:+1, R20:+1, R21:-3, R28:+1, R30:+16, R36:+1, R39:+1, R41:-1, R42:+1, R67:-1, R77:+1, R79:-1, R95:-1, R113:-2, R115:-1, R118:+1, R121:-1, R144:+1, R146:-1, R160:-2, R162:-1, R169:-5, R172:-2, R174:+2.
- init.link.narrow_delay: keep the initial link response duration unsigned at its load. Deficit 3 -> 3; fuzzy 90.84659 -> 90.84659. Restored. Region counts: R4:-1, R16:-1, R18:+1, R20:+1, R21:-3, R28:+1, R30:+16, R36:+1, R39:+1, R41:-1, R42:+1, R67:-1, R77:+1, R79:-1, R95:-1, R113:-2, R115:-1, R118:+1, R121:-1, R144:+1, R146:-1, R160:-2, R162:-1, R169:-5, R172:-2, R174:+2.
- init.link.explicit_sleep_calls: express the link sleep durations as separate call branches. Deficit 3 -> 2; fuzzy 90.84659 -> 90.61048. Kept, GATE PASS. Region counts: R4:-1, R16:-1, R18:+1, R20:+1, R21:-3, R28:+1, R30:-1, R32:+17, R36:+1, R39:+1, R41:-2, R42:+1, R67:-1, R77:+1, R79:-1, R95:-1, R113:-2, R115:-1, R118:+1, R121:-1, R144:+1, R146:-1, R160:-2, R162:-1, R169:-5, R172:-2, R174:+2.
- init.records.cursor: advance a request record pointer rather than recomputing its address. Deficit 2 -> 4; fuzzy 90.61048 -> 90.632576. Kept, GATE PASS. Region counts: R4:-1, R16:-1, R18:+1, R20:+1, R21:-3, R28:+1, R30:-1, R32:+17, R36:+1, R39:+1, R41:-2, R42:+1, R48:+2, R67:-1, R77:+1, R79:-1, R95:-1, R113:-2, R115:-1, R118:+1, R121:-1, R144:+1, R146:-1, R160:-2, R162:-1, R169:-5, R172:-2, R174:+2.
- init.records.index_offset: derive the current request record from the request index in bytes. Trial error AssertionError: init.records.index_offset did not change source; restored and excluded from coverage.
- init.records.for: iterate the three request records with a for loop. Trial error AssertionError: init.records.for did not change source; restored and excluded from coverage.
- init.ip.result_guard_current: test the captured initial network result directly. Deficit 4 -> 4; fuzzy 90.632576 -> 90.632576. Restored. Region counts: R4:-1, R16:-1, R18:+1, R20:+1, R21:-3, R28:+1, R30:-1, R32:+17, R36:+1, R39:+1, R41:-2, R42:+1, R48:+2, R67:-1, R77:+1, R79:-1, R95:-1, R113:-2, R115:-1, R118:+1, R121:-1, R144:+1, R146:-1, R160:-2, R162:-1, R169:-5, R172:-2, R174:+2.
- init.ip.switch_current: dispatch the captured initial network result with a switch. Deficit 4 -> 4; fuzzy 90.632576 -> 90.632576. Restored. Region counts: R4:-1, R16:-1, R18:+1, R20:+1, R21:-3, R28:+1, R30:-1, R32:+17, R36:+1, R39:+1, R41:-2, R42:+1, R48:+2, R67:-1, R77:+1, R79:-1, R95:-1, R113:-2, R115:-1, R118:+1, R121:-1, R144:+1, R146:-1, R160:-2, R162:-1, R169:-5, R172:-2, R174:+2.
- init.stack.poll_before_network: declare poll descriptors after network address words. Deficit 4 -> 4; fuzzy 90.632576 -> 90.63763. Kept, GATE PASS. Region counts: R4:-1, R16:-1, R18:+1, R20:+1, R21:-3, R28:+1, R30:-1, R32:+17, R36:+1, R39:+1, R41:-2, R42:+1, R48:+2, R67:-1, R77:+1, R79:-1, R95:-1, R113:-2, R115:-1, R118:+1, R121:-1, R144:+1, R146:-1, R160:-2, R162:-1, R169:-5, R172:-2, R174:+2.
- init.stack.time_before_socket: declare the poll time before the aligned socket address. Deficit 4 -> 4; fuzzy 90.63763 -> 90.62311. Restored; target frame differs. Region counts: R4:-1, R16:-1, R18:+1, R20:+1, R21:-3, R28:+1, R30:-1, R32:+17, R36:+1, R39:+1, R41:-2, R42:+1, R48:+2, R67:-1, R77:+1, R79:-1, R95:-1, R113:-2, R115:-1, R118:+1, R121:-1, R144:+1, R146:-1, R160:-2, R162:-1, R169:-5, R172:-2, R174:+2.
- init.stack.received_before_socket: declare the receive address before the aligned bind address. Deficit 4 -> 4; fuzzy 90.63763 -> 90.62311. Restored; target frame differs. Region counts: R4:-1, R16:-1, R18:+1, R20:+1, R21:-3, R28:+1, R30:-1, R32:+17, R36:+1, R39:+1, R41:-2, R42:+1, R48:+2, R67:-1, R77:+1, R79:-1, R95:-1, R113:-2, R115:-1, R118:+1, R121:-1, R144:+1, R146:-1, R160:-2, R162:-1, R169:-5, R172:-2, R174:+2.
- init.stack.time_array: represent poll seconds and microseconds as a two element time array. Deficit 4 -> 6; fuzzy 90.63763 -> 90.65783. Kept, GATE PASS. Region counts: R4:-1, R16:-1, R18:+1, R20:+1, R21:-3, R28:+1, R30:-1, R32:+17, R36:+1, R39:+1, R41:-2, R42:+1, R48:+2, R67:-1, R77:+1, R79:-1, R95:-1, R112:+2, R113:-2, R115:-1, R118:+1, R121:-1, R144:+1, R146:-1, R160:-2, R162:-1, R169:-5, R172:-2, R174:+2.
- init.address.guard_order: compare the next host address before the broadcast limit. Deficit 6 -> 6; fuzzy 90.65783 -> 90.66414. Kept, GATE PASS. Region counts: R4:-1, R16:-1, R18:+1, R20:+1, R21:-3, R28:+1, R30:-1, R32:+17, R36:+1, R39:+1, R41:-2, R42:+1, R48:+2, R67:-1, R77:+1, R79:-1, R95:-1, R112:+2, R113:-2, R115:-1, R118:+1, R121:-1, R144:+1, R146:-1, R160:-2, R162:-1, R169:-5, R172:-2, R174:+2.
- init.address.mask_first: read the subnet mask before computing the next network address. Build failed; restored.
- init.retry.error_if: select packet retry errors with ordered equality checks. Deficit 6 -> 8; fuzzy 90.66414 -> 90.5827. Restored. Region counts: R4:-1, R16:-1, R18:+1, R20:+1, R21:-3, R28:+1, R30:-1, R32:+17, R36:+1, R39:+1, R41:-2, R42:+1, R48:+2, R67:-1, R77:+1, R79:-1, R95:-1, R112:+2, R115:-1, R118:+1, R121:-1, R144:+1, R146:-1, R160:-2, R162:-1, R169:-5, R172:-2, R174:+2.
- init.retry.guard_order: compare the received count before the retry limit. Deficit 6 -> 6; fuzzy 90.66414 -> 90.670456. Kept, GATE PASS. Region counts: R4:-1, R16:-1, R18:+1, R20:+1, R21:-3, R28:+1, R30:-1, R32:+17, R36:+1, R39:+1, R41:-2, R42:+1, R48:+2, R67:-1, R77:+1, R79:-1, R95:-1, R112:+2, R113:-2, R115:-1, R118:+1, R121:-1, R144:+1, R146:-1, R160:-2, R162:-1, R169:-5, R172:-2, R174:+2.
- init.retry.delay_after_guard: load the packet retry delay after the exhaustion guard. Deficit 6 -> 6; fuzzy 90.670456 -> 90.75316. Kept, GATE PASS. Region counts: R4:-1, R16:-1, R18:+1, R20:+1, R21:-3, R28:+1, R30:-1, R32:+17, R36:+1, R39:+1, R41:-2, R42:+1, R48:+2, R67:-1, R77:+1, R79:-1, R95:-1, R112:+2, R113:-2, R115:-1, R118:+1, R121:-1, R144:+1, R146:-1, R160:-2, R162:-1, R169:-5, R172:-2, R174:+2.
- init.finish.status_local: publish the final protocol status after selecting its value. Deficit 6 -> 11; fuzzy 90.75316 -> 91.11553. Kept, GATE PASS. Region counts: R4:-1, R16:-1, R18:+1, R20:+1, R21:-3, R28:+1, R30:-1, R32:+17, R36:+1, R39:+1, R41:-2, R42:+1, R48:+2, R67:-1, R77:+1, R79:-1, R95:-1, R112:+2, R113:-2, R115:-1, R118:+1, R121:-1, R144:+1, R146:-1, R160:-2, R162:-1, R172:-2, R174:+2.
- init.finish.failure_first: handle final configuration failure before its success return. Deficit 11 -> 11; fuzzy 91.11553 -> 91.0827. Restored. Region counts: R4:-1, R16:-1, R18:+1, R20:+1, R21:-3, R28:+1, R30:-1, R32:+17, R36:+1, R39:+1, R41:-2, R42:+1, R48:+2, R67:-1, R77:+1, R79:-1, R95:-1, R112:+2, R113:-2, R115:-1, R118:+1, R121:-1, R144:+1, R146:-1, R160:-2, R162:-1.
- hello.frame.destination_last: declare the hello destination after the identity storage. Deficit 2 -> 2; fuzzy 89.78022 -> 89.772896. Restored. Region counts: R0:-2, R3:+1, R5:+1, R8:+1, R23:+1.
- hello.frame.identity_first: declare the hello identity before its record and key schedule. Deficit 2 -> 2; fuzzy 89.78022 -> 89.7619. Restored. Region counts: R0:-2, R3:+1, R5:+1, R8:+1, R23:+1.
- hello.frame.destination_scope: scope the hello destination to the send operation. Deficit 2 -> 2; fuzzy 89.78022 -> 89.772896. Restored. Region counts: R0:-2, R3:+1, R5:+1, R8:+1, R23:+1.
- hello.crc.halfword_parts: traverse the hello crc as four protocol halfwords. Deficit 2 -> 2; fuzzy 89.78022 -> 91.40293. Kept, GATE PASS. Region counts: R0:-2, R3:+1, R5:+1, R8:+1, R23:+1.
- hello.crc.shift_then_xor: separate crc index selection from shifting and table mixing. Trial error AssertionError: hello.crc.shift_then_xor did not change source; restored and excluded from coverage.
- hello.crc.byte_then_index: name each protocol byte before selecting its crc entry. Trial error AssertionError: hello.crc.byte_then_index did not change source; restored and excluded from coverage.
- hello.crc.xor_byte_first: xor each hello byte into the checksum before lookup. Trial error AssertionError: hello.crc.xor_byte_first did not change source; restored and excluded from coverage.
- hello.crc.table_first: write the crc table operand before the shifted checksum. Trial error AssertionError: hello.crc.table_first did not change source; restored and excluded from coverage.
- hello.crc.halfword_index: use an unsigned halfword index for hello crc bytes. Deficit 2 -> 2; fuzzy 91.40293 -> 91.40293. Restored. Region counts: R0:-2, R3:+1, R5:+1, R8:+1, R23:+1.
- hello.crc.signed_index: use a signed byte cursor index for each crc word. Deficit 2 -> 2; fuzzy 91.40293 -> 91.40293. Restored. Region counts: R0:-2, R3:+1, R5:+1, R8:+1, R23:+1.
- hello.crc.seed_after_init: seed the crc accumulator after initializing its table. Deficit 2 -> 2; fuzzy 91.40293 -> 90.772896. Restored. Region counts: R0:-2, R3:+1, R4:+1, R8:+1, R23:+1.
- hello.crc.complete_complement: complement the crc before retaining its checksum byte. Deficit 2 -> 3; fuzzy 91.40293 -> 89.51282. Restored. Region counts: R0:-2, R3:+1, R5:+2, R8:+1, R23:+1.
- hello.crc.split_current: separate crc lookup selection from the shift and table xor. Deficit 2 -> 2; fuzzy 91.40293 -> 90.688644. Restored. Region counts: R0:-2, R3:+1, R5:+1, R8:+1, R23:+1.
- hello.crc.byte_current: load each crc byte before computing its table index. Deficit 2 -> 2; fuzzy 91.40293 -> 91.40293. Restored. Region counts: R0:-2, R3:+1, R5:+1, R8:+1, R23:+1.
- hello.crc.xor_current: mix the protocol byte into the low crc byte before shifting. Deficit 2 -> 2; fuzzy 91.40293 -> 84.531136. Restored. Region counts: R0:-2, R3:+1, R5:+1, R8:+1, R23:+1.
- hello.crc.table_current: place the lookup operand first in the checksum xor. Deficit 2 -> 2; fuzzy 91.40293 -> 91.40293. Restored. Region counts: R0:-2, R3:+1, R5:+1, R8:+1, R23:+1.
- hello.crc.short_current: use a halfword byte index inside each crc protocol pair. Deficit 2 -> 2; fuzzy 91.40293 -> 91.40293. Restored. Region counts: R0:-2, R3:+1, R5:+1, R8:+1, R23:+1.
- hello.crc.int_current: use a signed byte index inside each crc protocol pair. Deficit 2 -> 2; fuzzy 91.40293 -> 91.40293. Restored. Region counts: R0:-2, R3:+1, R5:+1, R8:+1, R23:+1.
- hello.crc.final_byte: retain only the final crc byte outside the crc branch. Deficit 2 -> 2; fuzzy 91.40293 -> 91.3663. Restored. Region counts: R0:-2, R3:+1, R5:+1, R8:+1, R23:+1.
- hello.crc.signed_accumulator: keep a signed crc accumulator with an explicit logical shift. Deficit 2 -> 2; fuzzy 91.40293 -> 91.40293. Restored. Region counts: R0:-2, R3:+1, R5:+1, R8:+1, R23:+1.
- hello.crc.table_late: take the crc table pointer after table initialization. Deficit 2 -> 2; fuzzy 91.40293 -> 91.83883. Kept, GATE PASS. Region counts: R0:-2, R3:+1, R4:+1, R8:+1, R23:+1.
- hello.payload.after_flags: select the hello payload after publishing supported modes. Deficit 2 -> 2; fuzzy 91.83883 -> 90.72161. Restored. Region counts: R0:-2, R2:+1, R3:+1, R8:+1, R23:+1.
- hello.flags.local_modes: convert a local supported mode value before publishing it. Deficit 2 -> 2; fuzzy 91.83883 -> 91.83883. Restored. Region counts: R0:-2, R3:+1, R4:+1, R8:+1, R23:+1.
- hello.send.length_late: compute hello send length after completing the destination. Deficit 2 -> 3; fuzzy 91.83883 -> 91.06593. Restored. Region counts: R0:-2, R3:+1, R4:+1, R8:+1, R21:+2, R23:+1, R24:-1.
Mapper correction: target asm uses `subi` aliases. Earlier maps combined Capstone `addi` with the printed positive `subi` operand. Canonical target operands now come from decoding the instruction bytes; original-object disassembly confirms subtraction. Instruction counts and call alignment were unaffected. No plus-one source changes were made in this round. Exclude hello.crc.halfword_index and hello.crc.signed_index: their stale transformers only added unused declarations. Corrected short_current and int_current trials changed the actual loop index.
- zi.entry.flags_byte: represent candidate preparation flags as byte values. Deficit -1 -> -1; fuzzy 90.22073 -> 90.14774. Restored; target frame differs. Region counts: R1:+1, R4:+1, R8:-1, R13:-2, R25:+1, R26:+1, R35:-1, R37:+1, R42:-1, R44:+1, R46:+1, R51:+1, R55:+3, R57:-6, R59:-1, R60:-1, R62:-1, R66:+1, R67:+1, R68:+1, R69:-1.
- zi.entry.options_view: retain a typed candidate options pointer. Deficit -1 -> -63; fuzzy 90.22073 -> 88.374306. Restored. Region counts: R0:-3, R1:-2, R2:-1, R4:-1, R6:-3, R7:-1, R9:-4, R12:-3, R14:-4, R16:-1, R19:-1, R20:-2, R22:-1, R23:+1, R24:+1, R25:+1, R26:-1, R29:-1, R31:-3, R34:-1, R36:+1, R39:-1, R43:+1, R44:-1, R46:-2, R47:+1, R49:+1, R50:+1, R52:-5, R53:-1, R54:-8, R55:-1, R56:-7, R58:-4, R59:-2, R61:-1, R68:-4, R69:+1, R71:-2.
- zi.entry.work_view: retain a typed candidate workspace pointer. Deficit -1 -> -2; fuzzy 90.22073 -> 89.48454. Restored. Region counts: R3:+1, R7:-1, R12:-2, R24:+1, R25:+1, R34:-1, R36:+1, R41:-1, R43:+1, R45:+1, R50:+1, R54:+3, R56:-6, R58:-1, R59:-1, R61:-1, R65:+1, R66:+1, R67:+1, R68:-1.
- zi.entry.language_switch: classify phonetic candidate languages with a switch. Deficit -1 -> 9; fuzzy 90.22073 -> 89.549164. Restored. Region counts: R1:+16, R4:+1, R8:-1, R13:-2, R19:-1, R29:+1, R31:-1, R35:-1, R36:-1, R37:+1, R40:-1, R45:-1, R46:+1, R47:-1, R48:+1, R49:-1, R50:+1, R51:+1, R54:+1, R55:+2, R57:-6, R59:-1, R60:-2, R61:+1, R67:+2, R68:+1, R69:-1.
- zi.entry.dictionary_zero_loop: initialize dictionary status words in index order. Deficit -1 -> 2; fuzzy 90.22073 -> 89.706535. Restored. Region counts: R1:+7, R4:+1, R8:-1, R13:-2, R15:-1, R25:+1, R26:+1, R29:+1, R35:-1, R37:+1, R38:-1, R39:-1, R46:+1, R47:-1, R51:+1, R55:+3, R57:-6, R59:-1, R60:-1, R66:+1, R67:+1, R69:-1.
- zi.entry.dictionary_zero_explicit: initialize each dictionary status slot with its own statement. Deficit -1 -> -20; fuzzy 90.22073 -> 89.74557. Restored. Region counts: R1:-12, R4:+1, R8:-1, R13:-2, R18:-1, R19:-1, R25:+1, R27:-1, R29:+1, R35:-1, R37:+1, R38:-1, R45:-1, R51:+1, R52:-1, R55:+2, R57:-5, R58:+1, R59:-2, R60:-1, R62:-1, R65:-1, R66:+1, R67:+2, R70:+1.
- zi.normalize.direct_bound: compare case normalization indices with the input element count. Deficit -1 -> -1; fuzzy 90.22073 -> 90.22073. Restored. Region counts: R1:+1, R4:+1, R8:-1, R13:-2, R25:+1, R26:+1, R35:-1, R37:+1, R42:-1, R44:+1, R46:+1, R51:+1, R55:+3, R57:-6, R59:-1, R60:-1, R62:-1, R66:+1, R67:+1, R68:+1, R69:-1.
- zi.highlight.index_late: initialize the dictionary cursor immediately before dictionary scans. Deficit -1 -> -5; fuzzy 90.22073 -> 90.24582. Kept, GATE PASS. Region counts: R1:+1, R4:+1, R8:-1, R15:-1, R21:-1, R25:+1, R29:-2, R35:-1, R37:+1, R41:-1, R44:+1, R46:+1, R49:-1, R51:+1, R52:-1, R55:+2, R57:-6, R59:-1, R60:-1, R61:+1, R66:+1, R67:+1, R68:+1, R69:-1.
- zi.highlight.count_local: retain the input element count through highlighted candidate checks. Deficit -5 -> -5; fuzzy 90.24582 -> 90.202736. Restored. Region counts: R1:+1, R4:+1, R8:-1, R15:-1, R21:-1, R25:+1, R29:-2, R35:-1, R37:+1, R41:-1, R44:+1, R46:+1, R49:-1, R51:+1, R52:-1, R55:+2, R57:-6, R59:-1, R60:-1, R61:+1, R66:+1, R67:+1, R68:+1, R69:-1.
- zi.highlight.punct_result: name the punctuation result before testing the last input element. Deficit -5 -> -9; fuzzy 90.24582 -> 87.867714. Restored. Region counts: R3:+1, R7:-2, R14:-1, R20:-1, R24:+1, R28:-2, R34:-1, R36:+1, R40:-1, R43:+1, R45:+1, R48:-1, R50:+1, R51:-1, R54:+2, R56:-6, R58:-1, R59:-1, R60:+1, R65:+1, R66:+1, R67:+1, R68:-1, R71:-2.
- zi.highlight.index_initialized: initialize the dictionary cursor before every early finish path. Deficit -5 -> -7; fuzzy 90.24582 -> 90.00659. Restored. Region counts: R1:-1, R4:+1, R8:-1, R15:-1, R21:-1, R25:+1, R27:-1, R35:-1, R37:+1, R41:-1, R44:+1, R45:-1, R50:+1, R51:+1, R55:+2, R56:-1, R57:-6, R59:-2, R60:-1, R61:+1, R66:+1, R68:+1, R69:-1, R70:+1.
- zi.highlight.review_restore: restore the entry dictionary index initialization. index_late left the highlighted candidate early-finish path reading an uninitialized dictionaryIndex, so reject that trial despite GATE PASS. Deficit -5 -> -1; fuzzy 90.24582 -> 90.22073. The invalid index_late trial is excluded from coverage.
- zi.key_compare.while: compare candidate key bytes with a while loop and mismatch exit. Deficit -1 -> -1; fuzzy 90.22073 -> 90.60111. Kept, GATE PASS. Region counts: R1:+1, R4:+1, R8:-1, R13:-2, R25:+1, R26:+1, R35:-1, R37:+1, R42:-1, R44:+1, R46:+1, R51:+1, R55:+3, R57:-6, R59:-1, R60:-1, R62:-1, R66:+1, R67:+1, R68:+1, R69:-1.
- zi.key_compare.for: compare candidate key bytes with a for loop and mismatch exit. Trial error AssertionError: zi.key_compare.for did not change source; restored and excluded from coverage.
- zi.key_compare.do: compare candidate key bytes with a do loop and mismatch exit. Trial error AssertionError: zi.key_compare.do did not change source; restored and excluded from coverage.
- zi.emit.inverse: handle candidate skip count with inverse branch form. Deficit -1 -> -1; fuzzy 90.60111 -> 90.42879. Restored. Region counts: R1:+1, R4:+1, R8:-1, R13:-2, R25:+1, R26:+1, R27:-1, R29:+1, R35:-1, R37:+1, R38:-1, R39:-1, R42:-1, R44:+1, R46:+1, R49:-1, R50:+1, R51:+1, R55:-1, R56:-1, R57:-1, R58:+1, R59:-1, R60:-2, R61:+1, R65:-1, R66:+1, R67:+1, R68:+1, R69:-1, R70:+1.
- zi.emit.goto: handle candidate skip count with goto branch form. Deficit -1 -> -1; fuzzy 90.60111 -> 90.42879. Restored. Region counts: R1:+1, R4:+1, R8:-1, R13:-2, R25:+1, R26:+1, R27:-1, R29:+1, R35:-1, R37:+1, R38:-1, R39:-1, R42:-1, R44:+1, R46:+1, R49:-1, R50:+1, R51:+1, R55:-1, R56:-1, R57:-1, R58:+1, R59:-1, R60:-2, R61:+1, R65:-1, R66:+1, R67:+1, R68:+1, R69:-1, R70:+1.
- zi.emit.positive: handle candidate skip count with positive branch form. Deficit -1 -> -1; fuzzy 90.60111 -> 90.42752. Restored. Region counts: R1:+1, R4:+1, R8:-1, R13:-2, R25:+1, R26:+1, R27:-1, R29:+1, R35:-1, R37:+1, R38:-1, R39:-1, R42:-1, R44:+1, R46:+1, R49:-1, R50:+1, R51:+1, R55:-1, R56:-1, R57:-1, R58:+1, R59:-1, R60:-2, R61:+1, R65:-1, R66:+1, R67:+1, R68:+1, R69:-1, R70:+1.
- zi.suffix.copy_while: copy a candidate suffix with an explicit source bound. Deficit -1 -> -1; fuzzy 90.60111 -> 90.60111. Restored. Region counts: R1:+1, R4:+1, R8:-1, R13:-2, R25:+1, R26:+1, R35:-1, R37:+1, R42:-1, R44:+1, R46:+1, R51:+1, R55:+3, R57:-6, R59:-1, R60:-1, R62:-1, R66:+1, R67:+1, R68:+1, R69:-1.
- zi.suffix.copy_length: retain the input prefix length during candidate suffix copying. Deficit -1 -> -9; fuzzy 90.60111 -> 88.01444. Restored. Region counts: R3:+1, R7:-1, R12:-2, R17:-1, R24:+1, R25:+1, R26:-1, R34:-2, R36:+1, R41:-1, R43:+1, R45:+1, R48:-1, R49:+1, R50:+1, R54:+3, R56:-8, R57:+1, R58:-2, R59:-2, R61:-1, R64:+1, R66:+1, R67:+1, R69:+1, R70:-1, R71:-2.
- zi.emit.word_length_early: include the candidate terminator in length after writing it. Deficit -1 -> -1; fuzzy 90.60111 -> 90.60111. Restored. Region counts: R1:+1, R4:+1, R8:-1, R13:-2, R25:+1, R26:+1, R35:-1, R37:+1, R42:-1, R44:+1, R46:+1, R51:+1, R55:+3, R57:-6, R59:-1, R60:-1, R62:-1, R66:+1, R67:+1, R68:+1, R69:-1.
- zi.emit.byte_destination: write converted candidate bytes directly to the output cursor. Deficit -1 -> -1; fuzzy 90.60111 -> 90.60111. Restored. Region counts: R1:+1, R4:+1, R8:-1, R13:-2, R25:+1, R26:+1, R35:-1, R37:+1, R42:-1, R44:+1, R46:+1, R51:+1, R55:+3, R57:-6, R59:-1, R60:-1, R62:-1, R66:+1, R67:+1, R68:+1, R69:-1.
- zi.emit.native_bound: compare candidate result counts against the native maximum. Deficit -1 -> -1; fuzzy 90.60111 -> 90.60111. Restored. Region counts: R1:+1, R4:+1, R8:-1, R13:-2, R25:+1, R26:+1, R35:-1, R37:+1, R42:-1, R44:+1, R46:+1, R51:+1, R55:+3, R57:-6, R59:-1, R60:-1, R62:-1, R66:+1, R67:+1, R68:+1, R69:-1.
- zi.key_compare.current_for: compare candidate key bytes with an explicit for loop. Deficit -1 -> -1; fuzzy 90.60111 -> 90.60111. Restored. Region counts: R1:+1, R4:+1, R8:-1, R13:-2, R25:+1, R26:+1, R35:-1, R37:+1, R42:-1, R44:+1, R46:+1, R51:+1, R55:+3, R57:-6, R59:-1, R60:-1, R62:-1, R66:+1, R67:+1, R68:+1, R69:-1.
- zi.key_compare.current_do: compare candidate key bytes with an explicit do loop. Deficit -1 -> -8; fuzzy 90.60111 -> 90.138115. Restored. Region counts: R1:+1, R4:+1, R8:-1, R13:-2, R18:-1, R25:+1, R26:+1, R27:-1, R35:-2, R37:+1, R42:-1, R44:+1, R46:+1, R47:-1, R49:-1, R50:+1, R51:+1, R57:-6, R58:+1, R59:-2, R60:-2, R62:-1, R65:+1, R66:+1, R67:+1, R68:+1, R69:-1, R70:+1, R71:-1.
- zi.punct.zero_boolean: test the punctuation helper with a boolean negation. Deficit -1 -> -1; fuzzy 90.60111 -> 90.60111. Restored. Region counts: R1:+1, R4:+1, R8:-1, R13:-2, R25:+1, R26:+1, R35:-1, R37:+1, R42:-1, R44:+1, R46:+1, R51:+1, R55:+3, R57:-6, R59:-1, R60:-1, R62:-1, R66:+1, R67:+1, R68:+1, R69:-1.
- zi.punct.positive_first: handle punctuation before remembering the complete input count. Deficit -1 -> -1; fuzzy 90.60111 -> 90.38723. Restored. Region counts: R1:+1, R4:+1, R8:-1, R13:-2, R25:+1, R26:+1, R35:-1, R37:+1, R42:-1, R44:+1, R46:+1, R51:+1, R55:+3, R57:-6, R59:-1, R60:-1, R62:-1, R66:+1, R67:+1, R68:+1, R69:-1.
- zi.punct.full_result: retain the punctuation helper return in the work index. Deficit -1 -> -6; fuzzy 90.60111 -> 90.15509. Restored. Region counts: R1:+1, R4:+1, R8:-1, R13:-2, R25:+1, R26:+1, R27:-1, R29:+1, R31:-1, R35:-1, R37:+1, R38:-1, R40:-1, R42:-1, R44:+1, R45:-1, R46:+1, R47:-1, R49:-1, R51:+1, R52:-1, R55:+2, R56:-1, R57:-6, R58:+1, R59:-2, R60:-1, R61:+1, R64:+1, R65:+1, R66:+1, R67:+1, R69:-1, R70:+1.
- zi.tables.context_word: retain the context table flags before testing their high bit. Deficit -1 -> -4; fuzzy 90.60111 -> 90.45818. Restored. Region counts: R1:+1, R4:-1, R8:-1, R13:-2, R25:+1, R26:+1, R35:-1, R37:+1, R41:-1, R42:-1, R44:+1, R45:-1, R46:+1, R51:+1, R55:+3, R57:-6, R59:-1, R60:-1, R62:-1, R66:+1, R67:+1, R68:+1, R69:-1, R70:+1.
- zi.tables.context_index: retain context table flags in the general work index. Deficit -1 -> -6; fuzzy 90.60111 -> 90.161934. Restored. Region counts: R1:+1, R4:+1, R8:-1, R13:-2, R18:-1, R25:+1, R26:+1, R27:-1, R29:+1, R35:-1, R37:+1, R38:-1, R39:-1, R42:-1, R44:+1, R45:-1, R46:+1, R47:-1, R49:-1, R51:+1, R52:-1, R55:+2, R56:-1, R57:-6, R58:+1, R59:-2, R60:-2, R61:+1, R64:+1, R65:+1, R66:+1, R67:+1, R68:+1, R69:-1, R70:+1.
- zi.tables.order_index: retain dictionary order table flags in the work index. Deficit -1 -> -3; fuzzy 90.60111 -> 90.39255. Restored. Region counts: R1:+1, R4:+1, R8:-1, R13:-2, R25:+1, R29:+1, R35:-1, R38:-1, R44:+1, R46:+1, R47:-1, R49:-1, R50:+1, R51:+1, R52:-1, R55:+2, R56:-1, R57:-5, R59:-2, R60:-1, R61:+1, R62:-1, R63:-1, R64:+1, R65:+2, R66:+1, R67:+1, R68:+1, R69:-1.
- zi.tables.apostrophe_index: retain apostrophe table flags before scanning input elements. Deficit -1 -> -1; fuzzy 90.60111 -> 90.45768. Restored. Region counts: R1:+1, R4:+1, R8:-1, R13:-2, R26:+1, R29:+1, R35:-1, R38:-1, R44:+1, R46:+1, R47:-1, R49:-1, R50:+1, R51:+1, R52:-1, R55:+2, R57:-5, R59:-1, R60:-1, R61:+1, R62:-1, R63:-1, R64:+1, R65:+2, R66:+1, R67:+1, R68:+1, R69:-1.
- zi.native.word_width: retain candidate word lengths as signed 32 bit values explicitly. Deficit -1 -> -1; fuzzy 90.60111 -> 90.60111. Restored. Region counts: R1:+1, R4:+1, R8:-1, R13:-2, R25:+1, R26:+1, R35:-1, R37:+1, R42:-1, R44:+1, R46:+1, R51:+1, R55:+3, R57:-6, R59:-1, R60:-1, R62:-1, R66:+1, R67:+1, R68:+1, R69:-1.
- zi.native.count_width: retain the input element count as a signed halfword. Deficit -1 -> -12; fuzzy 90.60111 -> 88.95033. Restored; target frame differs. Region counts: R1:+1, R8:-1, R9:-1, R13:-2, R15:-1, R21:-1, R22:-1, R23:-1, R25:+1, R29:+1, R35:-1, R36:-1, R37:+1, R38:-1, R44:+1, R46:+1, R50:+1, R51:+1, R52:-1, R55:+3, R56:-1, R57:-6, R59:-2, R60:-4, R64:-1, R66:+1, R67:+1, R68:+1, R69:-1, R70:+1.
- zi.native.result_width: retain the candidate count as an unsigned halfword. Deficit -1 -> -9; fuzzy 90.60111 -> 90.009125. Restored; target frame differs. Region counts: R1:+1, R4:+1, R8:-1, R13:-2, R25:+1, R26:+1, R29:+1, R35:-1, R37:+1, R38:-1, R42:-1, R44:+1, R46:+1, R47:-1, R49:-1, R51:+1, R52:-1, R55:+1, R57:-7, R59:-2, R60:-2, R65:-1, R67:+2, R69:-1, R70:+1.
- cipher.xor.direct: mix the packet half and key mask directly into its byte. Deficit 0 -> 0; fuzzy 98.605446 -> 98.5034. Restored. Region counts: .
- cipher.xor.mask_first: load the key mask before mixing each packet byte. Deficit 0 -> 0; fuzzy 98.605446 -> 97.993195. Restored. Region counts: .
- cipher.xor.word: mix packet bytes in a full unsigned work value. Deficit 0 -> 0; fuzzy 98.605446 -> 98.605446. Restored. Region counts: .
- cipher.xor.reverse: write the key mask operand first in the packet xor. Deficit 0 -> 0; fuzzy 98.605446 -> 98.40136. Restored. Region counts: .
- options.cursor.same_view: reuse the response cursor as the initial option cursor. Deficit 0 -> 0; fuzzy 98.77193 -> 98.77193. Restored. Region counts: .
- options.length.late_assignment: publish the remaining option length after selecting configuration pointers. Deficit 0 -> 0; fuzzy 98.77193 -> 98.77193. Restored. Region counts: .
- options.flags.late: initialize accumulated configuration flags after validating the response. Deficit 0 -> 0; fuzzy 98.77193 -> 96.97369. Restored. Region counts: .
- options.length.unsigned: keep the response byte count unsigned with signed exhaustion checks. Deficit 0 -> 0; fuzzy 98.77193 -> 98.77193. Restored. Region counts: .
- decrypt.checksum.late: read the packet checksum only after allocating the cipher state. Deficit 0 -> 0; fuzzy 97.0405 -> 96.40187. Restored. Region counts: R11:+1, R12:-1.
- decrypt.cursors.input_first: assign the encrypted input cursor before the plaintext cursor. Deficit 0 -> 0; fuzzy 97.0405 -> 97.0405. Restored. Region counts: .
- decrypt.xor.state_first: write the cipher state byte before the packet byte in the xor. Deficit 0 -> 0; fuzzy 97.0405 -> 97.0405. Restored. Region counts: .
- wordcase.mode.byte: represent the word case selection as a boolean byte. Deficit 0 -> 0; fuzzy 99.09091 -> 99.09091. Restored. Region counts: .
- wordcase.work.typed: retain the typed workspace while changing word case. Deficit 0 -> -1; fuzzy 99.09091 -> 95.0. Restored. Region counts: R0:-1.
- wordcase.mode.late: initialize the case selection after retaining the input word. Deficit 0 -> 0; fuzzy 99.09091 -> 99.09091. Restored. Region counts: .
- init.ip.defer_result_init: define the initial network result at its first configuration call. Deficit 11 -> 11; fuzzy 91.11553 -> 91.12184. Kept, GATE PASS. Region counts: R4:-1, R16:-1, R18:+1, R20:+1, R21:-3, R28:+1, R30:-1, R32:+17, R36:+1, R39:+1, R41:-2, R42:+1, R48:+2, R67:-1, R77:+1, R79:-1, R95:-1, R112:+2, R113:-2, R115:-1, R118:+1, R121:-1, R144:+1, R146:-1, R160:-2, R162:-1, R172:-2, R174:+2.
- init.ip.keep_result_direct: check the named initial network result without copying it to state. Deficit 11 -> 11; fuzzy 91.12184 -> 91.12184. Restored. Region counts: R4:-1, R16:-1, R18:+1, R20:+1, R21:-3, R28:+1, R30:-1, R32:+17, R36:+1, R39:+1, R41:-2, R42:+1, R48:+2, R67:-1, R77:+1, R79:-1, R95:-1, R112:+2, R113:-2, R115:-1, R118:+1, R121:-1, R144:+1, R146:-1, R160:-2, R162:-1, R172:-2, R174:+2.
- init.ip.signed_result: give the captured initial network result an explicit signed width. Trial error AssertionError: init.ip.signed_result did not change source; restored and excluded from coverage.
- init.poll.restore_struct: retain poll seconds and microseconds as named time fields. Deficit 11 -> 9; fuzzy 91.12184 -> 91.15151. Kept, GATE PASS. Region counts: R4:-1, R16:-1, R18:+1, R20:+1, R21:-3, R28:+1, R30:-1, R32:+17, R36:+1, R39:+1, R41:-2, R42:+1, R48:+2, R67:-1, R77:+1, R79:-1, R95:-1, R113:-2, R115:-1, R118:+1, R121:-1, R144:+1, R146:-1, R160:-2, R162:-1, R172:-2, R174:+2.
- init.poll.clock_local: retain the bus tick rate before constructing the poll timeout. Deficit 9 -> 9; fuzzy 91.15151 -> 91.15151. Restored. Region counts: R4:-1, R16:-1, R18:+1, R20:+1, R21:-3, R28:+1, R30:-1, R32:+17, R36:+1, R39:+1, R41:-2, R42:+1, R48:+2, R67:-1, R77:+1, R79:-1, R95:-1, R113:-2, R115:-1, R118:+1, R121:-1, R144:+1, R146:-1, R160:-2, R162:-1, R172:-2, R174:+2.
- init.poll.timeout_unsigned: construct the poll timeout with explicitly unsigned carry terms. Deficit 9 -> 9; fuzzy 91.15151 -> 91.15151. Restored. Region counts: R4:-1, R16:-1, R18:+1, R20:+1, R21:-3, R28:+1, R30:-1, R32:+17, R36:+1, R39:+1, R41:-2, R42:+1, R48:+2, R67:-1, R77:+1, R79:-1, R95:-1, R113:-2, R115:-1, R118:+1, R121:-1, R144:+1, R146:-1, R160:-2, R162:-1, R172:-2, R174:+2.
- hello.frame.key_scope: limit the cipher schedule lifetime to the encrypted payload branch. Deficit 2 -> 2; fuzzy 91.83883 -> 91.83883. Restored. Region counts: R0:-2, R3:+1, R4:+1, R8:+1, R23:+1.
- hello.frame.record_scope: limit the hello record lifetime to payload construction. Deficit 2 -> 2; fuzzy 91.83883 -> 91.809525. Restored. Region counts: R0:-2, R3:+1, R4:+1, R8:+1, R23:+1.
- hello.runtime.views: retain the runtime pointer through hello conversion and send. Deficit 2 -> 2; fuzzy 91.83883 -> 91.468864. Restored. Region counts: R0:-3, R3:+1, R4:+1, R8:+1, R23:+2.
- hello.key.views: retain the key nonce pointer through both hello key copies. Deficit 2 -> 2; fuzzy 91.83883 -> 90.93773. Restored. Region counts: R0:-2, R3:+1, R8:+1, R9:+1, R23:+1.
- hello.active.byte: test the runtime active flag in its declared byte type. Deficit 2 -> 2; fuzzy 91.83883 -> 91.61905. Restored. Region counts: R0:-2, R3:+1, R4:+1, R8:+1, R23:+1.
- hello.cipher.output_field: publish each encrypted hello byte through the encrypted data field. Deficit 2 -> 2; fuzzy 91.83883 -> 91.83883. Restored. Region counts: R0:-2, R3:+1, R4:+1, R8:+1, R23:+1.
- init.link.initial_test: enter the initial link loop through its condition. Deficit 9 -> 8; fuzzy 91.15151 -> 91.116165. Kept, GATE PASS. Region counts: R4:-1, R16:-1, R18:+1, R20:+1, R21:-3, R28:+1, R30:-1, R32:+17, R39:+1, R41:-2, R42:+1, R48:+2, R67:-1, R77:+1, R79:-1, R95:-1, R113:-2, R115:-1, R118:+1, R121:-1, R144:+1, R146:-1, R160:-2, R162:-1, R172:-2, R174:+2.
- init.retry.sleep_calls: express the protocol retry sleep durations as separate branches. Deficit 8 -> 7; fuzzy 91.116165 -> 91.04987. Kept, GATE PASS. Region counts: R4:-1, R16:-1, R18:+1, R20:+1, R21:-3, R28:+1, R30:-1, R32:+17, R39:+1, R41:-2, R42:+1, R48:+2, R67:-1, R77:+1, R79:-1, R95:-1, R113:-2, R115:+1, R116:-3, R118:+1, R121:-1, R144:+1, R146:-1, R160:-2, R162:-1, R172:-2, R174:+2.
- init.receive.sleep_calls: express the received packet retry sleep durations as separate branches. Deficit 7 -> 6; fuzzy 91.04987 -> 90.98359. Kept, GATE PASS. Region counts: R4:-1, R16:-1, R18:+1, R20:+1, R21:-3, R28:+1, R30:-1, R32:+17, R39:+1, R41:-2, R42:+1, R48:+2, R67:-1, R77:+1, R79:-1, R95:-1, R113:-2, R115:+1, R116:-3, R118:+1, R121:-1, R144:+1, R146:-1, R160:-2, R162:+1, R163:-3, R172:-2, R174:+2.
- init.reconnect.sleep_calls: express reconnect sleep durations as separate branches. Deficit 6 -> 5; fuzzy 90.98359 -> 90.9173. Kept, GATE PASS. Region counts: R4:-1, R16:-1, R18:+1, R20:+1, R21:-3, R28:+1, R30:-1, R32:+17, R39:+1, R41:-2, R42:+1, R48:+2, R67:-1, R77:+1, R79:+1, R80:-3, R95:-1, R113:-2, R115:-2, R118:+1, R121:-1, R144:+1, R146:-1, R160:-2, R162:+1, R163:-3, R172:-2, R174:+2.
- init.receive_link.sleep_calls: express received link sleep durations as separate branches. Deficit 5 -> 4; fuzzy 90.9173 -> 90.67109. Kept, GATE PASS. Region counts: R4:-1, R16:-1, R18:+1, R20:+1, R21:-3, R28:+1, R30:-1, R32:+17, R39:+1, R41:-2, R42:+1, R48:+2, R67:-1, R77:+1, R79:+1, R80:-3, R95:-1, R113:-2, R115:+1, R116:-3, R118:+1, R121:-1, R144:+1, R146:+1, R147:-3, R160:-2, R162:+1, R163:-3, R172:-2, R174:+2.
- init.retry.sleep_no_preselect: select the protocol retry decrement only after sleeping. Trial error AssertionError: init.retry.sleep_no_preselect did not change source; restored and excluded from coverage.
- init.receive.sleep_no_preselect: select the received retry decrement only after sleeping. Trial error AssertionError: init.receive.sleep_no_preselect did not change source; restored and excluded from coverage.
- init.reconnect.delay_late: load the reconnect duration after testing successful connection. Deficit 4 -> 4; fuzzy 90.67109 -> 90.80051. Kept, GATE PASS. Region counts: R4:-1, R16:-1, R18:+1, R20:+1, R21:-3, R28:+1, R30:-1, R32:+17, R39:+1, R41:-2, R42:+1, R48:+2, R67:-1, R77:+1, R79:+1, R80:-3, R95:-1, R113:-2, R115:+1, R116:-3, R118:+1, R121:-1, R144:+1, R146:+1, R147:-3, R160:-2, R162:+1, R163:-3, R172:-2, R174:+2.
- init.receive_link.delay_late: load the received link duration after testing successful connection. Deficit 4 -> 4; fuzzy 90.80051 -> 90.84154. Kept, GATE PASS. Region counts: R4:-1, R16:-1, R18:+1, R20:+1, R21:-3, R28:+1, R30:-1, R32:+17, R39:+1, R41:-2, R42:+1, R48:+2, R67:-1, R77:+1, R79:+1, R80:-3, R95:-1, R113:-2, R115:+1, R116:-3, R118:+1, R121:-1, R144:+1, R146:+1, R147:-3, R160:-2, R162:+1, R163:-3, R172:-2, R174:+2.
- init.finish.success_label: branch to final success after testing configuration extraction. Deficit 4 -> 4; fuzzy 90.84154 -> 90.893936. Kept, GATE PASS. Region counts: R4:-1, R16:-1, R18:+1, R20:+1, R21:-3, R28:+1, R30:-1, R32:+17, R39:+1, R41:-2, R42:+1, R48:+2, R67:-1, R77:+1, R79:+1, R80:-3, R95:-1, R113:-2, R115:+1, R116:-3, R118:+1, R121:-1, R144:+1, R146:+1, R147:-3, R160:-2, R162:+1, R163:-3.
- init.finish.return_success: return success directly after final configuration extraction. Trial error AssertionError: init.finish.return_success did not change source; restored and excluded from coverage.
- init.finish.result_direct: use the extraction result as the final successful result code. Trial error AssertionError: init.finish.result_direct did not change source; restored and excluded from coverage.
- init.records.offset_before: retain request byte offsets and select the nonce record before. Deficit 4 -> -1; fuzzy 90.893936 -> 90.916664. Kept, GATE PASS. Region counts: R4:-1, R16:-1, R18:+1, R20:+1, R21:-3, R28:+1, R30:-1, R32:+17, R39:+1, R41:-2, R42:+1, R48:-2, R51:-1, R67:-1, R77:+1, R79:+1, R80:-3, R95:-1, R113:-2, R115:+1, R116:-3, R118:+1, R121:-1, R144:+1, R146:+1, R147:-3, R160:-2, R162:+1, R163:-3.
- init.records.offset_after: retain request byte offsets and select the nonce record after. Trial error ValueError: substring not found; restored and excluded from coverage.
- init.records.offset_byte_pointer: retain request byte offsets and select the nonce record byte pointer. Trial error ValueError: substring not found; restored and excluded from coverage.
- init.retry.select_after_sleep: compute the protocol retry countdown step after sleeping. Deficit -1 -> 0; fuzzy 90.916664 -> 91.010735. Kept, GATE PASS. Region counts: R4:-1, R16:-1, R18:+1, R20:+1, R21:-3, R28:+1, R30:-1, R32:+17, R39:+1, R41:-2, R42:+1, R48:-2, R51:-1, R67:-1, R77:+1, R79:+1, R80:-3, R95:-1, R113:-2, R115:+2, R116:-3, R118:+1, R121:-1, R144:+1, R146:+1, R147:-3, R160:-2, R162:+1, R163:-3.
- init.receive.select_after_sleep: compute the received retry countdown step after sleeping. Deficit 0 -> 1; fuzzy 91.010735 -> 91.07386. Kept, GATE PASS. Region counts: R4:-1, R16:-1, R18:+1, R20:+1, R21:-3, R28:+1, R30:-1, R32:+17, R39:+1, R41:-2, R42:+1, R48:-2, R51:-1, R67:-1, R77:+1, R79:+1, R80:-3, R95:-1, R113:-2, R115:+2, R116:-3, R118:+1, R121:-1, R144:+1, R146:+1, R147:-3, R160:-2, R162:+2, R163:-3.
- init.finish.direct_label_return: return zero from the completed configuration label. Deficit 1 -> 1; fuzzy 91.07386 -> 91.07386. Restored. Region counts: R4:-1, R16:-1, R18:+1, R20:+1, R21:-3, R28:+1, R30:-1, R32:+17, R39:+1, R41:-2, R42:+1, R48:-2, R51:-1, R67:-1, R77:+1, R79:+1, R80:-3, R95:-1, R113:-2, R115:+2, R116:-3, R118:+1, R121:-1, R144:+1, R146:+1, R147:-3, R160:-2, R162:+2, R163:-3.
- init.finish.label_result: return the successful extraction result through the final result code. Deficit 1 -> 1; fuzzy 91.07386 -> 91.00126. Restored. Region counts: R4:-1, R16:-1, R18:+1, R20:+1, R21:-3, R28:+1, R30:-1, R32:+17, R39:+1, R41:-2, R42:+1, R48:-2, R51:-1, R67:-1, R77:+1, R79:+1, R80:-3, R95:-1, R113:-2, R115:+2, R116:-3, R118:+1, R121:-1, R144:+1, R146:+1, R147:-3, R160:-2, R162:+2, R163:-3, R172:-1, R174:+1.
- init.retry.select_before_sleep: reuse the protocol retry duration when issuing its sleep call. Deficit 1 -> 6; fuzzy 91.07386 -> 90.96401. Restored. Region counts: R4:-1, R16:-1, R18:+1, R20:+1, R21:-3, R28:+1, R30:-1, R32:+17, R39:+1, R41:-2, R42:+1, R48:-2, R51:-1, R62:+1, R67:-1, R77:+1, R79:-2, R93:-1, R95:-1, R113:-2, R115:+4, R118:+1, R121:-1, R144:+1, R146:+1, R147:-3, R160:-2, R162:+2, R163:-3.
- init.receive.select_before_sleep: reuse the received retry duration when issuing its sleep call. Deficit 1 -> 6; fuzzy 91.07386 -> 90.96401. Restored. Region counts: R4:-1, R16:-1, R18:+1, R20:+1, R21:-3, R28:+1, R30:-1, R32:+17, R39:+1, R41:-2, R42:+1, R48:-2, R51:-1, R62:+1, R67:-1, R77:+1, R79:+1, R80:-3, R93:-1, R95:-1, R113:-2, R115:+2, R116:-3, R118:+1, R121:-1, R144:+1, R146:+1, R147:-3, R160:-2, R162:+4.
- init.state.split_entry: keep protocol state separate from connection call results at entry. Deficit 1 -> 2; fuzzy 91.07386 -> 91.01768. Restored. Region counts: R4:-1, R16:-1, R18:+1, R20:+1, R21:-3, R28:+1, R30:-1, R32:+17, R39:+1, R41:-2, R42:+1, R48:-2, R51:-1, R62:+1, R67:-1, R77:+1, R79:+1, R80:-3, R95:-1, R113:-2, R115:+2, R116:-3, R118:+1, R121:-1, R144:+1, R146:+1, R147:-3, R160:-2, R162:+2, R163:-3.
- init.state.split_before_memset: keep protocol state separate from connection call results at before memset. Deficit 1 -> 1; fuzzy 91.07386 -> 90.98232. Restored. Region counts: R1:-1, R4:-1, R16:-1, R18:+1, R20:+1, R21:-3, R28:+1, R30:-1, R32:+17, R39:+1, R41:-2, R42:+1, R48:-2, R51:-1, R62:+1, R67:-1, R77:+1, R79:+1, R80:-3, R95:-1, R113:-2, R115:+2, R116:-3, R118:+1, R121:-1, R144:+1, R146:+1, R147:-3, R160:-2, R162:+2, R163:-3.
- init.records.nonce_after_copy: select the indexed request record after copying its identity. Deficit 1 -> 1; fuzzy 91.07386 -> 90.95707. Restored. Region counts: R4:-1, R16:-1, R18:+1, R20:+1, R21:-3, R28:+1, R30:-1, R32:+17, R39:+1, R41:-2, R42:+1, R50:-2, R51:-1, R67:-1, R77:+1, R79:+1, R80:-3, R95:-1, R113:-2, R115:+2, R116:-3, R118:+1, R121:-1, R144:+1, R146:+1, R147:-3, R160:-2, R162:+2, R163:-3.
- init.records.nonce_byte_offset: select the indexed nonce record through the request byte offset. Deficit 1 -> 3; fuzzy 91.07386 -> 90.93119. Restored. Region counts: R4:-1, R16:-1, R18:+1, R20:+1, R21:-3, R28:+1, R30:-1, R32:+17, R39:+1, R41:-2, R42:+1, R48:-1, R67:-1, R77:+1, R79:+1, R80:-3, R95:-1, R113:-2, R115:+2, R116:-3, R118:+1, R121:-1, R144:+1, R146:+1, R147:-3, R160:-2, R162:+2, R163:-3.
- init.receive.preselect_correct: choose the received retry step before its sleep branches. Deficit 1 -> 0; fuzzy 91.07386 -> 91.19381. Kept, GATE PASS. Region counts: R4:-1, R16:-1, R18:+1, R20:+1, R21:-3, R28:+1, R30:-1, R32:+17, R39:+1, R41:-2, R42:+1, R48:-2, R51:-1, R67:-1, R77:+1, R79:+1, R80:-3, R95:-1, R113:-2, R115:+1, R116:-3, R118:+1, R121:-1, R144:+1, R146:+1, R147:-3, R160:-2, R162:+2, R163:-3.
- zi.output.char_pointer: retain the encoded output in its library character type. Deficit -1 -> -1; fuzzy 90.60111 -> 90.60111. Restored. Region counts: R1:+1, R4:+1, R8:-1, R13:-2, R25:+1, R26:+1, R35:-1, R37:+1, R42:-1, R44:+1, R46:+1, R51:+1, R55:+3, R57:-6, R59:-1, R60:-1, R62:-1, R66:+1, R67:+1, R68:+1, R69:-1.
- zi.output.local_char: convert each output character before assigning its output slot. Deficit -1 -> -9; fuzzy 90.60111 -> 87.789406. Restored. Region counts: R3:+1, R7:-1, R12:-2, R17:-1, R24:+1, R25:+1, R26:-1, R34:-2, R36:+1, R41:-1, R43:+1, R45:+1, R48:-1, R49:+1, R50:+1, R54:+3, R56:-8, R57:+1, R58:-2, R59:-2, R61:-1, R64:+1, R66:+1, R67:+1, R69:+1, R70:-1, R71:-2.
- zi.output.cast_byte: publish converted candidate characters through an explicit byte conversion. Deficit -1 -> -5; fuzzy 90.60111 -> 90.36822. Restored. Region counts: R1:+1, R4:+1, R8:-1, R13:-2, R18:-1, R25:+1, R26:+1, R27:-1, R35:-2, R37:+1, R42:-1, R44:+1, R46:+1, R49:-1, R50:+1, R51:+1, R55:+3, R57:-7, R58:+1, R59:-2, R60:-2, R62:-1, R65:+1, R67:+1, R68:+1, R70:+1, R71:-1.
- zi.phonetic.word_length_mask: compare phonetic candidate lengths in byte width on both sides. Deficit -1 -> -2; fuzzy 90.60111 -> 90.44729. Restored. Region counts: R1:+1, R4:+1, R8:-1, R13:-2, R25:+1, R26:+1, R35:-1, R37:+1, R42:-1, R44:+1, R46:+1, R53:-1, R54:+1, R55:+3, R57:-6, R59:-1, R60:-1, R62:-1, R66:+1, R67:+1, R68:+1, R69:-1.
- zi.phonetic.tail_pointer: retain the candidate tail while testing phonetic separators. Deficit -1 -> -1; fuzzy 90.60111 -> 90.47947. Restored. Region counts: R1:+1, R4:+1, R8:-1, R13:-2, R25:+1, R26:+1, R35:-1, R37:+1, R42:-1, R44:+1, R46:+1, R51:+1, R55:+3, R57:-6, R59:-1, R60:-1, R62:-1, R66:+1, R67:+1, R68:+1, R69:-1.
- zi.phonetic.tail_local: retain the phonetic ending character before testing its two separators. Deficit -1 -> -2; fuzzy 90.60111 -> 90.31931. Restored. Region counts: R1:+1, R4:+1, R8:-1, R13:-2, R25:+1, R26:+1, R35:-1, R37:+1, R39:-1, R42:-1, R44:+1, R46:+1, R51:+2, R55:+3, R57:-6, R59:-1, R60:-1, R62:-1, R66:+1, R67:+1, R69:-1.
- zi.finish.counts_scope: retain the candidate count array during final dictionary count updates. Deficit -1 -> -6; fuzzy 90.60111 -> 88.424225. Restored. Region counts: R3:+1, R7:-1, R12:-2, R24:+1, R25:+1, R34:-1, R36:+1, R41:-1, R43:+1, R45:+1, R50:+1, R54:+3, R56:-6, R58:-1, R59:-1, R61:-1, R65:+1, R66:+1, R67:+1, R68:-1, R70:-2, R71:-2.
- zi.finish.counts_reverse_guard: test the native dictionary count before the final dictionary index. Deficit -1 -> -1; fuzzy 90.60111 -> 90.55854. Restored. Region counts: R1:+1, R4:+1, R8:-1, R13:-2, R25:+1, R26:+1, R35:-1, R37:+1, R42:-1, R44:+1, R46:+1, R51:+1, R55:+3, R57:-6, R59:-1, R60:-1, R62:-1, R66:+1, R67:+1, R68:+1, R69:-1.
- zi.finish.counts_decrement: decrement the dictionary count cursor in the loop condition. Deficit -1 -> -1; fuzzy 90.60111 -> 90.599594. Restored. Region counts: R1:+1, R4:+1, R8:-1, R13:-2, R25:+1, R26:+1, R35:-1, R37:+1, R42:-1, R44:+1, R46:+1, R51:+1, R55:+3, R57:-6, R59:-1, R60:-1, R62:-1, R66:+1, R67:+1, R68:+1, R69:-1.
- init.state.split_runtime: retain protocol state separately after publishing runtime fields. Deficit 0 -> 0; fuzzy 91.19381 -> 91.15909. Restored. Region counts: R4:-2, R16:-1, R18:+1, R20:+1, R21:-3, R28:+1, R30:-1, R32:+17, R39:+1, R41:-2, R42:+1, R48:-2, R51:-1, R62:+1, R67:-1, R77:+1, R79:+1, R80:-3, R95:-1, R113:-2, R115:+1, R116:-3, R118:+1, R121:-1, R144:+1, R146:+1, R147:-3, R160:-2, R162:+2, R163:-3.
- zi.phonetic.guarded_ending: load the phonetic ending after validating the candidate length. Deficit -1 -> -3; fuzzy 90.60111 -> 88.10086. Restored. Region counts: R3:+1, R7:-1, R12:-2, R24:+1, R25:+1, R34:-1, R36:+1, R41:-1, R43:+1, R45:+1, R50:+2, R54:+3, R56:-6, R58:-1, R59:-1, R61:-1, R65:+1, R66:+1, R67:+1, R68:-1, R71:-2.
- zi.prefix.cursor_compound: advance candidate and input cursors with compound assignments. Deficit -1 -> -1; fuzzy 90.60111 -> 90.60111. Restored. Region counts: R1:+1, R4:+1, R8:-1, R13:-2, R25:+1, R26:+1, R35:-1, R37:+1, R42:-1, R44:+1, R46:+1, R51:+1, R55:+3, R57:-6, R59:-1, R60:-1, R62:-1, R66:+1, R67:+1, R68:+1, R69:-1.
- zi.prefix.count_byte: use the stored prefix count directly in candidate prefix copying. Deficit -1 -> -1; fuzzy 90.60111 -> 90.60111. Restored. Region counts: R1:+1, R4:+1, R8:-1, R13:-2, R25:+1, R26:+1, R35:-1, R37:+1, R42:-1, R44:+1, R46:+1, R51:+1, R55:+3, R57:-6, R59:-1, R60:-1, R62:-1, R66:+1, R67:+1, R68:+1, R69:-1.
- zi.prefix.cursor_view: retain the stored prefix pointer while validating prefix characters. Deficit -1 -> -6; fuzzy 90.60111 -> 88.34643. Restored. Region counts: R3:+1, R7:-1, R12:-2, R20:-2, R24:+1, R25:+1, R34:-1, R36:+1, R41:-1, R43:+1, R45:+1, R50:+1, R54:+3, R56:-6, R58:-1, R59:-1, R61:-1, R65:+1, R66:+1, R67:+1, R68:-1, R71:-2.
- zi.prefix.next_count_compare: compare prefix length plus one against the input count. Deficit -1 -> -1; fuzzy 90.60111 -> 90.494675. Restored. Region counts: R1:+1, R4:+1, R8:-1, R13:-2, R25:+1, R26:+1, R35:-1, R37:+1, R42:-1, R44:+1, R46:+1, R51:+1, R55:+3, R57:-6, R59:-1, R60:-1, R62:-1, R66:+1, R67:+1, R68:+1, R69:-1.
- zi.prefix.previous_element_count: retain the previous input count while validating final prefix fields. Deficit -1 -> -2; fuzzy 90.60111 -> 90.371765. Restored. Region counts: R1:+1, R4:+1, R8:-1, R13:-2, R25:+1, R26:+1, R35:-1, R37:+1, R42:-1, R44:+1, R46:+1, R51:+1, R55:+3, R57:-6, R59:-1, R60:-1, R62:-1, R66:+1, R67:+1, R68:+1, R69:-3, R70:+1.
- zi.prefix.guard_order: test the final input count before its prefix length. Deficit -1 -> -1; fuzzy 90.60111 -> 90.49341. Restored. Region counts: R1:+1, R4:+1, R8:-1, R13:-2, R25:+1, R26:+1, R35:-1, R37:+1, R42:-1, R44:+1, R46:+1, R51:+1, R55:+3, R57:-6, R59:-1, R60:-1, R62:-1, R66:+1, R67:+1, R68:+1, R69:-1.
- zi.dictionary.status_byte: store dictionary search states in their declared byte width. Deficit -1 -> 3; fuzzy 90.60111 -> 89.41257. Restored; target frame differs. Region counts: R1:+1, R4:+1, R13:-2, R15:-1, R21:+1, R25:+1, R26:+1, R27:-1, R32:+1, R34:-1, R35:-1, R38:+1, R41:+1, R44:+3, R45:+2, R47:-1, R51:+1, R52:-1, R54:+1, R55:+2, R56:-1, R57:-6, R59:-1, R60:-1, R61:+1, R63:-1, R64:+1, R66:+1, R67:+1, R68:+1, R69:-1.
- zi.dictionary.return_byte: retain a matched dictionary word length in a local byte. Deficit -1 -> -5; fuzzy 90.60111 -> 88.242775. Restored. Region counts: R3:+1, R7:-1, R12:-2, R24:+1, R25:+1, R34:-1, R36:+1, R41:-1, R42:-1, R43:+1, R45:+1, R50:+1, R54:+3, R56:-6, R58:-1, R59:-1, R61:-1, R65:+1, R66:+1, R67:+1, R68:-1, R71:-2.
- zi.dictionary.length_guard: compare minimum candidate length with the returned word first. Deficit -1 -> -1; fuzzy 90.60111 -> 90.56184. Restored. Region counts: R1:+1, R4:+1, R8:-1, R13:-2, R25:+1, R26:+1, R35:-1, R37:+1, R42:-1, R44:+1, R46:+1, R51:+1, R55:+3, R57:-6, R59:-1, R60:-1, R62:-1, R66:+1, R67:+1, R68:+1, R69:-1.
- cipher.xor.output_byte: name the mixed output byte separately from the input byte. Deficit 0 -> 0; fuzzy 98.605446 -> 98.5034. Restored. Region counts: .
- cipher.xor.output_word: retain the xor result in an unsigned word before publishing its byte. Deficit 0 -> 0; fuzzy 98.605446 -> 98.5034. Restored. Region counts: .
- cipher.xor.both_bytes: retain both cipher input bytes before mixing the output. Deficit 0 -> 0; fuzzy 98.605446 -> 98.5034. Restored. Region counts: .
- wordcase.loop.for: advance the case conversion cursor in the for loop update. Deficit 0 -> 0; fuzzy 99.09091 -> 94.545456. Restored. Region counts: R1:+1, R2:-1.
- wordcase.loop.break: terminate word case conversion through an explicit zero check. Deficit 0 -> 0; fuzzy 99.09091 -> 67.27273. Restored. Region counts: R1:-2, R2:+2.
- wordcase.upper.word: retain the selected case mode as an unsigned word. Deficit 0 -> 0; fuzzy 99.09091 -> 99.09091. Restored. Region counts: .
- init.manufacturer.copy_guard: retain the manufacturer copy capacity check as a named decision. Deficit 0 -> -5; fuzzy 91.19381 -> 90.821335. Restored. Region counts: R4:-1, R16:-1, R18:+1, R20:+1, R21:-3, R28:-4, R30:-1, R32:+17, R39:+1, R41:-2, R42:+1, R48:-2, R51:-1, R67:-1, R77:+1, R79:+1, R80:-3, R95:-1, R113:-2, R115:+1, R116:-3, R118:+1, R121:-1, R144:+1, R146:+1, R147:-3, R160:-2, R162:+2, R163:-3.
- init.address.mask_snapshot: retain the subnet mask while selecting the next host address. Deficit 0 -> 0; fuzzy 91.19381 -> 91.198235. Kept, GATE PASS. Region counts: R4:-1, R16:-1, R18:+1, R20:+1, R21:-3, R28:+1, R30:-1, R32:+17, R39:+1, R41:-2, R42:+1, R48:-2, R51:-1, R67:-1, R77:+1, R79:+1, R80:-3, R95:-1, R113:-2, R115:+1, R116:-3, R118:+1, R121:-1, R144:+1, R146:+1, R147:-3, R160:-2, R162:+2, R163:-3.
- init.address.limit_local: retain the broadcast limit before comparing the next host address. Deficit 0 -> 0; fuzzy 91.198235 -> 91.198235. Restored. Region counts: R4:-1, R16:-1, R18:+1, R20:+1, R21:-3, R28:+1, R30:-1, R32:+17, R39:+1, R41:-2, R42:+1, R48:-2, R51:-1, R67:-1, R77:+1, R79:+1, R80:-3, R95:-1, R113:-2, R115:+1, R116:-3, R118:+1, R121:-1, R144:+1, R146:+1, R147:-3, R160:-2, R162:+2, R163:-3.
- init.address.ip_snapshot: retain the current address while selecting its next host address. Deficit 0 -> 0; fuzzy 91.198235 -> 91.198235. Restored. Region counts: R4:-1, R16:-1, R18:+1, R20:+1, R21:-3, R28:+1, R30:-1, R32:+17, R39:+1, R41:-2, R42:+1, R48:-2, R51:-1, R67:-1, R77:+1, R79:+1, R80:-3, R95:-1, R113:-2, R115:+1, R116:-3, R118:+1, R121:-1, R144:+1, R146:+1, R147:-3, R160:-2, R162:+2, R163:-3.
Review exclusions: init.link.bottom_test initially entered the body before the initial condition; init.link.initial_test corrected both entry and back-edge control flow. Exclude the initial bottom_test trial. Exclude init.retry.select_before_sleep and init.receive.select_before_sleep: after preceding accepted edits they read delayStep before its first assignment; both were rejected and restored. Exclude zi.phonetic.tail_local: it moved a tail read before the nonzero-length guard; it was rejected and restored. guarded_ending is the valid scoped alternative.
The retained initializationResult has a defining AOSSi_SetNCDIPAddr assignment before every reachable read. All jumps into the initial link loop come after that configuration succeeds; no indeterminate value is used. The final initial-link entry checks the limit before running the body.
Late link review: the target uses lhz for the initial link countdown and masks subtraction to a halfword. The retained unsigned word alone emitted lha and omitted the loop mask; casting the interval and countdown update fixed both. Removing its pre-call decrement selection and using explicit post-sleep branches raised fuzzy. The later reconnect/retry changes improve branch and call alignment but increase the signed total deficit, as permitted by the higher-score acceptance rule; their missing and extra spans remain logged.
- init.link.unsigned_interval: read the initial link countdown as the protocol unsigned halfword. Deficit 0 -> 0; fuzzy 91.198235 -> 91.198235. Restored. Region counts: R4:-1, R16:-1, R18:+1, R20:+1, R21:-3, R28:+1, R30:-1, R32:+17, R39:+1, R41:-2, R42:+1, R48:-2, R51:-1, R67:-1, R77:+1, R79:+1, R80:-3, R95:-1, R113:-2, R115:+1, R116:-3, R118:+1, R121:-1, R144:+1, R146:+1, R147:-3, R160:-2, R162:+2, R163:-3.
- init.link.countdown_halfword: preserve the initial link countdown halfword after subtraction. Deficit 0 -> -1; fuzzy 91.198235 -> 91.16288. Restored. Region counts: R4:-1, R16:-1, R18:+1, R20:+1, R21:-3, R28:+1, R30:-1, R32:+17, R39:+1, R41:-2, R48:-2, R51:-1, R67:-1, R77:+1, R79:+1, R80:-3, R95:-1, R113:-2, R115:+1, R116:-3, R118:+1, R121:-1, R144:+1, R146:+1, R147:-3, R160:-2, R162:+2, R163:-3.
- init.link.halfword_after_sleep: narrow the link countdown and select its decrement after sleeping. Deficit 0 -> 0; fuzzy 91.198235 -> 91.232956. Kept, GATE PASS. Region counts: R4:-1, R16:-1, R18:+1, R20:+1, R21:-3, R28:+1, R30:-1, R32:+17, R39:+1, R41:-1, R48:-2, R51:-1, R67:-1, R77:+1, R79:+1, R80:-3, R95:-1, R113:-2, R115:+1, R116:-3, R118:+1, R121:-1, R144:+1, R146:+1, R147:-3, R160:-2, R162:+2, R163:-3.
- init.link.halfword_view: read the link countdown through the unsigned interval view. Deficit 0 -> 0; fuzzy 91.232956 -> 91.232956. Restored. Region counts: R4:-1, R16:-1, R18:+1, R20:+1, R21:-3, R28:+1, R30:-1, R32:+17, R39:+1, R41:-1, R48:-2, R51:-1, R67:-1, R77:+1, R79:+1, R80:-3, R95:-1, R113:-2, R115:+1, R116:-3, R118:+1, R121:-1, R144:+1, R146:+1, R147:-3, R160:-2, R162:+2, R163:-3.
- init.link.single_sleep_halfword: select one link sleep call while retaining halfword countdown arithmetic. Deficit 0 -> 1; fuzzy 91.232956 -> 91.2923. Kept, GATE PASS. Region counts: R4:-1, R16:-1, R18:+1, R20:+1, R21:-3, R28:+1, R30:+16, R39:+1, R48:-2, R51:-1, R67:-1, R77:+1, R79:+1, R80:-3, R95:-1, R113:-2, R115:+1, R116:-3, R118:+1, R121:-1, R144:+1, R146:+1, R147:-3, R160:-2, R162:+2, R163:-3.
- init.link.explicit_halfword_update: decrement the link countdown explicitly at the end of its sleep body. Deficit 1 -> 1; fuzzy 91.2923 -> 91.2923. Restored. Region counts: R4:-1, R16:-1, R18:+1, R20:+1, R21:-3, R28:+1, R30:+16, R39:+1, R48:-2, R51:-1, R67:-1, R77:+1, R79:+1, R80:-3, R95:-1, R113:-2, R115:+1, R116:-3, R118:+1, R121:-1, R144:+1, R146:+1, R147:-3, R160:-2, R162:+2, R163:-3.
- init.link.decrement_explicit: select the link countdown decrement with explicit greater-than branches. Deficit 1 -> 1; fuzzy 91.2923 -> 91.81061. Kept, GATE PASS. Region counts: R4:-1, R16:-1, R18:+1, R20:+1, R21:-3, R28:+1, R30:+16, R39:+1, R48:-2, R51:-1, R67:-1, R77:+1, R79:+1, R80:-3, R95:-1, R113:-2, R115:+1, R116:-3, R118:+1, R121:-1, R144:+1, R146:+1, R147:-3, R160:-2, R162:+2, R163:-3.
- init.link.decrement_short_first: select the short link countdown decrement before the long case. Trial error AssertionError: init.link.decrement_short_first did not change source; restored and excluded from coverage.
- init.link.decrement_min_reverse: select the link countdown decrement with the long ternary arm first. Trial error AssertionError: init.link.decrement_min_reverse did not change source; restored and excluded from coverage.
- init.link.short_arm_current: select the short link countdown decrement before the long case. Deficit 1 -> 1; fuzzy 91.81061 -> 91.2923. Restored. Region counts: R4:-1, R16:-1, R18:+1, R20:+1, R21:-3, R28:+1, R30:+16, R39:+1, R48:-2, R51:-1, R67:-1, R77:+1, R79:+1, R80:-3, R95:-1, R113:-2, R115:+1, R116:-3, R118:+1, R121:-1, R144:+1, R146:+1, R147:-3, R160:-2, R162:+2, R163:-3.
- init.link.ternary_current: select the long link countdown decrement using a ternary expression. Deficit 1 -> 1; fuzzy 91.81061 -> 91.81061. Restored. Region counts: R4:-1, R16:-1, R18:+1, R20:+1, R21:-3, R28:+1, R30:+16, R39:+1, R48:-2, R51:-1, R67:-1, R77:+1, R79:+1, R80:-3, R95:-1, R113:-2, R115:+1, R116:-3, R118:+1, R121:-1, R144:+1, R146:+1, R147:-3, R160:-2, R162:+2, R163:-3.
- init.scan.decrement_branches: select the scan countdown decrement after sleep with explicit branches. Deficit 1 -> 1; fuzzy 91.81061 -> 91.69697. Restored. Region counts: R4:-1, R16:-1, R18:+1, R20:+1, R21:-3, R28:+1, R30:+16, R39:+1, R48:-2, R51:-1, R67:-1, R77:+1, R79:+1, R80:-3, R95:-1, R113:-2, R115:+1, R116:-3, R118:+1, R121:-1, R144:+1, R146:+1, R147:-3, R160:-2, R162:+2, R163:-3.
- init.reconnect.decrement_branches: select the reconnect countdown decrement after sleep with explicit branches. Deficit 1 -> 1; fuzzy 91.81061 -> 91.93308. Kept, GATE PASS. Region counts: R4:-1, R16:-1, R18:+1, R20:+1, R21:-3, R28:+1, R30:+16, R39:+1, R48:-2, R51:-1, R67:-1, R77:+1, R79:+1, R80:-3, R95:-1, R113:-2, R115:+1, R116:-3, R118:+1, R121:-1, R144:+1, R146:+1, R147:-3, R160:-2, R162:+2, R163:-3.
- init.receive_link.decrement_branches: select the receive link countdown decrement after sleep with explicit branches. Deficit 1 -> 1; fuzzy 91.93308 -> 91.878784. Restored. Region counts: R4:-1, R16:-1, R18:+1, R20:+1, R21:-3, R28:+1, R30:+16, R39:+1, R48:-2, R51:-1, R62:+1, R67:-1, R77:+1, R79:+1, R80:-3, R93:-1, R95:-1, R113:-2, R115:+1, R116:-3, R118:+1, R121:-1, R144:+1, R146:+1, R147:-3, R160:-2, R162:+2, R163:-3.
- init.retry.decrement_branches: select the retry countdown decrement after sleep with explicit branches. Deficit 1 -> 1; fuzzy 91.93308 -> 92.005684. Kept, GATE PASS. Region counts: R4:-1, R16:-1, R18:+1, R20:+1, R21:-3, R28:+1, R30:+16, R39:+1, R48:-2, R51:-1, R67:-1, R77:+1, R79:+1, R80:-3, R95:-1, R113:-2, R115:+1, R116:-3, R118:+1, R121:-1, R144:+1, R146:+1, R147:-3, R160:-2, R162:+2, R163:-3.
- init.receive.decrement_branches: select the receive countdown decrement after sleep with explicit branches. Deficit 1 -> 1; fuzzy 92.005684 -> 92.23359. Kept, GATE PASS. Region counts: R4:-1, R16:-1, R18:+1, R20:+1, R21:-3, R28:+1, R30:+16, R39:+1, R48:-2, R51:-1, R67:-1, R77:+1, R79:+1, R80:-3, R95:-1, R113:-2, R115:+1, R116:-3, R118:+1, R121:-1, R144:+1, R146:+1, R147:-3, R160:-2, R162:+2, R163:-3.
- init.scan.single_sleep_current: select one scan sleep call after the decrement branch review. Deficit 1 -> 2; fuzzy 92.23359 -> 92.035355. Restored. Region counts: R4:-1, R16:-1, R18:+1, R20:-1, R28:+1, R30:+16, R39:+1, R48:-2, R51:-1, R67:-1, R77:+1, R79:+1, R80:-3, R95:-1, R113:-2, R115:+1, R116:-3, R118:+1, R121:-1, R144:+1, R146:+1, R147:-3, R160:-2, R162:+2, R163:-3.
- init.scan.late_step_current: select the scan countdown step only after its sleep call. Deficit 1 -> 2; fuzzy 92.23359 -> 92.032196. Restored. Region counts: R4:-1, R16:-1, R18:+1, R20:+2, R21:-3, R28:+1, R30:+16, R39:+1, R48:-2, R51:-1, R67:-1, R77:+1, R79:+1, R80:-3, R95:-1, R113:-2, R115:+1, R116:-3, R118:+1, R121:-1, R144:+1, R146:+1, R147:-3, R160:-2, R162:+2, R163:-3.
- init.reconnect.single_sleep_current: select one reconnect sleep call after the decrement branch review. Deficit 1 -> 2; fuzzy 92.23359 -> 92.29987. Kept, GATE PASS. Region counts: R4:-1, R16:-1, R18:+1, R20:+1, R21:-3, R28:+1, R30:+16, R39:+1, R48:-2, R51:-1, R67:-1, R77:+1, R79:-1, R95:-1, R113:-2, R115:+1, R116:-3, R118:+1, R121:-1, R144:+1, R146:+1, R147:-3, R160:-2, R162:+2, R163:-3.
- init.reconnect.late_step_current: select the reconnect countdown step only after its sleep call. Deficit 2 -> 3; fuzzy 92.29987 -> 92.27146. Restored. Region counts: R4:-1, R16:-1, R18:+1, R20:+1, R21:-3, R28:+1, R30:+16, R39:+1, R48:-2, R51:-1, R67:-1, R77:+1, R95:-1, R113:-2, R115:+1, R116:-3, R118:+1, R121:-1, R144:+1, R146:+1, R147:-3, R160:-2, R162:+2, R163:-3.
- init.receive_link.single_sleep_current: select one receive link sleep call after the decrement branch review. Deficit 2 -> 3; fuzzy 92.29987 -> 92.369316. Kept, GATE PASS. Region counts: R4:-1, R16:-1, R18:+1, R20:+1, R21:-3, R28:+1, R30:+16, R39:+1, R48:-2, R51:-1, R67:-1, R77:+1, R79:-1, R95:-1, R113:-2, R115:+1, R116:-3, R118:+1, R121:-1, R144:+1, R146:-1, R160:-2, R162:+2, R163:-3.
- init.receive_link.late_step_current: select the receive link countdown step only after its sleep call. Deficit 3 -> 4; fuzzy 92.369316 -> 92.37816. Kept, GATE PASS. Region counts: R4:-1, R16:-1, R18:+1, R20:+1, R21:-3, R28:+1, R30:+16, R39:+1, R48:-2, R51:-1, R67:-1, R77:+1, R79:-1, R95:-1, R113:-2, R115:+1, R116:-3, R118:+1, R121:-1, R144:+1, R160:-2, R162:+2, R163:-3.
- init.retry.single_sleep_current: select one retry sleep call after the decrement branch review. Deficit 4 -> 5; fuzzy 92.37816 -> 92.67551. Kept, GATE PASS. Region counts: R4:-1, R16:-1, R18:+1, R20:+1, R21:-3, R28:+1, R30:+16, R39:+1, R48:-2, R51:-1, R67:-1, R77:+1, R79:-1, R95:-1, R113:-2, R115:-1, R118:+1, R121:-1, R144:+1, R160:-2, R162:+2, R163:-3.
- init.retry.late_step_current: select the retry countdown step only after its sleep call. Deficit 5 -> 6; fuzzy 92.67551 -> 92.73864. Kept, GATE PASS. Region counts: R4:-1, R16:-1, R18:+1, R20:+1, R21:-3, R28:+1, R30:+16, R39:+1, R48:-2, R51:-1, R67:-1, R77:+1, R79:-1, R95:-1, R113:-2, R118:+1, R121:-1, R144:+1, R160:-2, R162:+2, R163:-3.
- init.receive.single_sleep_current: select one receive sleep call after the decrement branch review. Deficit 6 -> 7; fuzzy 92.73864 -> 92.62184. Restored. Region counts: R4:-1, R16:-1, R18:+1, R20:+1, R21:-3, R28:+1, R30:+16, R39:+1, R48:-2, R51:-1, R67:-1, R77:+1, R79:-1, R95:-1, R113:-2, R118:+1, R121:-1, R144:+1, R160:-2.
## Final attempt audit
220 object measurements were recorded; 204 distinct completed source trial labels remain after the explicit exclusions above. Failed builds, unchanged transformations, unused-only declarations and unsafe trials are not counted. Trials that compile identically remain source attempts, and were restored when they did not improve either measurement.
| Open function | Target / built instructions | Signed deficit before -> after | Fuzzy before -> after | Valid trial labels |
| --- | --- | --- | --- | --- |
| AOSS_Init_old | 1584 / 1578 | 0 -> 6 | 89.022095 -> 92.73864 | 111 |
| AOSS_81400830 | 321 / 321 | 0 -> 0 | 97.0405 -> 97.0405 | 3 |
| AOSS_814013AC | 114 / 114 | 0 -> 0 | 98.77193 -> 98.77193 | 4 |
| AOSS_81401778 | 273 / 271 | 2 -> 2 | 89.78022 -> 91.83883 | 24 |
| AOSS_81401E80 | 147 / 147 | 0 -> 0 | 98.605446 -> 98.605446 | 7 |
| Zi8ChangeWordCase | 44 / 44 | 0 -> 0 | 99.09091 -> 99.09091 | 6 |
| Zi8AlphaGetCandidates | 3946 / 3947 | -1 -> -1 | 90.22073 -> 90.60111 | 49 |
| Remaining region family | Final call-region IDs | Three distinct completed trials |
| --- | --- | --- |
| AOSS_Init_old: entry/default storage | 1,2 | init.defaults.named_values; init.defaults.response_first; init.defaults.response_store |
| AOSS_Init_old: input/control publication and cleanup | 4,8,16,18 | init.flags.snapshot; init.flags.test_before_stores; init.flags.cast_halfword |
| AOSS_Init_old: scan sleep/cancellation | 20,21 | init.scan.sleep_calls; init.scan.sleep_local; init.scan.sleep_branch |
| AOSS_Init_old: manufacturer fields | 27,28 | init.manufacturer.local_length; init.manufacturer.branch_skip; init.manufacturer.copy_guard |
| AOSS_Init_old: network result and allocation cleanup | 30,32 | init.ip.named_result; init.ip.result_guard_current; init.ip.switch_current |
| AOSS_Init_old: initial link condition and countdown | 39,41,42,44 | init.link.test_order; init.link.narrow_delay; init.link.initial_test |
| AOSS_Init_old: request identity/nonce records | 48,50,51 | init.records.copy_field; init.records.offset_record; init.records.single_index |
| AOSS_Init_old: bind/reconnect frame and address selection | 62,63,65,67,71 | init.stack.poll_before_network; init.stack.time_before_socket; init.stack.received_before_socket |
| AOSS_Init_old: reconnect cancellation/countdown | 77,79,80 | init.reconnect.sleep_calls; init.reconnect.delay_late; init.link.sleep_word |
| AOSS_Init_old: protocol state/status and packet construction | 93,95,98,99 | init.state.split_entry; init.state.split_before_memset; init.state.split_runtime |
| AOSS_Init_old: poll ABI and time fields | 112 | init.stack.time_array; init.poll.restore_struct; init.poll.clock_local |
| AOSS_Init_old: exhausted poll and protocol retry countdown | 113,115,116 | init.retry.error_if; init.retry.guard_order; init.retry.delay_after_guard |
| AOSS_Init_old: received packet/socket transitions | 118,121,127 | init.state.split_entry; init.state.split_before_memset; init.state.split_runtime |
| AOSS_Init_old: received link countdown/cancellation | 138,144,146,147 | init.receive_link.sleep_calls; init.receive_link.delay_late; init.link.sleep_word |
| AOSS_Init_old: received retry countdown/cancellation | 160,162,163 | init.receive.sleep_calls; init.receive.select_after_sleep; init.receive.preselect_correct |
| AOSS_Init_old: final cleanup/result publication | 167 | init.finish.status_local; init.finish.success_label; init.finish.direct_label_return |
| AOSS_81400830: CRC/cipher scheduling and operands | 2,3,7,13 | decrypt.checksum.late; decrypt.cursors.input_first; decrypt.xor.state_first |
| AOSS_814013AC: option cursor/flags and length | 1 | options.cursor.same_view; options.length.late_assignment; options.flags.late |
| AOSS_81401778: entry/runtime base and frame | 0,3 | hello.frame.destination_last; hello.frame.identity_first; hello.runtime.views |
| AOSS_81401778: CRC traversal and table lifetime | 4,5 | hello.crc.halfword_parts; hello.crc.split_current; hello.crc.table_late |
| AOSS_81401778: nonce/key state | 8,9 | hello.key.views; hello.frame.key_scope; hello.cipher.output_field |
| AOSS_81401778: identity and send | 15,23 | hello.frame.destination_scope; hello.send.length_late; hello.payload.after_flags |
| AOSS_81401E80: byte/key XOR operands | whole function | cipher.xor.direct; cipher.xor.mask_first; cipher.xor.word |
| Zi8ChangeWordCase: case/workspace registers | whole function | wordcase.mode.byte; wordcase.work.typed; wordcase.mode.late |
| Zi8AlphaGetCandidates: entry/normalization | 1 | zi.entry.flags_byte; zi.entry.options_view; zi.entry.work_view |
| Zi8AlphaGetCandidates: language/dictionary initialization | 4 | zi.entry.language_switch; zi.entry.dictionary_zero_loop; zi.entry.dictionary_zero_explicit |
| Zi8AlphaGetCandidates: primary/context tables | 8,20,25 | zi.tables.context_word; zi.tables.context_index; zi.tables.order_index |
| Zi8AlphaGetCandidates: prefix/suffix and punctuation | 13,14 | zi.punct.zero_boolean; zi.punct.positive_first; zi.punct.full_result |
| Zi8AlphaGetCandidates: dictionary/key dispatch and retries | 26,42,44,45,46 | zi.dictionary.status_byte; zi.dictionary.return_byte; zi.dictionary.length_guard |
| Zi8AlphaGetCandidates: exclusions/vowel test register lifetime | 35,37 | zi.native.word_width; zi.native.count_width; zi.native.result_width |
| Zi8AlphaGetCandidates: detokenization/spelling suffix | 50,51 | zi.phonetic.word_length_mask; zi.phonetic.tail_pointer; zi.phonetic.guarded_ending |
| Zi8AlphaGetCandidates: length/duplicate/key matching | 53,54,58 | zi.key_compare.while; zi.key_compare.current_for; zi.key_compare.current_do |
| Zi8AlphaGetCandidates: emission and skipped candidates | 55,56,57 | zi.emit.inverse; zi.emit.goto; zi.emit.positive |
| Zi8AlphaGetCandidates: alternate prefix/retry register lifetimes | 59,60,62,65 | zi.prefix.cursor_compound; zi.prefix.count_byte; zi.prefix.cursor_view |
| Zi8AlphaGetCandidates: final punctuation/prefix guards | 66,67,68 | zi.prefix.next_count_compare; zi.prefix.previous_element_count; zi.prefix.guard_order |
| Zi8AlphaGetCandidates: final counts/output | 69 | zi.finish.counts_scope; zi.finish.counts_reverse_guard; zi.finish.counts_decrement |
Every final unequal call-aligned region belongs to one of the families above. Some trials address shared frame/register lifetimes rather than the local branch alone. The complete final basic-block and call-region inventory is in `fix-board-r3.block-map.md`.
Init has the correct 0x160 frame and r14-upward saved range. It still differs in branch layout, address/time stack slots, scheduling and live register roles. The target carries an additional IP cleanup span after a successful-result branch; the final call alignment includes 16 missing instructions in R30. The source compiler folds that redundant test. No artificial instructions were added to reproduce it. The signed total deficit is now six: improved sleep branch/call alignment removed other extra instructions that had previously balanced the missing spans. Neither aggregate counts nor fuzzy establish a byte match.
Hello has the correct 0x60 frame, but saves r24 upward instead of target r25 upward. The target reloads separate runtime/CRC/key BSS bases; the build retains a common BSS base. Those address materializations account for four missing instructions across calls and two extra entry instructions. CRC traversal now follows four two-byte groups; remaining operand scheduling and destination/identity stack lifetimes differ.
Candidates has the correct 0x2b0 frame and r27-upward saved range. Its target entry stores a workspace pointer at +0x20 that has no later load; the build does not emit that dead store. No dummy spill was added. The signed -1 total is balanced across several positive and negative regions; masks, comparisons, emission/retry branches and register scheduling still differ.
The previous round's claim of +1 phonetic/prefix arithmetic was a mapper alias error: the target bytes encode subtraction. Canonical operands in the final map are decoded from bytes. This round preserved subtraction.
No primary or auxiliary function reached 100% this round. Objdiff exact functions remain AOSS 16/21 and zi8alpha 10/12; exact code remains 12,140 bytes and exact data 3,968 bytes. The gate's instruction-exact count is recorded separately in the final full gate output. Its odiff normalization has the previously documented CR1-address limitation when the earlier Init size moves AOSS_81400E0C; objdiff remains the byte-match authority.
No definition of target r14 was found before its initial socket-negative-result guard; the source retains a defined network result. That guard remains unresolved, and no uninitialized value was introduced to imitate it.
Final formatting review corrected the retry-sleep indentation and removed an empty declaration gap; both measurements stayed unchanged.
Final full gate: `python3 /mnt/drive2/projects/wii-ipl-workers/_restore0928-tools/gate.py src/scene/setting/AOSS libs/RVLMiddleware/eZiText/src/clib/zi8alpha`. The clean full build and target DOL hash passed; both pools are identical and regression/forbidden/readability counts are zero. Full output is `fix-board-r3.final-gate.txt`.
`[src/scene/setting/AOSS] instruction-exact functions: 15/21`
`[libs/RVLMiddleware/eZiText/src/clib/zi8alpha] instruction-exact functions: 10/12`
AOSS instruction-exact helper count is 16 -> 15; objdiff exact count remains 16/21. AOSS_81400E0C is still 100.0 in objdiff and has the same instruction count; its CR1 branch-address normalization changes when the six-instruction Init size difference moves its start. This is an unresolved helper limitation, not a newly mismatching function. Zi8 instruction-exact and objdiff counts remain 10/12. No new exact match is claimed.

File diff suppressed because it is too large Load Diff

Some files were not shown because too many files have changed in this diff Show More