code: def partition_block(block):
      
      result = [block]
  
      if not block.is_partitionable:
          return result
  
      EDP = END_PROGRAM_LABEL + ':'
  
      for i in range(len(block) - 1):
          if i and block.asm[i] == EDP:  # END_PROGRAM label always starts a basic block
              block, new_block = block_partition(block, i - 1)
              LABELS[END_PROGRAM_LABEL].basic_block = new_block
              result.extend(partition_block(new_block))
              return result
  
          if block.mem[i].is_ender:
              block, new_block = block_partition(block, i)
              result.extend(partition_block(new_block))
              op = block.mem[i].opers
  
              for l in op:
                  if l in LABELS.keys():
                      JUMP_LABELS.add(l)
                      block.label_goes += [l]
              return result
  
          if block.asm[i] in arch.zx48k.backend.ASMS:
              if i > 0:
                  block, new_block = block_partition(block, i - 1)
                  result.extend(partition_block(new_block))
                  return result
  
              block, new_block = block_partition(block, i)
              result.extend(partition_block(new_block))
              return result
  
      for label in JUMP_LABELS:
          must_partition = False
          if LABELS[label].basic_block is block:
              for i in range(len(block)):
                  cell = block.mem[i]
                  if cell.inst == label:
                      break
  
                  if cell.is_label:
                      continue
  
                  if cell.is_ender:
                      continue
  
                  must_partition = True
  
              if must_partition:
                  block, new_block = block_partition(block, i - 1)
                  LABELS[label].basic_block = new_block
                  result.extend(partition_block(new_block))
                  return result
  
      return result
docs: If a block is not partitionable, returns a list with the same block.
      Otherwise, returns a list with the resulting blocks, recursively.