The OOT and MM decomp had a bruteforcer tool that would reorder lines until the register allocation matched.