This is the "magic" step. The decompiler analyzes the flow of Assembly and "lifts" it into C code. It identifies patterns—for example, a series of "Compare" and "Branch" instructions in Assembly is reconstructed as a statement or an block in C. Symbol Recovery:
The only way to get perfect source code is —a human reading the decompiler's output and rewriting it into clean C. This is exactly what the Decompilation Projects for Super Mario 64 or Ocarina of Time did. For NDS, similar efforts exist for New Super Mario Bros. and Pokémon Diamond/Pearl , but they are community-driven and take years. nds decompiler
(Free, best overall)
Practical tips