Formation of nitric oxide in premixed hydrocarbon flames