Classification of finite 2-groups of maximal class

Statement
Let $$G$$ be a group of order $$2^n$$ and nilpotency class $$n - 1$$, where $$n \ge 4$$. In other words, $$G$$ is a 2-group that is also a maximal class group. Then, $$G$$ has a cyclic maximal subgroup $$M \cong \mathbb{Z}/2^{n-1}\mathbb{Z}$$, and it is one of the following groups:


 * 1) A dihedral group: it is a semidirect product of $$M$$ and a cyclic group of order two, which acts on $$M$$ via multiplication by -1.
 * 2) A semidihedral group: a semidirect product of $$M$$ and a cyclic group of order two, which acts on $$M$$ via multiplication by $$2^{n-2} - 1$$.
 * 3) A generalized quaternion group.

Note that in the case $$n = 3$$, we only get the dihedral group:D8 and the quaternion group, and no semidihedral group.

Related facts

 * Finite 2-groups of same order and maximal class are isoclinic
 * Classification of finite p-groups with cyclic maximal subgroup
 * Classification of finite 3-groups of maximal class
 * Finite non-abelian 2-group has maximal class iff its abelianization has order four