Thanks for this. Trying to follow along but modern compilers and cpus seem to modify the disassembly in a way that makes it tough to follow along. Tried throwing a bunch of flags at gcc but still getting some diffs. Had this issue when I was working with an older C book as well.
Maybe Godbolt has some way to emulate this better