{
    "Function": "asTicks",
    "File": "contracts/types/TokenId.sol",
    "Parent Contracts": [],
    "High-Level Calls": [
        "TokenId",
        "TokenId"
    ],
    "Internal Calls": [
        "revert TicksNotInitializable()"
    ],
    "Library Calls": [
        "width",
        "strike"
    ],
    "Low-Level Calls": [],
    "Code": "function asTicks(\n        uint256 self,\n        uint256 legIndex,\n        int24 tickSpacing\n    ) internal pure returns (int24 legLowerTick, int24 legUpperTick) {\n        unchecked {\n            int24 selfWidth = self.width(legIndex);\n            int24 selfStrike = self.strike(legIndex);\n\n            // The max/min ticks that can be initialized are the closest multiple of tickSpacing to the actual max/min tick abs()=887272\n            // Dividing and multiplying by tickSpacing rounds down and forces the tick to be a multiple of tickSpacing\n            int24 minTick = (Constants.MIN_V3POOL_TICK / tickSpacing) * tickSpacing;\n            int24 maxTick = (Constants.MAX_V3POOL_TICK / tickSpacing) * tickSpacing;\n\n            // The width is from lower to upper tick, the one-sided range is from strike to upper/lower\n            int24 oneSidedRange = (selfWidth * tickSpacing) / 2;\n\n            (legLowerTick, legUpperTick) = (selfStrike - oneSidedRange, selfStrike + oneSidedRange);\n\n            // Revert if the upper/lower ticks are not multiples of tickSpacing\n            // Revert if the tick range extends from the strike outside of the valid tick range\n            // These are invalid states, and would revert silently later in `univ3Pool.mint`\n            if (\n                legLowerTick % tickSpacing != 0 ||\n                legUpperTick % tickSpacing != 0 ||\n                legLowerTick < minTick ||\n                legUpperTick > maxTick\n            ) revert Errors.TicksNotInitializable();\n        }\n    }"
}