{
    "Function": "swapSelector",
    "File": "contracts/contracts/nomad-core/libs/ExcessivelySafeCall.sol",
    "Parent Contracts": [],
    "High-Level Calls": [],
    "Internal Calls": [
        "mstore(uint256,uint256)",
        "require(bool)",
        "mload(uint256)"
    ],
    "Library Calls": [],
    "Low-Level Calls": [],
    "Code": "function swapSelector(bytes4 _newSelector, bytes memory _buf) internal pure {\n    require(_buf.length >= 4);\n    uint256 _mask = LOW_28_MASK;\n    assembly {\n      // load the first word of\n      let _word := mload(add(_buf, 0x20))\n      // mask out the top 4 bytes\n      // /x\n      _word := and(_word, _mask)\n      _word := or(_newSelector, _word)\n      mstore(add(_buf, 0x20), _word)\n    }\n  }"
}