```\nfunction div(int256 a, int256 b) internal pure returns (int256) {\n    // Prevent overflow when dividing MIN_INT256 by -1\n    require(b != -1 || a != MIN_INT256);\n\n    // Solidity already throws when dividing by 0.\n    return a / b;\n}\n```\n