Fixed register use overlap in f function