function trade(
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        uint[] _nums,
        
        
        
        
        address[] _addrs,
        
        
        
        
        
        
        
        bytes32[] _rss
    ) public whenNotPaused {
        
        uint N = _addrs.length - 1;

        require(_nums.length == 6*N+4);
        require(_rss.length == 2*N+2);

        
        
        require(_nums[0] == BUY || _nums[0] == SELL);

        
        saveNonce(_nums[1]);

        
        require(now <= _nums[3]);

        
        
        
        
        
        bytes32 tradeHash = keccak256(
            this, msg.sender, uint8(_nums[0]), _addrs[0], _nums[1], _nums[3]
        );

        
        bytes32 orderHash;

        for (uint i = 0; i < N; i++) {
            checkExpiration(i, _nums);

            orderHash = verifyOrder(i, _nums, _addrs, _rss);

            
            tradeHash = keccak256(tradeHash, orderHash, _nums[6*i+9]);

            tradeOrder(i, _nums, _addrs);
        }

        checkTradeSignature(tradeHash, _nums, _rss);

        sendTradeEvent(_nums, _addrs);
    }