This input is reduced to run for approximately one second: https://gist.github.com/nikic/dd7a20a6604e7ab3f4c9ebce8377c2c9
This is the original input, which hangs ~forever (I stopped waiting after a few minutes): https://gist.github.com/nikic/f12002e855c733cece331e9d4d2841f3