This first riff is going to be somewhat floating over the 4/4 time signature. I like incorporating riffs over 4/4 drum grooves that don't always perfectly line up within the 4/4 structure. For example, bar 4 is in 4/4 time, however depending on how you look at it, the guitar part is doing 3/4 there, as the riff starts over on the 4th beat of that measure. But since the drums remain in the 4/4 groove the entire time, the guitar riff begins to "float" over the bars from that point on.
There are a lot of palm mutes throughout this part as well as the rest of the piece, so keep your eye out for the "P.M." markings above the tab.
You'll also see a lot of rests. It's crucial that you keep the silent moments in these riffs as silent as possible! You want these riffs sounding extremely tight. If you hear a lot of noise during the rests then it's not going to sound that great, so practice your muting until it's dead-on quiet.