{
  "contractName": "SwapMath",
  "abi": [],
  "metadata": "{\"compiler\":{\"version\":\"0.6.8+commit.0bbfe453\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"methods\":{},\"title\":\"Computes the result of a swap within ticks\"},\"userdoc\":{\"methods\":{},\"notice\":\"Contains methods for computing the result of a swap within a single tick price range, i.e., a single tick.\"}},\"settings\":{\"compilationTarget\":{\"project:/contracts/interfaces/uniswap/SwapMath.sol\":\"SwapMath\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":10000},\"remappings\":[]},\"sources\":{\"project:/contracts/interfaces/uniswap/FixedPoint96.sol\":{\"keccak256\":\"0x0ba8a9b95a956a4050749c0158e928398c447c91469682ca8a7cc7e77a7fe032\",\"license\":\"GPL-2.0-or-later\",\"urls\":[\"bzz-raw://186d3b528866065a5856f96d2aeec698efa99f8da913e9adf34f8cc296cc993d\",\"dweb:/ipfs/QmUAiMvtAQp8c9dy57bqJYzG7hkb1uChiPaQmt264skoqP\"]},\"project:/contracts/interfaces/uniswap/FullMath.sol\":{\"keccak256\":\"0x50e87f7a3197525d1c6f7e04290060e848677c8a4e86c554bc6ace4a4d0d476d\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://3874093a6b37d8e68f9475a91f8eb0a1c808cb6153c84cfe6c37909505a4d24e\",\"dweb:/ipfs/QmUqGpQqvSHX4SwUvcBCs9g4ZhR9JPhgD3615oUigAhtjj\"]},\"project:/contracts/interfaces/uniswap/LowGasSafeMath.sol\":{\"keccak256\":\"0xc96ba4e985950ecffd96feda6385286d9a4b1ebb2279e420c9bb1b79b765306c\",\"license\":\"GPL-2.0-or-later\",\"urls\":[\"bzz-raw://d5ead6a53282214cce910e511f7dca4d14c8933de6375cd9fa3653cc94934e2b\",\"dweb:/ipfs/QmcnPR5qhzEYjX7YLdjUeWD7wpLMVn4HonhpNroEh9itpC\"]},\"project:/contracts/interfaces/uniswap/SafeCast.sol\":{\"keccak256\":\"0x4c12bf820c0b011f5490a209960ca34dd8af34660ef9e01de0438393d15e3fd8\",\"license\":\"GPL-2.0-or-later\",\"urls\":[\"bzz-raw://fed11489e218e55d087d42b4f350a30e10cd2aedec8f432bd3cc712f648d5869\",\"dweb:/ipfs/QmWfRnRxyXwHUDcTQPazxYYk5jxErGeQqdvnYtyg5nBPbU\"]},\"project:/contracts/interfaces/uniswap/SqrtPriceMath.sol\":{\"keccak256\":\"0x4f69701d331d364b69a1cda77cd7b983a0079d36ae0e06b0bb1d64ae56c3705e\",\"license\":\"BUSL-1.1\",\"urls\":[\"bzz-raw://f9ed4f172da650484c97d31cce084e905e69c3f3b072141cb15363f4ed0cd03c\",\"dweb:/ipfs/QmPNDM667PxzbbR8YDbtibFaPMGrcbK71GKpFPkGgDEYvb\"]},\"project:/contracts/interfaces/uniswap/SwapMath.sol\":{\"keccak256\":\"0xcd310be830646d0d55bef86683847577f742704d227471ad7b4cab3df9c47cf7\",\"license\":\"BUSL-1.1\",\"urls\":[\"bzz-raw://e6029f7cbb62563f488ee9c4510fee69b5408b64119065d912c1bd682baeef84\",\"dweb:/ipfs/Qmed5zZvcEbqmDmkyGV2huNzrK3mk8KrF9UQohKWLTcc3n\"]},\"project:/contracts/interfaces/uniswap/UnsafeMath.sol\":{\"keccak256\":\"0x5f36d7d16348d8c37fe64fda932018d6e5e8acecd054f0f97d32db62d20c6c88\",\"license\":\"GPL-2.0-or-later\",\"urls\":[\"bzz-raw://4bd4e817ea3d2c26bb2be7e58db3eaa403119562c18d4c09cc92fb31aa231496\",\"dweb:/ipfs/QmbpjgL8Hf1mhmUyf9hpuPk4noGAggCdTqaRBFKqNF3AQw\"]}},\"version\":1}",
  "bytecode": "0x60566023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea264697066735822122020e52857e19240951099d139f1032eb1a7db655210004e9990b5506ac9a875b964736f6c63430006080033",
  "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea264697066735822122020e52857e19240951099d139f1032eb1a7db655210004e9990b5506ac9a875b964736f6c63430006080033",
  "immutableReferences": {},
  "sourceMap": "292:4340:40:-:0;;132:2:-1;166:7;155:9;146:7;137:37;255:7;249:14;246:1;241:23;235:4;232:33;222:2;;269:9;222:2;293:9;290:1;283:20;323:4;314:7;306:22;347:7;338;331:24",
  "deployedSourceMap": "292:4340:40:-:0;;;;;;12:1:-1;9;2:12",
  "source": "// SPDX-License-Identifier: BUSL-1.1\npragma solidity >=0.5.0;\n\nimport './FullMath.sol';\nimport './SqrtPriceMath.sol';\n\n/// @title Computes the result of a swap within ticks\n/// @notice Contains methods for computing the result of a swap within a single tick price range, i.e., a single tick.\nlibrary SwapMath {\n    /// @notice Computes the result of swapping some amount in, or amount out, given the parameters of the swap\n    /// @dev The fee, plus the amount in, will never exceed the amount remaining if the swap's `amountSpecified` is positive\n    /// @param sqrtRatioCurrentX96 The current sqrt price of the pool\n    /// @param sqrtRatioTargetX96 The price that cannot be exceeded, from which the direction of the swap is inferred\n    /// @param liquidity The usable liquidity\n    /// @param amountRemaining How much input or output amount is remaining to be swapped in/out\n    /// @param feePips The fee taken from the input amount, expressed in hundredths of a bip\n    /// @return sqrtRatioNextX96 The price after swapping the amount in/out, not to exceed the price target\n    /// @return amountIn The amount to be swapped in, of either token0 or token1, based on the direction of the swap\n    /// @return amountOut The amount to be received, of either token0 or token1, based on the direction of the swap\n    /// @return feeAmount The amount of input that will be taken as a fee\n    function computeSwapStep(\n        uint160 sqrtRatioCurrentX96,\n        uint160 sqrtRatioTargetX96,\n        uint128 liquidity,\n        int256 amountRemaining,\n        uint24 feePips\n    )\n        internal\n        pure\n        returns (\n            uint160 sqrtRatioNextX96,\n            uint256 amountIn,\n            uint256 amountOut,\n            uint256 feeAmount\n        )\n    {\n        bool zeroForOne = sqrtRatioCurrentX96 >= sqrtRatioTargetX96;\n        bool exactIn = amountRemaining >= 0;\n\n        if (exactIn) {\n            uint256 amountRemainingLessFee = FullMath.mulDiv(uint256(amountRemaining), 1e6 - feePips, 1e6);\n            amountIn = zeroForOne\n                ? SqrtPriceMath.getAmount0Delta(sqrtRatioTargetX96, sqrtRatioCurrentX96, liquidity, true)\n                : SqrtPriceMath.getAmount1Delta(sqrtRatioCurrentX96, sqrtRatioTargetX96, liquidity, true);\n            if (amountRemainingLessFee >= amountIn) sqrtRatioNextX96 = sqrtRatioTargetX96;\n            else\n                sqrtRatioNextX96 = SqrtPriceMath.getNextSqrtPriceFromInput(\n                    sqrtRatioCurrentX96,\n                    liquidity,\n                    amountRemainingLessFee,\n                    zeroForOne\n                );\n        } else {\n            amountOut = zeroForOne\n                ? SqrtPriceMath.getAmount1Delta(sqrtRatioTargetX96, sqrtRatioCurrentX96, liquidity, false)\n                : SqrtPriceMath.getAmount0Delta(sqrtRatioCurrentX96, sqrtRatioTargetX96, liquidity, false);\n            if (uint256(-amountRemaining) >= amountOut) sqrtRatioNextX96 = sqrtRatioTargetX96;\n            else\n                sqrtRatioNextX96 = SqrtPriceMath.getNextSqrtPriceFromOutput(\n                    sqrtRatioCurrentX96,\n                    liquidity,\n                    uint256(-amountRemaining),\n                    zeroForOne\n                );\n        }\n\n        bool max = sqrtRatioTargetX96 == sqrtRatioNextX96;\n\n        // get the input/output amounts\n        if (zeroForOne) {\n            amountIn = max && exactIn\n                ? amountIn\n                : SqrtPriceMath.getAmount0Delta(sqrtRatioNextX96, sqrtRatioCurrentX96, liquidity, true);\n            amountOut = max && !exactIn\n                ? amountOut\n                : SqrtPriceMath.getAmount1Delta(sqrtRatioNextX96, sqrtRatioCurrentX96, liquidity, false);\n        } else {\n            amountIn = max && exactIn\n                ? amountIn\n                : SqrtPriceMath.getAmount1Delta(sqrtRatioCurrentX96, sqrtRatioNextX96, liquidity, true);\n            amountOut = max && !exactIn\n                ? amountOut\n                : SqrtPriceMath.getAmount0Delta(sqrtRatioCurrentX96, sqrtRatioNextX96, liquidity, false);\n        }\n\n        // cap the output amount to not exceed the remaining output amount\n        if (!exactIn && amountOut > uint256(-amountRemaining)) {\n            amountOut = uint256(-amountRemaining);\n        }\n\n        if (exactIn && sqrtRatioNextX96 != sqrtRatioTargetX96) {\n            // we didn't reach the target, so take the remainder of the maximum input as fee\n            feeAmount = uint256(amountRemaining) - amountIn;\n        } else {\n            feeAmount = FullMath.mulDivRoundingUp(amountIn, feePips, 1e6 - feePips);\n        }\n    }\n}\n",
  "sourcePath": "/home/thezviad_gmail_com/src/swappa/contracts/interfaces/uniswap/SwapMath.sol",
  "ast": {
    "absolutePath": "project:/contracts/interfaces/uniswap/SwapMath.sol",
    "exportedSymbols": {
      "SwapMath": [
        4108
      ]
    },
    "id": 4109,
    "license": "BUSL-1.1",
    "nodeType": "SourceUnit",
    "nodes": [
      {
        "id": 3849,
        "literals": [
          "solidity",
          ">=",
          "0.5",
          ".0"
        ],
        "nodeType": "PragmaDirective",
        "src": "37:24:40"
      },
      {
        "absolutePath": "project:/contracts/interfaces/uniswap/FullMath.sol",
        "file": "./FullMath.sol",
        "id": 3850,
        "nodeType": "ImportDirective",
        "scope": 4109,
        "sourceUnit": 2346,
        "src": "63:24:40",
        "symbolAliases": [],
        "unitAlias": ""
      },
      {
        "absolutePath": "project:/contracts/interfaces/uniswap/SqrtPriceMath.sol",
        "file": "./SqrtPriceMath.sol",
        "id": 3851,
        "nodeType": "ImportDirective",
        "scope": 4109,
        "sourceUnit": 3848,
        "src": "88:29:40",
        "symbolAliases": [],
        "unitAlias": ""
      },
      {
        "abstract": false,
        "baseContracts": [],
        "contractDependencies": [],
        "contractKind": "library",
        "documentation": {
          "id": 3852,
          "nodeType": "StructuredDocumentation",
          "src": "119:173:40",
          "text": "@title Computes the result of a swap within ticks\n @notice Contains methods for computing the result of a swap within a single tick price range, i.e., a single tick."
        },
        "fullyImplemented": true,
        "id": 4108,
        "linearizedBaseContracts": [
          4108
        ],
        "name": "SwapMath",
        "nodeType": "ContractDefinition",
        "nodes": [
          {
            "body": {
              "id": 4106,
              "nodeType": "Block",
              "src": "1769:2861:40",
              "statements": [
                {
                  "assignments": [
                    3875
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 3875,
                      "mutability": "mutable",
                      "name": "zeroForOne",
                      "nodeType": "VariableDeclaration",
                      "overrides": null,
                      "scope": 4106,
                      "src": "1779:15:40",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bool",
                        "typeString": "bool"
                      },
                      "typeName": {
                        "id": 3874,
                        "name": "bool",
                        "nodeType": "ElementaryTypeName",
                        "src": "1779:4:40",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 3879,
                  "initialValue": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_uint160",
                      "typeString": "uint160"
                    },
                    "id": 3878,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "id": 3876,
                      "name": "sqrtRatioCurrentX96",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 3855,
                      "src": "1797:19:40",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint160",
                        "typeString": "uint160"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": ">=",
                    "rightExpression": {
                      "argumentTypes": null,
                      "id": 3877,
                      "name": "sqrtRatioTargetX96",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 3857,
                      "src": "1820:18:40",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint160",
                        "typeString": "uint160"
                      }
                    },
                    "src": "1797:41:40",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "1779:59:40"
                },
                {
                  "assignments": [
                    3881
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 3881,
                      "mutability": "mutable",
                      "name": "exactIn",
                      "nodeType": "VariableDeclaration",
                      "overrides": null,
                      "scope": 4106,
                      "src": "1848:12:40",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bool",
                        "typeString": "bool"
                      },
                      "typeName": {
                        "id": 3880,
                        "name": "bool",
                        "nodeType": "ElementaryTypeName",
                        "src": "1848:4:40",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 3885,
                  "initialValue": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_int256",
                      "typeString": "int256"
                    },
                    "id": 3884,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "id": 3882,
                      "name": "amountRemaining",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 3861,
                      "src": "1863:15:40",
                      "typeDescriptions": {
                        "typeIdentifier": "t_int256",
                        "typeString": "int256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": ">=",
                    "rightExpression": {
                      "argumentTypes": null,
                      "hexValue": "30",
                      "id": 3883,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "number",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "1882:1:40",
                      "subdenomination": null,
                      "typeDescriptions": {
                        "typeIdentifier": "t_rational_0_by_1",
                        "typeString": "int_const 0"
                      },
                      "value": "0"
                    },
                    "src": "1863:20:40",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "1848:35:40"
                },
                {
                  "condition": {
                    "argumentTypes": null,
                    "id": 3886,
                    "name": "exactIn",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 3881,
                    "src": "1898:7:40",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "falseBody": {
                    "id": 3984,
                    "nodeType": "Block",
                    "src": "2629:619:40",
                    "statements": [
                      {
                        "expression": {
                          "argumentTypes": null,
                          "id": 3956,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "argumentTypes": null,
                            "id": 3939,
                            "name": "amountOut",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 3870,
                            "src": "2643:9:40",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "argumentTypes": null,
                            "condition": {
                              "argumentTypes": null,
                              "id": 3940,
                              "name": "zeroForOne",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 3875,
                              "src": "2655:10:40",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            "falseExpression": {
                              "argumentTypes": null,
                              "arguments": [
                                {
                                  "argumentTypes": null,
                                  "id": 3950,
                                  "name": "sqrtRatioCurrentX96",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 3855,
                                  "src": "2821:19:40",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint160",
                                    "typeString": "uint160"
                                  }
                                },
                                {
                                  "argumentTypes": null,
                                  "id": 3951,
                                  "name": "sqrtRatioTargetX96",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 3857,
                                  "src": "2842:18:40",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint160",
                                    "typeString": "uint160"
                                  }
                                },
                                {
                                  "argumentTypes": null,
                                  "id": 3952,
                                  "name": "liquidity",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 3859,
                                  "src": "2862:9:40",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint128",
                                    "typeString": "uint128"
                                  }
                                },
                                {
                                  "argumentTypes": null,
                                  "hexValue": "66616c7365",
                                  "id": 3953,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "kind": "bool",
                                  "lValueRequested": false,
                                  "nodeType": "Literal",
                                  "src": "2873:5:40",
                                  "subdenomination": null,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bool",
                                    "typeString": "bool"
                                  },
                                  "value": "false"
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_uint160",
                                    "typeString": "uint160"
                                  },
                                  {
                                    "typeIdentifier": "t_uint160",
                                    "typeString": "uint160"
                                  },
                                  {
                                    "typeIdentifier": "t_uint128",
                                    "typeString": "uint128"
                                  },
                                  {
                                    "typeIdentifier": "t_bool",
                                    "typeString": "bool"
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": null,
                                  "id": 3948,
                                  "name": "SqrtPriceMath",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 3847,
                                  "src": "2791:13:40",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_type$_t_contract$_SqrtPriceMath_$3847_$",
                                    "typeString": "type(library SqrtPriceMath)"
                                  }
                                },
                                "id": 3949,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "getAmount0Delta",
                                "nodeType": "MemberAccess",
                                "referencedDeclaration": 3714,
                                "src": "2791:29:40",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_internal_pure$_t_uint160_$_t_uint160_$_t_uint128_$_t_bool_$returns$_t_uint256_$",
                                  "typeString": "function (uint160,uint160,uint128,bool) pure returns (uint256)"
                                }
                              },
                              "id": 3954,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "2791:88:40",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "id": 3955,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "Conditional",
                            "src": "2655:224:40",
                            "trueExpression": {
                              "argumentTypes": null,
                              "arguments": [
                                {
                                  "argumentTypes": null,
                                  "id": 3943,
                                  "name": "sqrtRatioTargetX96",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 3857,
                                  "src": "2714:18:40",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint160",
                                    "typeString": "uint160"
                                  }
                                },
                                {
                                  "argumentTypes": null,
                                  "id": 3944,
                                  "name": "sqrtRatioCurrentX96",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 3855,
                                  "src": "2734:19:40",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint160",
                                    "typeString": "uint160"
                                  }
                                },
                                {
                                  "argumentTypes": null,
                                  "id": 3945,
                                  "name": "liquidity",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 3859,
                                  "src": "2755:9:40",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint128",
                                    "typeString": "uint128"
                                  }
                                },
                                {
                                  "argumentTypes": null,
                                  "hexValue": "66616c7365",
                                  "id": 3946,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "kind": "bool",
                                  "lValueRequested": false,
                                  "nodeType": "Literal",
                                  "src": "2766:5:40",
                                  "subdenomination": null,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bool",
                                    "typeString": "bool"
                                  },
                                  "value": "false"
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_uint160",
                                    "typeString": "uint160"
                                  },
                                  {
                                    "typeIdentifier": "t_uint160",
                                    "typeString": "uint160"
                                  },
                                  {
                                    "typeIdentifier": "t_uint128",
                                    "typeString": "uint128"
                                  },
                                  {
                                    "typeIdentifier": "t_bool",
                                    "typeString": "bool"
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": null,
                                  "id": 3941,
                                  "name": "SqrtPriceMath",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 3847,
                                  "src": "2684:13:40",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_type$_t_contract$_SqrtPriceMath_$3847_$",
                                    "typeString": "type(library SqrtPriceMath)"
                                  }
                                },
                                "id": 3942,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "getAmount1Delta",
                                "nodeType": "MemberAccess",
                                "referencedDeclaration": 3762,
                                "src": "2684:29:40",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_internal_pure$_t_uint160_$_t_uint160_$_t_uint128_$_t_bool_$returns$_t_uint256_$",
                                  "typeString": "function (uint160,uint160,uint128,bool) pure returns (uint256)"
                                }
                              },
                              "id": 3947,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "2684:88:40",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "2643:236:40",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 3957,
                        "nodeType": "ExpressionStatement",
                        "src": "2643:236:40"
                      },
                      {
                        "condition": {
                          "argumentTypes": null,
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 3964,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "argumentTypes": null,
                            "arguments": [
                              {
                                "argumentTypes": null,
                                "id": 3961,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "nodeType": "UnaryOperation",
                                "operator": "-",
                                "prefix": true,
                                "src": "2905:16:40",
                                "subExpression": {
                                  "argumentTypes": null,
                                  "id": 3960,
                                  "name": "amountRemaining",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 3861,
                                  "src": "2906:15:40",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "typeDescriptions": {
                                  "typeIdentifier": "t_int256",
                                  "typeString": "int256"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_int256",
                                  "typeString": "int256"
                                }
                              ],
                              "id": 3959,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "nodeType": "ElementaryTypeNameExpression",
                              "src": "2897:7:40",
                              "typeDescriptions": {
                                "typeIdentifier": "t_type$_t_uint256_$",
                                "typeString": "type(uint256)"
                              },
                              "typeName": {
                                "id": 3958,
                                "name": "uint256",
                                "nodeType": "ElementaryTypeName",
                                "src": "2897:7:40",
                                "typeDescriptions": {
                                  "typeIdentifier": null,
                                  "typeString": null
                                }
                              }
                            },
                            "id": 3962,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "typeConversion",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "2897:25:40",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": ">=",
                          "rightExpression": {
                            "argumentTypes": null,
                            "id": 3963,
                            "name": "amountOut",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 3870,
                            "src": "2926:9:40",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "2897:38:40",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "falseBody": {
                          "expression": {
                            "argumentTypes": null,
                            "id": 3981,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftHandSide": {
                              "argumentTypes": null,
                              "id": 3969,
                              "name": "sqrtRatioNextX96",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 3866,
                              "src": "3009:16:40",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint160",
                                "typeString": "uint160"
                              }
                            },
                            "nodeType": "Assignment",
                            "operator": "=",
                            "rightHandSide": {
                              "argumentTypes": null,
                              "arguments": [
                                {
                                  "argumentTypes": null,
                                  "id": 3972,
                                  "name": "sqrtRatioCurrentX96",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 3855,
                                  "src": "3090:19:40",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint160",
                                    "typeString": "uint160"
                                  }
                                },
                                {
                                  "argumentTypes": null,
                                  "id": 3973,
                                  "name": "liquidity",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 3859,
                                  "src": "3131:9:40",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint128",
                                    "typeString": "uint128"
                                  }
                                },
                                {
                                  "argumentTypes": null,
                                  "arguments": [
                                    {
                                      "argumentTypes": null,
                                      "id": 3977,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "nodeType": "UnaryOperation",
                                      "operator": "-",
                                      "prefix": true,
                                      "src": "3170:16:40",
                                      "subExpression": {
                                        "argumentTypes": null,
                                        "id": 3976,
                                        "name": "amountRemaining",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": 3861,
                                        "src": "3171:15:40",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_int256",
                                          "typeString": "int256"
                                        }
                                      },
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_int256",
                                        "typeString": "int256"
                                      }
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_int256",
                                        "typeString": "int256"
                                      }
                                    ],
                                    "id": 3975,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": true,
                                    "lValueRequested": false,
                                    "nodeType": "ElementaryTypeNameExpression",
                                    "src": "3162:7:40",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_type$_t_uint256_$",
                                      "typeString": "type(uint256)"
                                    },
                                    "typeName": {
                                      "id": 3974,
                                      "name": "uint256",
                                      "nodeType": "ElementaryTypeName",
                                      "src": "3162:7:40",
                                      "typeDescriptions": {
                                        "typeIdentifier": null,
                                        "typeString": null
                                      }
                                    }
                                  },
                                  "id": 3978,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "typeConversion",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "3162:25:40",
                                  "tryCall": false,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                {
                                  "argumentTypes": null,
                                  "id": 3979,
                                  "name": "zeroForOne",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 3875,
                                  "src": "3209:10:40",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bool",
                                    "typeString": "bool"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_uint160",
                                    "typeString": "uint160"
                                  },
                                  {
                                    "typeIdentifier": "t_uint128",
                                    "typeString": "uint128"
                                  },
                                  {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  },
                                  {
                                    "typeIdentifier": "t_bool",
                                    "typeString": "bool"
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": null,
                                  "id": 3970,
                                  "name": "SqrtPriceMath",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 3847,
                                  "src": "3028:13:40",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_type$_t_contract$_SqrtPriceMath_$3847_$",
                                    "typeString": "type(library SqrtPriceMath)"
                                  }
                                },
                                "id": 3971,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "getNextSqrtPriceFromOutput",
                                "nodeType": "MemberAccess",
                                "referencedDeclaration": 3644,
                                "src": "3028:40:40",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_internal_pure$_t_uint160_$_t_uint128_$_t_uint256_$_t_bool_$returns$_t_uint160_$",
                                  "typeString": "function (uint160,uint128,uint256,bool) pure returns (uint160)"
                                }
                              },
                              "id": 3980,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "3028:209:40",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint160",
                                "typeString": "uint160"
                              }
                            },
                            "src": "3009:228:40",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint160",
                              "typeString": "uint160"
                            }
                          },
                          "id": 3982,
                          "nodeType": "ExpressionStatement",
                          "src": "3009:228:40"
                        },
                        "id": 3983,
                        "nodeType": "IfStatement",
                        "src": "2893:344:40",
                        "trueBody": {
                          "expression": {
                            "argumentTypes": null,
                            "id": 3967,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftHandSide": {
                              "argumentTypes": null,
                              "id": 3965,
                              "name": "sqrtRatioNextX96",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 3866,
                              "src": "2937:16:40",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint160",
                                "typeString": "uint160"
                              }
                            },
                            "nodeType": "Assignment",
                            "operator": "=",
                            "rightHandSide": {
                              "argumentTypes": null,
                              "id": 3966,
                              "name": "sqrtRatioTargetX96",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 3857,
                              "src": "2956:18:40",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint160",
                                "typeString": "uint160"
                              }
                            },
                            "src": "2937:37:40",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint160",
                              "typeString": "uint160"
                            }
                          },
                          "id": 3968,
                          "nodeType": "ExpressionStatement",
                          "src": "2937:37:40"
                        }
                      }
                    ]
                  },
                  "id": 3985,
                  "nodeType": "IfStatement",
                  "src": "1894:1354:40",
                  "trueBody": {
                    "id": 3938,
                    "nodeType": "Block",
                    "src": "1907:716:40",
                    "statements": [
                      {
                        "assignments": [
                          3888
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 3888,
                            "mutability": "mutable",
                            "name": "amountRemainingLessFee",
                            "nodeType": "VariableDeclaration",
                            "overrides": null,
                            "scope": 3938,
                            "src": "1921:30:40",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 3887,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "1921:7:40",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "value": null,
                            "visibility": "internal"
                          }
                        ],
                        "id": 3900,
                        "initialValue": {
                          "argumentTypes": null,
                          "arguments": [
                            {
                              "argumentTypes": null,
                              "arguments": [
                                {
                                  "argumentTypes": null,
                                  "id": 3893,
                                  "name": "amountRemaining",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 3861,
                                  "src": "1978:15:40",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                ],
                                "id": 3892,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "lValueRequested": false,
                                "nodeType": "ElementaryTypeNameExpression",
                                "src": "1970:7:40",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_uint256_$",
                                  "typeString": "type(uint256)"
                                },
                                "typeName": {
                                  "id": 3891,
                                  "name": "uint256",
                                  "nodeType": "ElementaryTypeName",
                                  "src": "1970:7:40",
                                  "typeDescriptions": {
                                    "typeIdentifier": null,
                                    "typeString": null
                                  }
                                }
                              },
                              "id": 3894,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "typeConversion",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "1970:24:40",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "argumentTypes": null,
                              "commonType": {
                                "typeIdentifier": "t_uint24",
                                "typeString": "uint24"
                              },
                              "id": 3897,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "argumentTypes": null,
                                "hexValue": "316536",
                                "id": 3895,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "number",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "1996:3:40",
                                "subdenomination": null,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_rational_1000000_by_1",
                                  "typeString": "int_const 1000000"
                                },
                                "value": "1e6"
                              },
                              "nodeType": "BinaryOperation",
                              "operator": "-",
                              "rightExpression": {
                                "argumentTypes": null,
                                "id": 3896,
                                "name": "feePips",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 3863,
                                "src": "2002:7:40",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint24",
                                  "typeString": "uint24"
                                }
                              },
                              "src": "1996:13:40",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint24",
                                "typeString": "uint24"
                              }
                            },
                            {
                              "argumentTypes": null,
                              "hexValue": "316536",
                              "id": 3898,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "number",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "2011:3:40",
                              "subdenomination": null,
                              "typeDescriptions": {
                                "typeIdentifier": "t_rational_1000000_by_1",
                                "typeString": "int_const 1000000"
                              },
                              "value": "1e6"
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              {
                                "typeIdentifier": "t_uint24",
                                "typeString": "uint24"
                              },
                              {
                                "typeIdentifier": "t_rational_1000000_by_1",
                                "typeString": "int_const 1000000"
                              }
                            ],
                            "expression": {
                              "argumentTypes": null,
                              "id": 3889,
                              "name": "FullMath",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 2345,
                              "src": "1954:8:40",
                              "typeDescriptions": {
                                "typeIdentifier": "t_type$_t_contract$_FullMath_$2345_$",
                                "typeString": "type(library FullMath)"
                              }
                            },
                            "id": 3890,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "mulDiv",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 2301,
                            "src": "1954:15:40",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
                              "typeString": "function (uint256,uint256,uint256) pure returns (uint256)"
                            }
                          },
                          "id": 3899,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "1954:61:40",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "1921:94:40"
                      },
                      {
                        "expression": {
                          "argumentTypes": null,
                          "id": 3918,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "argumentTypes": null,
                            "id": 3901,
                            "name": "amountIn",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 3868,
                            "src": "2029:8:40",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "argumentTypes": null,
                            "condition": {
                              "argumentTypes": null,
                              "id": 3902,
                              "name": "zeroForOne",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 3875,
                              "src": "2040:10:40",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            "falseExpression": {
                              "argumentTypes": null,
                              "arguments": [
                                {
                                  "argumentTypes": null,
                                  "id": 3912,
                                  "name": "sqrtRatioCurrentX96",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 3855,
                                  "src": "2205:19:40",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint160",
                                    "typeString": "uint160"
                                  }
                                },
                                {
                                  "argumentTypes": null,
                                  "id": 3913,
                                  "name": "sqrtRatioTargetX96",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 3857,
                                  "src": "2226:18:40",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint160",
                                    "typeString": "uint160"
                                  }
                                },
                                {
                                  "argumentTypes": null,
                                  "id": 3914,
                                  "name": "liquidity",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 3859,
                                  "src": "2246:9:40",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint128",
                                    "typeString": "uint128"
                                  }
                                },
                                {
                                  "argumentTypes": null,
                                  "hexValue": "74727565",
                                  "id": 3915,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "kind": "bool",
                                  "lValueRequested": false,
                                  "nodeType": "Literal",
                                  "src": "2257:4:40",
                                  "subdenomination": null,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bool",
                                    "typeString": "bool"
                                  },
                                  "value": "true"
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_uint160",
                                    "typeString": "uint160"
                                  },
                                  {
                                    "typeIdentifier": "t_uint160",
                                    "typeString": "uint160"
                                  },
                                  {
                                    "typeIdentifier": "t_uint128",
                                    "typeString": "uint128"
                                  },
                                  {
                                    "typeIdentifier": "t_bool",
                                    "typeString": "bool"
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": null,
                                  "id": 3910,
                                  "name": "SqrtPriceMath",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 3847,
                                  "src": "2175:13:40",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_type$_t_contract$_SqrtPriceMath_$3847_$",
                                    "typeString": "type(library SqrtPriceMath)"
                                  }
                                },
                                "id": 3911,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "getAmount1Delta",
                                "nodeType": "MemberAccess",
                                "referencedDeclaration": 3762,
                                "src": "2175:29:40",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_internal_pure$_t_uint160_$_t_uint160_$_t_uint128_$_t_bool_$returns$_t_uint256_$",
                                  "typeString": "function (uint160,uint160,uint128,bool) pure returns (uint256)"
                                }
                              },
                              "id": 3916,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "2175:87:40",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "id": 3917,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "Conditional",
                            "src": "2040:222:40",
                            "trueExpression": {
                              "argumentTypes": null,
                              "arguments": [
                                {
                                  "argumentTypes": null,
                                  "id": 3905,
                                  "name": "sqrtRatioTargetX96",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 3857,
                                  "src": "2099:18:40",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint160",
                                    "typeString": "uint160"
                                  }
                                },
                                {
                                  "argumentTypes": null,
                                  "id": 3906,
                                  "name": "sqrtRatioCurrentX96",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 3855,
                                  "src": "2119:19:40",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint160",
                                    "typeString": "uint160"
                                  }
                                },
                                {
                                  "argumentTypes": null,
                                  "id": 3907,
                                  "name": "liquidity",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 3859,
                                  "src": "2140:9:40",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint128",
                                    "typeString": "uint128"
                                  }
                                },
                                {
                                  "argumentTypes": null,
                                  "hexValue": "74727565",
                                  "id": 3908,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "kind": "bool",
                                  "lValueRequested": false,
                                  "nodeType": "Literal",
                                  "src": "2151:4:40",
                                  "subdenomination": null,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bool",
                                    "typeString": "bool"
                                  },
                                  "value": "true"
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_uint160",
                                    "typeString": "uint160"
                                  },
                                  {
                                    "typeIdentifier": "t_uint160",
                                    "typeString": "uint160"
                                  },
                                  {
                                    "typeIdentifier": "t_uint128",
                                    "typeString": "uint128"
                                  },
                                  {
                                    "typeIdentifier": "t_bool",
                                    "typeString": "bool"
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": null,
                                  "id": 3903,
                                  "name": "SqrtPriceMath",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 3847,
                                  "src": "2069:13:40",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_type$_t_contract$_SqrtPriceMath_$3847_$",
                                    "typeString": "type(library SqrtPriceMath)"
                                  }
                                },
                                "id": 3904,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "getAmount0Delta",
                                "nodeType": "MemberAccess",
                                "referencedDeclaration": 3714,
                                "src": "2069:29:40",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_internal_pure$_t_uint160_$_t_uint160_$_t_uint128_$_t_bool_$returns$_t_uint256_$",
                                  "typeString": "function (uint160,uint160,uint128,bool) pure returns (uint256)"
                                }
                              },
                              "id": 3909,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "2069:87:40",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "2029:233:40",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 3919,
                        "nodeType": "ExpressionStatement",
                        "src": "2029:233:40"
                      },
                      {
                        "condition": {
                          "argumentTypes": null,
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 3922,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "argumentTypes": null,
                            "id": 3920,
                            "name": "amountRemainingLessFee",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 3888,
                            "src": "2280:22:40",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": ">=",
                          "rightExpression": {
                            "argumentTypes": null,
                            "id": 3921,
                            "name": "amountIn",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 3868,
                            "src": "2306:8:40",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "2280:34:40",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "falseBody": {
                          "expression": {
                            "argumentTypes": null,
                            "id": 3935,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftHandSide": {
                              "argumentTypes": null,
                              "id": 3927,
                              "name": "sqrtRatioNextX96",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 3866,
                              "src": "2388:16:40",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint160",
                                "typeString": "uint160"
                              }
                            },
                            "nodeType": "Assignment",
                            "operator": "=",
                            "rightHandSide": {
                              "argumentTypes": null,
                              "arguments": [
                                {
                                  "argumentTypes": null,
                                  "id": 3930,
                                  "name": "sqrtRatioCurrentX96",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 3855,
                                  "src": "2468:19:40",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint160",
                                    "typeString": "uint160"
                                  }
                                },
                                {
                                  "argumentTypes": null,
                                  "id": 3931,
                                  "name": "liquidity",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 3859,
                                  "src": "2509:9:40",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint128",
                                    "typeString": "uint128"
                                  }
                                },
                                {
                                  "argumentTypes": null,
                                  "id": 3932,
                                  "name": "amountRemainingLessFee",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 3888,
                                  "src": "2540:22:40",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                {
                                  "argumentTypes": null,
                                  "id": 3933,
                                  "name": "zeroForOne",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 3875,
                                  "src": "2584:10:40",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bool",
                                    "typeString": "bool"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_uint160",
                                    "typeString": "uint160"
                                  },
                                  {
                                    "typeIdentifier": "t_uint128",
                                    "typeString": "uint128"
                                  },
                                  {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  },
                                  {
                                    "typeIdentifier": "t_bool",
                                    "typeString": "bool"
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": null,
                                  "id": 3928,
                                  "name": "SqrtPriceMath",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 3847,
                                  "src": "2407:13:40",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_type$_t_contract$_SqrtPriceMath_$3847_$",
                                    "typeString": "type(library SqrtPriceMath)"
                                  }
                                },
                                "id": 3929,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "getNextSqrtPriceFromInput",
                                "nodeType": "MemberAccess",
                                "referencedDeclaration": 3602,
                                "src": "2407:39:40",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_internal_pure$_t_uint160_$_t_uint128_$_t_uint256_$_t_bool_$returns$_t_uint160_$",
                                  "typeString": "function (uint160,uint128,uint256,bool) pure returns (uint160)"
                                }
                              },
                              "id": 3934,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "2407:205:40",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint160",
                                "typeString": "uint160"
                              }
                            },
                            "src": "2388:224:40",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint160",
                              "typeString": "uint160"
                            }
                          },
                          "id": 3936,
                          "nodeType": "ExpressionStatement",
                          "src": "2388:224:40"
                        },
                        "id": 3937,
                        "nodeType": "IfStatement",
                        "src": "2276:336:40",
                        "trueBody": {
                          "expression": {
                            "argumentTypes": null,
                            "id": 3925,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftHandSide": {
                              "argumentTypes": null,
                              "id": 3923,
                              "name": "sqrtRatioNextX96",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 3866,
                              "src": "2316:16:40",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint160",
                                "typeString": "uint160"
                              }
                            },
                            "nodeType": "Assignment",
                            "operator": "=",
                            "rightHandSide": {
                              "argumentTypes": null,
                              "id": 3924,
                              "name": "sqrtRatioTargetX96",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 3857,
                              "src": "2335:18:40",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint160",
                                "typeString": "uint160"
                              }
                            },
                            "src": "2316:37:40",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint160",
                              "typeString": "uint160"
                            }
                          },
                          "id": 3926,
                          "nodeType": "ExpressionStatement",
                          "src": "2316:37:40"
                        }
                      }
                    ]
                  }
                },
                {
                  "assignments": [
                    3987
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 3987,
                      "mutability": "mutable",
                      "name": "max",
                      "nodeType": "VariableDeclaration",
                      "overrides": null,
                      "scope": 4106,
                      "src": "3258:8:40",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bool",
                        "typeString": "bool"
                      },
                      "typeName": {
                        "id": 3986,
                        "name": "bool",
                        "nodeType": "ElementaryTypeName",
                        "src": "3258:4:40",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 3991,
                  "initialValue": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_uint160",
                      "typeString": "uint160"
                    },
                    "id": 3990,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "id": 3988,
                      "name": "sqrtRatioTargetX96",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 3857,
                      "src": "3269:18:40",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint160",
                        "typeString": "uint160"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "==",
                    "rightExpression": {
                      "argumentTypes": null,
                      "id": 3989,
                      "name": "sqrtRatioNextX96",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 3866,
                      "src": "3291:16:40",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint160",
                        "typeString": "uint160"
                      }
                    },
                    "src": "3269:38:40",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "3258:49:40"
                },
                {
                  "condition": {
                    "argumentTypes": null,
                    "id": 3992,
                    "name": "zeroForOne",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 3875,
                    "src": "3362:10:40",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "falseBody": {
                    "id": 4056,
                    "nodeType": "Block",
                    "src": "3735:355:40",
                    "statements": [
                      {
                        "expression": {
                          "argumentTypes": null,
                          "id": 4038,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "argumentTypes": null,
                            "id": 4025,
                            "name": "amountIn",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 3868,
                            "src": "3749:8:40",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "argumentTypes": null,
                            "condition": {
                              "argumentTypes": null,
                              "commonType": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              "id": 4028,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "argumentTypes": null,
                                "id": 4026,
                                "name": "max",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 3987,
                                "src": "3760:3:40",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": "&&",
                              "rightExpression": {
                                "argumentTypes": null,
                                "id": 4027,
                                "name": "exactIn",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 3881,
                                "src": "3767:7:40",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                }
                              },
                              "src": "3760:14:40",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            "falseExpression": {
                              "argumentTypes": null,
                              "arguments": [
                                {
                                  "argumentTypes": null,
                                  "id": 4032,
                                  "name": "sqrtRatioCurrentX96",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 3855,
                                  "src": "3850:19:40",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint160",
                                    "typeString": "uint160"
                                  }
                                },
                                {
                                  "argumentTypes": null,
                                  "id": 4033,
                                  "name": "sqrtRatioNextX96",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 3866,
                                  "src": "3871:16:40",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint160",
                                    "typeString": "uint160"
                                  }
                                },
                                {
                                  "argumentTypes": null,
                                  "id": 4034,
                                  "name": "liquidity",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 3859,
                                  "src": "3889:9:40",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint128",
                                    "typeString": "uint128"
                                  }
                                },
                                {
                                  "argumentTypes": null,
                                  "hexValue": "74727565",
                                  "id": 4035,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "kind": "bool",
                                  "lValueRequested": false,
                                  "nodeType": "Literal",
                                  "src": "3900:4:40",
                                  "subdenomination": null,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bool",
                                    "typeString": "bool"
                                  },
                                  "value": "true"
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_uint160",
                                    "typeString": "uint160"
                                  },
                                  {
                                    "typeIdentifier": "t_uint160",
                                    "typeString": "uint160"
                                  },
                                  {
                                    "typeIdentifier": "t_uint128",
                                    "typeString": "uint128"
                                  },
                                  {
                                    "typeIdentifier": "t_bool",
                                    "typeString": "bool"
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": null,
                                  "id": 4030,
                                  "name": "SqrtPriceMath",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 3847,
                                  "src": "3820:13:40",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_type$_t_contract$_SqrtPriceMath_$3847_$",
                                    "typeString": "type(library SqrtPriceMath)"
                                  }
                                },
                                "id": 4031,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "getAmount1Delta",
                                "nodeType": "MemberAccess",
                                "referencedDeclaration": 3762,
                                "src": "3820:29:40",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_internal_pure$_t_uint160_$_t_uint160_$_t_uint128_$_t_bool_$returns$_t_uint256_$",
                                  "typeString": "function (uint160,uint160,uint128,bool) pure returns (uint256)"
                                }
                              },
                              "id": 4036,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "3820:85:40",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "id": 4037,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "Conditional",
                            "src": "3760:145:40",
                            "trueExpression": {
                              "argumentTypes": null,
                              "id": 4029,
                              "name": "amountIn",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 3868,
                              "src": "3793:8:40",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "3749:156:40",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 4039,
                        "nodeType": "ExpressionStatement",
                        "src": "3749:156:40"
                      },
                      {
                        "expression": {
                          "argumentTypes": null,
                          "id": 4054,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "argumentTypes": null,
                            "id": 4040,
                            "name": "amountOut",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 3870,
                            "src": "3919:9:40",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "argumentTypes": null,
                            "condition": {
                              "argumentTypes": null,
                              "commonType": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              "id": 4044,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "argumentTypes": null,
                                "id": 4041,
                                "name": "max",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 3987,
                                "src": "3931:3:40",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": "&&",
                              "rightExpression": {
                                "argumentTypes": null,
                                "id": 4043,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "nodeType": "UnaryOperation",
                                "operator": "!",
                                "prefix": true,
                                "src": "3938:8:40",
                                "subExpression": {
                                  "argumentTypes": null,
                                  "id": 4042,
                                  "name": "exactIn",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 3881,
                                  "src": "3939:7:40",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bool",
                                    "typeString": "bool"
                                  }
                                },
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                }
                              },
                              "src": "3931:15:40",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            "falseExpression": {
                              "argumentTypes": null,
                              "arguments": [
                                {
                                  "argumentTypes": null,
                                  "id": 4048,
                                  "name": "sqrtRatioCurrentX96",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 3855,
                                  "src": "4023:19:40",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint160",
                                    "typeString": "uint160"
                                  }
                                },
                                {
                                  "argumentTypes": null,
                                  "id": 4049,
                                  "name": "sqrtRatioNextX96",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 3866,
                                  "src": "4044:16:40",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint160",
                                    "typeString": "uint160"
                                  }
                                },
                                {
                                  "argumentTypes": null,
                                  "id": 4050,
                                  "name": "liquidity",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 3859,
                                  "src": "4062:9:40",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint128",
                                    "typeString": "uint128"
                                  }
                                },
                                {
                                  "argumentTypes": null,
                                  "hexValue": "66616c7365",
                                  "id": 4051,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "kind": "bool",
                                  "lValueRequested": false,
                                  "nodeType": "Literal",
                                  "src": "4073:5:40",
                                  "subdenomination": null,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bool",
                                    "typeString": "bool"
                                  },
                                  "value": "false"
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_uint160",
                                    "typeString": "uint160"
                                  },
                                  {
                                    "typeIdentifier": "t_uint160",
                                    "typeString": "uint160"
                                  },
                                  {
                                    "typeIdentifier": "t_uint128",
                                    "typeString": "uint128"
                                  },
                                  {
                                    "typeIdentifier": "t_bool",
                                    "typeString": "bool"
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": null,
                                  "id": 4046,
                                  "name": "SqrtPriceMath",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 3847,
                                  "src": "3993:13:40",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_type$_t_contract$_SqrtPriceMath_$3847_$",
                                    "typeString": "type(library SqrtPriceMath)"
                                  }
                                },
                                "id": 4047,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "getAmount0Delta",
                                "nodeType": "MemberAccess",
                                "referencedDeclaration": 3714,
                                "src": "3993:29:40",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_internal_pure$_t_uint160_$_t_uint160_$_t_uint128_$_t_bool_$returns$_t_uint256_$",
                                  "typeString": "function (uint160,uint160,uint128,bool) pure returns (uint256)"
                                }
                              },
                              "id": 4052,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "3993:86:40",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "id": 4053,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "Conditional",
                            "src": "3931:148:40",
                            "trueExpression": {
                              "argumentTypes": null,
                              "id": 4045,
                              "name": "amountOut",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 3870,
                              "src": "3965:9:40",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "3919:160:40",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 4055,
                        "nodeType": "ExpressionStatement",
                        "src": "3919:160:40"
                      }
                    ]
                  },
                  "id": 4057,
                  "nodeType": "IfStatement",
                  "src": "3358:732:40",
                  "trueBody": {
                    "id": 4024,
                    "nodeType": "Block",
                    "src": "3374:355:40",
                    "statements": [
                      {
                        "expression": {
                          "argumentTypes": null,
                          "id": 4006,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "argumentTypes": null,
                            "id": 3993,
                            "name": "amountIn",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 3868,
                            "src": "3388:8:40",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "argumentTypes": null,
                            "condition": {
                              "argumentTypes": null,
                              "commonType": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              "id": 3996,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "argumentTypes": null,
                                "id": 3994,
                                "name": "max",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 3987,
                                "src": "3399:3:40",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": "&&",
                              "rightExpression": {
                                "argumentTypes": null,
                                "id": 3995,
                                "name": "exactIn",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 3881,
                                "src": "3406:7:40",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                }
                              },
                              "src": "3399:14:40",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            "falseExpression": {
                              "argumentTypes": null,
                              "arguments": [
                                {
                                  "argumentTypes": null,
                                  "id": 4000,
                                  "name": "sqrtRatioNextX96",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 3866,
                                  "src": "3489:16:40",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint160",
                                    "typeString": "uint160"
                                  }
                                },
                                {
                                  "argumentTypes": null,
                                  "id": 4001,
                                  "name": "sqrtRatioCurrentX96",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 3855,
                                  "src": "3507:19:40",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint160",
                                    "typeString": "uint160"
                                  }
                                },
                                {
                                  "argumentTypes": null,
                                  "id": 4002,
                                  "name": "liquidity",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 3859,
                                  "src": "3528:9:40",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint128",
                                    "typeString": "uint128"
                                  }
                                },
                                {
                                  "argumentTypes": null,
                                  "hexValue": "74727565",
                                  "id": 4003,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "kind": "bool",
                                  "lValueRequested": false,
                                  "nodeType": "Literal",
                                  "src": "3539:4:40",
                                  "subdenomination": null,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bool",
                                    "typeString": "bool"
                                  },
                                  "value": "true"
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_uint160",
                                    "typeString": "uint160"
                                  },
                                  {
                                    "typeIdentifier": "t_uint160",
                                    "typeString": "uint160"
                                  },
                                  {
                                    "typeIdentifier": "t_uint128",
                                    "typeString": "uint128"
                                  },
                                  {
                                    "typeIdentifier": "t_bool",
                                    "typeString": "bool"
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": null,
                                  "id": 3998,
                                  "name": "SqrtPriceMath",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 3847,
                                  "src": "3459:13:40",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_type$_t_contract$_SqrtPriceMath_$3847_$",
                                    "typeString": "type(library SqrtPriceMath)"
                                  }
                                },
                                "id": 3999,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "getAmount0Delta",
                                "nodeType": "MemberAccess",
                                "referencedDeclaration": 3714,
                                "src": "3459:29:40",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_internal_pure$_t_uint160_$_t_uint160_$_t_uint128_$_t_bool_$returns$_t_uint256_$",
                                  "typeString": "function (uint160,uint160,uint128,bool) pure returns (uint256)"
                                }
                              },
                              "id": 4004,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "3459:85:40",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "id": 4005,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "Conditional",
                            "src": "3399:145:40",
                            "trueExpression": {
                              "argumentTypes": null,
                              "id": 3997,
                              "name": "amountIn",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 3868,
                              "src": "3432:8:40",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "3388:156:40",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 4007,
                        "nodeType": "ExpressionStatement",
                        "src": "3388:156:40"
                      },
                      {
                        "expression": {
                          "argumentTypes": null,
                          "id": 4022,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "argumentTypes": null,
                            "id": 4008,
                            "name": "amountOut",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 3870,
                            "src": "3558:9:40",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "argumentTypes": null,
                            "condition": {
                              "argumentTypes": null,
                              "commonType": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              "id": 4012,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "argumentTypes": null,
                                "id": 4009,
                                "name": "max",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 3987,
                                "src": "3570:3:40",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": "&&",
                              "rightExpression": {
                                "argumentTypes": null,
                                "id": 4011,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "nodeType": "UnaryOperation",
                                "operator": "!",
                                "prefix": true,
                                "src": "3577:8:40",
                                "subExpression": {
                                  "argumentTypes": null,
                                  "id": 4010,
                                  "name": "exactIn",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 3881,
                                  "src": "3578:7:40",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bool",
                                    "typeString": "bool"
                                  }
                                },
                                "typeDescriptions": {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                }
                              },
                              "src": "3570:15:40",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            "falseExpression": {
                              "argumentTypes": null,
                              "arguments": [
                                {
                                  "argumentTypes": null,
                                  "id": 4016,
                                  "name": "sqrtRatioNextX96",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 3866,
                                  "src": "3662:16:40",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint160",
                                    "typeString": "uint160"
                                  }
                                },
                                {
                                  "argumentTypes": null,
                                  "id": 4017,
                                  "name": "sqrtRatioCurrentX96",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 3855,
                                  "src": "3680:19:40",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint160",
                                    "typeString": "uint160"
                                  }
                                },
                                {
                                  "argumentTypes": null,
                                  "id": 4018,
                                  "name": "liquidity",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 3859,
                                  "src": "3701:9:40",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint128",
                                    "typeString": "uint128"
                                  }
                                },
                                {
                                  "argumentTypes": null,
                                  "hexValue": "66616c7365",
                                  "id": 4019,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "kind": "bool",
                                  "lValueRequested": false,
                                  "nodeType": "Literal",
                                  "src": "3712:5:40",
                                  "subdenomination": null,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_bool",
                                    "typeString": "bool"
                                  },
                                  "value": "false"
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_uint160",
                                    "typeString": "uint160"
                                  },
                                  {
                                    "typeIdentifier": "t_uint160",
                                    "typeString": "uint160"
                                  },
                                  {
                                    "typeIdentifier": "t_uint128",
                                    "typeString": "uint128"
                                  },
                                  {
                                    "typeIdentifier": "t_bool",
                                    "typeString": "bool"
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": null,
                                  "id": 4014,
                                  "name": "SqrtPriceMath",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 3847,
                                  "src": "3632:13:40",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_type$_t_contract$_SqrtPriceMath_$3847_$",
                                    "typeString": "type(library SqrtPriceMath)"
                                  }
                                },
                                "id": 4015,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "getAmount1Delta",
                                "nodeType": "MemberAccess",
                                "referencedDeclaration": 3762,
                                "src": "3632:29:40",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_internal_pure$_t_uint160_$_t_uint160_$_t_uint128_$_t_bool_$returns$_t_uint256_$",
                                  "typeString": "function (uint160,uint160,uint128,bool) pure returns (uint256)"
                                }
                              },
                              "id": 4020,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "3632:86:40",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "id": 4021,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "Conditional",
                            "src": "3570:148:40",
                            "trueExpression": {
                              "argumentTypes": null,
                              "id": 4013,
                              "name": "amountOut",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 3870,
                              "src": "3604:9:40",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "3558:160:40",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 4023,
                        "nodeType": "ExpressionStatement",
                        "src": "3558:160:40"
                      }
                    ]
                  }
                },
                {
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    },
                    "id": 4067,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "id": 4059,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "nodeType": "UnaryOperation",
                      "operator": "!",
                      "prefix": true,
                      "src": "4179:8:40",
                      "subExpression": {
                        "argumentTypes": null,
                        "id": 4058,
                        "name": "exactIn",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 3881,
                        "src": "4180:7:40",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      "typeDescriptions": {
                        "typeIdentifier": "t_bool",
                        "typeString": "bool"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "&&",
                    "rightExpression": {
                      "argumentTypes": null,
                      "commonType": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "id": 4066,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftExpression": {
                        "argumentTypes": null,
                        "id": 4060,
                        "name": "amountOut",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 3870,
                        "src": "4191:9:40",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "nodeType": "BinaryOperation",
                      "operator": ">",
                      "rightExpression": {
                        "argumentTypes": null,
                        "arguments": [
                          {
                            "argumentTypes": null,
                            "id": 4064,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "UnaryOperation",
                            "operator": "-",
                            "prefix": true,
                            "src": "4211:16:40",
                            "subExpression": {
                              "argumentTypes": null,
                              "id": 4063,
                              "name": "amountRemaining",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 3861,
                              "src": "4212:15:40",
                              "typeDescriptions": {
                                "typeIdentifier": "t_int256",
                                "typeString": "int256"
                              }
                            },
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          }
                        ],
                        "expression": {
                          "argumentTypes": [
                            {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          ],
                          "id": 4062,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "lValueRequested": false,
                          "nodeType": "ElementaryTypeNameExpression",
                          "src": "4203:7:40",
                          "typeDescriptions": {
                            "typeIdentifier": "t_type$_t_uint256_$",
                            "typeString": "type(uint256)"
                          },
                          "typeName": {
                            "id": 4061,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "4203:7:40",
                            "typeDescriptions": {
                              "typeIdentifier": null,
                              "typeString": null
                            }
                          }
                        },
                        "id": 4065,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "typeConversion",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "4203:25:40",
                        "tryCall": false,
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "src": "4191:37:40",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bool",
                        "typeString": "bool"
                      }
                    },
                    "src": "4179:49:40",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "falseBody": null,
                  "id": 4077,
                  "nodeType": "IfStatement",
                  "src": "4175:117:40",
                  "trueBody": {
                    "id": 4076,
                    "nodeType": "Block",
                    "src": "4230:62:40",
                    "statements": [
                      {
                        "expression": {
                          "argumentTypes": null,
                          "id": 4074,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "argumentTypes": null,
                            "id": 4068,
                            "name": "amountOut",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 3870,
                            "src": "4244:9:40",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "argumentTypes": null,
                            "arguments": [
                              {
                                "argumentTypes": null,
                                "id": 4072,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "nodeType": "UnaryOperation",
                                "operator": "-",
                                "prefix": true,
                                "src": "4264:16:40",
                                "subExpression": {
                                  "argumentTypes": null,
                                  "id": 4071,
                                  "name": "amountRemaining",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 3861,
                                  "src": "4265:15:40",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                },
                                "typeDescriptions": {
                                  "typeIdentifier": "t_int256",
                                  "typeString": "int256"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_int256",
                                  "typeString": "int256"
                                }
                              ],
                              "id": 4070,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "nodeType": "ElementaryTypeNameExpression",
                              "src": "4256:7:40",
                              "typeDescriptions": {
                                "typeIdentifier": "t_type$_t_uint256_$",
                                "typeString": "type(uint256)"
                              },
                              "typeName": {
                                "id": 4069,
                                "name": "uint256",
                                "nodeType": "ElementaryTypeName",
                                "src": "4256:7:40",
                                "typeDescriptions": {
                                  "typeIdentifier": null,
                                  "typeString": null
                                }
                              }
                            },
                            "id": 4073,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "typeConversion",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "4256:25:40",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "4244:37:40",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 4075,
                        "nodeType": "ExpressionStatement",
                        "src": "4244:37:40"
                      }
                    ]
                  }
                },
                {
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    },
                    "id": 4082,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "id": 4078,
                      "name": "exactIn",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 3881,
                      "src": "4306:7:40",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bool",
                        "typeString": "bool"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "&&",
                    "rightExpression": {
                      "argumentTypes": null,
                      "commonType": {
                        "typeIdentifier": "t_uint160",
                        "typeString": "uint160"
                      },
                      "id": 4081,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftExpression": {
                        "argumentTypes": null,
                        "id": 4079,
                        "name": "sqrtRatioNextX96",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 3866,
                        "src": "4317:16:40",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint160",
                          "typeString": "uint160"
                        }
                      },
                      "nodeType": "BinaryOperation",
                      "operator": "!=",
                      "rightExpression": {
                        "argumentTypes": null,
                        "id": 4080,
                        "name": "sqrtRatioTargetX96",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 3857,
                        "src": "4337:18:40",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint160",
                          "typeString": "uint160"
                        }
                      },
                      "src": "4317:38:40",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bool",
                        "typeString": "bool"
                      }
                    },
                    "src": "4306:49:40",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "falseBody": {
                    "id": 4104,
                    "nodeType": "Block",
                    "src": "4528:96:40",
                    "statements": [
                      {
                        "expression": {
                          "argumentTypes": null,
                          "id": 4102,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "argumentTypes": null,
                            "id": 4093,
                            "name": "feeAmount",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 3872,
                            "src": "4542:9:40",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "argumentTypes": null,
                            "arguments": [
                              {
                                "argumentTypes": null,
                                "id": 4096,
                                "name": "amountIn",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 3868,
                                "src": "4580:8:40",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              {
                                "argumentTypes": null,
                                "id": 4097,
                                "name": "feePips",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 3863,
                                "src": "4590:7:40",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint24",
                                  "typeString": "uint24"
                                }
                              },
                              {
                                "argumentTypes": null,
                                "commonType": {
                                  "typeIdentifier": "t_uint24",
                                  "typeString": "uint24"
                                },
                                "id": 4100,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftExpression": {
                                  "argumentTypes": null,
                                  "hexValue": "316536",
                                  "id": 4098,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "kind": "number",
                                  "lValueRequested": false,
                                  "nodeType": "Literal",
                                  "src": "4599:3:40",
                                  "subdenomination": null,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_rational_1000000_by_1",
                                    "typeString": "int_const 1000000"
                                  },
                                  "value": "1e6"
                                },
                                "nodeType": "BinaryOperation",
                                "operator": "-",
                                "rightExpression": {
                                  "argumentTypes": null,
                                  "id": 4099,
                                  "name": "feePips",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 3863,
                                  "src": "4605:7:40",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint24",
                                    "typeString": "uint24"
                                  }
                                },
                                "src": "4599:13:40",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint24",
                                  "typeString": "uint24"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                },
                                {
                                  "typeIdentifier": "t_uint24",
                                  "typeString": "uint24"
                                },
                                {
                                  "typeIdentifier": "t_uint24",
                                  "typeString": "uint24"
                                }
                              ],
                              "expression": {
                                "argumentTypes": null,
                                "id": 4094,
                                "name": "FullMath",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 2345,
                                "src": "4554:8:40",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_FullMath_$2345_$",
                                  "typeString": "type(library FullMath)"
                                }
                              },
                              "id": 4095,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "mulDivRoundingUp",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 2344,
                              "src": "4554:25:40",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$",
                                "typeString": "function (uint256,uint256,uint256) pure returns (uint256)"
                              }
                            },
                            "id": 4101,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "4554:59:40",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "4542:71:40",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 4103,
                        "nodeType": "ExpressionStatement",
                        "src": "4542:71:40"
                      }
                    ]
                  },
                  "id": 4105,
                  "nodeType": "IfStatement",
                  "src": "4302:322:40",
                  "trueBody": {
                    "id": 4092,
                    "nodeType": "Block",
                    "src": "4357:165:40",
                    "statements": [
                      {
                        "expression": {
                          "argumentTypes": null,
                          "id": 4090,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "argumentTypes": null,
                            "id": 4083,
                            "name": "feeAmount",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 3872,
                            "src": "4464:9:40",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "argumentTypes": null,
                            "commonType": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "id": 4089,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftExpression": {
                              "argumentTypes": null,
                              "arguments": [
                                {
                                  "argumentTypes": null,
                                  "id": 4086,
                                  "name": "amountRemaining",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 3861,
                                  "src": "4484:15:40",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_int256",
                                    "typeString": "int256"
                                  }
                                ],
                                "id": 4085,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "lValueRequested": false,
                                "nodeType": "ElementaryTypeNameExpression",
                                "src": "4476:7:40",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_uint256_$",
                                  "typeString": "type(uint256)"
                                },
                                "typeName": {
                                  "id": 4084,
                                  "name": "uint256",
                                  "nodeType": "ElementaryTypeName",
                                  "src": "4476:7:40",
                                  "typeDescriptions": {
                                    "typeIdentifier": null,
                                    "typeString": null
                                  }
                                }
                              },
                              "id": 4087,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "typeConversion",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "4476:24:40",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "nodeType": "BinaryOperation",
                            "operator": "-",
                            "rightExpression": {
                              "argumentTypes": null,
                              "id": 4088,
                              "name": "amountIn",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 3868,
                              "src": "4503:8:40",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "src": "4476:35:40",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "4464:47:40",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 4091,
                        "nodeType": "ExpressionStatement",
                        "src": "4464:47:40"
                      }
                    ]
                  }
                }
              ]
            },
            "documentation": {
              "id": 3853,
              "nodeType": "StructuredDocumentation",
              "src": "315:1071:40",
              "text": "@notice Computes the result of swapping some amount in, or amount out, given the parameters of the swap\n @dev The fee, plus the amount in, will never exceed the amount remaining if the swap's `amountSpecified` is positive\n @param sqrtRatioCurrentX96 The current sqrt price of the pool\n @param sqrtRatioTargetX96 The price that cannot be exceeded, from which the direction of the swap is inferred\n @param liquidity The usable liquidity\n @param amountRemaining How much input or output amount is remaining to be swapped in/out\n @param feePips The fee taken from the input amount, expressed in hundredths of a bip\n @return sqrtRatioNextX96 The price after swapping the amount in/out, not to exceed the price target\n @return amountIn The amount to be swapped in, of either token0 or token1, based on the direction of the swap\n @return amountOut The amount to be received, of either token0 or token1, based on the direction of the swap\n @return feeAmount The amount of input that will be taken as a fee"
            },
            "id": 4107,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "computeSwapStep",
            "nodeType": "FunctionDefinition",
            "overrides": null,
            "parameters": {
              "id": 3864,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 3855,
                  "mutability": "mutable",
                  "name": "sqrtRatioCurrentX96",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 4107,
                  "src": "1425:27:40",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint160",
                    "typeString": "uint160"
                  },
                  "typeName": {
                    "id": 3854,
                    "name": "uint160",
                    "nodeType": "ElementaryTypeName",
                    "src": "1425:7:40",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint160",
                      "typeString": "uint160"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 3857,
                  "mutability": "mutable",
                  "name": "sqrtRatioTargetX96",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 4107,
                  "src": "1462:26:40",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint160",
                    "typeString": "uint160"
                  },
                  "typeName": {
                    "id": 3856,
                    "name": "uint160",
                    "nodeType": "ElementaryTypeName",
                    "src": "1462:7:40",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint160",
                      "typeString": "uint160"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 3859,
                  "mutability": "mutable",
                  "name": "liquidity",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 4107,
                  "src": "1498:17:40",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint128",
                    "typeString": "uint128"
                  },
                  "typeName": {
                    "id": 3858,
                    "name": "uint128",
                    "nodeType": "ElementaryTypeName",
                    "src": "1498:7:40",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint128",
                      "typeString": "uint128"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 3861,
                  "mutability": "mutable",
                  "name": "amountRemaining",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 4107,
                  "src": "1525:22:40",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_int256",
                    "typeString": "int256"
                  },
                  "typeName": {
                    "id": 3860,
                    "name": "int256",
                    "nodeType": "ElementaryTypeName",
                    "src": "1525:6:40",
                    "typeDescriptions": {
                      "typeIdentifier": "t_int256",
                      "typeString": "int256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 3863,
                  "mutability": "mutable",
                  "name": "feePips",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 4107,
                  "src": "1557:14:40",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint24",
                    "typeString": "uint24"
                  },
                  "typeName": {
                    "id": 3862,
                    "name": "uint24",
                    "nodeType": "ElementaryTypeName",
                    "src": "1557:6:40",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint24",
                      "typeString": "uint24"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "1415:162:40"
            },
            "returnParameters": {
              "id": 3873,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 3866,
                  "mutability": "mutable",
                  "name": "sqrtRatioNextX96",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 4107,
                  "src": "1638:24:40",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint160",
                    "typeString": "uint160"
                  },
                  "typeName": {
                    "id": 3865,
                    "name": "uint160",
                    "nodeType": "ElementaryTypeName",
                    "src": "1638:7:40",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint160",
                      "typeString": "uint160"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 3868,
                  "mutability": "mutable",
                  "name": "amountIn",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 4107,
                  "src": "1676:16:40",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 3867,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "1676:7:40",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 3870,
                  "mutability": "mutable",
                  "name": "amountOut",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 4107,
                  "src": "1706:17:40",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 3869,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "1706:7:40",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 3872,
                  "mutability": "mutable",
                  "name": "feeAmount",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 4107,
                  "src": "1737:17:40",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 3871,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "1737:7:40",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "1624:140:40"
            },
            "scope": 4108,
            "src": "1391:3239:40",
            "stateMutability": "pure",
            "virtual": false,
            "visibility": "internal"
          }
        ],
        "scope": 4109,
        "src": "292:4340:40"
      }
    ],
    "src": "37:4596:40"
  },
  "legacyAST": {
    "attributes": {
      "absolutePath": "project:/contracts/interfaces/uniswap/SwapMath.sol",
      "exportedSymbols": {
        "SwapMath": [
          4108
        ]
      },
      "license": "BUSL-1.1"
    },
    "children": [
      {
        "attributes": {
          "literals": [
            "solidity",
            ">=",
            "0.5",
            ".0"
          ]
        },
        "id": 3849,
        "name": "PragmaDirective",
        "src": "37:24:40"
      },
      {
        "attributes": {
          "SourceUnit": 2346,
          "absolutePath": "project:/contracts/interfaces/uniswap/FullMath.sol",
          "file": "./FullMath.sol",
          "scope": 4109,
          "symbolAliases": [
            null
          ],
          "unitAlias": ""
        },
        "id": 3850,
        "name": "ImportDirective",
        "src": "63:24:40"
      },
      {
        "attributes": {
          "SourceUnit": 3848,
          "absolutePath": "project:/contracts/interfaces/uniswap/SqrtPriceMath.sol",
          "file": "./SqrtPriceMath.sol",
          "scope": 4109,
          "symbolAliases": [
            null
          ],
          "unitAlias": ""
        },
        "id": 3851,
        "name": "ImportDirective",
        "src": "88:29:40"
      },
      {
        "attributes": {
          "abstract": false,
          "baseContracts": [
            null
          ],
          "contractDependencies": [
            null
          ],
          "contractKind": "library",
          "fullyImplemented": true,
          "linearizedBaseContracts": [
            4108
          ],
          "name": "SwapMath",
          "scope": 4109
        },
        "children": [
          {
            "attributes": {
              "text": "@title Computes the result of a swap within ticks\n @notice Contains methods for computing the result of a swap within a single tick price range, i.e., a single tick."
            },
            "id": 3852,
            "name": "StructuredDocumentation",
            "src": "119:173:40"
          },
          {
            "attributes": {
              "implemented": true,
              "isConstructor": false,
              "kind": "function",
              "modifiers": [
                null
              ],
              "name": "computeSwapStep",
              "overrides": null,
              "scope": 4108,
              "stateMutability": "pure",
              "virtual": false,
              "visibility": "internal"
            },
            "children": [
              {
                "attributes": {
                  "text": "@notice Computes the result of swapping some amount in, or amount out, given the parameters of the swap\n @dev The fee, plus the amount in, will never exceed the amount remaining if the swap's `amountSpecified` is positive\n @param sqrtRatioCurrentX96 The current sqrt price of the pool\n @param sqrtRatioTargetX96 The price that cannot be exceeded, from which the direction of the swap is inferred\n @param liquidity The usable liquidity\n @param amountRemaining How much input or output amount is remaining to be swapped in/out\n @param feePips The fee taken from the input amount, expressed in hundredths of a bip\n @return sqrtRatioNextX96 The price after swapping the amount in/out, not to exceed the price target\n @return amountIn The amount to be swapped in, of either token0 or token1, based on the direction of the swap\n @return amountOut The amount to be received, of either token0 or token1, based on the direction of the swap\n @return feeAmount The amount of input that will be taken as a fee"
                },
                "id": 3853,
                "name": "StructuredDocumentation",
                "src": "315:1071:40"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "mutability": "mutable",
                      "name": "sqrtRatioCurrentX96",
                      "overrides": null,
                      "scope": 4107,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "uint160",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "uint160",
                          "type": "uint160"
                        },
                        "id": 3854,
                        "name": "ElementaryTypeName",
                        "src": "1425:7:40"
                      }
                    ],
                    "id": 3855,
                    "name": "VariableDeclaration",
                    "src": "1425:27:40"
                  },
                  {
                    "attributes": {
                      "constant": false,
                      "mutability": "mutable",
                      "name": "sqrtRatioTargetX96",
                      "overrides": null,
                      "scope": 4107,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "uint160",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "uint160",
                          "type": "uint160"
                        },
                        "id": 3856,
                        "name": "ElementaryTypeName",
                        "src": "1462:7:40"
                      }
                    ],
                    "id": 3857,
                    "name": "VariableDeclaration",
                    "src": "1462:26:40"
                  },
                  {
                    "attributes": {
                      "constant": false,
                      "mutability": "mutable",
                      "name": "liquidity",
                      "overrides": null,
                      "scope": 4107,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "uint128",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "uint128",
                          "type": "uint128"
                        },
                        "id": 3858,
                        "name": "ElementaryTypeName",
                        "src": "1498:7:40"
                      }
                    ],
                    "id": 3859,
                    "name": "VariableDeclaration",
                    "src": "1498:17:40"
                  },
                  {
                    "attributes": {
                      "constant": false,
                      "mutability": "mutable",
                      "name": "amountRemaining",
                      "overrides": null,
                      "scope": 4107,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "int256",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "int256",
                          "type": "int256"
                        },
                        "id": 3860,
                        "name": "ElementaryTypeName",
                        "src": "1525:6:40"
                      }
                    ],
                    "id": 3861,
                    "name": "VariableDeclaration",
                    "src": "1525:22:40"
                  },
                  {
                    "attributes": {
                      "constant": false,
                      "mutability": "mutable",
                      "name": "feePips",
                      "overrides": null,
                      "scope": 4107,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "uint24",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "uint24",
                          "type": "uint24"
                        },
                        "id": 3862,
                        "name": "ElementaryTypeName",
                        "src": "1557:6:40"
                      }
                    ],
                    "id": 3863,
                    "name": "VariableDeclaration",
                    "src": "1557:14:40"
                  }
                ],
                "id": 3864,
                "name": "ParameterList",
                "src": "1415:162:40"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "mutability": "mutable",
                      "name": "sqrtRatioNextX96",
                      "overrides": null,
                      "scope": 4107,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "uint160",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "uint160",
                          "type": "uint160"
                        },
                        "id": 3865,
                        "name": "ElementaryTypeName",
                        "src": "1638:7:40"
                      }
                    ],
                    "id": 3866,
                    "name": "VariableDeclaration",
                    "src": "1638:24:40"
                  },
                  {
                    "attributes": {
                      "constant": false,
                      "mutability": "mutable",
                      "name": "amountIn",
                      "overrides": null,
                      "scope": 4107,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "uint256",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "uint256",
                          "type": "uint256"
                        },
                        "id": 3867,
                        "name": "ElementaryTypeName",
                        "src": "1676:7:40"
                      }
                    ],
                    "id": 3868,
                    "name": "VariableDeclaration",
                    "src": "1676:16:40"
                  },
                  {
                    "attributes": {
                      "constant": false,
                      "mutability": "mutable",
                      "name": "amountOut",
                      "overrides": null,
                      "scope": 4107,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "uint256",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "uint256",
                          "type": "uint256"
                        },
                        "id": 3869,
                        "name": "ElementaryTypeName",
                        "src": "1706:7:40"
                      }
                    ],
                    "id": 3870,
                    "name": "VariableDeclaration",
                    "src": "1706:17:40"
                  },
                  {
                    "attributes": {
                      "constant": false,
                      "mutability": "mutable",
                      "name": "feeAmount",
                      "overrides": null,
                      "scope": 4107,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "uint256",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "uint256",
                          "type": "uint256"
                        },
                        "id": 3871,
                        "name": "ElementaryTypeName",
                        "src": "1737:7:40"
                      }
                    ],
                    "id": 3872,
                    "name": "VariableDeclaration",
                    "src": "1737:17:40"
                  }
                ],
                "id": 3873,
                "name": "ParameterList",
                "src": "1624:140:40"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "assignments": [
                        3875
                      ]
                    },
                    "children": [
                      {
                        "attributes": {
                          "constant": false,
                          "mutability": "mutable",
                          "name": "zeroForOne",
                          "overrides": null,
                          "scope": 4106,
                          "stateVariable": false,
                          "storageLocation": "default",
                          "type": "bool",
                          "value": null,
                          "visibility": "internal"
                        },
                        "children": [
                          {
                            "attributes": {
                              "name": "bool",
                              "type": "bool"
                            },
                            "id": 3874,
                            "name": "ElementaryTypeName",
                            "src": "1779:4:40"
                          }
                        ],
                        "id": 3875,
                        "name": "VariableDeclaration",
                        "src": "1779:15:40"
                      },
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "commonType": {
                            "typeIdentifier": "t_uint160",
                            "typeString": "uint160"
                          },
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "operator": ">=",
                          "type": "bool"
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 3855,
                              "type": "uint160",
                              "value": "sqrtRatioCurrentX96"
                            },
                            "id": 3876,
                            "name": "Identifier",
                            "src": "1797:19:40"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 3857,
                              "type": "uint160",
                              "value": "sqrtRatioTargetX96"
                            },
                            "id": 3877,
                            "name": "Identifier",
                            "src": "1820:18:40"
                          }
                        ],
                        "id": 3878,
                        "name": "BinaryOperation",
                        "src": "1797:41:40"
                      }
                    ],
                    "id": 3879,
                    "name": "VariableDeclarationStatement",
                    "src": "1779:59:40"
                  },
                  {
                    "attributes": {
                      "assignments": [
                        3881
                      ]
                    },
                    "children": [
                      {
                        "attributes": {
                          "constant": false,
                          "mutability": "mutable",
                          "name": "exactIn",
                          "overrides": null,
                          "scope": 4106,
                          "stateVariable": false,
                          "storageLocation": "default",
                          "type": "bool",
                          "value": null,
                          "visibility": "internal"
                        },
                        "children": [
                          {
                            "attributes": {
                              "name": "bool",
                              "type": "bool"
                            },
                            "id": 3880,
                            "name": "ElementaryTypeName",
                            "src": "1848:4:40"
                          }
                        ],
                        "id": 3881,
                        "name": "VariableDeclaration",
                        "src": "1848:12:40"
                      },
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "commonType": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          },
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "operator": ">=",
                          "type": "bool"
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 3861,
                              "type": "int256",
                              "value": "amountRemaining"
                            },
                            "id": 3882,
                            "name": "Identifier",
                            "src": "1863:15:40"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "hexvalue": "30",
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "subdenomination": null,
                              "token": "number",
                              "type": "int_const 0",
                              "value": "0"
                            },
                            "id": 3883,
                            "name": "Literal",
                            "src": "1882:1:40"
                          }
                        ],
                        "id": 3884,
                        "name": "BinaryOperation",
                        "src": "1863:20:40"
                      }
                    ],
                    "id": 3885,
                    "name": "VariableDeclarationStatement",
                    "src": "1848:35:40"
                  },
                  {
                    "children": [
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "overloadedDeclarations": [
                            null
                          ],
                          "referencedDeclaration": 3881,
                          "type": "bool",
                          "value": "exactIn"
                        },
                        "id": 3886,
                        "name": "Identifier",
                        "src": "1898:7:40"
                      },
                      {
                        "children": [
                          {
                            "attributes": {
                              "assignments": [
                                3888
                              ]
                            },
                            "children": [
                              {
                                "attributes": {
                                  "constant": false,
                                  "mutability": "mutable",
                                  "name": "amountRemainingLessFee",
                                  "overrides": null,
                                  "scope": 3938,
                                  "stateVariable": false,
                                  "storageLocation": "default",
                                  "type": "uint256",
                                  "value": null,
                                  "visibility": "internal"
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "name": "uint256",
                                      "type": "uint256"
                                    },
                                    "id": 3887,
                                    "name": "ElementaryTypeName",
                                    "src": "1921:7:40"
                                  }
                                ],
                                "id": 3888,
                                "name": "VariableDeclaration",
                                "src": "1921:30:40"
                              },
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "isStructConstructorCall": false,
                                  "lValueRequested": false,
                                  "names": [
                                    null
                                  ],
                                  "tryCall": false,
                                  "type": "uint256",
                                  "type_conversion": false
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "argumentTypes": [
                                        {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        },
                                        {
                                          "typeIdentifier": "t_uint24",
                                          "typeString": "uint24"
                                        },
                                        {
                                          "typeIdentifier": "t_rational_1000000_by_1",
                                          "typeString": "int_const 1000000"
                                        }
                                      ],
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "member_name": "mulDiv",
                                      "referencedDeclaration": 2301,
                                      "type": "function (uint256,uint256,uint256) pure returns (uint256)"
                                    },
                                    "children": [
                                      {
                                        "attributes": {
                                          "argumentTypes": null,
                                          "overloadedDeclarations": [
                                            null
                                          ],
                                          "referencedDeclaration": 2345,
                                          "type": "type(library FullMath)",
                                          "value": "FullMath"
                                        },
                                        "id": 3889,
                                        "name": "Identifier",
                                        "src": "1954:8:40"
                                      }
                                    ],
                                    "id": 3890,
                                    "name": "MemberAccess",
                                    "src": "1954:15:40"
                                  },
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "isStructConstructorCall": false,
                                      "lValueRequested": false,
                                      "names": [
                                        null
                                      ],
                                      "tryCall": false,
                                      "type": "uint256",
                                      "type_conversion": true
                                    },
                                    "children": [
                                      {
                                        "attributes": {
                                          "argumentTypes": [
                                            {
                                              "typeIdentifier": "t_int256",
                                              "typeString": "int256"
                                            }
                                          ],
                                          "isConstant": false,
                                          "isLValue": false,
                                          "isPure": true,
                                          "lValueRequested": false,
                                          "type": "type(uint256)"
                                        },
                                        "children": [
                                          {
                                            "attributes": {
                                              "name": "uint256",
                                              "type": null
                                            },
                                            "id": 3891,
                                            "name": "ElementaryTypeName",
                                            "src": "1970:7:40"
                                          }
                                        ],
                                        "id": 3892,
                                        "name": "ElementaryTypeNameExpression",
                                        "src": "1970:7:40"
                                      },
                                      {
                                        "attributes": {
                                          "argumentTypes": null,
                                          "overloadedDeclarations": [
                                            null
                                          ],
                                          "referencedDeclaration": 3861,
                                          "type": "int256",
                                          "value": "amountRemaining"
                                        },
                                        "id": 3893,
                                        "name": "Identifier",
                                        "src": "1978:15:40"
                                      }
                                    ],
                                    "id": 3894,
                                    "name": "FunctionCall",
                                    "src": "1970:24:40"
                                  },
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "commonType": {
                                        "typeIdentifier": "t_uint24",
                                        "typeString": "uint24"
                                      },
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "operator": "-",
                                      "type": "uint24"
                                    },
                                    "children": [
                                      {
                                        "attributes": {
                                          "argumentTypes": null,
                                          "hexvalue": "316536",
                                          "isConstant": false,
                                          "isLValue": false,
                                          "isPure": true,
                                          "lValueRequested": false,
                                          "subdenomination": null,
                                          "token": "number",
                                          "type": "int_const 1000000",
                                          "value": "1e6"
                                        },
                                        "id": 3895,
                                        "name": "Literal",
                                        "src": "1996:3:40"
                                      },
                                      {
                                        "attributes": {
                                          "argumentTypes": null,
                                          "overloadedDeclarations": [
                                            null
                                          ],
                                          "referencedDeclaration": 3863,
                                          "type": "uint24",
                                          "value": "feePips"
                                        },
                                        "id": 3896,
                                        "name": "Identifier",
                                        "src": "2002:7:40"
                                      }
                                    ],
                                    "id": 3897,
                                    "name": "BinaryOperation",
                                    "src": "1996:13:40"
                                  },
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "hexvalue": "316536",
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": true,
                                      "lValueRequested": false,
                                      "subdenomination": null,
                                      "token": "number",
                                      "type": "int_const 1000000",
                                      "value": "1e6"
                                    },
                                    "id": 3898,
                                    "name": "Literal",
                                    "src": "2011:3:40"
                                  }
                                ],
                                "id": 3899,
                                "name": "FunctionCall",
                                "src": "1954:61:40"
                              }
                            ],
                            "id": 3900,
                            "name": "VariableDeclarationStatement",
                            "src": "1921:94:40"
                          },
                          {
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "operator": "=",
                                  "type": "uint256"
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "overloadedDeclarations": [
                                        null
                                      ],
                                      "referencedDeclaration": 3868,
                                      "type": "uint256",
                                      "value": "amountIn"
                                    },
                                    "id": 3901,
                                    "name": "Identifier",
                                    "src": "2029:8:40"
                                  },
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "type": "uint256"
                                    },
                                    "children": [
                                      {
                                        "attributes": {
                                          "argumentTypes": null,
                                          "overloadedDeclarations": [
                                            null
                                          ],
                                          "referencedDeclaration": 3875,
                                          "type": "bool",
                                          "value": "zeroForOne"
                                        },
                                        "id": 3902,
                                        "name": "Identifier",
                                        "src": "2040:10:40"
                                      },
                                      {
                                        "attributes": {
                                          "argumentTypes": null,
                                          "isConstant": false,
                                          "isLValue": false,
                                          "isPure": false,
                                          "isStructConstructorCall": false,
                                          "lValueRequested": false,
                                          "names": [
                                            null
                                          ],
                                          "tryCall": false,
                                          "type": "uint256",
                                          "type_conversion": false
                                        },
                                        "children": [
                                          {
                                            "attributes": {
                                              "argumentTypes": [
                                                {
                                                  "typeIdentifier": "t_uint160",
                                                  "typeString": "uint160"
                                                },
                                                {
                                                  "typeIdentifier": "t_uint160",
                                                  "typeString": "uint160"
                                                },
                                                {
                                                  "typeIdentifier": "t_uint128",
                                                  "typeString": "uint128"
                                                },
                                                {
                                                  "typeIdentifier": "t_bool",
                                                  "typeString": "bool"
                                                }
                                              ],
                                              "isConstant": false,
                                              "isLValue": false,
                                              "isPure": false,
                                              "lValueRequested": false,
                                              "member_name": "getAmount0Delta",
                                              "referencedDeclaration": 3714,
                                              "type": "function (uint160,uint160,uint128,bool) pure returns (uint256)"
                                            },
                                            "children": [
                                              {
                                                "attributes": {
                                                  "argumentTypes": null,
                                                  "overloadedDeclarations": [
                                                    null
                                                  ],
                                                  "referencedDeclaration": 3847,
                                                  "type": "type(library SqrtPriceMath)",
                                                  "value": "SqrtPriceMath"
                                                },
                                                "id": 3903,
                                                "name": "Identifier",
                                                "src": "2069:13:40"
                                              }
                                            ],
                                            "id": 3904,
                                            "name": "MemberAccess",
                                            "src": "2069:29:40"
                                          },
                                          {
                                            "attributes": {
                                              "argumentTypes": null,
                                              "overloadedDeclarations": [
                                                null
                                              ],
                                              "referencedDeclaration": 3857,
                                              "type": "uint160",
                                              "value": "sqrtRatioTargetX96"
                                            },
                                            "id": 3905,
                                            "name": "Identifier",
                                            "src": "2099:18:40"
                                          },
                                          {
                                            "attributes": {
                                              "argumentTypes": null,
                                              "overloadedDeclarations": [
                                                null
                                              ],
                                              "referencedDeclaration": 3855,
                                              "type": "uint160",
                                              "value": "sqrtRatioCurrentX96"
                                            },
                                            "id": 3906,
                                            "name": "Identifier",
                                            "src": "2119:19:40"
                                          },
                                          {
                                            "attributes": {
                                              "argumentTypes": null,
                                              "overloadedDeclarations": [
                                                null
                                              ],
                                              "referencedDeclaration": 3859,
                                              "type": "uint128",
                                              "value": "liquidity"
                                            },
                                            "id": 3907,
                                            "name": "Identifier",
                                            "src": "2140:9:40"
                                          },
                                          {
                                            "attributes": {
                                              "argumentTypes": null,
                                              "hexvalue": "74727565",
                                              "isConstant": false,
                                              "isLValue": false,
                                              "isPure": true,
                                              "lValueRequested": false,
                                              "subdenomination": null,
                                              "token": "bool",
                                              "type": "bool",
                                              "value": "true"
                                            },
                                            "id": 3908,
                                            "name": "Literal",
                                            "src": "2151:4:40"
                                          }
                                        ],
                                        "id": 3909,
                                        "name": "FunctionCall",
                                        "src": "2069:87:40"
                                      },
                                      {
                                        "attributes": {
                                          "argumentTypes": null,
                                          "isConstant": false,
                                          "isLValue": false,
                                          "isPure": false,
                                          "isStructConstructorCall": false,
                                          "lValueRequested": false,
                                          "names": [
                                            null
                                          ],
                                          "tryCall": false,
                                          "type": "uint256",
                                          "type_conversion": false
                                        },
                                        "children": [
                                          {
                                            "attributes": {
                                              "argumentTypes": [
                                                {
                                                  "typeIdentifier": "t_uint160",
                                                  "typeString": "uint160"
                                                },
                                                {
                                                  "typeIdentifier": "t_uint160",
                                                  "typeString": "uint160"
                                                },
                                                {
                                                  "typeIdentifier": "t_uint128",
                                                  "typeString": "uint128"
                                                },
                                                {
                                                  "typeIdentifier": "t_bool",
                                                  "typeString": "bool"
                                                }
                                              ],
                                              "isConstant": false,
                                              "isLValue": false,
                                              "isPure": false,
                                              "lValueRequested": false,
                                              "member_name": "getAmount1Delta",
                                              "referencedDeclaration": 3762,
                                              "type": "function (uint160,uint160,uint128,bool) pure returns (uint256)"
                                            },
                                            "children": [
                                              {
                                                "attributes": {
                                                  "argumentTypes": null,
                                                  "overloadedDeclarations": [
                                                    null
                                                  ],
                                                  "referencedDeclaration": 3847,
                                                  "type": "type(library SqrtPriceMath)",
                                                  "value": "SqrtPriceMath"
                                                },
                                                "id": 3910,
                                                "name": "Identifier",
                                                "src": "2175:13:40"
                                              }
                                            ],
                                            "id": 3911,
                                            "name": "MemberAccess",
                                            "src": "2175:29:40"
                                          },
                                          {
                                            "attributes": {
                                              "argumentTypes": null,
                                              "overloadedDeclarations": [
                                                null
                                              ],
                                              "referencedDeclaration": 3855,
                                              "type": "uint160",
                                              "value": "sqrtRatioCurrentX96"
                                            },
                                            "id": 3912,
                                            "name": "Identifier",
                                            "src": "2205:19:40"
                                          },
                                          {
                                            "attributes": {
                                              "argumentTypes": null,
                                              "overloadedDeclarations": [
                                                null
                                              ],
                                              "referencedDeclaration": 3857,
                                              "type": "uint160",
                                              "value": "sqrtRatioTargetX96"
                                            },
                                            "id": 3913,
                                            "name": "Identifier",
                                            "src": "2226:18:40"
                                          },
                                          {
                                            "attributes": {
                                              "argumentTypes": null,
                                              "overloadedDeclarations": [
                                                null
                                              ],
                                              "referencedDeclaration": 3859,
                                              "type": "uint128",
                                              "value": "liquidity"
                                            },
                                            "id": 3914,
                                            "name": "Identifier",
                                            "src": "2246:9:40"
                                          },
                                          {
                                            "attributes": {
                                              "argumentTypes": null,
                                              "hexvalue": "74727565",
                                              "isConstant": false,
                                              "isLValue": false,
                                              "isPure": true,
                                              "lValueRequested": false,
                                              "subdenomination": null,
                                              "token": "bool",
                                              "type": "bool",
                                              "value": "true"
                                            },
                                            "id": 3915,
                                            "name": "Literal",
                                            "src": "2257:4:40"
                                          }
                                        ],
                                        "id": 3916,
                                        "name": "FunctionCall",
                                        "src": "2175:87:40"
                                      }
                                    ],
                                    "id": 3917,
                                    "name": "Conditional",
                                    "src": "2040:222:40"
                                  }
                                ],
                                "id": 3918,
                                "name": "Assignment",
                                "src": "2029:233:40"
                              }
                            ],
                            "id": 3919,
                            "name": "ExpressionStatement",
                            "src": "2029:233:40"
                          },
                          {
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "commonType": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  },
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "operator": ">=",
                                  "type": "bool"
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "overloadedDeclarations": [
                                        null
                                      ],
                                      "referencedDeclaration": 3888,
                                      "type": "uint256",
                                      "value": "amountRemainingLessFee"
                                    },
                                    "id": 3920,
                                    "name": "Identifier",
                                    "src": "2280:22:40"
                                  },
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "overloadedDeclarations": [
                                        null
                                      ],
                                      "referencedDeclaration": 3868,
                                      "type": "uint256",
                                      "value": "amountIn"
                                    },
                                    "id": 3921,
                                    "name": "Identifier",
                                    "src": "2306:8:40"
                                  }
                                ],
                                "id": 3922,
                                "name": "BinaryOperation",
                                "src": "2280:34:40"
                              },
                              {
                                "children": [
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "operator": "=",
                                      "type": "uint160"
                                    },
                                    "children": [
                                      {
                                        "attributes": {
                                          "argumentTypes": null,
                                          "overloadedDeclarations": [
                                            null
                                          ],
                                          "referencedDeclaration": 3866,
                                          "type": "uint160",
                                          "value": "sqrtRatioNextX96"
                                        },
                                        "id": 3923,
                                        "name": "Identifier",
                                        "src": "2316:16:40"
                                      },
                                      {
                                        "attributes": {
                                          "argumentTypes": null,
                                          "overloadedDeclarations": [
                                            null
                                          ],
                                          "referencedDeclaration": 3857,
                                          "type": "uint160",
                                          "value": "sqrtRatioTargetX96"
                                        },
                                        "id": 3924,
                                        "name": "Identifier",
                                        "src": "2335:18:40"
                                      }
                                    ],
                                    "id": 3925,
                                    "name": "Assignment",
                                    "src": "2316:37:40"
                                  }
                                ],
                                "id": 3926,
                                "name": "ExpressionStatement",
                                "src": "2316:37:40"
                              },
                              {
                                "children": [
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "operator": "=",
                                      "type": "uint160"
                                    },
                                    "children": [
                                      {
                                        "attributes": {
                                          "argumentTypes": null,
                                          "overloadedDeclarations": [
                                            null
                                          ],
                                          "referencedDeclaration": 3866,
                                          "type": "uint160",
                                          "value": "sqrtRatioNextX96"
                                        },
                                        "id": 3927,
                                        "name": "Identifier",
                                        "src": "2388:16:40"
                                      },
                                      {
                                        "attributes": {
                                          "argumentTypes": null,
                                          "isConstant": false,
                                          "isLValue": false,
                                          "isPure": false,
                                          "isStructConstructorCall": false,
                                          "lValueRequested": false,
                                          "names": [
                                            null
                                          ],
                                          "tryCall": false,
                                          "type": "uint160",
                                          "type_conversion": false
                                        },
                                        "children": [
                                          {
                                            "attributes": {
                                              "argumentTypes": [
                                                {
                                                  "typeIdentifier": "t_uint160",
                                                  "typeString": "uint160"
                                                },
                                                {
                                                  "typeIdentifier": "t_uint128",
                                                  "typeString": "uint128"
                                                },
                                                {
                                                  "typeIdentifier": "t_uint256",
                                                  "typeString": "uint256"
                                                },
                                                {
                                                  "typeIdentifier": "t_bool",
                                                  "typeString": "bool"
                                                }
                                              ],
                                              "isConstant": false,
                                              "isLValue": false,
                                              "isPure": false,
                                              "lValueRequested": false,
                                              "member_name": "getNextSqrtPriceFromInput",
                                              "referencedDeclaration": 3602,
                                              "type": "function (uint160,uint128,uint256,bool) pure returns (uint160)"
                                            },
                                            "children": [
                                              {
                                                "attributes": {
                                                  "argumentTypes": null,
                                                  "overloadedDeclarations": [
                                                    null
                                                  ],
                                                  "referencedDeclaration": 3847,
                                                  "type": "type(library SqrtPriceMath)",
                                                  "value": "SqrtPriceMath"
                                                },
                                                "id": 3928,
                                                "name": "Identifier",
                                                "src": "2407:13:40"
                                              }
                                            ],
                                            "id": 3929,
                                            "name": "MemberAccess",
                                            "src": "2407:39:40"
                                          },
                                          {
                                            "attributes": {
                                              "argumentTypes": null,
                                              "overloadedDeclarations": [
                                                null
                                              ],
                                              "referencedDeclaration": 3855,
                                              "type": "uint160",
                                              "value": "sqrtRatioCurrentX96"
                                            },
                                            "id": 3930,
                                            "name": "Identifier",
                                            "src": "2468:19:40"
                                          },
                                          {
                                            "attributes": {
                                              "argumentTypes": null,
                                              "overloadedDeclarations": [
                                                null
                                              ],
                                              "referencedDeclaration": 3859,
                                              "type": "uint128",
                                              "value": "liquidity"
                                            },
                                            "id": 3931,
                                            "name": "Identifier",
                                            "src": "2509:9:40"
                                          },
                                          {
                                            "attributes": {
                                              "argumentTypes": null,
                                              "overloadedDeclarations": [
                                                null
                                              ],
                                              "referencedDeclaration": 3888,
                                              "type": "uint256",
                                              "value": "amountRemainingLessFee"
                                            },
                                            "id": 3932,
                                            "name": "Identifier",
                                            "src": "2540:22:40"
                                          },
                                          {
                                            "attributes": {
                                              "argumentTypes": null,
                                              "overloadedDeclarations": [
                                                null
                                              ],
                                              "referencedDeclaration": 3875,
                                              "type": "bool",
                                              "value": "zeroForOne"
                                            },
                                            "id": 3933,
                                            "name": "Identifier",
                                            "src": "2584:10:40"
                                          }
                                        ],
                                        "id": 3934,
                                        "name": "FunctionCall",
                                        "src": "2407:205:40"
                                      }
                                    ],
                                    "id": 3935,
                                    "name": "Assignment",
                                    "src": "2388:224:40"
                                  }
                                ],
                                "id": 3936,
                                "name": "ExpressionStatement",
                                "src": "2388:224:40"
                              }
                            ],
                            "id": 3937,
                            "name": "IfStatement",
                            "src": "2276:336:40"
                          }
                        ],
                        "id": 3938,
                        "name": "Block",
                        "src": "1907:716:40"
                      },
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "operator": "=",
                                  "type": "uint256"
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "overloadedDeclarations": [
                                        null
                                      ],
                                      "referencedDeclaration": 3870,
                                      "type": "uint256",
                                      "value": "amountOut"
                                    },
                                    "id": 3939,
                                    "name": "Identifier",
                                    "src": "2643:9:40"
                                  },
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "type": "uint256"
                                    },
                                    "children": [
                                      {
                                        "attributes": {
                                          "argumentTypes": null,
                                          "overloadedDeclarations": [
                                            null
                                          ],
                                          "referencedDeclaration": 3875,
                                          "type": "bool",
                                          "value": "zeroForOne"
                                        },
                                        "id": 3940,
                                        "name": "Identifier",
                                        "src": "2655:10:40"
                                      },
                                      {
                                        "attributes": {
                                          "argumentTypes": null,
                                          "isConstant": false,
                                          "isLValue": false,
                                          "isPure": false,
                                          "isStructConstructorCall": false,
                                          "lValueRequested": false,
                                          "names": [
                                            null
                                          ],
                                          "tryCall": false,
                                          "type": "uint256",
                                          "type_conversion": false
                                        },
                                        "children": [
                                          {
                                            "attributes": {
                                              "argumentTypes": [
                                                {
                                                  "typeIdentifier": "t_uint160",
                                                  "typeString": "uint160"
                                                },
                                                {
                                                  "typeIdentifier": "t_uint160",
                                                  "typeString": "uint160"
                                                },
                                                {
                                                  "typeIdentifier": "t_uint128",
                                                  "typeString": "uint128"
                                                },
                                                {
                                                  "typeIdentifier": "t_bool",
                                                  "typeString": "bool"
                                                }
                                              ],
                                              "isConstant": false,
                                              "isLValue": false,
                                              "isPure": false,
                                              "lValueRequested": false,
                                              "member_name": "getAmount1Delta",
                                              "referencedDeclaration": 3762,
                                              "type": "function (uint160,uint160,uint128,bool) pure returns (uint256)"
                                            },
                                            "children": [
                                              {
                                                "attributes": {
                                                  "argumentTypes": null,
                                                  "overloadedDeclarations": [
                                                    null
                                                  ],
                                                  "referencedDeclaration": 3847,
                                                  "type": "type(library SqrtPriceMath)",
                                                  "value": "SqrtPriceMath"
                                                },
                                                "id": 3941,
                                                "name": "Identifier",
                                                "src": "2684:13:40"
                                              }
                                            ],
                                            "id": 3942,
                                            "name": "MemberAccess",
                                            "src": "2684:29:40"
                                          },
                                          {
                                            "attributes": {
                                              "argumentTypes": null,
                                              "overloadedDeclarations": [
                                                null
                                              ],
                                              "referencedDeclaration": 3857,
                                              "type": "uint160",
                                              "value": "sqrtRatioTargetX96"
                                            },
                                            "id": 3943,
                                            "name": "Identifier",
                                            "src": "2714:18:40"
                                          },
                                          {
                                            "attributes": {
                                              "argumentTypes": null,
                                              "overloadedDeclarations": [
                                                null
                                              ],
                                              "referencedDeclaration": 3855,
                                              "type": "uint160",
                                              "value": "sqrtRatioCurrentX96"
                                            },
                                            "id": 3944,
                                            "name": "Identifier",
                                            "src": "2734:19:40"
                                          },
                                          {
                                            "attributes": {
                                              "argumentTypes": null,
                                              "overloadedDeclarations": [
                                                null
                                              ],
                                              "referencedDeclaration": 3859,
                                              "type": "uint128",
                                              "value": "liquidity"
                                            },
                                            "id": 3945,
                                            "name": "Identifier",
                                            "src": "2755:9:40"
                                          },
                                          {
                                            "attributes": {
                                              "argumentTypes": null,
                                              "hexvalue": "66616c7365",
                                              "isConstant": false,
                                              "isLValue": false,
                                              "isPure": true,
                                              "lValueRequested": false,
                                              "subdenomination": null,
                                              "token": "bool",
                                              "type": "bool",
                                              "value": "false"
                                            },
                                            "id": 3946,
                                            "name": "Literal",
                                            "src": "2766:5:40"
                                          }
                                        ],
                                        "id": 3947,
                                        "name": "FunctionCall",
                                        "src": "2684:88:40"
                                      },
                                      {
                                        "attributes": {
                                          "argumentTypes": null,
                                          "isConstant": false,
                                          "isLValue": false,
                                          "isPure": false,
                                          "isStructConstructorCall": false,
                                          "lValueRequested": false,
                                          "names": [
                                            null
                                          ],
                                          "tryCall": false,
                                          "type": "uint256",
                                          "type_conversion": false
                                        },
                                        "children": [
                                          {
                                            "attributes": {
                                              "argumentTypes": [
                                                {
                                                  "typeIdentifier": "t_uint160",
                                                  "typeString": "uint160"
                                                },
                                                {
                                                  "typeIdentifier": "t_uint160",
                                                  "typeString": "uint160"
                                                },
                                                {
                                                  "typeIdentifier": "t_uint128",
                                                  "typeString": "uint128"
                                                },
                                                {
                                                  "typeIdentifier": "t_bool",
                                                  "typeString": "bool"
                                                }
                                              ],
                                              "isConstant": false,
                                              "isLValue": false,
                                              "isPure": false,
                                              "lValueRequested": false,
                                              "member_name": "getAmount0Delta",
                                              "referencedDeclaration": 3714,
                                              "type": "function (uint160,uint160,uint128,bool) pure returns (uint256)"
                                            },
                                            "children": [
                                              {
                                                "attributes": {
                                                  "argumentTypes": null,
                                                  "overloadedDeclarations": [
                                                    null
                                                  ],
                                                  "referencedDeclaration": 3847,
                                                  "type": "type(library SqrtPriceMath)",
                                                  "value": "SqrtPriceMath"
                                                },
                                                "id": 3948,
                                                "name": "Identifier",
                                                "src": "2791:13:40"
                                              }
                                            ],
                                            "id": 3949,
                                            "name": "MemberAccess",
                                            "src": "2791:29:40"
                                          },
                                          {
                                            "attributes": {
                                              "argumentTypes": null,
                                              "overloadedDeclarations": [
                                                null
                                              ],
                                              "referencedDeclaration": 3855,
                                              "type": "uint160",
                                              "value": "sqrtRatioCurrentX96"
                                            },
                                            "id": 3950,
                                            "name": "Identifier",
                                            "src": "2821:19:40"
                                          },
                                          {
                                            "attributes": {
                                              "argumentTypes": null,
                                              "overloadedDeclarations": [
                                                null
                                              ],
                                              "referencedDeclaration": 3857,
                                              "type": "uint160",
                                              "value": "sqrtRatioTargetX96"
                                            },
                                            "id": 3951,
                                            "name": "Identifier",
                                            "src": "2842:18:40"
                                          },
                                          {
                                            "attributes": {
                                              "argumentTypes": null,
                                              "overloadedDeclarations": [
                                                null
                                              ],
                                              "referencedDeclaration": 3859,
                                              "type": "uint128",
                                              "value": "liquidity"
                                            },
                                            "id": 3952,
                                            "name": "Identifier",
                                            "src": "2862:9:40"
                                          },
                                          {
                                            "attributes": {
                                              "argumentTypes": null,
                                              "hexvalue": "66616c7365",
                                              "isConstant": false,
                                              "isLValue": false,
                                              "isPure": true,
                                              "lValueRequested": false,
                                              "subdenomination": null,
                                              "token": "bool",
                                              "type": "bool",
                                              "value": "false"
                                            },
                                            "id": 3953,
                                            "name": "Literal",
                                            "src": "2873:5:40"
                                          }
                                        ],
                                        "id": 3954,
                                        "name": "FunctionCall",
                                        "src": "2791:88:40"
                                      }
                                    ],
                                    "id": 3955,
                                    "name": "Conditional",
                                    "src": "2655:224:40"
                                  }
                                ],
                                "id": 3956,
                                "name": "Assignment",
                                "src": "2643:236:40"
                              }
                            ],
                            "id": 3957,
                            "name": "ExpressionStatement",
                            "src": "2643:236:40"
                          },
                          {
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "commonType": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  },
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "operator": ">=",
                                  "type": "bool"
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "isStructConstructorCall": false,
                                      "lValueRequested": false,
                                      "names": [
                                        null
                                      ],
                                      "tryCall": false,
                                      "type": "uint256",
                                      "type_conversion": true
                                    },
                                    "children": [
                                      {
                                        "attributes": {
                                          "argumentTypes": [
                                            {
                                              "typeIdentifier": "t_int256",
                                              "typeString": "int256"
                                            }
                                          ],
                                          "isConstant": false,
                                          "isLValue": false,
                                          "isPure": true,
                                          "lValueRequested": false,
                                          "type": "type(uint256)"
                                        },
                                        "children": [
                                          {
                                            "attributes": {
                                              "name": "uint256",
                                              "type": null
                                            },
                                            "id": 3958,
                                            "name": "ElementaryTypeName",
                                            "src": "2897:7:40"
                                          }
                                        ],
                                        "id": 3959,
                                        "name": "ElementaryTypeNameExpression",
                                        "src": "2897:7:40"
                                      },
                                      {
                                        "attributes": {
                                          "argumentTypes": null,
                                          "isConstant": false,
                                          "isLValue": false,
                                          "isPure": false,
                                          "lValueRequested": false,
                                          "operator": "-",
                                          "prefix": true,
                                          "type": "int256"
                                        },
                                        "children": [
                                          {
                                            "attributes": {
                                              "argumentTypes": null,
                                              "overloadedDeclarations": [
                                                null
                                              ],
                                              "referencedDeclaration": 3861,
                                              "type": "int256",
                                              "value": "amountRemaining"
                                            },
                                            "id": 3960,
                                            "name": "Identifier",
                                            "src": "2906:15:40"
                                          }
                                        ],
                                        "id": 3961,
                                        "name": "UnaryOperation",
                                        "src": "2905:16:40"
                                      }
                                    ],
                                    "id": 3962,
                                    "name": "FunctionCall",
                                    "src": "2897:25:40"
                                  },
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "overloadedDeclarations": [
                                        null
                                      ],
                                      "referencedDeclaration": 3870,
                                      "type": "uint256",
                                      "value": "amountOut"
                                    },
                                    "id": 3963,
                                    "name": "Identifier",
                                    "src": "2926:9:40"
                                  }
                                ],
                                "id": 3964,
                                "name": "BinaryOperation",
                                "src": "2897:38:40"
                              },
                              {
                                "children": [
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "operator": "=",
                                      "type": "uint160"
                                    },
                                    "children": [
                                      {
                                        "attributes": {
                                          "argumentTypes": null,
                                          "overloadedDeclarations": [
                                            null
                                          ],
                                          "referencedDeclaration": 3866,
                                          "type": "uint160",
                                          "value": "sqrtRatioNextX96"
                                        },
                                        "id": 3965,
                                        "name": "Identifier",
                                        "src": "2937:16:40"
                                      },
                                      {
                                        "attributes": {
                                          "argumentTypes": null,
                                          "overloadedDeclarations": [
                                            null
                                          ],
                                          "referencedDeclaration": 3857,
                                          "type": "uint160",
                                          "value": "sqrtRatioTargetX96"
                                        },
                                        "id": 3966,
                                        "name": "Identifier",
                                        "src": "2956:18:40"
                                      }
                                    ],
                                    "id": 3967,
                                    "name": "Assignment",
                                    "src": "2937:37:40"
                                  }
                                ],
                                "id": 3968,
                                "name": "ExpressionStatement",
                                "src": "2937:37:40"
                              },
                              {
                                "children": [
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "operator": "=",
                                      "type": "uint160"
                                    },
                                    "children": [
                                      {
                                        "attributes": {
                                          "argumentTypes": null,
                                          "overloadedDeclarations": [
                                            null
                                          ],
                                          "referencedDeclaration": 3866,
                                          "type": "uint160",
                                          "value": "sqrtRatioNextX96"
                                        },
                                        "id": 3969,
                                        "name": "Identifier",
                                        "src": "3009:16:40"
                                      },
                                      {
                                        "attributes": {
                                          "argumentTypes": null,
                                          "isConstant": false,
                                          "isLValue": false,
                                          "isPure": false,
                                          "isStructConstructorCall": false,
                                          "lValueRequested": false,
                                          "names": [
                                            null
                                          ],
                                          "tryCall": false,
                                          "type": "uint160",
                                          "type_conversion": false
                                        },
                                        "children": [
                                          {
                                            "attributes": {
                                              "argumentTypes": [
                                                {
                                                  "typeIdentifier": "t_uint160",
                                                  "typeString": "uint160"
                                                },
                                                {
                                                  "typeIdentifier": "t_uint128",
                                                  "typeString": "uint128"
                                                },
                                                {
                                                  "typeIdentifier": "t_uint256",
                                                  "typeString": "uint256"
                                                },
                                                {
                                                  "typeIdentifier": "t_bool",
                                                  "typeString": "bool"
                                                }
                                              ],
                                              "isConstant": false,
                                              "isLValue": false,
                                              "isPure": false,
                                              "lValueRequested": false,
                                              "member_name": "getNextSqrtPriceFromOutput",
                                              "referencedDeclaration": 3644,
                                              "type": "function (uint160,uint128,uint256,bool) pure returns (uint160)"
                                            },
                                            "children": [
                                              {
                                                "attributes": {
                                                  "argumentTypes": null,
                                                  "overloadedDeclarations": [
                                                    null
                                                  ],
                                                  "referencedDeclaration": 3847,
                                                  "type": "type(library SqrtPriceMath)",
                                                  "value": "SqrtPriceMath"
                                                },
                                                "id": 3970,
                                                "name": "Identifier",
                                                "src": "3028:13:40"
                                              }
                                            ],
                                            "id": 3971,
                                            "name": "MemberAccess",
                                            "src": "3028:40:40"
                                          },
                                          {
                                            "attributes": {
                                              "argumentTypes": null,
                                              "overloadedDeclarations": [
                                                null
                                              ],
                                              "referencedDeclaration": 3855,
                                              "type": "uint160",
                                              "value": "sqrtRatioCurrentX96"
                                            },
                                            "id": 3972,
                                            "name": "Identifier",
                                            "src": "3090:19:40"
                                          },
                                          {
                                            "attributes": {
                                              "argumentTypes": null,
                                              "overloadedDeclarations": [
                                                null
                                              ],
                                              "referencedDeclaration": 3859,
                                              "type": "uint128",
                                              "value": "liquidity"
                                            },
                                            "id": 3973,
                                            "name": "Identifier",
                                            "src": "3131:9:40"
                                          },
                                          {
                                            "attributes": {
                                              "argumentTypes": null,
                                              "isConstant": false,
                                              "isLValue": false,
                                              "isPure": false,
                                              "isStructConstructorCall": false,
                                              "lValueRequested": false,
                                              "names": [
                                                null
                                              ],
                                              "tryCall": false,
                                              "type": "uint256",
                                              "type_conversion": true
                                            },
                                            "children": [
                                              {
                                                "attributes": {
                                                  "argumentTypes": [
                                                    {
                                                      "typeIdentifier": "t_int256",
                                                      "typeString": "int256"
                                                    }
                                                  ],
                                                  "isConstant": false,
                                                  "isLValue": false,
                                                  "isPure": true,
                                                  "lValueRequested": false,
                                                  "type": "type(uint256)"
                                                },
                                                "children": [
                                                  {
                                                    "attributes": {
                                                      "name": "uint256",
                                                      "type": null
                                                    },
                                                    "id": 3974,
                                                    "name": "ElementaryTypeName",
                                                    "src": "3162:7:40"
                                                  }
                                                ],
                                                "id": 3975,
                                                "name": "ElementaryTypeNameExpression",
                                                "src": "3162:7:40"
                                              },
                                              {
                                                "attributes": {
                                                  "argumentTypes": null,
                                                  "isConstant": false,
                                                  "isLValue": false,
                                                  "isPure": false,
                                                  "lValueRequested": false,
                                                  "operator": "-",
                                                  "prefix": true,
                                                  "type": "int256"
                                                },
                                                "children": [
                                                  {
                                                    "attributes": {
                                                      "argumentTypes": null,
                                                      "overloadedDeclarations": [
                                                        null
                                                      ],
                                                      "referencedDeclaration": 3861,
                                                      "type": "int256",
                                                      "value": "amountRemaining"
                                                    },
                                                    "id": 3976,
                                                    "name": "Identifier",
                                                    "src": "3171:15:40"
                                                  }
                                                ],
                                                "id": 3977,
                                                "name": "UnaryOperation",
                                                "src": "3170:16:40"
                                              }
                                            ],
                                            "id": 3978,
                                            "name": "FunctionCall",
                                            "src": "3162:25:40"
                                          },
                                          {
                                            "attributes": {
                                              "argumentTypes": null,
                                              "overloadedDeclarations": [
                                                null
                                              ],
                                              "referencedDeclaration": 3875,
                                              "type": "bool",
                                              "value": "zeroForOne"
                                            },
                                            "id": 3979,
                                            "name": "Identifier",
                                            "src": "3209:10:40"
                                          }
                                        ],
                                        "id": 3980,
                                        "name": "FunctionCall",
                                        "src": "3028:209:40"
                                      }
                                    ],
                                    "id": 3981,
                                    "name": "Assignment",
                                    "src": "3009:228:40"
                                  }
                                ],
                                "id": 3982,
                                "name": "ExpressionStatement",
                                "src": "3009:228:40"
                              }
                            ],
                            "id": 3983,
                            "name": "IfStatement",
                            "src": "2893:344:40"
                          }
                        ],
                        "id": 3984,
                        "name": "Block",
                        "src": "2629:619:40"
                      }
                    ],
                    "id": 3985,
                    "name": "IfStatement",
                    "src": "1894:1354:40"
                  },
                  {
                    "attributes": {
                      "assignments": [
                        3987
                      ]
                    },
                    "children": [
                      {
                        "attributes": {
                          "constant": false,
                          "mutability": "mutable",
                          "name": "max",
                          "overrides": null,
                          "scope": 4106,
                          "stateVariable": false,
                          "storageLocation": "default",
                          "type": "bool",
                          "value": null,
                          "visibility": "internal"
                        },
                        "children": [
                          {
                            "attributes": {
                              "name": "bool",
                              "type": "bool"
                            },
                            "id": 3986,
                            "name": "ElementaryTypeName",
                            "src": "3258:4:40"
                          }
                        ],
                        "id": 3987,
                        "name": "VariableDeclaration",
                        "src": "3258:8:40"
                      },
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "commonType": {
                            "typeIdentifier": "t_uint160",
                            "typeString": "uint160"
                          },
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "operator": "==",
                          "type": "bool"
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 3857,
                              "type": "uint160",
                              "value": "sqrtRatioTargetX96"
                            },
                            "id": 3988,
                            "name": "Identifier",
                            "src": "3269:18:40"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 3866,
                              "type": "uint160",
                              "value": "sqrtRatioNextX96"
                            },
                            "id": 3989,
                            "name": "Identifier",
                            "src": "3291:16:40"
                          }
                        ],
                        "id": 3990,
                        "name": "BinaryOperation",
                        "src": "3269:38:40"
                      }
                    ],
                    "id": 3991,
                    "name": "VariableDeclarationStatement",
                    "src": "3258:49:40"
                  },
                  {
                    "children": [
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "overloadedDeclarations": [
                            null
                          ],
                          "referencedDeclaration": 3875,
                          "type": "bool",
                          "value": "zeroForOne"
                        },
                        "id": 3992,
                        "name": "Identifier",
                        "src": "3362:10:40"
                      },
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "operator": "=",
                                  "type": "uint256"
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "overloadedDeclarations": [
                                        null
                                      ],
                                      "referencedDeclaration": 3868,
                                      "type": "uint256",
                                      "value": "amountIn"
                                    },
                                    "id": 3993,
                                    "name": "Identifier",
                                    "src": "3388:8:40"
                                  },
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "type": "uint256"
                                    },
                                    "children": [
                                      {
                                        "attributes": {
                                          "argumentTypes": null,
                                          "commonType": {
                                            "typeIdentifier": "t_bool",
                                            "typeString": "bool"
                                          },
                                          "isConstant": false,
                                          "isLValue": false,
                                          "isPure": false,
                                          "lValueRequested": false,
                                          "operator": "&&",
                                          "type": "bool"
                                        },
                                        "children": [
                                          {
                                            "attributes": {
                                              "argumentTypes": null,
                                              "overloadedDeclarations": [
                                                null
                                              ],
                                              "referencedDeclaration": 3987,
                                              "type": "bool",
                                              "value": "max"
                                            },
                                            "id": 3994,
                                            "name": "Identifier",
                                            "src": "3399:3:40"
                                          },
                                          {
                                            "attributes": {
                                              "argumentTypes": null,
                                              "overloadedDeclarations": [
                                                null
                                              ],
                                              "referencedDeclaration": 3881,
                                              "type": "bool",
                                              "value": "exactIn"
                                            },
                                            "id": 3995,
                                            "name": "Identifier",
                                            "src": "3406:7:40"
                                          }
                                        ],
                                        "id": 3996,
                                        "name": "BinaryOperation",
                                        "src": "3399:14:40"
                                      },
                                      {
                                        "attributes": {
                                          "argumentTypes": null,
                                          "overloadedDeclarations": [
                                            null
                                          ],
                                          "referencedDeclaration": 3868,
                                          "type": "uint256",
                                          "value": "amountIn"
                                        },
                                        "id": 3997,
                                        "name": "Identifier",
                                        "src": "3432:8:40"
                                      },
                                      {
                                        "attributes": {
                                          "argumentTypes": null,
                                          "isConstant": false,
                                          "isLValue": false,
                                          "isPure": false,
                                          "isStructConstructorCall": false,
                                          "lValueRequested": false,
                                          "names": [
                                            null
                                          ],
                                          "tryCall": false,
                                          "type": "uint256",
                                          "type_conversion": false
                                        },
                                        "children": [
                                          {
                                            "attributes": {
                                              "argumentTypes": [
                                                {
                                                  "typeIdentifier": "t_uint160",
                                                  "typeString": "uint160"
                                                },
                                                {
                                                  "typeIdentifier": "t_uint160",
                                                  "typeString": "uint160"
                                                },
                                                {
                                                  "typeIdentifier": "t_uint128",
                                                  "typeString": "uint128"
                                                },
                                                {
                                                  "typeIdentifier": "t_bool",
                                                  "typeString": "bool"
                                                }
                                              ],
                                              "isConstant": false,
                                              "isLValue": false,
                                              "isPure": false,
                                              "lValueRequested": false,
                                              "member_name": "getAmount0Delta",
                                              "referencedDeclaration": 3714,
                                              "type": "function (uint160,uint160,uint128,bool) pure returns (uint256)"
                                            },
                                            "children": [
                                              {
                                                "attributes": {
                                                  "argumentTypes": null,
                                                  "overloadedDeclarations": [
                                                    null
                                                  ],
                                                  "referencedDeclaration": 3847,
                                                  "type": "type(library SqrtPriceMath)",
                                                  "value": "SqrtPriceMath"
                                                },
                                                "id": 3998,
                                                "name": "Identifier",
                                                "src": "3459:13:40"
                                              }
                                            ],
                                            "id": 3999,
                                            "name": "MemberAccess",
                                            "src": "3459:29:40"
                                          },
                                          {
                                            "attributes": {
                                              "argumentTypes": null,
                                              "overloadedDeclarations": [
                                                null
                                              ],
                                              "referencedDeclaration": 3866,
                                              "type": "uint160",
                                              "value": "sqrtRatioNextX96"
                                            },
                                            "id": 4000,
                                            "name": "Identifier",
                                            "src": "3489:16:40"
                                          },
                                          {
                                            "attributes": {
                                              "argumentTypes": null,
                                              "overloadedDeclarations": [
                                                null
                                              ],
                                              "referencedDeclaration": 3855,
                                              "type": "uint160",
                                              "value": "sqrtRatioCurrentX96"
                                            },
                                            "id": 4001,
                                            "name": "Identifier",
                                            "src": "3507:19:40"
                                          },
                                          {
                                            "attributes": {
                                              "argumentTypes": null,
                                              "overloadedDeclarations": [
                                                null
                                              ],
                                              "referencedDeclaration": 3859,
                                              "type": "uint128",
                                              "value": "liquidity"
                                            },
                                            "id": 4002,
                                            "name": "Identifier",
                                            "src": "3528:9:40"
                                          },
                                          {
                                            "attributes": {
                                              "argumentTypes": null,
                                              "hexvalue": "74727565",
                                              "isConstant": false,
                                              "isLValue": false,
                                              "isPure": true,
                                              "lValueRequested": false,
                                              "subdenomination": null,
                                              "token": "bool",
                                              "type": "bool",
                                              "value": "true"
                                            },
                                            "id": 4003,
                                            "name": "Literal",
                                            "src": "3539:4:40"
                                          }
                                        ],
                                        "id": 4004,
                                        "name": "FunctionCall",
                                        "src": "3459:85:40"
                                      }
                                    ],
                                    "id": 4005,
                                    "name": "Conditional",
                                    "src": "3399:145:40"
                                  }
                                ],
                                "id": 4006,
                                "name": "Assignment",
                                "src": "3388:156:40"
                              }
                            ],
                            "id": 4007,
                            "name": "ExpressionStatement",
                            "src": "3388:156:40"
                          },
                          {
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "operator": "=",
                                  "type": "uint256"
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "overloadedDeclarations": [
                                        null
                                      ],
                                      "referencedDeclaration": 3870,
                                      "type": "uint256",
                                      "value": "amountOut"
                                    },
                                    "id": 4008,
                                    "name": "Identifier",
                                    "src": "3558:9:40"
                                  },
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "type": "uint256"
                                    },
                                    "children": [
                                      {
                                        "attributes": {
                                          "argumentTypes": null,
                                          "commonType": {
                                            "typeIdentifier": "t_bool",
                                            "typeString": "bool"
                                          },
                                          "isConstant": false,
                                          "isLValue": false,
                                          "isPure": false,
                                          "lValueRequested": false,
                                          "operator": "&&",
                                          "type": "bool"
                                        },
                                        "children": [
                                          {
                                            "attributes": {
                                              "argumentTypes": null,
                                              "overloadedDeclarations": [
                                                null
                                              ],
                                              "referencedDeclaration": 3987,
                                              "type": "bool",
                                              "value": "max"
                                            },
                                            "id": 4009,
                                            "name": "Identifier",
                                            "src": "3570:3:40"
                                          },
                                          {
                                            "attributes": {
                                              "argumentTypes": null,
                                              "isConstant": false,
                                              "isLValue": false,
                                              "isPure": false,
                                              "lValueRequested": false,
                                              "operator": "!",
                                              "prefix": true,
                                              "type": "bool"
                                            },
                                            "children": [
                                              {
                                                "attributes": {
                                                  "argumentTypes": null,
                                                  "overloadedDeclarations": [
                                                    null
                                                  ],
                                                  "referencedDeclaration": 3881,
                                                  "type": "bool",
                                                  "value": "exactIn"
                                                },
                                                "id": 4010,
                                                "name": "Identifier",
                                                "src": "3578:7:40"
                                              }
                                            ],
                                            "id": 4011,
                                            "name": "UnaryOperation",
                                            "src": "3577:8:40"
                                          }
                                        ],
                                        "id": 4012,
                                        "name": "BinaryOperation",
                                        "src": "3570:15:40"
                                      },
                                      {
                                        "attributes": {
                                          "argumentTypes": null,
                                          "overloadedDeclarations": [
                                            null
                                          ],
                                          "referencedDeclaration": 3870,
                                          "type": "uint256",
                                          "value": "amountOut"
                                        },
                                        "id": 4013,
                                        "name": "Identifier",
                                        "src": "3604:9:40"
                                      },
                                      {
                                        "attributes": {
                                          "argumentTypes": null,
                                          "isConstant": false,
                                          "isLValue": false,
                                          "isPure": false,
                                          "isStructConstructorCall": false,
                                          "lValueRequested": false,
                                          "names": [
                                            null
                                          ],
                                          "tryCall": false,
                                          "type": "uint256",
                                          "type_conversion": false
                                        },
                                        "children": [
                                          {
                                            "attributes": {
                                              "argumentTypes": [
                                                {
                                                  "typeIdentifier": "t_uint160",
                                                  "typeString": "uint160"
                                                },
                                                {
                                                  "typeIdentifier": "t_uint160",
                                                  "typeString": "uint160"
                                                },
                                                {
                                                  "typeIdentifier": "t_uint128",
                                                  "typeString": "uint128"
                                                },
                                                {
                                                  "typeIdentifier": "t_bool",
                                                  "typeString": "bool"
                                                }
                                              ],
                                              "isConstant": false,
                                              "isLValue": false,
                                              "isPure": false,
                                              "lValueRequested": false,
                                              "member_name": "getAmount1Delta",
                                              "referencedDeclaration": 3762,
                                              "type": "function (uint160,uint160,uint128,bool) pure returns (uint256)"
                                            },
                                            "children": [
                                              {
                                                "attributes": {
                                                  "argumentTypes": null,
                                                  "overloadedDeclarations": [
                                                    null
                                                  ],
                                                  "referencedDeclaration": 3847,
                                                  "type": "type(library SqrtPriceMath)",
                                                  "value": "SqrtPriceMath"
                                                },
                                                "id": 4014,
                                                "name": "Identifier",
                                                "src": "3632:13:40"
                                              }
                                            ],
                                            "id": 4015,
                                            "name": "MemberAccess",
                                            "src": "3632:29:40"
                                          },
                                          {
                                            "attributes": {
                                              "argumentTypes": null,
                                              "overloadedDeclarations": [
                                                null
                                              ],
                                              "referencedDeclaration": 3866,
                                              "type": "uint160",
                                              "value": "sqrtRatioNextX96"
                                            },
                                            "id": 4016,
                                            "name": "Identifier",
                                            "src": "3662:16:40"
                                          },
                                          {
                                            "attributes": {
                                              "argumentTypes": null,
                                              "overloadedDeclarations": [
                                                null
                                              ],
                                              "referencedDeclaration": 3855,
                                              "type": "uint160",
                                              "value": "sqrtRatioCurrentX96"
                                            },
                                            "id": 4017,
                                            "name": "Identifier",
                                            "src": "3680:19:40"
                                          },
                                          {
                                            "attributes": {
                                              "argumentTypes": null,
                                              "overloadedDeclarations": [
                                                null
                                              ],
                                              "referencedDeclaration": 3859,
                                              "type": "uint128",
                                              "value": "liquidity"
                                            },
                                            "id": 4018,
                                            "name": "Identifier",
                                            "src": "3701:9:40"
                                          },
                                          {
                                            "attributes": {
                                              "argumentTypes": null,
                                              "hexvalue": "66616c7365",
                                              "isConstant": false,
                                              "isLValue": false,
                                              "isPure": true,
                                              "lValueRequested": false,
                                              "subdenomination": null,
                                              "token": "bool",
                                              "type": "bool",
                                              "value": "false"
                                            },
                                            "id": 4019,
                                            "name": "Literal",
                                            "src": "3712:5:40"
                                          }
                                        ],
                                        "id": 4020,
                                        "name": "FunctionCall",
                                        "src": "3632:86:40"
                                      }
                                    ],
                                    "id": 4021,
                                    "name": "Conditional",
                                    "src": "3570:148:40"
                                  }
                                ],
                                "id": 4022,
                                "name": "Assignment",
                                "src": "3558:160:40"
                              }
                            ],
                            "id": 4023,
                            "name": "ExpressionStatement",
                            "src": "3558:160:40"
                          }
                        ],
                        "id": 4024,
                        "name": "Block",
                        "src": "3374:355:40"
                      },
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "operator": "=",
                                  "type": "uint256"
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "overloadedDeclarations": [
                                        null
                                      ],
                                      "referencedDeclaration": 3868,
                                      "type": "uint256",
                                      "value": "amountIn"
                                    },
                                    "id": 4025,
                                    "name": "Identifier",
                                    "src": "3749:8:40"
                                  },
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "type": "uint256"
                                    },
                                    "children": [
                                      {
                                        "attributes": {
                                          "argumentTypes": null,
                                          "commonType": {
                                            "typeIdentifier": "t_bool",
                                            "typeString": "bool"
                                          },
                                          "isConstant": false,
                                          "isLValue": false,
                                          "isPure": false,
                                          "lValueRequested": false,
                                          "operator": "&&",
                                          "type": "bool"
                                        },
                                        "children": [
                                          {
                                            "attributes": {
                                              "argumentTypes": null,
                                              "overloadedDeclarations": [
                                                null
                                              ],
                                              "referencedDeclaration": 3987,
                                              "type": "bool",
                                              "value": "max"
                                            },
                                            "id": 4026,
                                            "name": "Identifier",
                                            "src": "3760:3:40"
                                          },
                                          {
                                            "attributes": {
                                              "argumentTypes": null,
                                              "overloadedDeclarations": [
                                                null
                                              ],
                                              "referencedDeclaration": 3881,
                                              "type": "bool",
                                              "value": "exactIn"
                                            },
                                            "id": 4027,
                                            "name": "Identifier",
                                            "src": "3767:7:40"
                                          }
                                        ],
                                        "id": 4028,
                                        "name": "BinaryOperation",
                                        "src": "3760:14:40"
                                      },
                                      {
                                        "attributes": {
                                          "argumentTypes": null,
                                          "overloadedDeclarations": [
                                            null
                                          ],
                                          "referencedDeclaration": 3868,
                                          "type": "uint256",
                                          "value": "amountIn"
                                        },
                                        "id": 4029,
                                        "name": "Identifier",
                                        "src": "3793:8:40"
                                      },
                                      {
                                        "attributes": {
                                          "argumentTypes": null,
                                          "isConstant": false,
                                          "isLValue": false,
                                          "isPure": false,
                                          "isStructConstructorCall": false,
                                          "lValueRequested": false,
                                          "names": [
                                            null
                                          ],
                                          "tryCall": false,
                                          "type": "uint256",
                                          "type_conversion": false
                                        },
                                        "children": [
                                          {
                                            "attributes": {
                                              "argumentTypes": [
                                                {
                                                  "typeIdentifier": "t_uint160",
                                                  "typeString": "uint160"
                                                },
                                                {
                                                  "typeIdentifier": "t_uint160",
                                                  "typeString": "uint160"
                                                },
                                                {
                                                  "typeIdentifier": "t_uint128",
                                                  "typeString": "uint128"
                                                },
                                                {
                                                  "typeIdentifier": "t_bool",
                                                  "typeString": "bool"
                                                }
                                              ],
                                              "isConstant": false,
                                              "isLValue": false,
                                              "isPure": false,
                                              "lValueRequested": false,
                                              "member_name": "getAmount1Delta",
                                              "referencedDeclaration": 3762,
                                              "type": "function (uint160,uint160,uint128,bool) pure returns (uint256)"
                                            },
                                            "children": [
                                              {
                                                "attributes": {
                                                  "argumentTypes": null,
                                                  "overloadedDeclarations": [
                                                    null
                                                  ],
                                                  "referencedDeclaration": 3847,
                                                  "type": "type(library SqrtPriceMath)",
                                                  "value": "SqrtPriceMath"
                                                },
                                                "id": 4030,
                                                "name": "Identifier",
                                                "src": "3820:13:40"
                                              }
                                            ],
                                            "id": 4031,
                                            "name": "MemberAccess",
                                            "src": "3820:29:40"
                                          },
                                          {
                                            "attributes": {
                                              "argumentTypes": null,
                                              "overloadedDeclarations": [
                                                null
                                              ],
                                              "referencedDeclaration": 3855,
                                              "type": "uint160",
                                              "value": "sqrtRatioCurrentX96"
                                            },
                                            "id": 4032,
                                            "name": "Identifier",
                                            "src": "3850:19:40"
                                          },
                                          {
                                            "attributes": {
                                              "argumentTypes": null,
                                              "overloadedDeclarations": [
                                                null
                                              ],
                                              "referencedDeclaration": 3866,
                                              "type": "uint160",
                                              "value": "sqrtRatioNextX96"
                                            },
                                            "id": 4033,
                                            "name": "Identifier",
                                            "src": "3871:16:40"
                                          },
                                          {
                                            "attributes": {
                                              "argumentTypes": null,
                                              "overloadedDeclarations": [
                                                null
                                              ],
                                              "referencedDeclaration": 3859,
                                              "type": "uint128",
                                              "value": "liquidity"
                                            },
                                            "id": 4034,
                                            "name": "Identifier",
                                            "src": "3889:9:40"
                                          },
                                          {
                                            "attributes": {
                                              "argumentTypes": null,
                                              "hexvalue": "74727565",
                                              "isConstant": false,
                                              "isLValue": false,
                                              "isPure": true,
                                              "lValueRequested": false,
                                              "subdenomination": null,
                                              "token": "bool",
                                              "type": "bool",
                                              "value": "true"
                                            },
                                            "id": 4035,
                                            "name": "Literal",
                                            "src": "3900:4:40"
                                          }
                                        ],
                                        "id": 4036,
                                        "name": "FunctionCall",
                                        "src": "3820:85:40"
                                      }
                                    ],
                                    "id": 4037,
                                    "name": "Conditional",
                                    "src": "3760:145:40"
                                  }
                                ],
                                "id": 4038,
                                "name": "Assignment",
                                "src": "3749:156:40"
                              }
                            ],
                            "id": 4039,
                            "name": "ExpressionStatement",
                            "src": "3749:156:40"
                          },
                          {
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "operator": "=",
                                  "type": "uint256"
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "overloadedDeclarations": [
                                        null
                                      ],
                                      "referencedDeclaration": 3870,
                                      "type": "uint256",
                                      "value": "amountOut"
                                    },
                                    "id": 4040,
                                    "name": "Identifier",
                                    "src": "3919:9:40"
                                  },
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "type": "uint256"
                                    },
                                    "children": [
                                      {
                                        "attributes": {
                                          "argumentTypes": null,
                                          "commonType": {
                                            "typeIdentifier": "t_bool",
                                            "typeString": "bool"
                                          },
                                          "isConstant": false,
                                          "isLValue": false,
                                          "isPure": false,
                                          "lValueRequested": false,
                                          "operator": "&&",
                                          "type": "bool"
                                        },
                                        "children": [
                                          {
                                            "attributes": {
                                              "argumentTypes": null,
                                              "overloadedDeclarations": [
                                                null
                                              ],
                                              "referencedDeclaration": 3987,
                                              "type": "bool",
                                              "value": "max"
                                            },
                                            "id": 4041,
                                            "name": "Identifier",
                                            "src": "3931:3:40"
                                          },
                                          {
                                            "attributes": {
                                              "argumentTypes": null,
                                              "isConstant": false,
                                              "isLValue": false,
                                              "isPure": false,
                                              "lValueRequested": false,
                                              "operator": "!",
                                              "prefix": true,
                                              "type": "bool"
                                            },
                                            "children": [
                                              {
                                                "attributes": {
                                                  "argumentTypes": null,
                                                  "overloadedDeclarations": [
                                                    null
                                                  ],
                                                  "referencedDeclaration": 3881,
                                                  "type": "bool",
                                                  "value": "exactIn"
                                                },
                                                "id": 4042,
                                                "name": "Identifier",
                                                "src": "3939:7:40"
                                              }
                                            ],
                                            "id": 4043,
                                            "name": "UnaryOperation",
                                            "src": "3938:8:40"
                                          }
                                        ],
                                        "id": 4044,
                                        "name": "BinaryOperation",
                                        "src": "3931:15:40"
                                      },
                                      {
                                        "attributes": {
                                          "argumentTypes": null,
                                          "overloadedDeclarations": [
                                            null
                                          ],
                                          "referencedDeclaration": 3870,
                                          "type": "uint256",
                                          "value": "amountOut"
                                        },
                                        "id": 4045,
                                        "name": "Identifier",
                                        "src": "3965:9:40"
                                      },
                                      {
                                        "attributes": {
                                          "argumentTypes": null,
                                          "isConstant": false,
                                          "isLValue": false,
                                          "isPure": false,
                                          "isStructConstructorCall": false,
                                          "lValueRequested": false,
                                          "names": [
                                            null
                                          ],
                                          "tryCall": false,
                                          "type": "uint256",
                                          "type_conversion": false
                                        },
                                        "children": [
                                          {
                                            "attributes": {
                                              "argumentTypes": [
                                                {
                                                  "typeIdentifier": "t_uint160",
                                                  "typeString": "uint160"
                                                },
                                                {
                                                  "typeIdentifier": "t_uint160",
                                                  "typeString": "uint160"
                                                },
                                                {
                                                  "typeIdentifier": "t_uint128",
                                                  "typeString": "uint128"
                                                },
                                                {
                                                  "typeIdentifier": "t_bool",
                                                  "typeString": "bool"
                                                }
                                              ],
                                              "isConstant": false,
                                              "isLValue": false,
                                              "isPure": false,
                                              "lValueRequested": false,
                                              "member_name": "getAmount0Delta",
                                              "referencedDeclaration": 3714,
                                              "type": "function (uint160,uint160,uint128,bool) pure returns (uint256)"
                                            },
                                            "children": [
                                              {
                                                "attributes": {
                                                  "argumentTypes": null,
                                                  "overloadedDeclarations": [
                                                    null
                                                  ],
                                                  "referencedDeclaration": 3847,
                                                  "type": "type(library SqrtPriceMath)",
                                                  "value": "SqrtPriceMath"
                                                },
                                                "id": 4046,
                                                "name": "Identifier",
                                                "src": "3993:13:40"
                                              }
                                            ],
                                            "id": 4047,
                                            "name": "MemberAccess",
                                            "src": "3993:29:40"
                                          },
                                          {
                                            "attributes": {
                                              "argumentTypes": null,
                                              "overloadedDeclarations": [
                                                null
                                              ],
                                              "referencedDeclaration": 3855,
                                              "type": "uint160",
                                              "value": "sqrtRatioCurrentX96"
                                            },
                                            "id": 4048,
                                            "name": "Identifier",
                                            "src": "4023:19:40"
                                          },
                                          {
                                            "attributes": {
                                              "argumentTypes": null,
                                              "overloadedDeclarations": [
                                                null
                                              ],
                                              "referencedDeclaration": 3866,
                                              "type": "uint160",
                                              "value": "sqrtRatioNextX96"
                                            },
                                            "id": 4049,
                                            "name": "Identifier",
                                            "src": "4044:16:40"
                                          },
                                          {
                                            "attributes": {
                                              "argumentTypes": null,
                                              "overloadedDeclarations": [
                                                null
                                              ],
                                              "referencedDeclaration": 3859,
                                              "type": "uint128",
                                              "value": "liquidity"
                                            },
                                            "id": 4050,
                                            "name": "Identifier",
                                            "src": "4062:9:40"
                                          },
                                          {
                                            "attributes": {
                                              "argumentTypes": null,
                                              "hexvalue": "66616c7365",
                                              "isConstant": false,
                                              "isLValue": false,
                                              "isPure": true,
                                              "lValueRequested": false,
                                              "subdenomination": null,
                                              "token": "bool",
                                              "type": "bool",
                                              "value": "false"
                                            },
                                            "id": 4051,
                                            "name": "Literal",
                                            "src": "4073:5:40"
                                          }
                                        ],
                                        "id": 4052,
                                        "name": "FunctionCall",
                                        "src": "3993:86:40"
                                      }
                                    ],
                                    "id": 4053,
                                    "name": "Conditional",
                                    "src": "3931:148:40"
                                  }
                                ],
                                "id": 4054,
                                "name": "Assignment",
                                "src": "3919:160:40"
                              }
                            ],
                            "id": 4055,
                            "name": "ExpressionStatement",
                            "src": "3919:160:40"
                          }
                        ],
                        "id": 4056,
                        "name": "Block",
                        "src": "3735:355:40"
                      }
                    ],
                    "id": 4057,
                    "name": "IfStatement",
                    "src": "3358:732:40"
                  },
                  {
                    "attributes": {
                      "falseBody": null
                    },
                    "children": [
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "commonType": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          },
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "operator": "&&",
                          "type": "bool"
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "operator": "!",
                              "prefix": true,
                              "type": "bool"
                            },
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "overloadedDeclarations": [
                                    null
                                  ],
                                  "referencedDeclaration": 3881,
                                  "type": "bool",
                                  "value": "exactIn"
                                },
                                "id": 4058,
                                "name": "Identifier",
                                "src": "4180:7:40"
                              }
                            ],
                            "id": 4059,
                            "name": "UnaryOperation",
                            "src": "4179:8:40"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "operator": ">",
                              "type": "bool"
                            },
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "overloadedDeclarations": [
                                    null
                                  ],
                                  "referencedDeclaration": 3870,
                                  "type": "uint256",
                                  "value": "amountOut"
                                },
                                "id": 4060,
                                "name": "Identifier",
                                "src": "4191:9:40"
                              },
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "isStructConstructorCall": false,
                                  "lValueRequested": false,
                                  "names": [
                                    null
                                  ],
                                  "tryCall": false,
                                  "type": "uint256",
                                  "type_conversion": true
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "argumentTypes": [
                                        {
                                          "typeIdentifier": "t_int256",
                                          "typeString": "int256"
                                        }
                                      ],
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": true,
                                      "lValueRequested": false,
                                      "type": "type(uint256)"
                                    },
                                    "children": [
                                      {
                                        "attributes": {
                                          "name": "uint256",
                                          "type": null
                                        },
                                        "id": 4061,
                                        "name": "ElementaryTypeName",
                                        "src": "4203:7:40"
                                      }
                                    ],
                                    "id": 4062,
                                    "name": "ElementaryTypeNameExpression",
                                    "src": "4203:7:40"
                                  },
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "operator": "-",
                                      "prefix": true,
                                      "type": "int256"
                                    },
                                    "children": [
                                      {
                                        "attributes": {
                                          "argumentTypes": null,
                                          "overloadedDeclarations": [
                                            null
                                          ],
                                          "referencedDeclaration": 3861,
                                          "type": "int256",
                                          "value": "amountRemaining"
                                        },
                                        "id": 4063,
                                        "name": "Identifier",
                                        "src": "4212:15:40"
                                      }
                                    ],
                                    "id": 4064,
                                    "name": "UnaryOperation",
                                    "src": "4211:16:40"
                                  }
                                ],
                                "id": 4065,
                                "name": "FunctionCall",
                                "src": "4203:25:40"
                              }
                            ],
                            "id": 4066,
                            "name": "BinaryOperation",
                            "src": "4191:37:40"
                          }
                        ],
                        "id": 4067,
                        "name": "BinaryOperation",
                        "src": "4179:49:40"
                      },
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "operator": "=",
                                  "type": "uint256"
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "overloadedDeclarations": [
                                        null
                                      ],
                                      "referencedDeclaration": 3870,
                                      "type": "uint256",
                                      "value": "amountOut"
                                    },
                                    "id": 4068,
                                    "name": "Identifier",
                                    "src": "4244:9:40"
                                  },
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "isStructConstructorCall": false,
                                      "lValueRequested": false,
                                      "names": [
                                        null
                                      ],
                                      "tryCall": false,
                                      "type": "uint256",
                                      "type_conversion": true
                                    },
                                    "children": [
                                      {
                                        "attributes": {
                                          "argumentTypes": [
                                            {
                                              "typeIdentifier": "t_int256",
                                              "typeString": "int256"
                                            }
                                          ],
                                          "isConstant": false,
                                          "isLValue": false,
                                          "isPure": true,
                                          "lValueRequested": false,
                                          "type": "type(uint256)"
                                        },
                                        "children": [
                                          {
                                            "attributes": {
                                              "name": "uint256",
                                              "type": null
                                            },
                                            "id": 4069,
                                            "name": "ElementaryTypeName",
                                            "src": "4256:7:40"
                                          }
                                        ],
                                        "id": 4070,
                                        "name": "ElementaryTypeNameExpression",
                                        "src": "4256:7:40"
                                      },
                                      {
                                        "attributes": {
                                          "argumentTypes": null,
                                          "isConstant": false,
                                          "isLValue": false,
                                          "isPure": false,
                                          "lValueRequested": false,
                                          "operator": "-",
                                          "prefix": true,
                                          "type": "int256"
                                        },
                                        "children": [
                                          {
                                            "attributes": {
                                              "argumentTypes": null,
                                              "overloadedDeclarations": [
                                                null
                                              ],
                                              "referencedDeclaration": 3861,
                                              "type": "int256",
                                              "value": "amountRemaining"
                                            },
                                            "id": 4071,
                                            "name": "Identifier",
                                            "src": "4265:15:40"
                                          }
                                        ],
                                        "id": 4072,
                                        "name": "UnaryOperation",
                                        "src": "4264:16:40"
                                      }
                                    ],
                                    "id": 4073,
                                    "name": "FunctionCall",
                                    "src": "4256:25:40"
                                  }
                                ],
                                "id": 4074,
                                "name": "Assignment",
                                "src": "4244:37:40"
                              }
                            ],
                            "id": 4075,
                            "name": "ExpressionStatement",
                            "src": "4244:37:40"
                          }
                        ],
                        "id": 4076,
                        "name": "Block",
                        "src": "4230:62:40"
                      }
                    ],
                    "id": 4077,
                    "name": "IfStatement",
                    "src": "4175:117:40"
                  },
                  {
                    "children": [
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "commonType": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          },
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "operator": "&&",
                          "type": "bool"
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 3881,
                              "type": "bool",
                              "value": "exactIn"
                            },
                            "id": 4078,
                            "name": "Identifier",
                            "src": "4306:7:40"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "commonType": {
                                "typeIdentifier": "t_uint160",
                                "typeString": "uint160"
                              },
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "operator": "!=",
                              "type": "bool"
                            },
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "overloadedDeclarations": [
                                    null
                                  ],
                                  "referencedDeclaration": 3866,
                                  "type": "uint160",
                                  "value": "sqrtRatioNextX96"
                                },
                                "id": 4079,
                                "name": "Identifier",
                                "src": "4317:16:40"
                              },
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "overloadedDeclarations": [
                                    null
                                  ],
                                  "referencedDeclaration": 3857,
                                  "type": "uint160",
                                  "value": "sqrtRatioTargetX96"
                                },
                                "id": 4080,
                                "name": "Identifier",
                                "src": "4337:18:40"
                              }
                            ],
                            "id": 4081,
                            "name": "BinaryOperation",
                            "src": "4317:38:40"
                          }
                        ],
                        "id": 4082,
                        "name": "BinaryOperation",
                        "src": "4306:49:40"
                      },
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "operator": "=",
                                  "type": "uint256"
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "overloadedDeclarations": [
                                        null
                                      ],
                                      "referencedDeclaration": 3872,
                                      "type": "uint256",
                                      "value": "feeAmount"
                                    },
                                    "id": 4083,
                                    "name": "Identifier",
                                    "src": "4464:9:40"
                                  },
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "commonType": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      },
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "operator": "-",
                                      "type": "uint256"
                                    },
                                    "children": [
                                      {
                                        "attributes": {
                                          "argumentTypes": null,
                                          "isConstant": false,
                                          "isLValue": false,
                                          "isPure": false,
                                          "isStructConstructorCall": false,
                                          "lValueRequested": false,
                                          "names": [
                                            null
                                          ],
                                          "tryCall": false,
                                          "type": "uint256",
                                          "type_conversion": true
                                        },
                                        "children": [
                                          {
                                            "attributes": {
                                              "argumentTypes": [
                                                {
                                                  "typeIdentifier": "t_int256",
                                                  "typeString": "int256"
                                                }
                                              ],
                                              "isConstant": false,
                                              "isLValue": false,
                                              "isPure": true,
                                              "lValueRequested": false,
                                              "type": "type(uint256)"
                                            },
                                            "children": [
                                              {
                                                "attributes": {
                                                  "name": "uint256",
                                                  "type": null
                                                },
                                                "id": 4084,
                                                "name": "ElementaryTypeName",
                                                "src": "4476:7:40"
                                              }
                                            ],
                                            "id": 4085,
                                            "name": "ElementaryTypeNameExpression",
                                            "src": "4476:7:40"
                                          },
                                          {
                                            "attributes": {
                                              "argumentTypes": null,
                                              "overloadedDeclarations": [
                                                null
                                              ],
                                              "referencedDeclaration": 3861,
                                              "type": "int256",
                                              "value": "amountRemaining"
                                            },
                                            "id": 4086,
                                            "name": "Identifier",
                                            "src": "4484:15:40"
                                          }
                                        ],
                                        "id": 4087,
                                        "name": "FunctionCall",
                                        "src": "4476:24:40"
                                      },
                                      {
                                        "attributes": {
                                          "argumentTypes": null,
                                          "overloadedDeclarations": [
                                            null
                                          ],
                                          "referencedDeclaration": 3868,
                                          "type": "uint256",
                                          "value": "amountIn"
                                        },
                                        "id": 4088,
                                        "name": "Identifier",
                                        "src": "4503:8:40"
                                      }
                                    ],
                                    "id": 4089,
                                    "name": "BinaryOperation",
                                    "src": "4476:35:40"
                                  }
                                ],
                                "id": 4090,
                                "name": "Assignment",
                                "src": "4464:47:40"
                              }
                            ],
                            "id": 4091,
                            "name": "ExpressionStatement",
                            "src": "4464:47:40"
                          }
                        ],
                        "id": 4092,
                        "name": "Block",
                        "src": "4357:165:40"
                      },
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "operator": "=",
                                  "type": "uint256"
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "overloadedDeclarations": [
                                        null
                                      ],
                                      "referencedDeclaration": 3872,
                                      "type": "uint256",
                                      "value": "feeAmount"
                                    },
                                    "id": 4093,
                                    "name": "Identifier",
                                    "src": "4542:9:40"
                                  },
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "isStructConstructorCall": false,
                                      "lValueRequested": false,
                                      "names": [
                                        null
                                      ],
                                      "tryCall": false,
                                      "type": "uint256",
                                      "type_conversion": false
                                    },
                                    "children": [
                                      {
                                        "attributes": {
                                          "argumentTypes": [
                                            {
                                              "typeIdentifier": "t_uint256",
                                              "typeString": "uint256"
                                            },
                                            {
                                              "typeIdentifier": "t_uint24",
                                              "typeString": "uint24"
                                            },
                                            {
                                              "typeIdentifier": "t_uint24",
                                              "typeString": "uint24"
                                            }
                                          ],
                                          "isConstant": false,
                                          "isLValue": false,
                                          "isPure": false,
                                          "lValueRequested": false,
                                          "member_name": "mulDivRoundingUp",
                                          "referencedDeclaration": 2344,
                                          "type": "function (uint256,uint256,uint256) pure returns (uint256)"
                                        },
                                        "children": [
                                          {
                                            "attributes": {
                                              "argumentTypes": null,
                                              "overloadedDeclarations": [
                                                null
                                              ],
                                              "referencedDeclaration": 2345,
                                              "type": "type(library FullMath)",
                                              "value": "FullMath"
                                            },
                                            "id": 4094,
                                            "name": "Identifier",
                                            "src": "4554:8:40"
                                          }
                                        ],
                                        "id": 4095,
                                        "name": "MemberAccess",
                                        "src": "4554:25:40"
                                      },
                                      {
                                        "attributes": {
                                          "argumentTypes": null,
                                          "overloadedDeclarations": [
                                            null
                                          ],
                                          "referencedDeclaration": 3868,
                                          "type": "uint256",
                                          "value": "amountIn"
                                        },
                                        "id": 4096,
                                        "name": "Identifier",
                                        "src": "4580:8:40"
                                      },
                                      {
                                        "attributes": {
                                          "argumentTypes": null,
                                          "overloadedDeclarations": [
                                            null
                                          ],
                                          "referencedDeclaration": 3863,
                                          "type": "uint24",
                                          "value": "feePips"
                                        },
                                        "id": 4097,
                                        "name": "Identifier",
                                        "src": "4590:7:40"
                                      },
                                      {
                                        "attributes": {
                                          "argumentTypes": null,
                                          "commonType": {
                                            "typeIdentifier": "t_uint24",
                                            "typeString": "uint24"
                                          },
                                          "isConstant": false,
                                          "isLValue": false,
                                          "isPure": false,
                                          "lValueRequested": false,
                                          "operator": "-",
                                          "type": "uint24"
                                        },
                                        "children": [
                                          {
                                            "attributes": {
                                              "argumentTypes": null,
                                              "hexvalue": "316536",
                                              "isConstant": false,
                                              "isLValue": false,
                                              "isPure": true,
                                              "lValueRequested": false,
                                              "subdenomination": null,
                                              "token": "number",
                                              "type": "int_const 1000000",
                                              "value": "1e6"
                                            },
                                            "id": 4098,
                                            "name": "Literal",
                                            "src": "4599:3:40"
                                          },
                                          {
                                            "attributes": {
                                              "argumentTypes": null,
                                              "overloadedDeclarations": [
                                                null
                                              ],
                                              "referencedDeclaration": 3863,
                                              "type": "uint24",
                                              "value": "feePips"
                                            },
                                            "id": 4099,
                                            "name": "Identifier",
                                            "src": "4605:7:40"
                                          }
                                        ],
                                        "id": 4100,
                                        "name": "BinaryOperation",
                                        "src": "4599:13:40"
                                      }
                                    ],
                                    "id": 4101,
                                    "name": "FunctionCall",
                                    "src": "4554:59:40"
                                  }
                                ],
                                "id": 4102,
                                "name": "Assignment",
                                "src": "4542:71:40"
                              }
                            ],
                            "id": 4103,
                            "name": "ExpressionStatement",
                            "src": "4542:71:40"
                          }
                        ],
                        "id": 4104,
                        "name": "Block",
                        "src": "4528:96:40"
                      }
                    ],
                    "id": 4105,
                    "name": "IfStatement",
                    "src": "4302:322:40"
                  }
                ],
                "id": 4106,
                "name": "Block",
                "src": "1769:2861:40"
              }
            ],
            "id": 4107,
            "name": "FunctionDefinition",
            "src": "1391:3239:40"
          }
        ],
        "id": 4108,
        "name": "ContractDefinition",
        "src": "292:4340:40"
      }
    ],
    "id": 4109,
    "name": "SourceUnit",
    "src": "37:4596:40"
  },
  "compiler": {
    "name": "solc",
    "version": "0.6.8+commit.0bbfe453.Emscripten.clang"
  },
  "networks": {},
  "schemaVersion": "3.4.16",
  "updatedAt": "2025-02-07T17:50:42.799Z",
  "devdoc": {
    "methods": {},
    "title": "Computes the result of a swap within ticks"
  },
  "userdoc": {
    "methods": {},
    "notice": "Contains methods for computing the result of a swap within a single tick price range, i.e., a single tick."
  }
}