ac/nir: split scanning outputs from setting up output allocas