I was looking at the Clones.sol contract, and I noticed that you are using the EVM instruction
shl to shift the implementation address by 96 bits:
mstore(ptr, 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000000000000000000000) mstore(add(ptr, 0x14), shl(0x60, implementation))
I understand the first part of this code. You are adding
0x14 (20) bytes to the pointer because the first part of the EIP-1167 bytecode has that length. But why do you have to shift left by
0x60 (96 bits)?
Optionality's original implementation of EIP-1167 doesn't need to do that.