Compare commits

...

1 Commits

Author SHA1 Message Date
coah
bd035593e6 match(NWC24MsgCommit 18/18, Texture_MCUtoY8U8V8 12/13) (fz15g) (worker fed147c9) 2026-10-02 17:25:36 +00:00
4 changed files with 368 additions and 20 deletions

View File

@@ -53,9 +53,9 @@ Progress
<!-- progress:start -->
| Decompiled | Matched | Linked | Data |
|:---:|:---:|:---:|:---:|
| 99.57% | 90.47% | 70.31% | 99.37% |
| 99.57% | 90.55% | 70.31% | 99.37% |
units 952/1027 complete, functions 12351/12563 matched.
units 952/1027 complete, functions 12353/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

@@ -303,9 +303,7 @@ static void TMCJPEG_814F0A58(TMCCJPEGDecWork* work, s32 x, s32 y) {
u8* lumaTexture;
u8* luminance;
s32 column;
s32 chromaXEnd;
s32 row;
u32 chromaTileWidth;
TMCCJPEGDecState* state;
s32 width;
s32 height;
@@ -316,7 +314,6 @@ static void TMCJPEG_814F0A58(TMCCJPEGDecWork* work, s32 x, s32 y) {
u8* cb;
u32 tileWidth;
u8* cr;
s32 chromaRowSkip;
row = y;
luminance = work->convBuf + 4;
@@ -341,18 +338,17 @@ static void TMCJPEG_814F0A58(TMCCJPEGDecWork* work, s32 x, s32 y) {
x = (u32)x >> 1;
width = 8 / state->scaleFactor;
height = 8 / state->scaleFactor;
chromaXEnd = x + width;
xEnd = x + width;
chromaYEnd = y + height;
chromaTileWidth = state->chromaWidth >> 3;
chromaRowSkip = 8 - width;
for (; y < chromaYEnd; y++) {
for (column = x; column < chromaXEnd; column += 1) {
(cbTexture + ((y & 3) << 3) + (column & 7))[(s32)(((column >> 3) + (y >> 2) * chromaTileWidth) << 5)] = *cb + 128;
tileWidth = state->chromaWidth >> 3;
for (row = y; row < chromaYEnd; row++) {
for (column = x; column < xEnd; column += 1) {
(cbTexture + ((row & 3) << 3) + (column & 7))[(s32)(((column >> 3) + (row >> 2) * tileWidth) << 5)] = *cb + 128;
cb++;
(crTexture + ((y & 3) << 3) + (column & 7))[(s32)(((column >> 3) + (y >> 2) * chromaTileWidth) << 5)] = *cr + 128;
(crTexture + ((row & 3) << 3) + (column & 7))[(s32)(((column >> 3) + (row >> 2) * tileWidth) << 5)] = *cr + 128;
cr++;
}
cb += chromaRowSkip;
cb += 8 - width;
cr += 8 - width;
}
}

View File

@@ -769,19 +769,14 @@ static NWC24Err WriteMIMEAttachHeader(NWC24MsgObjPrivate* msg, u32 index) {
char* buffer;
const char* mime;
const char* suffix;
s32 typeLength, encodingLength, dispositionLength, mimeLength;
int mimeLength;
s32 first, second, third, total;
NWC24Err err;
Mail_memset(NWC24WorkP->stringWork, 0, 1024);
buffer = NWC24WorkP->stringWork;
mime = NWC24GetMIMETypeStr(msg->attachedType[index]);
suffix = NWC24iGetMIMETypeSuffix(msg->attachedType[index]);
encodingLength = Mail_strlen(ContentTxEncA);
typeLength = Mail_strlen(ContentTypeA);
dispositionLength = Mail_strlen(ContentDispA);
typeLength += encodingLength;
mimeLength = Mail_strlen(mime);
mimeLength = (dispositionLength + typeLength) + mimeLength + 4;
mimeLength = (Mail_strlen(ContentTypeA) + Mail_strlen(ContentTxEncA)) + Mail_strlen(ContentDispA) + Mail_strlen(mime) + 4;
if (mimeLength >= 1024)
return NWC24_ERR_NOMEM;
first = Mail_sprintf(buffer, (char*)ContentTypeA, mime, (char)('a' + index), msg->msgId, suffix);

View File

@@ -3582,3 +3582,360 @@ KBDSetModState 99.40476%: modifier address versus old value r4/r5 allocation, fo
WriteMIMEAttachHeader 99.61957%: type versus disposition lengths and sum result coalescing, five operands.
Zi8PrepareMatch 96.319145%: local stack/code layout and component-presence stores without semantic reads, 939/940 instructions.
Uncertainty: original source construct responsible for the JPEG two-instruction schedule and zprepare dead component flag is unresolved. No unsupported volatility or dummy field retained. Current-round exact source commit: 7ea5a033.
# Xhigh continuation fz15g
Fresh branch agent/w1002/sol-fz15g-xhigh from bc303bc36e5ea826ef9da39d6e9c9ed9c79e4ba9. All four owned files identical to origin/main after fetch. All four pools identical before code tuning. Start exact counts NWC 17/18, JPEG 11/13, keyboard 15/21, zprepare 0/1. Previous helper match retained unchanged.
## fz15g WriteMIMEAttachHeader diagnosis
Origin body unchanged; current structural/exact (0, 5), 92/92 instructions. Frame 0x30, five differences at 25/28/30/32/33 map to measured prefix lengths. Library Mail_strlen returns int, while current locals use long typedef s32. No store/reload volatility proof. Test library result types and direct call-expression boundary before register search.
- WriteMIMEAttachHeader: strlen result locals use int return type: structural/exact (0, 5) instructions 92/92 first [(25, ('mr', 'r29, r3'), ('mr', 'r30, r3')), (28, ('mr', 'r30, r3'), ('mr', 'r29, r3')), (30, ('add', 'r28, r29, r28'), ('add', 'r30, r30, r28')), (32, ('add', 'r0, r3, r30'), ('add', 'r0, r29, r30'))]
- WriteMIMEAttachHeader: formatted byte counts use int return type: structural/exact (0, 5) instructions 92/92 first [(25, ('mr', 'r29, r3'), ('mr', 'r30, r3')), (28, ('mr', 'r30, r3'), ('mr', 'r29, r3')), (30, ('add', 'r28, r29, r28'), ('add', 'r30, r30, r28')), (32, ('add', 'r0, r3, r30'), ('add', 'r0, r29, r30'))]
- WriteMIMEAttachHeader: all library return values use int locals: structural/exact (0, 5) instructions 92/92 first [(25, ('mr', 'r29, r3'), ('mr', 'r30, r3')), (28, ('mr', 'r30, r3'), ('mr', 'r29, r3')), (30, ('add', 'r28, r29, r28'), ('add', 'r30, r30, r28')), (32, ('add', 'r0, r3, r30'), ('add', 'r0, r29, r30'))]
- WriteMIMEAttachHeader: nested library-call capacity tree 0: structural/exact (0, 0) instructions 92/92 first []
## fz15g TMCJPEGDEC_set_converterY8U8V8 diagnosis
Origin body unchanged; current structural/exact (41, 195), 195/196 instructions. Frame 0x10, 195/196 instructions; target early shared convBuf base r4 is folded into individual work addresses. Extent ends at immediate neighbour; no volatility proof. Test typed sample-block ownership, int dimensions and dimension helper boundary.
- TMCJPEGDEC_set_converterY8U8V8: decoder dimensions read through separate const view: structural/exact (41, 195) instructions 195/196
- TMCJPEGDEC_set_converterY8U8V8: component and dimensions use C int locals: structural/exact (41, 195) instructions 195/196
- TMCJPEGDEC_set_converterY8U8V8: texture dimensions owned by inline state helper: structural/exact (41, 195) instructions 195/196
- TMCJPEGDEC_set_converterY8U8V8: conversion sample buffer represented as typed block: structural/exact (41, 195) instructions 195/196
## fz15g WriteMIMEAttachHeader exact
The nested strlen call expression preserves the original evaluation boundary. MWCC evaluates the right operand of the first addition, ContentTxEncA, before ContentTypeA; the expression result now owns the target r30 length sum instead of the scalar encoding local. All five operand differences disappear: 92/92 instructions, ctxdiff diffs 0, identical 9-string pool. Quick full-build gate confirms NWC 18/18 functions, code 8532/8532, data 904/904, all sections 100, no regressions/forbidden/readability. Keep NonMatching classification for this phase as instructed.
## fz15g TMCJPEGDEC_set_converterY8U8V8 Address arithmetic uses a typed sample-word base, preserving all real buffer offsets and object layout. No loads through reinterpreted word types.
## fz15g kbdEventHandler diagnosis
Origin body unchanged; current structural/exact (0, 5), 186/186 instructions. Frame 0x20, 186/186 instructions. First differing instruction 35 loads report error into r3 versus r5 and then table base r30 versus r3. All later instructions identical; no adjacent stack reload evidence. Test report signedness, explicit enum and readonly pointer view.
- TMCJPEGDEC_set_converterY8U8V8: converter buffer viewed as 32-bit sample words: structural/exact (41, 195) instructions 195/196
- kbdEventHandler: read report as const char data with unsigned modifier view: structural/exact (22, 106) instructions 192/186
- TMCJPEGDEC_set_converterY8U8V8: converter buffer viewed as signed 32-bit sample words: structural/exact (41, 195) instructions 195/196
- kbdEventHandler: unsigned error status and signed channel index snapshot: structural/exact (0, 6) instructions 186/186 first [(35, ('lbz', 'r3, 2(r4)'), ('lbz', 'r5, 2(r4)')), (36, ('lis', 'r4, 0'), ('lis', 'r3, 0')), (37, ('mulli', 'r5, r31, 0x268'), ('mulli', 'r4, r31, 0x268')), (38, ('addi', 'r0, r3, 0xff'), ('addi', 'r0, r5, 0xff'))]
- kbdEventHandler: report uses readonly void-to-byte input view: structural/exact (0, 5) instructions 186/186 first [(35, ('lbz', 'r3, 2(r4)'), ('lbz', 'r5, 2(r4)')), (36, ('lis', 'r30, 0'), ('lis', 'r3, 0')), (38, ('addi', 'r0, r3, 0xff'), ('addi', 'r0, r5, 0xff')), (39, ('addi', 'r30, r30, 0'), ('addi', 'r3, r3, 0'))]
- TMCJPEGDEC_set_converterY8U8V8: converter buffer viewed as 16-bit sample pairs: structural/exact (41, 195) instructions 195/196
- kbdEventHandler: report status has explicit HID error enum type: structural/exact (0, 6) instructions 186/186 first [(35, ('lbz', 'r4, 2(r4)'), ('lbz', 'r5, 2(r4)')), (36, ('lis', 'r30, 0'), ('lis', 'r3, 0')), (37, ('mulli', 'r3, r31, 0x268'), ('mulli', 'r4, r31, 0x268')), (38, ('addi', 'r0, r4, 0xff'), ('addi', 'r0, r5, 0xff'))]
The first const-char report trial changed signed key comparisons and is excluded from the valid attempt count. Re-run with unsigned casts on every report-byte read to preserve HID values 0x80..0xff. No trial was retained.
## fz15g kbdEventHandler Correct unsigned HID key comparisons in report representation trial.
- kbdEventHandler: const char report view with every byte explicitly unsigned: structural/exact (0, 5) instructions 186/186 first [(35, ('lbz', 'r3, 2(r4)'), ('lbz', 'r5, 2(r4)')), (36, ('lis', 'r30, 0'), ('lis', 'r3, 0')), (38, ('addi', 'r0, r3, 0xff'), ('addi', 'r0, r5, 0xff')), (39, ('addi', 'r30, r30, 0'), ('addi', 'r3, r3, 0'))]
## fz15g kbdProcMod diagnosis
Origin body unchanged; current structural/exact (0, 4), 256/256 instructions. Frame 0x20, identical instruction counts. Address/result r4/r5 differ in physical field update. Test modifier union word type and real reserved/lock bit layout; no volatility proof.
- kbdProcMod: modifier union uses unsigned int storage and bitfields: structural/exact (0, 4) instructions 256/256 first [(245, ('add', 'r5, r4, r31'), ('add', 'r4, r4, r31')), (246, ('lwz', 'r4, 0x220(r5)'), ('lwz', 'r5, 0x220(r4)')), (247, ('rlwimi', 'r0, r4, 0, 0x1a, 0x1f'), ('rlwimi', 'r0, r5, 0, 0x1a, 0x1f')), (248, ('stw', 'r0, 0x220(r5)'), ('stw', 'r0, 0x220(r4)'))]
- kbdProcMod: logical modifier bits split from reserved high bits: structural/exact (0, 4) instructions 256/256 first [(245, ('add', 'r5, r4, r31'), ('add', 'r4, r4, r31')), (246, ('lwz', 'r4, 0x220(r5)'), ('lwz', 'r5, 0x220(r4)')), (247, ('rlwimi', 'r0, r4, 0, 0x1a, 0x1f'), ('rlwimi', 'r0, r5, 0, 0x1a, 0x1f')), (248, ('stw', 'r0, 0x220(r5)'), ('stw', 'r0, 0x220(r4)'))]
- kbdProcMod: modifier union scalar follows unsigned int word type: structural/exact (0, 4) instructions 256/256 first [(245, ('add', 'r5, r4, r31'), ('add', 'r4, r4, r31')), (246, ('lwz', 'r4, 0x220(r5)'), ('lwz', 'r5, 0x220(r4)')), (247, ('rlwimi', 'r0, r4, 0, 0x1a, 0x1f'), ('rlwimi', 'r0, r5, 0, 0x1a, 0x1f')), (248, ('stw', 'r0, 0x220(r5)'), ('stw', 'r0, 0x220(r4)'))]
- kbdProcMod: modifier union scalar uses signed word representation: structural/exact (0, 4) instructions 256/256 first [(245, ('add', 'r5, r4, r31'), ('add', 'r4, r4, r31')), (246, ('lwz', 'r4, 0x220(r5)'), ('lwz', 'r5, 0x220(r4)')), (247, ('rlwimi', 'r0, r4, 0, 0x1a, 0x1f'), ('rlwimi', 'r0, r5, 0, 0x1a, 0x1f')), (248, ('stw', 'r0, 0x220(r5)'), ('stw', 'r0, 0x220(r4)'))]
## fz15g TMCJPEG_814F0A58 diagnosis
Origin body unchanged; current structural/exact (0, 77), 475/475 instructions. Frame 0x60, 475/475 instructions. Earlier implicit chroma padding and phase-shared tileWidth/xEnd resolves all registers but leaves subfic r6 and generated bound-mask rlwinm exchanged. Test readonly count helper and expression result ownership, not declaration permutations.
- kbdProcMod: physical modifier read owned by readonly union helper: structural/exact (0, 4) instructions 256/256 first [(245, ('add', 'r5, r4, r31'), ('add', 'r4, r4, r31')), (246, ('lwz', 'r4, 0x220(r5)'), ('lwz', 'r5, 0x220(r4)')), (247, ('rlwimi', 'r0, r4, 0, 0x1a, 0x1f'), ('rlwimi', 'r0, r5, 0, 0x1a, 0x1f')), (248, ('stw', 'r0, 0x220(r5)'), ('stw', 'r0, 0x220(r4)'))]
## fz15g KBDSetModState diagnosis
Origin body unchanged; current structural/exact (0, 4), 42/42 instructions. Frame 0x10, identical instruction counts. Address/result r4/r5 differ in physical field update. Test modifier union word type and real reserved/lock bit layout; no volatility proof.
- TMCJPEG_814F0A58: readonly decoder helper owns chroma sample count: structural/exact (34, 283) instructions 474/475
- TMCJPEG_814F0A58: readonly scale factor byte helper owns sample count: structural/exact (34, 283) instructions 474/475
- KBDSetModState: modifier union uses unsigned int storage and bitfields: structural/exact (0, 4) instructions 42/42 first [(30, ('add', 'r5, r5, r4'), ('add', 'r4, r5, r4')), (31, ('lwz', 'r4, 0x220(r5)'), ('lwz', 'r5, 0x220(r4)')), (32, ('rlwimi', 'r0, r4, 0, 0x1a, 0x1f'), ('rlwimi', 'r0, r5, 0, 0x1a, 0x1f')), (33, ('stw', 'r0, 0x220(r5)'), ('stw', 'r0, 0x220(r4)'))]
- KBDSetModState: logical modifier bits split from reserved high bits: structural/exact (0, 4) instructions 42/42 first [(30, ('add', 'r5, r5, r4'), ('add', 'r4, r5, r4')), (31, ('lwz', 'r4, 0x220(r5)'), ('lwz', 'r5, 0x220(r4)')), (32, ('rlwimi', 'r0, r4, 0, 0x1a, 0x1f'), ('rlwimi', 'r0, r5, 0, 0x1a, 0x1f')), (33, ('stw', 'r0, 0x220(r5)'), ('stw', 'r0, 0x220(r4)'))]
- TMCJPEG_814F0A58: chroma width and height initialize from shared helper value: structural/exact (2, 2) instructions 475/475 first [(274, ('rlwinm', 'r0, r26, 0, 0, 0'), ('subfic', 'r6, r6, 8')), (275, ('subfic', 'r6, r6, 8'), ('rlwinm', 'r0, r26, 0, 0, 0'))]
- KBDSetModState: modifier union scalar follows unsigned int word type: structural/exact (0, 4) instructions 42/42 first [(30, ('add', 'r5, r5, r4'), ('add', 'r4, r5, r4')), (31, ('lwz', 'r4, 0x220(r5)'), ('lwz', 'r5, 0x220(r4)')), (32, ('rlwimi', 'r0, r4, 0, 0x1a, 0x1f'), ('rlwimi', 'r0, r5, 0, 0x1a, 0x1f')), (33, ('stw', 'r0, 0x220(r5)'), ('stw', 'r0, 0x220(r4)'))]
- KBDSetModState: modifier union scalar uses signed word representation: structural/exact (0, 4) instructions 42/42 first [(30, ('add', 'r5, r5, r4'), ('add', 'r4, r5, r4')), (31, ('lwz', 'r4, 0x220(r5)'), ('lwz', 'r5, 0x220(r4)')), (32, ('rlwimi', 'r0, r4, 0, 0x1a, 0x1f'), ('rlwimi', 'r0, r5, 0, 0x1a, 0x1f')), (33, ('stw', 'r0, 0x220(r5)'), ('stw', 'r0, 0x220(r4)'))]
- TMCJPEG_814F0A58: phase-shared variables use C int arithmetic: structural/exact (2, 2) instructions 475/475 first [(274, ('rlwinm', 'r0, r26, 0, 0, 0'), ('subfic', 'r6, r6, 8')), (275, ('subfic', 'r6, r6, 8'), ('rlwinm', 'r0, r26, 0, 0, 0'))]
- KBDSetModState: physical modifier read owned by readonly union helper: structural/exact (0, 4) instructions 42/42 first [(30, ('add', 'r5, r5, r4'), ('add', 'r4, r5, r4')), (31, ('lwz', 'r4, 0x220(r5)'), ('lwz', 'r5, 0x220(r4)')), (32, ('rlwimi', 'r0, r4, 0, 0x1a, 0x1f'), ('rlwimi', 'r0, r5, 0, 0x1a, 0x1f')), (33, ('stw', 'r0, 0x220(r5)'), ('stw', 'r0, 0x220(r4)'))]
- TMCJPEG_814F0A58: phase-shared tile width uses unsigned int arithmetic: structural/exact (2, 2) instructions 475/475 first [(274, ('rlwinm', 'r0, r26, 0, 0, 0'), ('subfic', 'r6, r6, 8')), (275, ('subfic', 'r6, r6, 8'), ('rlwinm', 'r0, r26, 0, 0, 0'))]
## fz15g kbd_led_handler diagnosis
Origin body unchanged; current structural/exact (13, 21), 24/25 instructions. Frame absent, 24/25 instructions. Target reads callback before device release, branches success-first and rematerializes callback index after result selection, then has a final blr. Test index lifetime and positive guard/helper boundaries.
- kbd_led_handler: success-first switch with callback index cast at each use: structural/exact (10, 18) instructions 25/25
- kbd_led_handler: success-first switch with signed int callback index: structural/exact (10, 18) instructions 25/25
- kbd_led_handler: callback completion enclosed by positive presence branch: structural/exact (10, 18) instructions 25/25
- kbd_led_handler: ordinary null callback guard with success-first switch: structural/exact (10, 18) instructions 25/25
- kbd_led_handler: original callback argument owns final callback lookup: structural/exact (2, 20) instructions 26/25
## fz15g TMCJPEG_814F0A58 Limit expression/readonly helper change to chroma so exact luma phase is unchanged. Test shared assignment value, nested vertical bound and real factor snapshot.
- kbd_led_handler: callback address snapshot before command release: structural/exact (10, 18) instructions 25/25
- kbd_led_handler: inline completion helper uses readonly callback argument: structural/exact (9, 19) instructions 26/25
- TMCJPEG_814F0A58: chroma count expression chained: structural/exact (2, 2) instructions 475/475 first [(274, ('rlwinm', 'r0, r26, 0, 0, 0'), ('subfic', 'r6, r6, 8')), (275, ('subfic', 'r6, r6, 8'), ('rlwinm', 'r0, r26, 0, 0, 0'))]
- TMCJPEG_814F0A58: chroma count expression directbounds: structural/exact (2, 2) instructions 475/475 first [(274, ('rlwinm', 'r0, r26, 0, 0, 0'), ('subfic', 'r6, r6, 8')), (275, ('subfic', 'r6, r6, 8'), ('rlwinm', 'r0, r26, 0, 0, 0'))]
- TMCJPEG_814F0A58: chroma count expression scale: structural/exact (2, 2) instructions 475/475 first [(274, ('rlwinm', 'r0, r26, 0, 0, 0'), ('subfic', 'r6, r6, 8')), (275, ('subfic', 'r6, r6, 8'), ('rlwinm', 'r0, r26, 0, 0, 0'))]
- TMCJPEG_814F0A58: chroma count expression scoped: structural/exact (2, 2) instructions 475/475 first [(274, ('rlwinm', 'r0, r26, 0, 0, 0'), ('subfic', 'r6, r6, 8')), (275, ('subfic', 'r6, r6, 8'), ('rlwinm', 'r0, r26, 0, 0, 0'))]
- TMCJPEG_814F0A58: chroma count expression helper: structural/exact (2, 2) instructions 475/475 first [(274, ('rlwinm', 'r0, r26, 0, 0, 0'), ('subfic', 'r6, r6, 8')), (275, ('subfic', 'r6, r6, 8'), ('rlwinm', 'r0, r26, 0, 0, 0'))]
- TMCJPEG_814F0A58: chroma count expression ptrhelper: structural/exact (2, 2) instructions 475/475 first [(274, ('rlwinm', 'r0, r26, 0, 0, 0'), ('subfic', 'r6, r6, 8')), (275, ('subfic', 'r6, r6, 8'), ('rlwinm', 'r0, r26, 0, 0, 0'))]
## fz15g kbd_led_handler Original-argument tail lookup improved structural distance to two, with 26/25 instructions. Test integer conversion type and distinct completion index scope without casts on memory accesses.
- kbd_led_handler: callback tail index representation unsignedint: structural/exact (2, 20) instructions 26/25
- kbd_led_handler: callback tail index representation signedint: structural/exact (2, 20) instructions 26/25
- kbd_led_handler: callback tail index representation ulong: structural/exact (2, 20) instructions 26/25
- kbd_led_handler: callback tail index representation constvoid: structural/exact (2, 20) instructions 26/25
- kbd_led_handler: callback tail index representation earlyint: structural/exact (2, 20) instructions 26/25
- kbd_led_handler: callback tail index representation scopedidx: structural/exact (2, 20) instructions 26/25
Best callback tail candidate disassembly pairs:
```
0 ('lis', 'r5, 0') | ('lis', 'r5, 0')
1 ('lis', 'r7, 0') | ('lis', 'r6, 0')
2 ('slwi', 'r0, r4, 3') | ('slwi', 'r0, r4, 3')
3 ('li', 'r6, 0') | ('li', 'r8, 0')
4 ('addi', 'r5, r5, 0') | ('addi', 'r5, r5, 0')
5 ('slwi', 'r8, r4, 5') | ('slwi', 'r7, r4, 5')
6 ('lwzx', 'r0, r5, r0') | ('lwzx', 'r0, r5, r0')
7 ('addi', 'r7, r7, 0') | ('addi', 'r6, r6, 0')
8 ('stwx', 'r6, r7, r8') | ('stwx', 'r8, r6, r7')
9 ('cmplw', 'r0, r6') | ('cmplw', 'r0, r8')
10 ('beqlr', '') | ('beqlr', '')
11 ('cmpwi', 'r3, 1') | ('cmpwi', 'r3, 1')
12 ('beq', '8') | ('bne', '12')
13 ('b', '12') | ('li', 'r3, 0')
14 ('li', 'r3, 0') | ('b', '8')
15 ('b', '8') | ('li', 'r3, 7')
16 ('li', 'r3, 7') | ('lis', 'r5, 0')
17 ('lis', 'r5, 0') | ('slwi', 'r0, r4, 3')
18 ('slwi', 'r0, r4, 3') | ('addi', 'r5, r5, 0')
19 ('addi', 'r5, r5, 0') | ('lwzx', 'r12, r5, r0')
20 ('lwzx', 'r12, r5, r0') | ('add', 'r4, r5, r0')
21 ('add', 'r4, r5, r0') | ('lwz', 'r4, 4(r4)')
22 ('lwz', 'r4, 4(r4)') | ('mtctr', 'r12')
23 ('mtctr', 'r12') | ('bctr', '')
24 ('bctr', '') | ('blr', '')
25 ('blr', '') | None
```
## fz15g Zi8PrepareMatch diagnosis
Origin body unchanged; current structural/exact (36, 889), 939/940 instructions. Target frame 0x70, source 939 versus target 940 instructions. First context-mask init register differs, and target stores component presence at byte 0xf without later reads. Existing -opt off explains stack reloads, so no unsupported volatile/dummy flag added. Test readonly table/request views and scalar expression boundary.
- Zi8PrepareMatch: all lookup table fields are readonly byte pointers: structural/exact (36, 897) instructions 938/940
- Zi8PrepareMatch: read fields use const input while request count remains writable: structural/exact (43, 692) instructions 944/940
- Zi8PrepareMatch: context mask stored as char with explicit unsigned view: structural/exact (37, 834) instructions 940/940
- Zi8PrepareMatch: element index advance separated from halfword fetch: structural/exact (44, 889) instructions 939/940
- Zi8PrepareMatch: component classifier uses direct boolean branch: structural/exact (36, 889) instructions 939/940
## fz15g KBDSetLedsAsync diagnosis
Origin body unchanged; current structural/exact (14, 70), 80/81 instructions. Target frame 0x20. Reservation loop uses unsigned ordinal and byte offset/CTR; source caches channel multiplication across interrupts and uses 80/81 instructions. Test readonly input helper boundary and typed slot loop, preserving all command record layout.
- KBDSetLedsAsync: slot helper rereads channel through const scalar pointer: structural/exact (20, 44) instructions 81/81
- KBDSetLedsAsync: slot helper receives channel scalar value: structural/exact (19, 73) instructions 79/81
- KBDSetLedsAsync: slot helper receives readonly channel object: structural/exact (19, 73) instructions 79/81
- KBDSetLedsAsync: unsigned indexed slot loop uses record device fields: structural/exact (19, 72) instructions 79/81
## fz15g KBDSetLeds diagnosis
Origin body unchanged; current structural/exact (19, 75), 75/79 instructions. Target frame 0x20. Reservation loop uses unsigned ordinal and byte offset/CTR; source caches channel multiplication across interrupts and uses 75/79 instructions. Test readonly input helper boundary and typed slot loop, preserving all command record layout.
- KBDSetLeds: slot helper rereads channel through const scalar pointer: structural/exact (48, 75) instructions 82/79
- KBDSetLeds: slot helper receives channel scalar value: structural/exact (19, 69) instructions 78/79
- KBDSetLeds: slot helper receives readonly channel object: structural/exact (19, 69) instructions 78/79
- KBDSetLeds: unsigned indexed slot loop uses record device fields: structural/exact (19, 68) instructions 78/79
## fz15g kbd_led_handler Combine target true-first if with original-argument index rematerialization. Previous isolated switch contains one extra unconditional branch; if should remove it while preserving final blr.
- kbd_led_handler: true-first if plus original-argument completion base: structural/exact (30, 23) instructions 23/25
- kbd_led_handler: true-first if plus original-argument completion null: structural/exact (30, 23) instructions 23/25
- kbd_led_handler: true-first if plus original-argument completion zero: structural/exact (30, 23) instructions 23/25
- kbd_led_handler: true-first if plus original-argument completion constzero: structural/exact (30, 23) instructions 23/25
## fz15g TMCJPEG_814F0A58 Test actual chroma sample signedness, source increment expression and pointer-add operand order at fixed chroma preheader dependency graph.
- kbd_led_handler: true-first if plus original-argument completion callint: structural/exact (30, 23) instructions 23/25
- kbd_led_handler: true-first if plus original-argument completion sdk: structural/exact (30, 23) instructions 23/25
- TMCJPEG_814F0A58: chroma output pointer initialization nestedstore: structural/exact (101, 408) instructions 473/475
- TMCJPEG_814F0A58: chroma output pointer initialization signedsample: structural/exact (2, 2) instructions 475/475 first [(274, ('rlwinm', 'r0, r26, 0, 0, 0'), ('subfic', 'r6, r6, 8')), (275, ('subfic', 'r6, r6, 8'), ('rlwinm', 'r0, r26, 0, 0, 0'))]
- TMCJPEG_814F0A58: chroma output pointer initialization paddingneg: structural/exact (2, 2) instructions 475/475 first [(274, ('rlwinm', 'r0, r26, 0, 0, 0'), ('subfic', 'r6, r6, 8')), (275, ('subfic', 'r6, r6, 8'), ('rlwinm', 'r0, r26, 0, 0, 0'))]
- TMCJPEG_814F0A58: chroma output pointer initialization pointeradd: structural/exact (2, 2) instructions 475/475 first [(274, ('rlwinm', 'r0, r26, 0, 0, 0'), ('subfic', 'r6, r6, 8')), (275, ('subfic', 'r6, r6, 8'), ('rlwinm', 'r0, r26, 0, 0, 0'))]
## fz15g TMCJPEG_814F0A58 Test signed-loop unroller boundary and explicit body/iterator forms at the two-instruction preheader plateau.
- TMCJPEG_814F0A58: chroma loop shape while: structural/exact (2, 2) instructions 475/475 first [(274, ('rlwinm', 'r0, r26, 0, 0, 0'), ('subfic', 'r6, r6, 8')), (275, ('subfic', 'r6, r6, 8'), ('rlwinm', 'r0, r26, 0, 0, 0'))]
- TMCJPEG_814F0A58: chroma loop shape do: structural/exact (204, 413) instructions 305/475
## fz15g kbd_led_handler Test callback BOOL result ownership and parameter mutation versus separate unsigned result; preserve original argument for final callback index.
- TMCJPEG_814F0A58: chroma loop shape commute: structural/exact (2, 2) instructions 475/475 first [(274, ('rlwinm', 'r0, r26, 0, 0, 0'), ('subfic', 'r6, r6, 8')), (275, ('subfic', 'r6, r6, 8'), ('rlwinm', 'r0, r26, 0, 0, 0'))]
- kbd_led_handler: completion result lifetime parameter: structural/exact (30, 23) instructions 23/25
- kbd_led_handler: completion result lifetime ternary: structural/exact (30, 23) instructions 23/25
- TMCJPEG_814F0A58: chroma loop shape ystepfirst: structural/exact (2, 2) instructions 475/475 first [(274, ('rlwinm', 'r0, r26, 0, 0, 0'), ('subfic', 'r6, r6, 8')), (275, ('subfic', 'r6, r6, 8'), ('rlwinm', 'r0, r26, 0, 0, 0'))]
- kbd_led_handler: completion result lifetime BOOL: structural/exact (5, 9) instructions 25/25 first [(1, ('lis', 'r7, 0'), ('lis', 'r6, 0')), (3, ('li', 'r6, 0'), ('li', 'r8, 0')), (5, ('slwi', 'r8, r4, 5'), ('slwi', 'r7, r4, 5')), (7, ('addi', 'r7, r7, 0'), ('addi', 'r6, r6, 0'))]
- kbd_led_handler: completion result lifetime switchsame: structural/exact (5, 9) instructions 25/25 first [(1, ('lis', 'r7, 0'), ('lis', 'r6, 0')), (3, ('li', 'r6, 0'), ('li', 'r8, 0')), (5, ('slwi', 'r8, r4, 5'), ('slwi', 'r7, r4, 5')), (7, ('addi', 'r7, r7, 0'), ('addi', 'r6, r6, 0'))]
- TMCJPEG_814F0A58: chroma loop shape finishcount: structural/exact (2, 2) instructions 475/475 first [(274, ('rlwinm', 'r0, r26, 0, 0, 0'), ('subfic', 'r6, r6, 8')), (275, ('subfic', 'r6, r6, 8'), ('rlwinm', 'r0, r26, 0, 0, 0'))]
- kbd_led_handler: completion result lifetime returnhelper: structural/exact (30, 23) instructions 23/25
## fz15g kbd_led_handler BOOL return representation removed the extra switch branch. Combine it with target positive-case layout, then vary command-address/zero ownership.
- kbd_led_handler: callback BOOL result and positive switch base: structural/exact (2, 20) instructions 26/25
- kbd_led_handler: callback BOOL result and positive switch null: structural/exact (9, 19) instructions 26/25
- kbd_led_handler: callback BOOL result and positive switch cmdptr: structural/exact (2, 20) instructions 26/25
- kbd_led_handler: callback BOOL result and positive switch earlyptr: structural/exact (2, 20) instructions 26/25
- kbd_led_handler: callback BOOL result and positive switch zero: structural/exact (9, 19) instructions 26/25
- kbd_led_handler: callback BOOL result and positive switch reloadguard: structural/exact (2, 20) instructions 26/25
- kbd_led_handler: callback BOOL result and positive switch signedidx: structural/exact (2, 20) instructions 26/25
- kbd_led_handler: callback BOOL result and positive switch param: structural/exact (2, 20) instructions 26/25
## fz15g kbd_led_handler The target retains final blr after tail call. Test a real shared exit and positive callback guard with direct if result selection.
- kbd_led_handler: callback single exit shape goto: structural/exact (30, 23) instructions 23/25
- kbd_led_handler: callback single exit shape positive: structural/exact (30, 23) instructions 23/25
- kbd_led_handler: callback single exit shape positiveNULL: structural/exact (30, 23) instructions 23/25
- kbd_led_handler: callback single exit shape dupcall: structural/exact (33, 23) instructions 26/25
## fz15g TMCJPEG_814F0A58 Reverse which source plane owns named row padding, and use the C int type rather than long. This distinguishes width use lifetime from explicit padding definition.
- TMCJPEG_814F0A58: named row padding int in cr plane: structural/exact (0, 62) instructions 475/475
- TMCJPEG_814F0A58: named row padding unsigned int in cr plane: structural/exact (0, 62) instructions 475/475
- TMCJPEG_814F0A58: named row padding s32 in cr plane: structural/exact (0, 62) instructions 475/475
- TMCJPEG_814F0A58: named row padding int in both plane: structural/exact (21, 220) instructions 475/475
- TMCJPEG_814F0A58: named row padding unsigned int in both plane: structural/exact (21, 220) instructions 475/475
- TMCJPEG_814F0A58: named row padding s32 in both plane: structural/exact (21, 220) instructions 475/475
## fz15g owned data and extents audit
JPEG has no owned data sections; NWC 904/904 and keyboard 5296/5296 data bytes already pair exactly. No symbol rename or extent change justified there.
target zprepare data relocations: 0->Zi8PrepareMatch+0x260, 4->Zi8PrepareMatch+0x1e4, 8->Zi8PrepareMatch+0x1f4, 12->Zi8PrepareMatch+0x204, 16->Zi8PrepareMatch+0x214, 20->Zi8PrepareMatch+0x224, 24->Zi8PrepareMatch+0x234, 28->Zi8PrepareMatch+0x244, 32->Zi8PrepareMatch+0x254, 36->Zi8PrepareMatch+0x260, 40->Zi8PrepareMatch+0x260, 44->Zi8PrepareMatch+0x204
source zprepare data relocations: 0->Zi8PrepareMatch+0x250, 4->Zi8PrepareMatch+0x1d4, 8->Zi8PrepareMatch+0x1e4, 12->Zi8PrepareMatch+0x1f4, 16->Zi8PrepareMatch+0x204, 20->Zi8PrepareMatch+0x214, 24->Zi8PrepareMatch+0x224, 28->Zi8PrepareMatch+0x234, 32->Zi8PrepareMatch+0x244, 36->Zi8PrepareMatch+0x250, 40->Zi8PrepareMatch+0x250, 44->Zi8PrepareMatch+0x1f4
Relocation proof: all twelve entries in target jumptable_8166B3D0 (48 bytes) point inside nonmatching Zi8PrepareMatch; source @230 is the corresponding compiler-generated switch table with different code offsets. This is a code-layout gap; @230 is not a stable real source object name, so no rename. Extab 8 bytes exact, extabindex 12 differs by nonmatching function extent; no data-type size correction.
Zi8PrepareMatch extent 0x814850fc..0x81485fac, next CDBInit 0x81485fac, overlap 0.
CheckMsgBoxSpace extent 0x814a731c..0x814a7698, next SynthesizeAddrStr 0x814a7698, overlap 0.
WriteMIMEAttachHeader extent 0x814a8064..0x814a81d4, next WriteContentTypeField 0x814a81d4, overlap 0.
TMCJPEGDEC_set_converterY8U8V8 extent 0x814efb9c..0x814efeac, next TMCJPEG_814EFEAC 0x814efeac, overlap 0.
TMCJPEG_814F0A58 extent 0x814f0a58..0x814f11c4, next TMCJPEG_814F11C4 0x814f11c4, overlap 0.
kbdEventHandler extent 0x815f34d8..0x815f37c0, next kbdRepeatHandler 0x815f37c0, overlap 0.
kbdProcMod extent 0x815f3aa4..0x815f3ea4, next kbdSendKey 0x815f3ea4, overlap 0.
kbd_led_handler extent 0x815f3fb4..0x815f4018, next KBDSetLedsAsync 0x815f4018, overlap 0.
KBDSetLedsAsync extent 0x815f4018..0x815f415c, next KBDSetLeds 0x815f415c, overlap 0.
KBDSetLeds extent 0x815f415c..0x815f4298, next kbdInitMap 0x815f4298, overlap 0.
KBDSetModState extent 0x815f4664..0x815f470c, next KBDTranslateHidCode 0x815f470c, overlap 0.
## fz15g TMCJPEG_814F0A58 Continue already diagnosed chroma preheader. Retire dimension locals after bound formation, reuse them for real source padding, or use the prior row induction local; no dummy values.
- TMCJPEG_814F0A58: chroma dimension lifetime widthpadding: structural/exact (21, 126) instructions 475/475
- TMCJPEG_814F0A58: chroma dimension lifetime heightpadding: structural/exact (21, 126) instructions 475/475
- TMCJPEG_814F0A58: chroma dimension lifetime reusebound: structural/exact (21, 140) instructions 475/475
- TMCJPEG_814F0A58: chroma dimension lifetime rowvariable: structural/exact (0, 0) instructions 475/475 first []
## fz15g TMCJPEG_814F0A58 exact candidate
Reusing the existing row induction variable for the chroma loop, rather than incrementing the incoming y parameter, resolves the last two preheader scheduling instructions after sharing xEnd/tileWidth and expressing source padding directly. Both loops use row=original y; y is not used after the chroma loop, so output semantics are unchanged. Raw source/target symbol bytes identical, 1900 bytes and 475/475 instructions; branch-correct declsearch score (0,0). ctxdiff still emits four false CR1-branch differences because its normalizer uses operand zero rather than the branch target, and the converter-setup function remains four bytes shorter. Existing tool bug also affects eleven pre-existing exact converters; no tool or symbol edits.
The queued last-stage keyboard declaration check was cancelled before modifying source: shared git-fetch lock was occupied by another worker fetch for several minutes. Those functions already received their required origin fetch/check and distinct structural trials earlier this round.
JPEG candidate quick full-build gate: GATE PASS, objdiff 12/13 functions and code 15164/15948 (before 11/13, 13264/15948), no regressions/forbidden/readability warnings, DOL hash correct. Gate instruction-exact remains 2/13 solely because of the unchanged CR1 normalizer issue documented above; raw bytes prove the new converter exact. NWC remains 18/18 and 8532/8532 with 904/904 data.
## fz15g kbdEventHandler final declaration search
Continue the function already fetched/diagnosed this round; its body still equals the fetched origin snapshot. Structural trials exhausted; test actual declaration block last.
Declaration-search output for kbdEventHandler:
```
declaration block:
KBDChannel* data;
u8* bytes;
u8 status;
start (0, 5)
best (0, 5) after 6 builds; source restored; best order was:
KBDChannel* data;
u8* bytes;
u8 status;
```
## fz15g kbdProcMod final declaration search
Continue the function already fetched/diagnosed this round; its body still equals the fetched origin snapshot. Structural trials exhausted; test actual declaration block last.
Declaration-search output for kbdProcMod:
```
declaration block:
KBDChannel* data;
u32 modState;
s32 delta;
u8 flags;
start (0, 4)
best (0, 4) after 13 builds; source restored; best order was:
KBDChannel* data;
u32 modState;
s32 delta;
u8 flags;
```
## fz15g KBDSetModState final declaration search
Continue the function already fetched/diagnosed this round; its body still equals the fetched origin snapshot. Structural trials exhausted; test actual declaration block last.
Declaration-search output for KBDSetModState:
```
declaration block:
BOOL interrupts;
KBDModifierState oldState;
KBDModifierState newState;
start (0, 4)
best (0, 4) after 6 builds; source restored; best order was:
BOOL interrupts;
KBDModifierState oldState;
KBDModifierState newState;
```
## fz15g TMCJPEGDEC_set_converterY8U8V8 Continue previously fetched and diagnosed converter setup. Test byte-buffer address ownership as integer SDK address arithmetic and readonly buffer view; every base remains the real convBuf member, without pinned labels or numeric work offsets.
- TMCJPEGDEC_set_converterY8U8V8: shared conversion address representation address: structural/exact (41, 195) instructions 195/196
- TMCJPEGDEC_set_converterY8U8V8: shared conversion address representation pointeraddress: structural/exact (41, 195) instructions 195/196
- TMCJPEGDEC_set_converterY8U8V8: shared conversion address representation constaddress: structural/exact (41, 195) instructions 195/196
## fz15g pre-final completeness audit
Only two source changes retained: exact WriteMIMEAttachHeader and TMCJPEG_814F0A58. All other source trials restored; no header/config/symbol changes. Every remaining function has at least three distinct valid compiled source trials this round. Count excludes the unsigned-HID bug in the first const-char trial and excludes compile failures.
Zi8PrepareMatch: 5 distinct valid current-round compiled source trials; remains open.
TMCJPEGDEC_set_converterY8U8V8: 10 distinct valid current-round compiled source trials; remains open.
kbdEventHandler: 4 distinct valid current-round compiled source trials; remains open.
kbdProcMod: 5 distinct valid current-round compiled source trials; remains open.
kbd_led_handler: 36 distinct valid current-round compiled source trials; remains open.
KBDSetLedsAsync: 4 distinct valid current-round compiled source trials; remains open.
KBDSetLeds: 4 distinct valid current-round compiled source trials; remains open.
KBDSetModState: 5 distinct valid current-round compiled source trials; remains open.
Gate keyboard count 14/21 versus objdiff 15/21 is also a normalization artifact: KBDResetChannel raw symbol bytes are identical; odiff misnormalizes CR1 bne/beq at 5/26 from instruction address, yielding 24-byte false differences because earlier unmatched LED functions differ in length. Correct last-operand branch normalization scores (0,0). No tool changes.
Commits so far: 36ff398b NWC header measurement expression; e4b0d291 JPEG row induction. Remote main advanced while other workers fetched; this branch remains on its authorized starting base, without rebase or unrelated changes.
## fz15g final full clean gate
```
full build: ok
main.dol sha1: 26116613f624061ba99c8d1a299aaa6efa85670d
[libs/RevoEX/src/nwc24/NWC24MsgCommit] pool: IDENTICAL
[libs/RevoEX/src/nwc24/NWC24MsgCommit] objdiff: code 8532/8532 data 904/904 functions 18/18 fuzzy 100.0000 linked code 0
[libs/RevoEX/src/nwc24/NWC24MsgCommit] instruction-exact functions: 18/18
[libs/RevoEX/src/nwc24/NWC24MsgCommit] section .bss size 64 match 100.0
[libs/RevoEX/src/nwc24/NWC24MsgCommit] section .data size 680 match 100.0
[libs/RevoEX/src/nwc24/NWC24MsgCommit] section .sbss size 8 match 100.0
[libs/RevoEX/src/nwc24/NWC24MsgCommit] section .sdata size 152 match 100.0
[libs/RevoEX/src/nwc24/NWC24MsgCommit] section .text size 8532 match 100.0
[libs/RevoEX/src/nwc24/NWC24MsgCommit] baseline: code 8164/8532 data 904 functions 17 fuzzy 99.9836
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoY8U8V8] pool: IDENTICAL
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoY8U8V8] objdiff: code 15164/15948 data None/None functions 12/13 fuzzy 99.6453 linked code 0
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoY8U8V8] instruction-exact functions: 2/13
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoY8U8V8] section .text size 15948 match 99.64535
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoY8U8V8] below 100: TMCJPEGDEC_set_converterY8U8V8 92.78571
[libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoY8U8V8] baseline: code 13264/15948 data None functions 11 fuzzy 99.5275
[libs/RVL_SDK/src/kbd/kbd_lib] pool: IDENTICAL
[libs/RVL_SDK/src/kbd/kbd_lib] objdiff: code 3088/5764 data 5296/5296 functions 15/21 fuzzy 97.7044 linked code 0
[libs/RVL_SDK/src/kbd/kbd_lib] instruction-exact functions: 14/21
[libs/RVL_SDK/src/kbd/kbd_lib] section .bss size 3968 match 100.0
[libs/RVL_SDK/src/kbd/kbd_lib] section .data size 1304 match 100.0
[libs/RVL_SDK/src/kbd/kbd_lib] section .sbss size 16 match 100.0
[libs/RVL_SDK/src/kbd/kbd_lib] section .sdata size 8 match 100.0
[libs/RVL_SDK/src/kbd/kbd_lib] section .text size 5764 match 97.70437
[libs/RVL_SDK/src/kbd/kbd_lib] below 100: kbdEventHandler 99.83871
[libs/RVL_SDK/src/kbd/kbd_lib] below 100: kbdProcMod 99.90234
[libs/RVL_SDK/src/kbd/kbd_lib] below 100: kbd_led_handler 64.12
[libs/RVL_SDK/src/kbd/kbd_lib] below 100: KBDSetLedsAsync 86.234566
[libs/RVL_SDK/src/kbd/kbd_lib] below 100: KBDSetLeds 84.6076
[libs/RVL_SDK/src/kbd/kbd_lib] below 100: KBDSetModState 99.40476
[libs/RVL_SDK/src/kbd/kbd_lib] baseline: code 3088/5764 data 5296 functions 15 fuzzy 97.7044
[libs/RVLMiddleware/eZiText/src/clib/zprepare] pool: IDENTICAL
[libs/RVLMiddleware/eZiText/src/clib/zprepare] objdiff: code None/3760 data 8/68 functions 0/1 fuzzy 96.3191 linked code 0
[libs/RVLMiddleware/eZiText/src/clib/zprepare] instruction-exact functions: 0/1
[libs/RVLMiddleware/eZiText/src/clib/zprepare] section .data size 48 match None
[libs/RVLMiddleware/eZiText/src/clib/zprepare] section .text size 3760 match 96.319145
[libs/RVLMiddleware/eZiText/src/clib/zprepare] section extab size 8 match 100.0
[libs/RVLMiddleware/eZiText/src/clib/zprepare] section extabindex size 12 match 91.66667
[libs/RVLMiddleware/eZiText/src/clib/zprepare] below 100: Zi8PrepareMatch 96.319145
[libs/RVLMiddleware/eZiText/src/clib/zprepare] baseline: code None/3760 data 8 functions 0 fuzzy 96.3191
regressions vs baseline: 0
global matched_code_percent: 90.43582 -> 90.51154
global fuzzy_match_percent: 99.56486 -> 99.56554
global complete_code_percent: 70.30611 -> 70.30611
global matched_data_percent: 99.36596 -> 99.36596
forbidden patterns added (net, per file): 0
readability warnings (net, per file; must be 0 in the final result): 0
GATE PASS
```
## fz15g final per-unit before -> after
main/libs/RevoEX/src/nwc24/NWC24MsgCommit: objdiff exact functions 17 -> 18/18, code bytes 8164 -> 8532/8532, data bytes 904 -> 904/904.
main/libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoY8U8V8: objdiff exact functions 11 -> 12/13, code bytes 13264 -> 15164/15948, data bytes 0 -> 0/0.
main/libs/RVL_SDK/src/kbd/kbd_lib: objdiff exact functions 15 -> 15/21, code bytes 3088 -> 3088/5764, data bytes 5296 -> 5296/5296.
main/libs/RVLMiddleware/eZiText/src/clib/zprepare: objdiff exact functions 0 -> 0/1, code bytes 0 -> 0/3760, data bytes 8 -> 8/68.
Gate instruction-exact counts NWC 17 -> 18, JPEG 2 -> 2, keyboard 14 -> 14, zprepare 0 -> 0. Branch-correct instruction equality and objdiff confirm JPEG 11 -> 12 and keyboard 15 -> 15; raw-byte proof and the existing CR1 normalizer artifact are documented above.
## fz15g final open functions and attempt audit
TMCJPEGDEC_set_converterY8U8V8 92.78571%: shared convBuf address folded into case addresses, 195/196 instructions; dimension scheduling also differs; 10 distinct valid compiled current-round source trials.
kbdEventHandler 99.83871%: initial report status uses r3 and table base r30 instead of r5 and r3; five operand differences, 186/186 instructions; 4 distinct valid compiled current-round source trials.
kbdProcMod 99.90234%: inlined modifier setter address and old-state value swap r4/r5; four operands, 256/256 instructions; 5 distinct valid compiled current-round source trials.
kbd_led_handler 64.12%: callback-index rematerialization and success/default branch shape; retained source 24/25 instructions, best rejected BOOL trial 25/25 with nine differences; 36 distinct valid compiled current-round source trials.
KBDSetLedsAsync 86.234566%: channel-stride cached across interrupt calls and slot-loop address/ordinal form; retained source 80/81 instructions; 4 distinct valid compiled current-round source trials.
KBDSetLeds 84.6076%: channel-stride caching and command-slot loop pointer form; retained source 75/79 instructions; 4 distinct valid compiled current-round source trials.
KBDSetModState 99.40476%: modifier address and prior word swap r4/r5; four operand differences, 42/42 instructions; 5 distinct valid compiled current-round source trials.
Zi8PrepareMatch 96.319145%: target component branch stores a local flag absent in source, plus local/branch scheduling; retained source 939/940 instructions, switch relocations remain code-dependent; 5 distinct valid compiled current-round source trials.
Changed files: libs/RevoEX/src/nwc24/NWC24MsgCommit.c; libs/RVLMiddleware/TMC_JPEG/src/texturecvtr/Texture_MCUtoY8U8V8.c; tools/decomp-assist/fz15.attempts.md. Exact source commits: 36ff398b and e4b0d291. Final log-only commit follows this audit.
Uncertainty: original source forms for converter shared-base preservation, keyboard allocator/LED loop behavior, and the zprepare component branch remain unresolved. No unsupported volatile declaration or dummy component flag added. zprepare data remains 8/68 because the unpaired compiler table points into nonexact code, with no legitimate stable source-name rename or extent correction.