{
  "contractName": "CarefulMath",
  "abi": [],
  "metadata": "{\"compiler\":{\"version\":\"0.5.12+commit.7709ece9\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"author\":\"Compound\",\"methods\":{},\"title\":\"Careful Math\"},\"userdoc\":{\"methods\":{},\"notice\":\"Derived from OpenZeppelin's SafeMath library        https://github.com/OpenZeppelin/openzeppelin-solidity/blob/master/contracts/math/SafeMath.sol\"}},\"settings\":{\"compilationTarget\":{\"/home/runner/work/rtoken-contracts/rtoken-contracts/packages/contracts/compound/contracts/CarefulMath.sol\":\"CarefulMath\"},\"evmVersion\":\"petersburg\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/runner/work/rtoken-contracts/rtoken-contracts/packages/contracts/compound/contracts/CarefulMath.sol\":{\"keccak256\":\"0xbeb605bfb980199c42701b9557bcffffa3a845c6386adfc6130568d9f3f38495\",\"urls\":[\"bzz-raw://6595932dbb88fb67d81694ab43f9dd42124e3db91d3b29d8c226577c1a96481a\",\"dweb:/ipfs/Qmb66bD8XPmJBH1eShryFwWUAWEyAx4uHzDdLQs1mZMVTe\"]}},\"version\":1}",
  "bytecode": "0x6080604052348015600f57600080fd5b50603e80601d6000396000f3fe6080604052600080fdfea265627a7a7231582090f1302498d87bb1f8893f14fbe47d232f07bdf64903fad955fe4faa57cc452864736f6c634300050c0032",
  "deployedBytecode": "0x6080604052600080fdfea265627a7a7231582090f1302498d87bb1f8893f14fbe47d232f07bdf64903fad955fe4faa57cc452864736f6c634300050c0032",
  "sourceMap": "242:1967:3:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;242:1967:3;;;;;;;",
  "deployedSourceMap": "242:1967:3:-;;;;;",
  "source": "pragma solidity ^0.5.8;\n\n/**\n  * @title Careful Math\n  * @author Compound\n  * @notice Derived from OpenZeppelin's SafeMath library\n  *         https://github.com/OpenZeppelin/openzeppelin-solidity/blob/master/contracts/math/SafeMath.sol\n  */\ncontract CarefulMath {\n    /**\n     * @dev Possible error codes that we can return\n     */\n    enum MathError {NO_ERROR, DIVISION_BY_ZERO, INTEGER_OVERFLOW, INTEGER_UNDERFLOW}\n\n    /**\n    * @dev Multiplies two numbers, returns an error on overflow.\n    */\n    function mulUInt(uint256 a, uint256 b) internal pure returns (MathError, uint256) {\n        if (a == 0) {\n            return (MathError.NO_ERROR, 0);\n        }\n\n        uint256 c = a * b;\n\n        if (c / a != b) {\n            return (MathError.INTEGER_OVERFLOW, 0);\n        } else {\n            return (MathError.NO_ERROR, c);\n        }\n    }\n\n    /**\n    * @dev Integer division of two numbers, truncating the quotient.\n    */\n    function divUInt(uint256 a, uint256 b) internal pure returns (MathError, uint256) {\n        if (b == 0) {\n            return (MathError.DIVISION_BY_ZERO, 0);\n        }\n\n        return (MathError.NO_ERROR, a / b);\n    }\n\n    /**\n    * @dev Subtracts two numbers, returns an error on overflow (i.e. if subtrahend is greater than minuend).\n    */\n    function subUInt(uint256 a, uint256 b) internal pure returns (MathError, uint256) {\n        if (b <= a) {\n            return (MathError.NO_ERROR, a - b);\n        } else {\n            return (MathError.INTEGER_UNDERFLOW, 0);\n        }\n    }\n\n    /**\n    * @dev Adds two numbers, returns an error on overflow.\n    */\n    function addUInt(uint256 a, uint256 b) internal pure returns (MathError, uint256) {\n        uint256 c = a + b;\n\n        if (c >= a) {\n            return (MathError.NO_ERROR, c);\n        } else {\n            return (MathError.INTEGER_OVERFLOW, 0);\n        }\n    }\n\n    /**\n    * @dev add a and b and then subtract c\n    */\n    function addThenSubUInt(uint256 a, uint256 b, uint256 c) internal pure returns (MathError, uint256) {\n        (MathError err0, uint256 sum) = addUInt(a, b);\n\n        if (err0 != MathError.NO_ERROR) {\n            return (err0, 0);\n        }\n\n        return subUInt(sum, c);\n    }\n}\n",
  "sourcePath": "/home/runner/work/rtoken-contracts/rtoken-contracts/packages/contracts/compound/contracts/CarefulMath.sol",
  "ast": {
    "absolutePath": "/home/runner/work/rtoken-contracts/rtoken-contracts/packages/contracts/compound/contracts/CarefulMath.sol",
    "exportedSymbols": {
      "CarefulMath": [
        4607
      ]
    },
    "id": 4608,
    "nodeType": "SourceUnit",
    "nodes": [
      {
        "id": 4424,
        "literals": [
          "solidity",
          "^",
          "0.5",
          ".8"
        ],
        "nodeType": "PragmaDirective",
        "src": "0:23:3"
      },
      {
        "baseContracts": [],
        "contractDependencies": [],
        "contractKind": "contract",
        "documentation": "@title Careful Math\n@author Compound\n@notice Derived from OpenZeppelin's SafeMath library\n        https://github.com/OpenZeppelin/openzeppelin-solidity/blob/master/contracts/math/SafeMath.sol",
        "fullyImplemented": true,
        "id": 4607,
        "linearizedBaseContracts": [
          4607
        ],
        "name": "CarefulMath",
        "nodeType": "ContractDefinition",
        "nodes": [
          {
            "canonicalName": "CarefulMath.MathError",
            "id": 4429,
            "members": [
              {
                "id": 4425,
                "name": "NO_ERROR",
                "nodeType": "EnumValue",
                "src": "353:8:3"
              },
              {
                "id": 4426,
                "name": "DIVISION_BY_ZERO",
                "nodeType": "EnumValue",
                "src": "363:16:3"
              },
              {
                "id": 4427,
                "name": "INTEGER_OVERFLOW",
                "nodeType": "EnumValue",
                "src": "381:16:3"
              },
              {
                "id": 4428,
                "name": "INTEGER_UNDERFLOW",
                "nodeType": "EnumValue",
                "src": "399:17:3"
              }
            ],
            "name": "MathError",
            "nodeType": "EnumDefinition",
            "src": "337:80:3"
          },
          {
            "body": {
              "id": 4474,
              "nodeType": "Block",
              "src": "585:261:3",
              "statements": [
                {
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 4442,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "id": 4440,
                      "name": "a",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 4431,
                      "src": "599:1:3",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "==",
                    "rightExpression": {
                      "argumentTypes": null,
                      "hexValue": "30",
                      "id": 4441,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "number",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "604:1:3",
                      "subdenomination": null,
                      "typeDescriptions": {
                        "typeIdentifier": "t_rational_0_by_1",
                        "typeString": "int_const 0"
                      },
                      "value": "0"
                    },
                    "src": "599:6:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "falseBody": null,
                  "id": 4449,
                  "nodeType": "IfStatement",
                  "src": "595:67:3",
                  "trueBody": {
                    "id": 4448,
                    "nodeType": "Block",
                    "src": "607:55:3",
                    "statements": [
                      {
                        "expression": {
                          "argumentTypes": null,
                          "components": [
                            {
                              "argumentTypes": null,
                              "expression": {
                                "argumentTypes": null,
                                "id": 4443,
                                "name": "MathError",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 4429,
                                "src": "629:9:3",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_enum$_MathError_$4429_$",
                                  "typeString": "type(enum CarefulMath.MathError)"
                                }
                              },
                              "id": 4444,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "memberName": "NO_ERROR",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": null,
                              "src": "629:18:3",
                              "typeDescriptions": {
                                "typeIdentifier": "t_enum$_MathError_$4429",
                                "typeString": "enum CarefulMath.MathError"
                              }
                            },
                            {
                              "argumentTypes": null,
                              "hexValue": "30",
                              "id": 4445,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "number",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "649:1:3",
                              "subdenomination": null,
                              "typeDescriptions": {
                                "typeIdentifier": "t_rational_0_by_1",
                                "typeString": "int_const 0"
                              },
                              "value": "0"
                            }
                          ],
                          "id": 4446,
                          "isConstant": false,
                          "isInlineArray": false,
                          "isLValue": false,
                          "isPure": true,
                          "lValueRequested": false,
                          "nodeType": "TupleExpression",
                          "src": "628:23:3",
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$_t_enum$_MathError_$4429_$_t_rational_0_by_1_$",
                            "typeString": "tuple(enum CarefulMath.MathError,int_const 0)"
                          }
                        },
                        "functionReturnParameters": 4439,
                        "id": 4447,
                        "nodeType": "Return",
                        "src": "621:30:3"
                      }
                    ]
                  }
                },
                {
                  "assignments": [
                    4451
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 4451,
                      "name": "c",
                      "nodeType": "VariableDeclaration",
                      "scope": 4474,
                      "src": "672:9:3",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 4450,
                        "name": "uint256",
                        "nodeType": "ElementaryTypeName",
                        "src": "672:7:3",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 4455,
                  "initialValue": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 4454,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "id": 4452,
                      "name": "a",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 4431,
                      "src": "684:1:3",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "*",
                    "rightExpression": {
                      "argumentTypes": null,
                      "id": 4453,
                      "name": "b",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 4433,
                      "src": "688:1:3",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "684:5:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "672:17:3"
                },
                {
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 4460,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "commonType": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "id": 4458,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftExpression": {
                        "argumentTypes": null,
                        "id": 4456,
                        "name": "c",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 4451,
                        "src": "704:1:3",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "nodeType": "BinaryOperation",
                      "operator": "/",
                      "rightExpression": {
                        "argumentTypes": null,
                        "id": 4457,
                        "name": "a",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 4431,
                        "src": "708:1:3",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "src": "704:5:3",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "!=",
                    "rightExpression": {
                      "argumentTypes": null,
                      "id": 4459,
                      "name": "b",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 4433,
                      "src": "713:1:3",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "704:10:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "falseBody": {
                    "id": 4472,
                    "nodeType": "Block",
                    "src": "785:55:3",
                    "statements": [
                      {
                        "expression": {
                          "argumentTypes": null,
                          "components": [
                            {
                              "argumentTypes": null,
                              "expression": {
                                "argumentTypes": null,
                                "id": 4467,
                                "name": "MathError",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 4429,
                                "src": "807:9:3",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_enum$_MathError_$4429_$",
                                  "typeString": "type(enum CarefulMath.MathError)"
                                }
                              },
                              "id": 4468,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "memberName": "NO_ERROR",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": null,
                              "src": "807:18:3",
                              "typeDescriptions": {
                                "typeIdentifier": "t_enum$_MathError_$4429",
                                "typeString": "enum CarefulMath.MathError"
                              }
                            },
                            {
                              "argumentTypes": null,
                              "id": 4469,
                              "name": "c",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 4451,
                              "src": "827:1:3",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "id": 4470,
                          "isConstant": false,
                          "isInlineArray": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "nodeType": "TupleExpression",
                          "src": "806:23:3",
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$_t_enum$_MathError_$4429_$_t_uint256_$",
                            "typeString": "tuple(enum CarefulMath.MathError,uint256)"
                          }
                        },
                        "functionReturnParameters": 4439,
                        "id": 4471,
                        "nodeType": "Return",
                        "src": "799:30:3"
                      }
                    ]
                  },
                  "id": 4473,
                  "nodeType": "IfStatement",
                  "src": "700:140:3",
                  "trueBody": {
                    "id": 4466,
                    "nodeType": "Block",
                    "src": "716:63:3",
                    "statements": [
                      {
                        "expression": {
                          "argumentTypes": null,
                          "components": [
                            {
                              "argumentTypes": null,
                              "expression": {
                                "argumentTypes": null,
                                "id": 4461,
                                "name": "MathError",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 4429,
                                "src": "738:9:3",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_enum$_MathError_$4429_$",
                                  "typeString": "type(enum CarefulMath.MathError)"
                                }
                              },
                              "id": 4462,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "memberName": "INTEGER_OVERFLOW",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": null,
                              "src": "738:26:3",
                              "typeDescriptions": {
                                "typeIdentifier": "t_enum$_MathError_$4429",
                                "typeString": "enum CarefulMath.MathError"
                              }
                            },
                            {
                              "argumentTypes": null,
                              "hexValue": "30",
                              "id": 4463,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "number",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "766:1:3",
                              "subdenomination": null,
                              "typeDescriptions": {
                                "typeIdentifier": "t_rational_0_by_1",
                                "typeString": "int_const 0"
                              },
                              "value": "0"
                            }
                          ],
                          "id": 4464,
                          "isConstant": false,
                          "isInlineArray": false,
                          "isLValue": false,
                          "isPure": true,
                          "lValueRequested": false,
                          "nodeType": "TupleExpression",
                          "src": "737:31:3",
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$_t_enum$_MathError_$4429_$_t_rational_0_by_1_$",
                            "typeString": "tuple(enum CarefulMath.MathError,int_const 0)"
                          }
                        },
                        "functionReturnParameters": 4439,
                        "id": 4465,
                        "nodeType": "Return",
                        "src": "730:38:3"
                      }
                    ]
                  }
                }
              ]
            },
            "documentation": "@dev Multiplies two numbers, returns an error on overflow.",
            "id": 4475,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "mulUInt",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 4434,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 4431,
                  "name": "a",
                  "nodeType": "VariableDeclaration",
                  "scope": 4475,
                  "src": "520:9:3",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 4430,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "520:7:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 4433,
                  "name": "b",
                  "nodeType": "VariableDeclaration",
                  "scope": 4475,
                  "src": "531:9:3",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 4432,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "531:7:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "519:22:3"
            },
            "returnParameters": {
              "id": 4439,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 4436,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 4475,
                  "src": "565:9:3",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_enum$_MathError_$4429",
                    "typeString": "enum CarefulMath.MathError"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 4435,
                    "name": "MathError",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 4429,
                    "src": "565:9:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_enum$_MathError_$4429",
                      "typeString": "enum CarefulMath.MathError"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 4438,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 4475,
                  "src": "576:7:3",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 4437,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "576:7:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "564:20:3"
            },
            "scope": 4607,
            "src": "503:343:3",
            "stateMutability": "pure",
            "superFunction": null,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 4503,
              "nodeType": "Block",
              "src": "1018:136:3",
              "statements": [
                {
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 4488,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "id": 4486,
                      "name": "b",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 4479,
                      "src": "1032:1:3",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "==",
                    "rightExpression": {
                      "argumentTypes": null,
                      "hexValue": "30",
                      "id": 4487,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "number",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "1037:1:3",
                      "subdenomination": null,
                      "typeDescriptions": {
                        "typeIdentifier": "t_rational_0_by_1",
                        "typeString": "int_const 0"
                      },
                      "value": "0"
                    },
                    "src": "1032:6:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "falseBody": null,
                  "id": 4495,
                  "nodeType": "IfStatement",
                  "src": "1028:75:3",
                  "trueBody": {
                    "id": 4494,
                    "nodeType": "Block",
                    "src": "1040:63:3",
                    "statements": [
                      {
                        "expression": {
                          "argumentTypes": null,
                          "components": [
                            {
                              "argumentTypes": null,
                              "expression": {
                                "argumentTypes": null,
                                "id": 4489,
                                "name": "MathError",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 4429,
                                "src": "1062:9:3",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_enum$_MathError_$4429_$",
                                  "typeString": "type(enum CarefulMath.MathError)"
                                }
                              },
                              "id": 4490,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "memberName": "DIVISION_BY_ZERO",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": null,
                              "src": "1062:26:3",
                              "typeDescriptions": {
                                "typeIdentifier": "t_enum$_MathError_$4429",
                                "typeString": "enum CarefulMath.MathError"
                              }
                            },
                            {
                              "argumentTypes": null,
                              "hexValue": "30",
                              "id": 4491,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "number",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "1090:1:3",
                              "subdenomination": null,
                              "typeDescriptions": {
                                "typeIdentifier": "t_rational_0_by_1",
                                "typeString": "int_const 0"
                              },
                              "value": "0"
                            }
                          ],
                          "id": 4492,
                          "isConstant": false,
                          "isInlineArray": false,
                          "isLValue": false,
                          "isPure": true,
                          "lValueRequested": false,
                          "nodeType": "TupleExpression",
                          "src": "1061:31:3",
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$_t_enum$_MathError_$4429_$_t_rational_0_by_1_$",
                            "typeString": "tuple(enum CarefulMath.MathError,int_const 0)"
                          }
                        },
                        "functionReturnParameters": 4485,
                        "id": 4493,
                        "nodeType": "Return",
                        "src": "1054:38:3"
                      }
                    ]
                  }
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "components": [
                      {
                        "argumentTypes": null,
                        "expression": {
                          "argumentTypes": null,
                          "id": 4496,
                          "name": "MathError",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 4429,
                          "src": "1121:9:3",
                          "typeDescriptions": {
                            "typeIdentifier": "t_type$_t_enum$_MathError_$4429_$",
                            "typeString": "type(enum CarefulMath.MathError)"
                          }
                        },
                        "id": 4497,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "lValueRequested": false,
                        "memberName": "NO_ERROR",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": null,
                        "src": "1121:18:3",
                        "typeDescriptions": {
                          "typeIdentifier": "t_enum$_MathError_$4429",
                          "typeString": "enum CarefulMath.MathError"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "commonType": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "id": 4500,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "argumentTypes": null,
                          "id": 4498,
                          "name": "a",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 4477,
                          "src": "1141:1:3",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "/",
                        "rightExpression": {
                          "argumentTypes": null,
                          "id": 4499,
                          "name": "b",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 4479,
                          "src": "1145:1:3",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "src": "1141:5:3",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "id": 4501,
                    "isConstant": false,
                    "isInlineArray": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "nodeType": "TupleExpression",
                    "src": "1120:27:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$_t_enum$_MathError_$4429_$_t_uint256_$",
                      "typeString": "tuple(enum CarefulMath.MathError,uint256)"
                    }
                  },
                  "functionReturnParameters": 4485,
                  "id": 4502,
                  "nodeType": "Return",
                  "src": "1113:34:3"
                }
              ]
            },
            "documentation": "@dev Integer division of two numbers, truncating the quotient.",
            "id": 4504,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "divUInt",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 4480,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 4477,
                  "name": "a",
                  "nodeType": "VariableDeclaration",
                  "scope": 4504,
                  "src": "953:9:3",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 4476,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "953:7:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 4479,
                  "name": "b",
                  "nodeType": "VariableDeclaration",
                  "scope": 4504,
                  "src": "964:9:3",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 4478,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "964:7:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "952:22:3"
            },
            "returnParameters": {
              "id": 4485,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 4482,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 4504,
                  "src": "998:9:3",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_enum$_MathError_$4429",
                    "typeString": "enum CarefulMath.MathError"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 4481,
                    "name": "MathError",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 4429,
                    "src": "998:9:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_enum$_MathError_$4429",
                      "typeString": "enum CarefulMath.MathError"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 4484,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 4504,
                  "src": "1009:7:3",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 4483,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "1009:7:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "997:20:3"
            },
            "scope": 4607,
            "src": "936:218:3",
            "stateMutability": "pure",
            "superFunction": null,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 4533,
              "nodeType": "Block",
              "src": "1366:157:3",
              "statements": [
                {
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 4517,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "id": 4515,
                      "name": "b",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 4508,
                      "src": "1380:1:3",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "<=",
                    "rightExpression": {
                      "argumentTypes": null,
                      "id": 4516,
                      "name": "a",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 4506,
                      "src": "1385:1:3",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "1380:6:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "falseBody": {
                    "id": 4531,
                    "nodeType": "Block",
                    "src": "1453:64:3",
                    "statements": [
                      {
                        "expression": {
                          "argumentTypes": null,
                          "components": [
                            {
                              "argumentTypes": null,
                              "expression": {
                                "argumentTypes": null,
                                "id": 4526,
                                "name": "MathError",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 4429,
                                "src": "1475:9:3",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_enum$_MathError_$4429_$",
                                  "typeString": "type(enum CarefulMath.MathError)"
                                }
                              },
                              "id": 4527,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "memberName": "INTEGER_UNDERFLOW",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": null,
                              "src": "1475:27:3",
                              "typeDescriptions": {
                                "typeIdentifier": "t_enum$_MathError_$4429",
                                "typeString": "enum CarefulMath.MathError"
                              }
                            },
                            {
                              "argumentTypes": null,
                              "hexValue": "30",
                              "id": 4528,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "number",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "1504:1:3",
                              "subdenomination": null,
                              "typeDescriptions": {
                                "typeIdentifier": "t_rational_0_by_1",
                                "typeString": "int_const 0"
                              },
                              "value": "0"
                            }
                          ],
                          "id": 4529,
                          "isConstant": false,
                          "isInlineArray": false,
                          "isLValue": false,
                          "isPure": true,
                          "lValueRequested": false,
                          "nodeType": "TupleExpression",
                          "src": "1474:32:3",
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$_t_enum$_MathError_$4429_$_t_rational_0_by_1_$",
                            "typeString": "tuple(enum CarefulMath.MathError,int_const 0)"
                          }
                        },
                        "functionReturnParameters": 4514,
                        "id": 4530,
                        "nodeType": "Return",
                        "src": "1467:39:3"
                      }
                    ]
                  },
                  "id": 4532,
                  "nodeType": "IfStatement",
                  "src": "1376:141:3",
                  "trueBody": {
                    "id": 4525,
                    "nodeType": "Block",
                    "src": "1388:59:3",
                    "statements": [
                      {
                        "expression": {
                          "argumentTypes": null,
                          "components": [
                            {
                              "argumentTypes": null,
                              "expression": {
                                "argumentTypes": null,
                                "id": 4518,
                                "name": "MathError",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 4429,
                                "src": "1410:9:3",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_enum$_MathError_$4429_$",
                                  "typeString": "type(enum CarefulMath.MathError)"
                                }
                              },
                              "id": 4519,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "memberName": "NO_ERROR",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": null,
                              "src": "1410:18:3",
                              "typeDescriptions": {
                                "typeIdentifier": "t_enum$_MathError_$4429",
                                "typeString": "enum CarefulMath.MathError"
                              }
                            },
                            {
                              "argumentTypes": null,
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "id": 4522,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "argumentTypes": null,
                                "id": 4520,
                                "name": "a",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 4506,
                                "src": "1430:1:3",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": "-",
                              "rightExpression": {
                                "argumentTypes": null,
                                "id": 4521,
                                "name": "b",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 4508,
                                "src": "1434:1:3",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "src": "1430:5:3",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "id": 4523,
                          "isConstant": false,
                          "isInlineArray": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "nodeType": "TupleExpression",
                          "src": "1409:27:3",
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$_t_enum$_MathError_$4429_$_t_uint256_$",
                            "typeString": "tuple(enum CarefulMath.MathError,uint256)"
                          }
                        },
                        "functionReturnParameters": 4514,
                        "id": 4524,
                        "nodeType": "Return",
                        "src": "1402:34:3"
                      }
                    ]
                  }
                }
              ]
            },
            "documentation": "@dev Subtracts two numbers, returns an error on overflow (i.e. if subtrahend is greater than minuend).",
            "id": 4534,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "subUInt",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 4509,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 4506,
                  "name": "a",
                  "nodeType": "VariableDeclaration",
                  "scope": 4534,
                  "src": "1301:9:3",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 4505,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "1301:7:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 4508,
                  "name": "b",
                  "nodeType": "VariableDeclaration",
                  "scope": 4534,
                  "src": "1312:9:3",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 4507,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "1312:7:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "1300:22:3"
            },
            "returnParameters": {
              "id": 4514,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 4511,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 4534,
                  "src": "1346:9:3",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_enum$_MathError_$4429",
                    "typeString": "enum CarefulMath.MathError"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 4510,
                    "name": "MathError",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 4429,
                    "src": "1346:9:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_enum$_MathError_$4429",
                      "typeString": "enum CarefulMath.MathError"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 4513,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 4534,
                  "src": "1357:7:3",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 4512,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "1357:7:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "1345:20:3"
            },
            "scope": 4607,
            "src": "1284:239:3",
            "stateMutability": "pure",
            "superFunction": null,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 4567,
              "nodeType": "Block",
              "src": "1685:180:3",
              "statements": [
                {
                  "assignments": [
                    4546
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 4546,
                      "name": "c",
                      "nodeType": "VariableDeclaration",
                      "scope": 4567,
                      "src": "1695:9:3",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 4545,
                        "name": "uint256",
                        "nodeType": "ElementaryTypeName",
                        "src": "1695:7:3",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 4550,
                  "initialValue": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 4549,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "id": 4547,
                      "name": "a",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 4536,
                      "src": "1707:1:3",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "+",
                    "rightExpression": {
                      "argumentTypes": null,
                      "id": 4548,
                      "name": "b",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 4538,
                      "src": "1711:1:3",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "1707:5:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "1695:17:3"
                },
                {
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 4553,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "id": 4551,
                      "name": "c",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 4546,
                      "src": "1727:1:3",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": ">=",
                    "rightExpression": {
                      "argumentTypes": null,
                      "id": 4552,
                      "name": "a",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 4536,
                      "src": "1732:1:3",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "1727:6:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "falseBody": {
                    "id": 4565,
                    "nodeType": "Block",
                    "src": "1796:63:3",
                    "statements": [
                      {
                        "expression": {
                          "argumentTypes": null,
                          "components": [
                            {
                              "argumentTypes": null,
                              "expression": {
                                "argumentTypes": null,
                                "id": 4560,
                                "name": "MathError",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 4429,
                                "src": "1818:9:3",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_enum$_MathError_$4429_$",
                                  "typeString": "type(enum CarefulMath.MathError)"
                                }
                              },
                              "id": 4561,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "memberName": "INTEGER_OVERFLOW",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": null,
                              "src": "1818:26:3",
                              "typeDescriptions": {
                                "typeIdentifier": "t_enum$_MathError_$4429",
                                "typeString": "enum CarefulMath.MathError"
                              }
                            },
                            {
                              "argumentTypes": null,
                              "hexValue": "30",
                              "id": 4562,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "number",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "1846:1:3",
                              "subdenomination": null,
                              "typeDescriptions": {
                                "typeIdentifier": "t_rational_0_by_1",
                                "typeString": "int_const 0"
                              },
                              "value": "0"
                            }
                          ],
                          "id": 4563,
                          "isConstant": false,
                          "isInlineArray": false,
                          "isLValue": false,
                          "isPure": true,
                          "lValueRequested": false,
                          "nodeType": "TupleExpression",
                          "src": "1817:31:3",
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$_t_enum$_MathError_$4429_$_t_rational_0_by_1_$",
                            "typeString": "tuple(enum CarefulMath.MathError,int_const 0)"
                          }
                        },
                        "functionReturnParameters": 4544,
                        "id": 4564,
                        "nodeType": "Return",
                        "src": "1810:38:3"
                      }
                    ]
                  },
                  "id": 4566,
                  "nodeType": "IfStatement",
                  "src": "1723:136:3",
                  "trueBody": {
                    "id": 4559,
                    "nodeType": "Block",
                    "src": "1735:55:3",
                    "statements": [
                      {
                        "expression": {
                          "argumentTypes": null,
                          "components": [
                            {
                              "argumentTypes": null,
                              "expression": {
                                "argumentTypes": null,
                                "id": 4554,
                                "name": "MathError",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 4429,
                                "src": "1757:9:3",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_enum$_MathError_$4429_$",
                                  "typeString": "type(enum CarefulMath.MathError)"
                                }
                              },
                              "id": 4555,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "memberName": "NO_ERROR",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": null,
                              "src": "1757:18:3",
                              "typeDescriptions": {
                                "typeIdentifier": "t_enum$_MathError_$4429",
                                "typeString": "enum CarefulMath.MathError"
                              }
                            },
                            {
                              "argumentTypes": null,
                              "id": 4556,
                              "name": "c",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 4546,
                              "src": "1777:1:3",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "id": 4557,
                          "isConstant": false,
                          "isInlineArray": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "nodeType": "TupleExpression",
                          "src": "1756:23:3",
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$_t_enum$_MathError_$4429_$_t_uint256_$",
                            "typeString": "tuple(enum CarefulMath.MathError,uint256)"
                          }
                        },
                        "functionReturnParameters": 4544,
                        "id": 4558,
                        "nodeType": "Return",
                        "src": "1749:30:3"
                      }
                    ]
                  }
                }
              ]
            },
            "documentation": "@dev Adds two numbers, returns an error on overflow.",
            "id": 4568,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "addUInt",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 4539,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 4536,
                  "name": "a",
                  "nodeType": "VariableDeclaration",
                  "scope": 4568,
                  "src": "1620:9:3",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 4535,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "1620:7:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 4538,
                  "name": "b",
                  "nodeType": "VariableDeclaration",
                  "scope": 4568,
                  "src": "1631:9:3",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 4537,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "1631:7:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "1619:22:3"
            },
            "returnParameters": {
              "id": 4544,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 4541,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 4568,
                  "src": "1665:9:3",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_enum$_MathError_$4429",
                    "typeString": "enum CarefulMath.MathError"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 4540,
                    "name": "MathError",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 4429,
                    "src": "1665:9:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_enum$_MathError_$4429",
                      "typeString": "enum CarefulMath.MathError"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 4543,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 4568,
                  "src": "1676:7:3",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 4542,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "1676:7:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "1664:20:3"
            },
            "scope": 4607,
            "src": "1603:262:3",
            "stateMutability": "pure",
            "superFunction": null,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 4605,
              "nodeType": "Block",
              "src": "2029:178:3",
              "statements": [
                {
                  "assignments": [
                    4582,
                    4584
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 4582,
                      "name": "err0",
                      "nodeType": "VariableDeclaration",
                      "scope": 4605,
                      "src": "2040:14:3",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_enum$_MathError_$4429",
                        "typeString": "enum CarefulMath.MathError"
                      },
                      "typeName": {
                        "contractScope": null,
                        "id": 4581,
                        "name": "MathError",
                        "nodeType": "UserDefinedTypeName",
                        "referencedDeclaration": 4429,
                        "src": "2040:9:3",
                        "typeDescriptions": {
                          "typeIdentifier": "t_enum$_MathError_$4429",
                          "typeString": "enum CarefulMath.MathError"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    },
                    {
                      "constant": false,
                      "id": 4584,
                      "name": "sum",
                      "nodeType": "VariableDeclaration",
                      "scope": 4605,
                      "src": "2056:11:3",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 4583,
                        "name": "uint256",
                        "nodeType": "ElementaryTypeName",
                        "src": "2056:7:3",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 4589,
                  "initialValue": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 4586,
                        "name": "a",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 4570,
                        "src": "2079:1:3",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 4587,
                        "name": "b",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 4572,
                        "src": "2082:1:3",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "id": 4585,
                      "name": "addUInt",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 4568,
                      "src": "2071:7:3",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_enum$_MathError_$4429_$_t_uint256_$",
                        "typeString": "function (uint256,uint256) pure returns (enum CarefulMath.MathError,uint256)"
                      }
                    },
                    "id": 4588,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "2071:13:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$_t_enum$_MathError_$4429_$_t_uint256_$",
                      "typeString": "tuple(enum CarefulMath.MathError,uint256)"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "2039:45:3"
                },
                {
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_enum$_MathError_$4429",
                      "typeString": "enum CarefulMath.MathError"
                    },
                    "id": 4593,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "id": 4590,
                      "name": "err0",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 4582,
                      "src": "2099:4:3",
                      "typeDescriptions": {
                        "typeIdentifier": "t_enum$_MathError_$4429",
                        "typeString": "enum CarefulMath.MathError"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "!=",
                    "rightExpression": {
                      "argumentTypes": null,
                      "expression": {
                        "argumentTypes": null,
                        "id": 4591,
                        "name": "MathError",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 4429,
                        "src": "2107:9:3",
                        "typeDescriptions": {
                          "typeIdentifier": "t_type$_t_enum$_MathError_$4429_$",
                          "typeString": "type(enum CarefulMath.MathError)"
                        }
                      },
                      "id": 4592,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "lValueRequested": false,
                      "memberName": "NO_ERROR",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": null,
                      "src": "2107:18:3",
                      "typeDescriptions": {
                        "typeIdentifier": "t_enum$_MathError_$4429",
                        "typeString": "enum CarefulMath.MathError"
                      }
                    },
                    "src": "2099:26:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "falseBody": null,
                  "id": 4599,
                  "nodeType": "IfStatement",
                  "src": "2095:73:3",
                  "trueBody": {
                    "id": 4598,
                    "nodeType": "Block",
                    "src": "2127:41:3",
                    "statements": [
                      {
                        "expression": {
                          "argumentTypes": null,
                          "components": [
                            {
                              "argumentTypes": null,
                              "id": 4594,
                              "name": "err0",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 4582,
                              "src": "2149:4:3",
                              "typeDescriptions": {
                                "typeIdentifier": "t_enum$_MathError_$4429",
                                "typeString": "enum CarefulMath.MathError"
                              }
                            },
                            {
                              "argumentTypes": null,
                              "hexValue": "30",
                              "id": 4595,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "number",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "2155:1:3",
                              "subdenomination": null,
                              "typeDescriptions": {
                                "typeIdentifier": "t_rational_0_by_1",
                                "typeString": "int_const 0"
                              },
                              "value": "0"
                            }
                          ],
                          "id": 4596,
                          "isConstant": false,
                          "isInlineArray": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "nodeType": "TupleExpression",
                          "src": "2148:9:3",
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$_t_enum$_MathError_$4429_$_t_rational_0_by_1_$",
                            "typeString": "tuple(enum CarefulMath.MathError,int_const 0)"
                          }
                        },
                        "functionReturnParameters": 4580,
                        "id": 4597,
                        "nodeType": "Return",
                        "src": "2141:16:3"
                      }
                    ]
                  }
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 4601,
                        "name": "sum",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 4584,
                        "src": "2193:3:3",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 4602,
                        "name": "c",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 4574,
                        "src": "2198:1:3",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "id": 4600,
                      "name": "subUInt",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 4534,
                      "src": "2185:7:3",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_enum$_MathError_$4429_$_t_uint256_$",
                        "typeString": "function (uint256,uint256) pure returns (enum CarefulMath.MathError,uint256)"
                      }
                    },
                    "id": 4603,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "2185:15:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$_t_enum$_MathError_$4429_$_t_uint256_$",
                      "typeString": "tuple(enum CarefulMath.MathError,uint256)"
                    }
                  },
                  "functionReturnParameters": 4580,
                  "id": 4604,
                  "nodeType": "Return",
                  "src": "2178:22:3"
                }
              ]
            },
            "documentation": "@dev add a and b and then subtract c",
            "id": 4606,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "addThenSubUInt",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 4575,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 4570,
                  "name": "a",
                  "nodeType": "VariableDeclaration",
                  "scope": 4606,
                  "src": "1953:9:3",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 4569,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "1953:7:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 4572,
                  "name": "b",
                  "nodeType": "VariableDeclaration",
                  "scope": 4606,
                  "src": "1964:9:3",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 4571,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "1964:7:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 4574,
                  "name": "c",
                  "nodeType": "VariableDeclaration",
                  "scope": 4606,
                  "src": "1975:9:3",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 4573,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "1975:7:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "1952:33:3"
            },
            "returnParameters": {
              "id": 4580,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 4577,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 4606,
                  "src": "2009:9:3",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_enum$_MathError_$4429",
                    "typeString": "enum CarefulMath.MathError"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 4576,
                    "name": "MathError",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 4429,
                    "src": "2009:9:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_enum$_MathError_$4429",
                      "typeString": "enum CarefulMath.MathError"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 4579,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 4606,
                  "src": "2020:7:3",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 4578,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "2020:7:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "2008:20:3"
            },
            "scope": 4607,
            "src": "1929:278:3",
            "stateMutability": "pure",
            "superFunction": null,
            "visibility": "internal"
          }
        ],
        "scope": 4608,
        "src": "242:1967:3"
      }
    ],
    "src": "0:2210:3"
  },
  "legacyAST": {
    "absolutePath": "/home/runner/work/rtoken-contracts/rtoken-contracts/packages/contracts/compound/contracts/CarefulMath.sol",
    "exportedSymbols": {
      "CarefulMath": [
        4607
      ]
    },
    "id": 4608,
    "nodeType": "SourceUnit",
    "nodes": [
      {
        "id": 4424,
        "literals": [
          "solidity",
          "^",
          "0.5",
          ".8"
        ],
        "nodeType": "PragmaDirective",
        "src": "0:23:3"
      },
      {
        "baseContracts": [],
        "contractDependencies": [],
        "contractKind": "contract",
        "documentation": "@title Careful Math\n@author Compound\n@notice Derived from OpenZeppelin's SafeMath library\n        https://github.com/OpenZeppelin/openzeppelin-solidity/blob/master/contracts/math/SafeMath.sol",
        "fullyImplemented": true,
        "id": 4607,
        "linearizedBaseContracts": [
          4607
        ],
        "name": "CarefulMath",
        "nodeType": "ContractDefinition",
        "nodes": [
          {
            "canonicalName": "CarefulMath.MathError",
            "id": 4429,
            "members": [
              {
                "id": 4425,
                "name": "NO_ERROR",
                "nodeType": "EnumValue",
                "src": "353:8:3"
              },
              {
                "id": 4426,
                "name": "DIVISION_BY_ZERO",
                "nodeType": "EnumValue",
                "src": "363:16:3"
              },
              {
                "id": 4427,
                "name": "INTEGER_OVERFLOW",
                "nodeType": "EnumValue",
                "src": "381:16:3"
              },
              {
                "id": 4428,
                "name": "INTEGER_UNDERFLOW",
                "nodeType": "EnumValue",
                "src": "399:17:3"
              }
            ],
            "name": "MathError",
            "nodeType": "EnumDefinition",
            "src": "337:80:3"
          },
          {
            "body": {
              "id": 4474,
              "nodeType": "Block",
              "src": "585:261:3",
              "statements": [
                {
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 4442,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "id": 4440,
                      "name": "a",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 4431,
                      "src": "599:1:3",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "==",
                    "rightExpression": {
                      "argumentTypes": null,
                      "hexValue": "30",
                      "id": 4441,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "number",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "604:1:3",
                      "subdenomination": null,
                      "typeDescriptions": {
                        "typeIdentifier": "t_rational_0_by_1",
                        "typeString": "int_const 0"
                      },
                      "value": "0"
                    },
                    "src": "599:6:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "falseBody": null,
                  "id": 4449,
                  "nodeType": "IfStatement",
                  "src": "595:67:3",
                  "trueBody": {
                    "id": 4448,
                    "nodeType": "Block",
                    "src": "607:55:3",
                    "statements": [
                      {
                        "expression": {
                          "argumentTypes": null,
                          "components": [
                            {
                              "argumentTypes": null,
                              "expression": {
                                "argumentTypes": null,
                                "id": 4443,
                                "name": "MathError",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 4429,
                                "src": "629:9:3",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_enum$_MathError_$4429_$",
                                  "typeString": "type(enum CarefulMath.MathError)"
                                }
                              },
                              "id": 4444,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "memberName": "NO_ERROR",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": null,
                              "src": "629:18:3",
                              "typeDescriptions": {
                                "typeIdentifier": "t_enum$_MathError_$4429",
                                "typeString": "enum CarefulMath.MathError"
                              }
                            },
                            {
                              "argumentTypes": null,
                              "hexValue": "30",
                              "id": 4445,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "number",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "649:1:3",
                              "subdenomination": null,
                              "typeDescriptions": {
                                "typeIdentifier": "t_rational_0_by_1",
                                "typeString": "int_const 0"
                              },
                              "value": "0"
                            }
                          ],
                          "id": 4446,
                          "isConstant": false,
                          "isInlineArray": false,
                          "isLValue": false,
                          "isPure": true,
                          "lValueRequested": false,
                          "nodeType": "TupleExpression",
                          "src": "628:23:3",
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$_t_enum$_MathError_$4429_$_t_rational_0_by_1_$",
                            "typeString": "tuple(enum CarefulMath.MathError,int_const 0)"
                          }
                        },
                        "functionReturnParameters": 4439,
                        "id": 4447,
                        "nodeType": "Return",
                        "src": "621:30:3"
                      }
                    ]
                  }
                },
                {
                  "assignments": [
                    4451
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 4451,
                      "name": "c",
                      "nodeType": "VariableDeclaration",
                      "scope": 4474,
                      "src": "672:9:3",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 4450,
                        "name": "uint256",
                        "nodeType": "ElementaryTypeName",
                        "src": "672:7:3",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 4455,
                  "initialValue": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 4454,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "id": 4452,
                      "name": "a",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 4431,
                      "src": "684:1:3",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "*",
                    "rightExpression": {
                      "argumentTypes": null,
                      "id": 4453,
                      "name": "b",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 4433,
                      "src": "688:1:3",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "684:5:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "672:17:3"
                },
                {
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 4460,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "commonType": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "id": 4458,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftExpression": {
                        "argumentTypes": null,
                        "id": 4456,
                        "name": "c",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 4451,
                        "src": "704:1:3",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "nodeType": "BinaryOperation",
                      "operator": "/",
                      "rightExpression": {
                        "argumentTypes": null,
                        "id": 4457,
                        "name": "a",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 4431,
                        "src": "708:1:3",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "src": "704:5:3",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "!=",
                    "rightExpression": {
                      "argumentTypes": null,
                      "id": 4459,
                      "name": "b",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 4433,
                      "src": "713:1:3",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "704:10:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "falseBody": {
                    "id": 4472,
                    "nodeType": "Block",
                    "src": "785:55:3",
                    "statements": [
                      {
                        "expression": {
                          "argumentTypes": null,
                          "components": [
                            {
                              "argumentTypes": null,
                              "expression": {
                                "argumentTypes": null,
                                "id": 4467,
                                "name": "MathError",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 4429,
                                "src": "807:9:3",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_enum$_MathError_$4429_$",
                                  "typeString": "type(enum CarefulMath.MathError)"
                                }
                              },
                              "id": 4468,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "memberName": "NO_ERROR",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": null,
                              "src": "807:18:3",
                              "typeDescriptions": {
                                "typeIdentifier": "t_enum$_MathError_$4429",
                                "typeString": "enum CarefulMath.MathError"
                              }
                            },
                            {
                              "argumentTypes": null,
                              "id": 4469,
                              "name": "c",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 4451,
                              "src": "827:1:3",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "id": 4470,
                          "isConstant": false,
                          "isInlineArray": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "nodeType": "TupleExpression",
                          "src": "806:23:3",
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$_t_enum$_MathError_$4429_$_t_uint256_$",
                            "typeString": "tuple(enum CarefulMath.MathError,uint256)"
                          }
                        },
                        "functionReturnParameters": 4439,
                        "id": 4471,
                        "nodeType": "Return",
                        "src": "799:30:3"
                      }
                    ]
                  },
                  "id": 4473,
                  "nodeType": "IfStatement",
                  "src": "700:140:3",
                  "trueBody": {
                    "id": 4466,
                    "nodeType": "Block",
                    "src": "716:63:3",
                    "statements": [
                      {
                        "expression": {
                          "argumentTypes": null,
                          "components": [
                            {
                              "argumentTypes": null,
                              "expression": {
                                "argumentTypes": null,
                                "id": 4461,
                                "name": "MathError",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 4429,
                                "src": "738:9:3",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_enum$_MathError_$4429_$",
                                  "typeString": "type(enum CarefulMath.MathError)"
                                }
                              },
                              "id": 4462,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "memberName": "INTEGER_OVERFLOW",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": null,
                              "src": "738:26:3",
                              "typeDescriptions": {
                                "typeIdentifier": "t_enum$_MathError_$4429",
                                "typeString": "enum CarefulMath.MathError"
                              }
                            },
                            {
                              "argumentTypes": null,
                              "hexValue": "30",
                              "id": 4463,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "number",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "766:1:3",
                              "subdenomination": null,
                              "typeDescriptions": {
                                "typeIdentifier": "t_rational_0_by_1",
                                "typeString": "int_const 0"
                              },
                              "value": "0"
                            }
                          ],
                          "id": 4464,
                          "isConstant": false,
                          "isInlineArray": false,
                          "isLValue": false,
                          "isPure": true,
                          "lValueRequested": false,
                          "nodeType": "TupleExpression",
                          "src": "737:31:3",
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$_t_enum$_MathError_$4429_$_t_rational_0_by_1_$",
                            "typeString": "tuple(enum CarefulMath.MathError,int_const 0)"
                          }
                        },
                        "functionReturnParameters": 4439,
                        "id": 4465,
                        "nodeType": "Return",
                        "src": "730:38:3"
                      }
                    ]
                  }
                }
              ]
            },
            "documentation": "@dev Multiplies two numbers, returns an error on overflow.",
            "id": 4475,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "mulUInt",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 4434,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 4431,
                  "name": "a",
                  "nodeType": "VariableDeclaration",
                  "scope": 4475,
                  "src": "520:9:3",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 4430,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "520:7:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 4433,
                  "name": "b",
                  "nodeType": "VariableDeclaration",
                  "scope": 4475,
                  "src": "531:9:3",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 4432,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "531:7:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "519:22:3"
            },
            "returnParameters": {
              "id": 4439,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 4436,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 4475,
                  "src": "565:9:3",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_enum$_MathError_$4429",
                    "typeString": "enum CarefulMath.MathError"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 4435,
                    "name": "MathError",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 4429,
                    "src": "565:9:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_enum$_MathError_$4429",
                      "typeString": "enum CarefulMath.MathError"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 4438,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 4475,
                  "src": "576:7:3",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 4437,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "576:7:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "564:20:3"
            },
            "scope": 4607,
            "src": "503:343:3",
            "stateMutability": "pure",
            "superFunction": null,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 4503,
              "nodeType": "Block",
              "src": "1018:136:3",
              "statements": [
                {
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 4488,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "id": 4486,
                      "name": "b",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 4479,
                      "src": "1032:1:3",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "==",
                    "rightExpression": {
                      "argumentTypes": null,
                      "hexValue": "30",
                      "id": 4487,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "number",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "1037:1:3",
                      "subdenomination": null,
                      "typeDescriptions": {
                        "typeIdentifier": "t_rational_0_by_1",
                        "typeString": "int_const 0"
                      },
                      "value": "0"
                    },
                    "src": "1032:6:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "falseBody": null,
                  "id": 4495,
                  "nodeType": "IfStatement",
                  "src": "1028:75:3",
                  "trueBody": {
                    "id": 4494,
                    "nodeType": "Block",
                    "src": "1040:63:3",
                    "statements": [
                      {
                        "expression": {
                          "argumentTypes": null,
                          "components": [
                            {
                              "argumentTypes": null,
                              "expression": {
                                "argumentTypes": null,
                                "id": 4489,
                                "name": "MathError",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 4429,
                                "src": "1062:9:3",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_enum$_MathError_$4429_$",
                                  "typeString": "type(enum CarefulMath.MathError)"
                                }
                              },
                              "id": 4490,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "memberName": "DIVISION_BY_ZERO",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": null,
                              "src": "1062:26:3",
                              "typeDescriptions": {
                                "typeIdentifier": "t_enum$_MathError_$4429",
                                "typeString": "enum CarefulMath.MathError"
                              }
                            },
                            {
                              "argumentTypes": null,
                              "hexValue": "30",
                              "id": 4491,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "number",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "1090:1:3",
                              "subdenomination": null,
                              "typeDescriptions": {
                                "typeIdentifier": "t_rational_0_by_1",
                                "typeString": "int_const 0"
                              },
                              "value": "0"
                            }
                          ],
                          "id": 4492,
                          "isConstant": false,
                          "isInlineArray": false,
                          "isLValue": false,
                          "isPure": true,
                          "lValueRequested": false,
                          "nodeType": "TupleExpression",
                          "src": "1061:31:3",
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$_t_enum$_MathError_$4429_$_t_rational_0_by_1_$",
                            "typeString": "tuple(enum CarefulMath.MathError,int_const 0)"
                          }
                        },
                        "functionReturnParameters": 4485,
                        "id": 4493,
                        "nodeType": "Return",
                        "src": "1054:38:3"
                      }
                    ]
                  }
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "components": [
                      {
                        "argumentTypes": null,
                        "expression": {
                          "argumentTypes": null,
                          "id": 4496,
                          "name": "MathError",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 4429,
                          "src": "1121:9:3",
                          "typeDescriptions": {
                            "typeIdentifier": "t_type$_t_enum$_MathError_$4429_$",
                            "typeString": "type(enum CarefulMath.MathError)"
                          }
                        },
                        "id": 4497,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "lValueRequested": false,
                        "memberName": "NO_ERROR",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": null,
                        "src": "1121:18:3",
                        "typeDescriptions": {
                          "typeIdentifier": "t_enum$_MathError_$4429",
                          "typeString": "enum CarefulMath.MathError"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "commonType": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "id": 4500,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "argumentTypes": null,
                          "id": 4498,
                          "name": "a",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 4477,
                          "src": "1141:1:3",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "/",
                        "rightExpression": {
                          "argumentTypes": null,
                          "id": 4499,
                          "name": "b",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 4479,
                          "src": "1145:1:3",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "src": "1141:5:3",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "id": 4501,
                    "isConstant": false,
                    "isInlineArray": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "nodeType": "TupleExpression",
                    "src": "1120:27:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$_t_enum$_MathError_$4429_$_t_uint256_$",
                      "typeString": "tuple(enum CarefulMath.MathError,uint256)"
                    }
                  },
                  "functionReturnParameters": 4485,
                  "id": 4502,
                  "nodeType": "Return",
                  "src": "1113:34:3"
                }
              ]
            },
            "documentation": "@dev Integer division of two numbers, truncating the quotient.",
            "id": 4504,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "divUInt",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 4480,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 4477,
                  "name": "a",
                  "nodeType": "VariableDeclaration",
                  "scope": 4504,
                  "src": "953:9:3",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 4476,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "953:7:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 4479,
                  "name": "b",
                  "nodeType": "VariableDeclaration",
                  "scope": 4504,
                  "src": "964:9:3",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 4478,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "964:7:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "952:22:3"
            },
            "returnParameters": {
              "id": 4485,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 4482,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 4504,
                  "src": "998:9:3",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_enum$_MathError_$4429",
                    "typeString": "enum CarefulMath.MathError"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 4481,
                    "name": "MathError",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 4429,
                    "src": "998:9:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_enum$_MathError_$4429",
                      "typeString": "enum CarefulMath.MathError"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 4484,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 4504,
                  "src": "1009:7:3",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 4483,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "1009:7:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "997:20:3"
            },
            "scope": 4607,
            "src": "936:218:3",
            "stateMutability": "pure",
            "superFunction": null,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 4533,
              "nodeType": "Block",
              "src": "1366:157:3",
              "statements": [
                {
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 4517,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "id": 4515,
                      "name": "b",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 4508,
                      "src": "1380:1:3",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "<=",
                    "rightExpression": {
                      "argumentTypes": null,
                      "id": 4516,
                      "name": "a",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 4506,
                      "src": "1385:1:3",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "1380:6:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "falseBody": {
                    "id": 4531,
                    "nodeType": "Block",
                    "src": "1453:64:3",
                    "statements": [
                      {
                        "expression": {
                          "argumentTypes": null,
                          "components": [
                            {
                              "argumentTypes": null,
                              "expression": {
                                "argumentTypes": null,
                                "id": 4526,
                                "name": "MathError",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 4429,
                                "src": "1475:9:3",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_enum$_MathError_$4429_$",
                                  "typeString": "type(enum CarefulMath.MathError)"
                                }
                              },
                              "id": 4527,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "memberName": "INTEGER_UNDERFLOW",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": null,
                              "src": "1475:27:3",
                              "typeDescriptions": {
                                "typeIdentifier": "t_enum$_MathError_$4429",
                                "typeString": "enum CarefulMath.MathError"
                              }
                            },
                            {
                              "argumentTypes": null,
                              "hexValue": "30",
                              "id": 4528,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "number",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "1504:1:3",
                              "subdenomination": null,
                              "typeDescriptions": {
                                "typeIdentifier": "t_rational_0_by_1",
                                "typeString": "int_const 0"
                              },
                              "value": "0"
                            }
                          ],
                          "id": 4529,
                          "isConstant": false,
                          "isInlineArray": false,
                          "isLValue": false,
                          "isPure": true,
                          "lValueRequested": false,
                          "nodeType": "TupleExpression",
                          "src": "1474:32:3",
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$_t_enum$_MathError_$4429_$_t_rational_0_by_1_$",
                            "typeString": "tuple(enum CarefulMath.MathError,int_const 0)"
                          }
                        },
                        "functionReturnParameters": 4514,
                        "id": 4530,
                        "nodeType": "Return",
                        "src": "1467:39:3"
                      }
                    ]
                  },
                  "id": 4532,
                  "nodeType": "IfStatement",
                  "src": "1376:141:3",
                  "trueBody": {
                    "id": 4525,
                    "nodeType": "Block",
                    "src": "1388:59:3",
                    "statements": [
                      {
                        "expression": {
                          "argumentTypes": null,
                          "components": [
                            {
                              "argumentTypes": null,
                              "expression": {
                                "argumentTypes": null,
                                "id": 4518,
                                "name": "MathError",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 4429,
                                "src": "1410:9:3",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_enum$_MathError_$4429_$",
                                  "typeString": "type(enum CarefulMath.MathError)"
                                }
                              },
                              "id": 4519,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "memberName": "NO_ERROR",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": null,
                              "src": "1410:18:3",
                              "typeDescriptions": {
                                "typeIdentifier": "t_enum$_MathError_$4429",
                                "typeString": "enum CarefulMath.MathError"
                              }
                            },
                            {
                              "argumentTypes": null,
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "id": 4522,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "argumentTypes": null,
                                "id": 4520,
                                "name": "a",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 4506,
                                "src": "1430:1:3",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": "-",
                              "rightExpression": {
                                "argumentTypes": null,
                                "id": 4521,
                                "name": "b",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 4508,
                                "src": "1434:1:3",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "src": "1430:5:3",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "id": 4523,
                          "isConstant": false,
                          "isInlineArray": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "nodeType": "TupleExpression",
                          "src": "1409:27:3",
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$_t_enum$_MathError_$4429_$_t_uint256_$",
                            "typeString": "tuple(enum CarefulMath.MathError,uint256)"
                          }
                        },
                        "functionReturnParameters": 4514,
                        "id": 4524,
                        "nodeType": "Return",
                        "src": "1402:34:3"
                      }
                    ]
                  }
                }
              ]
            },
            "documentation": "@dev Subtracts two numbers, returns an error on overflow (i.e. if subtrahend is greater than minuend).",
            "id": 4534,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "subUInt",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 4509,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 4506,
                  "name": "a",
                  "nodeType": "VariableDeclaration",
                  "scope": 4534,
                  "src": "1301:9:3",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 4505,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "1301:7:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 4508,
                  "name": "b",
                  "nodeType": "VariableDeclaration",
                  "scope": 4534,
                  "src": "1312:9:3",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 4507,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "1312:7:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "1300:22:3"
            },
            "returnParameters": {
              "id": 4514,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 4511,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 4534,
                  "src": "1346:9:3",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_enum$_MathError_$4429",
                    "typeString": "enum CarefulMath.MathError"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 4510,
                    "name": "MathError",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 4429,
                    "src": "1346:9:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_enum$_MathError_$4429",
                      "typeString": "enum CarefulMath.MathError"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 4513,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 4534,
                  "src": "1357:7:3",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 4512,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "1357:7:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "1345:20:3"
            },
            "scope": 4607,
            "src": "1284:239:3",
            "stateMutability": "pure",
            "superFunction": null,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 4567,
              "nodeType": "Block",
              "src": "1685:180:3",
              "statements": [
                {
                  "assignments": [
                    4546
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 4546,
                      "name": "c",
                      "nodeType": "VariableDeclaration",
                      "scope": 4567,
                      "src": "1695:9:3",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 4545,
                        "name": "uint256",
                        "nodeType": "ElementaryTypeName",
                        "src": "1695:7:3",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 4550,
                  "initialValue": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 4549,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "id": 4547,
                      "name": "a",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 4536,
                      "src": "1707:1:3",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "+",
                    "rightExpression": {
                      "argumentTypes": null,
                      "id": 4548,
                      "name": "b",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 4538,
                      "src": "1711:1:3",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "1707:5:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "1695:17:3"
                },
                {
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 4553,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "id": 4551,
                      "name": "c",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 4546,
                      "src": "1727:1:3",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": ">=",
                    "rightExpression": {
                      "argumentTypes": null,
                      "id": 4552,
                      "name": "a",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 4536,
                      "src": "1732:1:3",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "1727:6:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "falseBody": {
                    "id": 4565,
                    "nodeType": "Block",
                    "src": "1796:63:3",
                    "statements": [
                      {
                        "expression": {
                          "argumentTypes": null,
                          "components": [
                            {
                              "argumentTypes": null,
                              "expression": {
                                "argumentTypes": null,
                                "id": 4560,
                                "name": "MathError",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 4429,
                                "src": "1818:9:3",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_enum$_MathError_$4429_$",
                                  "typeString": "type(enum CarefulMath.MathError)"
                                }
                              },
                              "id": 4561,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "memberName": "INTEGER_OVERFLOW",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": null,
                              "src": "1818:26:3",
                              "typeDescriptions": {
                                "typeIdentifier": "t_enum$_MathError_$4429",
                                "typeString": "enum CarefulMath.MathError"
                              }
                            },
                            {
                              "argumentTypes": null,
                              "hexValue": "30",
                              "id": 4562,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "number",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "1846:1:3",
                              "subdenomination": null,
                              "typeDescriptions": {
                                "typeIdentifier": "t_rational_0_by_1",
                                "typeString": "int_const 0"
                              },
                              "value": "0"
                            }
                          ],
                          "id": 4563,
                          "isConstant": false,
                          "isInlineArray": false,
                          "isLValue": false,
                          "isPure": true,
                          "lValueRequested": false,
                          "nodeType": "TupleExpression",
                          "src": "1817:31:3",
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$_t_enum$_MathError_$4429_$_t_rational_0_by_1_$",
                            "typeString": "tuple(enum CarefulMath.MathError,int_const 0)"
                          }
                        },
                        "functionReturnParameters": 4544,
                        "id": 4564,
                        "nodeType": "Return",
                        "src": "1810:38:3"
                      }
                    ]
                  },
                  "id": 4566,
                  "nodeType": "IfStatement",
                  "src": "1723:136:3",
                  "trueBody": {
                    "id": 4559,
                    "nodeType": "Block",
                    "src": "1735:55:3",
                    "statements": [
                      {
                        "expression": {
                          "argumentTypes": null,
                          "components": [
                            {
                              "argumentTypes": null,
                              "expression": {
                                "argumentTypes": null,
                                "id": 4554,
                                "name": "MathError",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 4429,
                                "src": "1757:9:3",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_enum$_MathError_$4429_$",
                                  "typeString": "type(enum CarefulMath.MathError)"
                                }
                              },
                              "id": 4555,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "memberName": "NO_ERROR",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": null,
                              "src": "1757:18:3",
                              "typeDescriptions": {
                                "typeIdentifier": "t_enum$_MathError_$4429",
                                "typeString": "enum CarefulMath.MathError"
                              }
                            },
                            {
                              "argumentTypes": null,
                              "id": 4556,
                              "name": "c",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 4546,
                              "src": "1777:1:3",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "id": 4557,
                          "isConstant": false,
                          "isInlineArray": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "nodeType": "TupleExpression",
                          "src": "1756:23:3",
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$_t_enum$_MathError_$4429_$_t_uint256_$",
                            "typeString": "tuple(enum CarefulMath.MathError,uint256)"
                          }
                        },
                        "functionReturnParameters": 4544,
                        "id": 4558,
                        "nodeType": "Return",
                        "src": "1749:30:3"
                      }
                    ]
                  }
                }
              ]
            },
            "documentation": "@dev Adds two numbers, returns an error on overflow.",
            "id": 4568,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "addUInt",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 4539,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 4536,
                  "name": "a",
                  "nodeType": "VariableDeclaration",
                  "scope": 4568,
                  "src": "1620:9:3",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 4535,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "1620:7:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 4538,
                  "name": "b",
                  "nodeType": "VariableDeclaration",
                  "scope": 4568,
                  "src": "1631:9:3",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 4537,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "1631:7:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "1619:22:3"
            },
            "returnParameters": {
              "id": 4544,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 4541,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 4568,
                  "src": "1665:9:3",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_enum$_MathError_$4429",
                    "typeString": "enum CarefulMath.MathError"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 4540,
                    "name": "MathError",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 4429,
                    "src": "1665:9:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_enum$_MathError_$4429",
                      "typeString": "enum CarefulMath.MathError"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 4543,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 4568,
                  "src": "1676:7:3",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 4542,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "1676:7:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "1664:20:3"
            },
            "scope": 4607,
            "src": "1603:262:3",
            "stateMutability": "pure",
            "superFunction": null,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 4605,
              "nodeType": "Block",
              "src": "2029:178:3",
              "statements": [
                {
                  "assignments": [
                    4582,
                    4584
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 4582,
                      "name": "err0",
                      "nodeType": "VariableDeclaration",
                      "scope": 4605,
                      "src": "2040:14:3",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_enum$_MathError_$4429",
                        "typeString": "enum CarefulMath.MathError"
                      },
                      "typeName": {
                        "contractScope": null,
                        "id": 4581,
                        "name": "MathError",
                        "nodeType": "UserDefinedTypeName",
                        "referencedDeclaration": 4429,
                        "src": "2040:9:3",
                        "typeDescriptions": {
                          "typeIdentifier": "t_enum$_MathError_$4429",
                          "typeString": "enum CarefulMath.MathError"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    },
                    {
                      "constant": false,
                      "id": 4584,
                      "name": "sum",
                      "nodeType": "VariableDeclaration",
                      "scope": 4605,
                      "src": "2056:11:3",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 4583,
                        "name": "uint256",
                        "nodeType": "ElementaryTypeName",
                        "src": "2056:7:3",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 4589,
                  "initialValue": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 4586,
                        "name": "a",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 4570,
                        "src": "2079:1:3",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 4587,
                        "name": "b",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 4572,
                        "src": "2082:1:3",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "id": 4585,
                      "name": "addUInt",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 4568,
                      "src": "2071:7:3",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_enum$_MathError_$4429_$_t_uint256_$",
                        "typeString": "function (uint256,uint256) pure returns (enum CarefulMath.MathError,uint256)"
                      }
                    },
                    "id": 4588,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "2071:13:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$_t_enum$_MathError_$4429_$_t_uint256_$",
                      "typeString": "tuple(enum CarefulMath.MathError,uint256)"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "2039:45:3"
                },
                {
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_enum$_MathError_$4429",
                      "typeString": "enum CarefulMath.MathError"
                    },
                    "id": 4593,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "id": 4590,
                      "name": "err0",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 4582,
                      "src": "2099:4:3",
                      "typeDescriptions": {
                        "typeIdentifier": "t_enum$_MathError_$4429",
                        "typeString": "enum CarefulMath.MathError"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "!=",
                    "rightExpression": {
                      "argumentTypes": null,
                      "expression": {
                        "argumentTypes": null,
                        "id": 4591,
                        "name": "MathError",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 4429,
                        "src": "2107:9:3",
                        "typeDescriptions": {
                          "typeIdentifier": "t_type$_t_enum$_MathError_$4429_$",
                          "typeString": "type(enum CarefulMath.MathError)"
                        }
                      },
                      "id": 4592,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "lValueRequested": false,
                      "memberName": "NO_ERROR",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": null,
                      "src": "2107:18:3",
                      "typeDescriptions": {
                        "typeIdentifier": "t_enum$_MathError_$4429",
                        "typeString": "enum CarefulMath.MathError"
                      }
                    },
                    "src": "2099:26:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "falseBody": null,
                  "id": 4599,
                  "nodeType": "IfStatement",
                  "src": "2095:73:3",
                  "trueBody": {
                    "id": 4598,
                    "nodeType": "Block",
                    "src": "2127:41:3",
                    "statements": [
                      {
                        "expression": {
                          "argumentTypes": null,
                          "components": [
                            {
                              "argumentTypes": null,
                              "id": 4594,
                              "name": "err0",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 4582,
                              "src": "2149:4:3",
                              "typeDescriptions": {
                                "typeIdentifier": "t_enum$_MathError_$4429",
                                "typeString": "enum CarefulMath.MathError"
                              }
                            },
                            {
                              "argumentTypes": null,
                              "hexValue": "30",
                              "id": 4595,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "number",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "2155:1:3",
                              "subdenomination": null,
                              "typeDescriptions": {
                                "typeIdentifier": "t_rational_0_by_1",
                                "typeString": "int_const 0"
                              },
                              "value": "0"
                            }
                          ],
                          "id": 4596,
                          "isConstant": false,
                          "isInlineArray": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "nodeType": "TupleExpression",
                          "src": "2148:9:3",
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$_t_enum$_MathError_$4429_$_t_rational_0_by_1_$",
                            "typeString": "tuple(enum CarefulMath.MathError,int_const 0)"
                          }
                        },
                        "functionReturnParameters": 4580,
                        "id": 4597,
                        "nodeType": "Return",
                        "src": "2141:16:3"
                      }
                    ]
                  }
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 4601,
                        "name": "sum",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 4584,
                        "src": "2193:3:3",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 4602,
                        "name": "c",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 4574,
                        "src": "2198:1:3",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "id": 4600,
                      "name": "subUInt",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 4534,
                      "src": "2185:7:3",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_enum$_MathError_$4429_$_t_uint256_$",
                        "typeString": "function (uint256,uint256) pure returns (enum CarefulMath.MathError,uint256)"
                      }
                    },
                    "id": 4603,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "2185:15:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$_t_enum$_MathError_$4429_$_t_uint256_$",
                      "typeString": "tuple(enum CarefulMath.MathError,uint256)"
                    }
                  },
                  "functionReturnParameters": 4580,
                  "id": 4604,
                  "nodeType": "Return",
                  "src": "2178:22:3"
                }
              ]
            },
            "documentation": "@dev add a and b and then subtract c",
            "id": 4606,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "addThenSubUInt",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 4575,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 4570,
                  "name": "a",
                  "nodeType": "VariableDeclaration",
                  "scope": 4606,
                  "src": "1953:9:3",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 4569,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "1953:7:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 4572,
                  "name": "b",
                  "nodeType": "VariableDeclaration",
                  "scope": 4606,
                  "src": "1964:9:3",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 4571,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "1964:7:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 4574,
                  "name": "c",
                  "nodeType": "VariableDeclaration",
                  "scope": 4606,
                  "src": "1975:9:3",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 4573,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "1975:7:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "1952:33:3"
            },
            "returnParameters": {
              "id": 4580,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 4577,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 4606,
                  "src": "2009:9:3",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_enum$_MathError_$4429",
                    "typeString": "enum CarefulMath.MathError"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 4576,
                    "name": "MathError",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 4429,
                    "src": "2009:9:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_enum$_MathError_$4429",
                      "typeString": "enum CarefulMath.MathError"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 4579,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 4606,
                  "src": "2020:7:3",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 4578,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "2020:7:3",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "2008:20:3"
            },
            "scope": 4607,
            "src": "1929:278:3",
            "stateMutability": "pure",
            "superFunction": null,
            "visibility": "internal"
          }
        ],
        "scope": 4608,
        "src": "242:1967:3"
      }
    ],
    "src": "0:2210:3"
  },
  "compiler": {
    "name": "solc",
    "version": "0.5.12+commit.7709ece9.Emscripten.clang"
  },
  "networks": {},
  "schemaVersion": "3.0.21",
  "updatedAt": "2020-04-22T17:31:54.505Z",
  "devdoc": {
    "author": "Compound",
    "methods": {},
    "title": "Careful Math"
  },
  "userdoc": {
    "methods": {},
    "notice": "Derived from OpenZeppelin's SafeMath library        https://github.com/OpenZeppelin/openzeppelin-solidity/blob/master/contracts/math/SafeMath.sol"
  }
}