Association between insulin resistance and cognitive function in elderly diabetic patients