Double-end five-axis tenon machine