Gymnastics doctor sentenced to 40 to 175 years in prison