```\nfunction cloneDeterministic(address implementation, bytes32 salt)\n  internal\n  returns (address instance)\n{\n  assembly {\n    let ptr := mload(0x40)\n    mstore(\n      ptr,\n      0x3d605d80600a3d3981f336603057343d52307f00000000000000000000000000\n    )\n    mstore(\n      add(ptr, 0x13),\n      0x830d2d700a97af574b186c80d40429385d24241565b08a7c559ba283a964d9b1\n    )\n    mstore(\n      add(ptr, 0x33),\n      0x60203da23d3df35b3d3d3d3d363d3d37363d7300000000000000000000000000\n    )\n    mstore(add(ptr, 0x46), shl(0x60, implementation))\n    mstore(\n      add(ptr, 0x5a),\n      0x5af43d3d93803e605b57fd5bf300000000000000000000000000000000000000\n    )\n    instance := create2(0, ptr, 0x67, salt)\n  }\n  if (instance == address(0)) revert Create2Error();\n}\n```\n