```\n/\*\*\n \* @notice This is used by any router to decrease their available\n \* liquidity for a given asset.\n \* @param shares The amount of liquidity to remove for the router in shares\n \* @param assetId The address (or `address(0)` if native asset) of the\n \* asset you're removing liquidity for\n \* @param recipient The address that will receive the liquidity being removed\n \*/\nfunction removeLiquidity(\n  uint256 shares,\n  address assetId,\n  address payable recipient\n) external override {\n  // Sanity check: recipient is sensible\n  require(recipient != address(0), "#RL:007");\n\n  // Sanity check: nonzero shares\n  require(shares > 0, "#RL:035");\n\n  // Get stored router shares\n  uint256 routerShares = issuedShares[msg.sender][assetId];\n\n  // Get stored outstanding shares\n  uint256 outstanding = outstandingShares[assetId];\n\n  // Sanity check: owns enough shares\n  require(routerShares >= shares, "#RL:018");\n\n  // Convert shares to amount\n  uint256 amount = getAmountFromIssuedShares(\n    shares,\n    outstanding,\n    Asset.getOwnBalance(assetId)\n  );\n\n  // Update router issued shares\n  // NOTE: unchecked due to require above\n  unchecked {\n    issuedShares[msg.sender][assetId] = routerShares - shares;\n  }\n\n  // Update the total shares for asset\n  outstandingShares[assetId] = outstanding - shares;\n\n  // Transfer from contract to specified recipient\n  Asset.transferAsset(assetId, recipient, amount);\n\n  // Emit event\n  emit LiquidityRemoved(\n    msg.sender,\n    assetId,\n    shares,\n    amount,\n    recipient\n  );\n}\n```\n