{
    "Function": "getLiquidityForAmount0",
    "File": "contracts/libraries/Math.sol",
    "Parent Contracts": [],
    "High-Level Calls": [
        "LiquidityChunk",
        "LiquidityChunk"
    ],
    "Internal Calls": [
        "mulDiv96",
        "toUint128",
        "getSqrtRatioAtTick",
        "getSqrtRatioAtTick",
        "mulDiv"
    ],
    "Library Calls": [
        "tickLower",
        "tickUpper"
    ],
    "Low-Level Calls": [],
    "Code": "function getLiquidityForAmount0(\n        uint256 liquidityChunk,\n        uint256 amount0\n    ) internal pure returns (uint128 liquidity) {\n        uint160 lowPriceX96 = getSqrtRatioAtTick(liquidityChunk.tickLower());\n        uint160 highPriceX96 = getSqrtRatioAtTick(liquidityChunk.tickUpper());\n\n        unchecked {\n            return\n                toUint128(\n                    mulDiv(amount0, mulDiv96(highPriceX96, lowPriceX96), highPriceX96 - lowPriceX96)\n                );\n        }\n    }"
}