{
    "Function": "readBytecode",
    "File": "contracts/lib/solmate/src/utils/SSTORE2.sol",
    "Parent Contracts": [],
    "High-Level Calls": [],
    "Internal Calls": [
        "extcodecopy(uint256,uint256,uint256,uint256)",
        "mload(uint256)",
        "mstore(uint256,uint256)",
        "mstore(uint256,uint256)"
    ],
    "Library Calls": [],
    "Low-Level Calls": [],
    "Code": "function readBytecode(\n        address pointer,\n        uint256 start,\n        uint256 size\n    ) private view returns (bytes memory data) {\n        assembly {\n            // Get a pointer to some free memory.\n            data := mload(0x40)\n\n            // Update the free memory pointer to prevent overriding our data.\n            // We use and(x, not(31)) as a cheaper equivalent to sub(x, mod(x, 32)).\n            // Adding 31 to size and running the result through the logic above ensures\n            // the memory pointer remains word-aligned, following the Solidity convention.\n            mstore(0x40, add(data, and(add(add(size, 32), 31), not(31))))\n\n            // Store the size of the data in the first 32 byte chunk of free memory.\n            mstore(data, size)\n\n            // Copy the code into memory right after the 32 bytes we used to store the size.\n            extcodecopy(pointer, add(data, 32), start, size)\n        }\n    }"
}