Lifting to Pseudocode: IR, SSA, and Structuring From Scratch
Decompiler output is a claim with a hidden derivation. When you build the derivation yourself, every line of that output becomes a thing you can check.
150 minutesBuildPython, CMembers
Learning Objectives
- Lift decoded x86-64 instructions to a small IR with explicit flags, loads, stores, branches, calls, and returns.
- Turn frame slots into local variables and System V argument registers into parameters.
- Build minimal SSA with phi functions on dominance frontiers, then substitute, simplify, and remove dead code.
- Recover
ififwithelsewhileanddo whilefrom the control-flow graph with post-dominators and back edges. - Explain the multiply by
0x66666667as a division by 10 and prove the identity. - Read Ghidra pseudocode for the same functions line by line and name the instruction, or the guess, behind every difference.