IMHO the most confusing part is that AT&T/GAS syntax inverts the comparisons, which are otherwise natural in Intel syntax:
cmp eax, ebx ; eax ? ebx
jg foo ; jump if eax > ebx
Related: http://x86asm.net/articles/what-i-dislike-about-gas/