Separating out writing assembly (from the AST) from writing the header.