    function mul(int256 a, int256 b) internal pure returns (int256) {
        if (a == 0) {
            return 0;
        }
        require(!(a == -1 && b == INT256_MIN));  
        int256 c = a * b;
        require(c / a == b);
        return c;
    }