So, in summary, the first block corrects for HTTP -> HTTPS and the second corrects if the www subdomain is omitted. I also removed the parentheses in your pattern (.*) since you aren't capturing it for the substitution.
These two rule blocks could be combined into one if desired...