I would run the LOWEST octane available in your area. Higher octane burns slower which has a higher chance of some fuel making it out unburnt.
I did a smog on my car yesterday and passed great. I had just replaced a BHG and burnt valve on it. Other than gaskets, all stock parts are on there with mild cleaning. I ran a full tank of amsoil PI additive before going, and there was still a little bit in there during the test. HC and CO were about half of the average and NOx was under 10ppm during both tests.