Development of a semi-global reaction mechanism for thermal decomposition of a polymer containing reactive flame retardant