Production of muons from heavy-flavour hadron decays in pp collisions at root s=5.02 TeV