{
    "Function": "_squeezedAmt",
    "File": "src/Drips.sol",
    "Parent Contracts": [],
    "High-Level Calls": [
        "DripsConfigImpl"
    ],
    "Internal Calls": [
        "_dripsRange",
        "_drippedAmt"
    ],
    "Library Calls": [
        "amtPerSec"
    ],
    "Low-Level Calls": [],
    "Code": "function _squeezedAmt(\n        uint256 userId,\n        DripsHistory memory dripsHistory,\n        uint32 squeezeStartCap,\n        uint32 squeezeEndCap\n    ) private view returns (uint128 squeezedAmt) {\n        DripsReceiver[] memory receivers = dripsHistory.receivers;\n        // Binary search for the `idx` of the first occurrence of `userId`\n        uint256 idx = 0;\n        for (uint256 idxCap = receivers.length; idx < idxCap;) {\n            uint256 idxMid = (idx + idxCap) / 2;\n            if (receivers[idxMid].userId < userId) {\n                idx = idxMid + 1;\n            } else {\n                idxCap = idxMid;\n            }\n        }\n        uint32 updateTime = dripsHistory.updateTime;\n        uint32 maxEnd = dripsHistory.maxEnd;\n        uint256 amt = 0;\n        for (; idx < receivers.length; idx++) {\n            DripsReceiver memory receiver = receivers[idx];\n            if (receiver.userId != userId) break;\n            (uint32 start, uint32 end) =\n                _dripsRange(receiver, updateTime, maxEnd, squeezeStartCap, squeezeEndCap);\n            amt += _drippedAmt(receiver.config.amtPerSec(), start, end);\n        }\n        return uint128(amt);\n    }"
}