Damn OBOEs. Though it looks like I've actually got part of it right. The number of inputs produced 1 instructions ahead is correct, at least.