The flowchart is described in the surrounding text.