public CodeUnit getCodeUnitBefore(Address address) {
		lock.acquire();
		try {
			AddressIterator it = program.getMemory().getAddresses(address, false);
			Address addr = null;
			if (it.hasNext()) {
				addr = it.next();
				if (addr.equals(address)) {
					addr = it.hasNext() ? it.next() : null;
				}
			}
			if (addr == null) {
				return null;
			}
			CodeUnit cu = getDefinedBefore(address);
			if (cu != null && cu.contains(addr)) {
				return cu;
			}
			return getUndefinedDataDB(addr, addrMap.getKey(addr, false));
		}
		catch (IOException e) {
			dbError(e);
		}
		finally {
			lock.release();
		}

		return null;
	}
Returns the next code unit whose min address is closest to and less than the specified 
address.

@param address the address to look before
@return CodeUnit the code unit before the specified address, or null if a code unit does not 
exist
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/code/CodeManager.java