Compare-and-jump loops are what every for loop compiles to, and reading them is a daily skill on Compiler Explorer; the flags-register discipline you learn here (cmp sets, jl reads) is the x86 idiom underlying all control flow. This is also where you first see why the compiler replaces your loop with the Gauss formula at -O2.