
In the given code, new execution segments begin:
Examining the jump targets and conditional branches reveals that the program naturally partitions into six such uninterrupted segments, each having a single entry point and a single exit point.
No two of these segments can be merged without violating the definition, since doing so would introduce either multiple entry points or internal branches.
Hence, the total number of basic blocks in the code is \(\boxed{6}\).