I understand that a conditional move based on equality "maps" to c or c++ code like
but what about operations based on register flags like the carry flag? I understand the use of the zero flag for loops etc but instructions like cmovc and cmovp have me puzzled how they can be used practically
You try to reason about assembler at the wrong abstraction level; machine instructions have a direct and simple correspondence with high level variables, arithmetic, loops etc. only in easy cases, and optimizations (like using conditional move instructions rather than jumps and plain moves) tend to depart from the easy cases.