{
    "Function": "countLegs",
    "File": "contracts/types/TokenId.sol",
    "Parent Contracts": [],
    "High-Level Calls": [],
    "Internal Calls": [],
    "Library Calls": [],
    "Low-Level Calls": [],
    "Code": "function countLegs(uint256 self) internal pure returns (uint256) {\n        // Strip all bits except for the option ratios\n        uint256 optionRatios = self & OPTION_RATIO_MASK;\n\n        // The legs are filled in from least to most significant\n        // Each comparison here is to the start of the next leg's option ratio section\n        // Since only the option ratios remain, we can be sure that no bits above the start of the inactive legs will be 1\n        if (optionRatios < 2 ** 64) {\n            return 0;\n        } else if (optionRatios < 2 ** 112) {\n            return 1;\n        } else if (optionRatios < 2 ** 160) {\n            return 2;\n        } else if (optionRatios < 2 ** 208) {\n            return 3;\n        }\n        return 4;\n    }"
}