For both loadKeccak256PreimagePart and loadSha256PreimagePart, it is better to use .length instead of using calldataload at a fixed offset to determine the length of calldata, because calldata offsets can be manipulated.
