Reads unit->unit.player_index (+0x1C8 via unit_get, which the target confirms
by passing mask 3), and maps it through player_get to local_player_index (+2 in
player_datum).
Branch polarity is the load-bearing detail: writing the NONE check as an early
return puts the cold path inline and leaves 28 bytes off. Testing the positive
case and returning NONE at the end reproduces January's layout (je to an
out-of-line tail) exactly. The ternary form is 7 off, a result-variable form 31.
Verified strict; player_control now 37 exact.
Byte-exact (144/144 B, 10/10 relocs, section_infos_equal). The house-rule single
return per function was the missing shape: one *mutex_reference = reference write
reached from success AND both fail paths keeps reference in a register (ESI,
un-folded) instead of our CL constant-folding the provably-NULL early-return write.
CreateMutexA-fail sets reference = NULL so that exit writes NULL; a single
return success closes it. code_0006fc60 remains a call. Not pushed.
source/ai/props 9/17 -> 10/17 from codex/props-full-admission-20260729,
found by branch_sweep.
Sweep hygiene note, learned here: the sweep's reported verdicts must be
re-verified before adoption. Its render/render row claimed
"exact 9 residual 0 unwritten 0" where re-running the gate on that same
blob gives exact 0 / unwritten 13 - far worse - so that row was a
measurement artifact and was not adopted. Only props reproduced.
Also measured and worth recording: an optimization-flag matrix on
circular_queue (/Ox, /O1, /Ob2, /Oi, /Og /Oi /Ot /Ob1, /Gf, /GF, /Oa,
/Ow, /Op, /QIfist, /Ot /Og) leaves /O2 as the clear best at 7/8 exact -
every alternative drops to 0-6/8. Flags are exonerated for that unit, so
its shared-zero-register residual is not flag-driven.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>