{
    "Function": "leastSignificantBit",
    "File": "contracts/helper/BitMath.sol",
    "Parent Contracts": [],
    "High-Level Calls": [],
    "Internal Calls": [
        "require(bool,string)"
    ],
    "Library Calls": [],
    "Low-Level Calls": [],
    "Code": "function leastSignificantBit(uint256 x) internal pure returns (uint8 r) {\n        require(x > 0, \"BitMath::leastSignificantBit: zero\");\n\n        r = 255;\n        if (x & type(uint128).max > 0) {\n            r -= 128;\n        } else {\n            x >>= 128;\n        }\n        if (x & type(uint64).max > 0) {\n            r -= 64;\n        } else {\n            x >>= 64;\n        }\n        if (x & type(uint32).max > 0) {\n            r -= 32;\n        } else {\n            x >>= 32;\n        }\n        if (x & type(uint16).max > 0) {\n            r -= 16;\n        } else {\n            x >>= 16;\n        }\n        if (x & type(uint8).max > 0) {\n            r -= 8;\n        } else {\n            x >>= 8;\n        }\n        if (x & 0xf > 0) {\n            r -= 4;\n        } else {\n            x >>= 4;\n        }\n        if (x & 0x3 > 0) {\n            r -= 2;\n        } else {\n            x >>= 2;\n        }\n        if (x & 0x1 > 0) r -= 1;\n    }"
}