Added mali patches and optimizations (ty cocafe)