{
    "Function": "updateReserves",
    "File": "src/libraries/SwapHelper.sol",
    "Parent Contracts": [],
    "High-Level Calls": [],
    "Internal Calls": [],
    "Library Calls": [],
    "Low-Level Calls": [],
    "Code": "function updateReserves(\n        ILBPair.Bin memory bin,\n        ILBPair.PairInformation memory pair,\n        bool swapForY,\n        uint112 amountInToBin,\n        uint112 amountOutOfBin\n    ) internal pure {\n        if (swapForY) {\n            bin.reserveX += amountInToBin;\n\n            unchecked {\n                bin.reserveY -= amountOutOfBin;\n                pair.reserveX += uint136(amountInToBin);\n                pair.reserveY -= uint136(amountOutOfBin);\n            }\n        } else {\n            bin.reserveY += amountInToBin;\n\n            unchecked {\n                bin.reserveX -= amountOutOfBin;\n                pair.reserveX -= uint136(amountOutOfBin);\n                pair.reserveY += uint136(amountInToBin);\n            }\n        }\n    }"
}