library LibFindMethod {

    /// @dev Returns the method of an ABIencoded call
    /// @param assembledData Bytes of the call data
    /// @return Bytes4 of the function signature
    function findMethod(bytes assembledData)
        internal
        pure
        returns (bytes4 method)
    {
        // find the bytes4(keccak256('functionABI')) of the function
        assembly {
            // Load free memory pointer
            method := mload(0x00)
            let transaction := assembledData
            method := mload(add(transaction, 0x20))
        }
        return method;
    }
}
function findMethod(bytes assembledData)
    internal
    pure
    returns (bytes4 method)
{
    // find the bytes4(keccak256('functionABI')) of the function
    assembly {
        // Load free memory pointer
        method := mload(0x00)
        let transaction := assembledData
        method := mload(add(transaction, 0x20))
    }
    return method;
}

/// @dev Returns the method of an ABIencoded call
/// @param assembledData Bytes of the call data
/// @return Bytes4 of the function signature