{
    "Function": "divuq",
    "File": "contracts/helper/FixedPoint.sol",
    "Parent Contracts": [],
    "High-Level Calls": [
        "FullMath"
    ],
    "Internal Calls": [
        "require(bool,string)",
        "require(bool,string)",
        "require(bool,string)"
    ],
    "Library Calls": [
        "mulDiv"
    ],
    "Low-Level Calls": [],
    "Code": "function divuq(uq112x112 memory self, uq112x112 memory other)\n        internal\n        pure\n        returns (uq112x112 memory)\n    {\n        require(other._x > 0, \"FixedPoint::divuq: division by zero\");\n        if (self._x == other._x) {\n            return uq112x112(uint224(Q112));\n        }\n        if (self._x <= type(uint144).max) {\n            uint256 value = (uint256(self._x) << RESOLUTION) / other._x;\n            require(value <= type(uint224).max, \"FixedPoint::divuq: overflow\");\n            return uq112x112(uint224(value));\n        }\n\n        uint256 result = FullMath.mulDiv(Q112, self._x, other._x);\n        require(result <= type(uint224).max, \"FixedPoint::divuq: overflow\");\n        return uq112x112(uint224(result));\n    }"
}