Matching Decompilation as a Puzzle: An Edge-First Method for Byte-Exact Reconstruction of Compiled Programs with Coordinated AI Agents
Matching decompilation rebuilds source code that the original compiler turns into the original binary, byte for byte. This note describes a general, tool-independent method for doing so at scale with many AI agents and an automated search, organised around one insight: a program is a puzzle whose pieces must fit at both edges. Per-function byte agreement is necessary but not sufficient. Only the linked image, compared by hash, proves a piece correct, and it proves it together with its neighbours. The method covers the full path: reconstructing the original toolchain, a byte-exact reassemblable baseline, source drafts (decompiler, sibling functions, body transplant), generators (agents and a mutator), the original compiler run and instrumented in an emulator as a predictive model, a verification hierarchy with a ratchet, and an edge-first puzzle strategy with regional link probes. It closes with a chain of operating principles and lessons from practice, including why rewriting beats patching when progress stalls. The method was developed on a 1990s DOS game built with a 32-bit C++ compiler. No code, binaries or assets of that product are part of this note.
Authors
- Werner Baumgarten
Publication Details
- Journal
- Zenodo (CERN European Organization for Nuclear Research)
- Published
- 2026-10-30
- DOI
- https://doi.org/10.5281/zenodo.23806061
- Primary Topic
- Software Engineering Research
- Type
- article
- Field-Weighted Citation Impact
- 0.00