The rest of part 1 was easy: for each input case, just count how many opcodes modify all the registers in the given way and keep a count of the cases where there were at least 3 such opcodes.
For part 2, I collected all the guesses for each instruction number, and kept removing those that only had one solution until I knew all of them. Then I just translated each instruction number to the opcode and ran it.
Fortunately, much easier than yesterday, it would have ruined my Advent otherwise.
I started implementing the dispatch table for the opcodes like this
but it was a lot of repetitive typing, so I let Perl generate the code for me from simpler strings.
The rest of part 1 was easy: for each input case, just count how many opcodes modify all the registers in the given way and keep a count of the cases where there were at least 3 such opcodes.
For part 2, I collected all the guesses for each instruction number, and kept removing those that only had one solution until I knew all of them. Then I just translated each instruction number to the opcode and ran it.