asm-optimizer-artifacts
Installation
SKILL.md
Optimizer Artifacts in Assembly
When to use
- Reading
-O2/-O3assembly produced from C/C++ and mapping it back to the source. - Explaining why a function body "disappeared", a call became a
jmp, or animulbecame alea. - Checking whether generated code does what the source says (reviews, reverse engineering, ABI verification).
- Comparing
-O0vs-O2disassembly to understand what the optimizer changed.
When not to use
- Deciding whether source contains UB — use
c-undefined-behavior/compiler-ub-assumptionsfirst; optimizer behavior caused by UB is that skill's domain. - Writing inline asm — use
asm-inline-asm-constraints. - Reading debug info to recover source variables — use
dwarf-debug-info. - Anything ARM/AArch64/RISC-V — these artifacts are x86-64 examples; the concepts transfer but the instructions differ.