This is already very optimal, two frames away from the TAS time, so optimizing this is gonna suck a lot.