Apparently gcc doesn't bother to reset r1 to 0 despite the fact that it is in the clobber list.