CodeBlock getFirstBlockContaining(Address addr){
        CodeBlock[] blocks = getBlocksContaining(addr);
        if (blocks == null)
            return null;
        if (blocks.length == 1)
            return blocks[0];

        int firstIndex = -1;
        Address minAddr = null;
        for (int i=0; i < blocks.length; i++) {
            if (minAddr == null ||
            	minAddr.compareTo(blocks[i].getFirstStartAddress()) > 0) {
                minAddr = blocks[i].getFirstStartAddress();
                firstIndex = i;
            }
        }
        return blocks[firstIndex];
    }
Get the first block which contains addr.
@return  the block whose entry point is minimum among all
         blocks that contain addr and are in the cache.
         Otherwise, return null.
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/block/CodeBlockCache.java