Alarm Contract Address

Live:0x321a1e5e0ef137f37eeb5563c987d60ab9dcd8de
Testnet:N/A

The Alarm service is comprised of one normal contract and six library contracts. Verification of the alarm source requires independent verification of each of these contracts.

  • Scheduler: 0x321a1e5e0ef137f37eeb5563c987d60ab9dcd8de
  • SchedulerLib: 0x873bf63c898791e57fa66e7b9261ea81df0b8044
  • CallLib: 0x2746bcf29bffafcc7906752f639819171d18ce2b
  • ResourcePoolLib: 0x2b8f80bd9fe08f7a13cf5919ee20524cb4a75858
  • AccountingLib: 0x947aaa72162d32135d2af1ed0c6d610d541829c3
  • GroveLib: 0x661d36b10dd5b879e496edaf860327812fb81e48
  • StringLib: 0xb06732649abb0e2d4fd1988c7cd74aa182c5453e

While the source code for all libraries and contracts can be found on this page, due to a compiler bug with solc, you cannot verify the source using the merged source found below. Instead you will need to use the published sources which are available in the 0.5.0 release on github

To verify the compiled code of the contract, you will need to compile the source below with the solc compiler. You will likely need to use the same version used when deploying the contract,

$ solc --version
solc, the solidity compiler commandline interface
Version: 0.1.6-d6e77ce0/Release-Darwin/clang/JIT linked to libethereum-1.1.0-16476b37/Release-Darwin/clang/JIT

The source was compiled with the command solc --optimize --bin --bin-runtime contracts/Scheduler.sol libraries/* with the command being run from the root of the github project. This will produce unlinked source code, which means that there will be placeholders for the addresses of the library contracts. You can either compile with linking enabled or manually fill in the contract addresses above to get the compiled binary.

$ solc --bin --bin-runtime --optimize contracts/Alarm.sol libraries/* | solce --link --libraries SchedulerLib:0x873bf63c898791e57fa66e7b9261ea81df0b8044,CallLib:0x2746bcf29bffafcc7906752f639819171d18ce2b,AccountingLib:0x947aaa72162d32135d2af1ed0c6d610d541829c3,GroveLib:0x661d36b10dd5b879e496edaf860327812fb81e48,StringLib:0xb06732649abb0e2d4fd1988c7cd74aa182c5453e,ResourcePoolLib:0x2b8f80bd9fe08f7a13cf5919ee20524cb4a75858

To verify the source you check that the runtime bytecode associated with each of contract address equals the runtime binary output from the solc compiler.

Source Code

// Accounting v0.1 (not the same as the 0.1 release of this library)

/// @title Accounting Lib - Accounting utilities
/// @author Piper Merriam - 
library AccountingLib {
        /*
         *  Address: 0x947aaa72162d32135d2af1ed0c6d610d541829c3
         */
        struct Bank {
            mapping (address => uint) accountBalances;
        }

        /// @dev Low level method for adding funds to an account.  Protects against overflow.
        /// @param self The Bank instance to operate on.
        /// @param accountAddress The address of the account the funds should be added to.
        /// @param value The amount that should be added to the account.
        function addFunds(Bank storage self, address accountAddress, uint value) public {
                if (self.accountBalances[accountAddress] + value < self.accountBalances[accountAddress]) {
                        // Prevent Overflow.
                        throw;
                }
                self.accountBalances[accountAddress] += value;
        }

        event _Deposit(address indexed _from, address indexed accountAddress, uint value);
        /// @dev Function wrapper around the _Deposit event so that it can be used by contracts.  Can be used to log a deposit to an account.
        /// @param _from The address that deposited the funds.
        /// @param accountAddress The address of the account the funds were added to.
        /// @param value The amount that was added to the account.
        function Deposit(address _from, address accountAddress, uint value) public {
            _Deposit(_from, accountAddress, value);
        }


        /// @dev Safe function for depositing funds.  Returns boolean for whether the deposit was successful
        /// @param self The Bank instance to operate on.
        /// @param accountAddress The address of the account the funds should be added to.
        /// @param value The amount that should be added to the account.
        function deposit(Bank storage self, address accountAddress, uint value) public returns (bool) {
                addFunds(self, accountAddress, value);
                return true;
        }

        event _Withdrawal(address indexed accountAddress, uint value);

        /// @dev Function wrapper around the _Withdrawal event so that it can be used by contracts.  Can be used to log a withdrawl from an account.
        /// @param accountAddress The address of the account the funds were withdrawn from.
        /// @param value The amount that was withdrawn to the account.
        function Withdrawal(address accountAddress, uint value) public {
            _Withdrawal(accountAddress, value);
        }

        event _InsufficientFunds(address indexed accountAddress, uint value, uint balance);

        /// @dev Function wrapper around the _InsufficientFunds event so that it can be used by contracts.  Can be used to log a failed withdrawl from an account.
        /// @param accountAddress The address of the account the funds were to be withdrawn from.
        /// @param value The amount that was attempted to be withdrawn from the account.
        /// @param balance The current balance of the account.
        function InsufficientFunds(address accountAddress, uint value, uint balance) public {
            _InsufficientFunds(accountAddress, value, balance);
        }

        /// @dev Low level method for removing funds from an account.  Protects against underflow.
        /// @param self The Bank instance to operate on.
        /// @param accountAddress The address of the account the funds should be deducted from.
        /// @param value The amount that should be deducted from the account.
        function deductFunds(Bank storage self, address accountAddress, uint value) public {
                /*
                 *  Helper function that should be used for any reduction of
                 *  account funds.  It has error checking to prevent
                 *  underflowing the account balance which would be REALLY bad.
                 */
                if (value > self.accountBalances[accountAddress]) {
                        // Prevent Underflow.
                        throw;
                }
                self.accountBalances[accountAddress] -= value;
        }

        /// @dev Safe function for withdrawing funds.  Returns boolean for whether the deposit was successful as well as sending the amount in ether to the account address.
        /// @param self The Bank instance to operate on.
        /// @param accountAddress The address of the account the funds should be withdrawn from.
        /// @param value The amount that should be withdrawn from the account.
        function withdraw(Bank storage self, address accountAddress, uint value) public returns (bool) {
                /*
                 *  Public API for withdrawing funds.
                 */
                if (self.accountBalances[accountAddress] >= value) {
                        deductFunds(self, accountAddress, value);
                        if (!accountAddress.send(value)) {
                                // Potentially sending money to a contract that
                                // has a fallback function.  So instead, try
                                // tranferring the funds with the call api.
                                if (!accountAddress.call.value(value)()) {
                                        // Revert the entire transaction.  No
                                        // need to destroy the funds.
                                        throw;
                                }
                        }
                        return true;
                }
                return false;
        }

        function sendRobust(address toAddress, uint value) public returns (bool) {
                if (value > 0 && !toAddress.send(value)) {
                        // Potentially sending money to a contract that
                        // has a fallback function.  So instead, try
                        // tranferring the funds with the call api.
                        if (!toAddress.call.value(value)()) {
                                return false;
                        }
                }
                return true;
        }
}
library CallLib {
        /*
         *  Address: 0x2746bcf29bffafcc7906752f639819171d18ce2b
         */
        struct Call {
                address contractAddress;
                bytes4 abiSignature;
                bytes callData;
                uint anchorGasPrice;
                uint suggestedGas;
        }

        address constant creator = 0xd3cda913deb6f67967b99d67acdfa1712c293601;

        function extractCallData(Call storage call, bytes data) public {
            call.callData.length = data.length - 4;
            if (data.length > 4) {
                    for (uint i = 0; i < call.callData.length; i++) {
                            call.callData[i] = data[i + 4];
                    }
            }
        }

        function sendSafe(address toAddress, uint value) public returns (uint) {
                if (value > address(this).balance) {
                        value = address(this).balance;
                }
                if (value > 0) {
                        AccountingLib.sendRobust(toAddress, value);
                        return value;
                }
                return 0;
        }

        function getCallFeeScalar(uint baseGasPrice, uint gasPrice) constant returns (uint) {
                /*
                 *  Return a number between 0 - 200 to scale the fee based on
                 *  the gas price set for the calling transaction as compared
                 *  to the gas price of the scheduling transaction.
                 *
                 *  - number approaches zero as the transaction gas price goes
                 *  above the gas price recorded when the call was scheduled.
                 *
                 *  - the number approaches 200 as the transaction gas price
                 *  drops under the price recorded when the call was scheduled.
                 *
                 *  This encourages lower gas costs as the lower the gas price
                 *  for the executing transaction, the higher the payout to the
                 *  caller.
                 */
                if (gasPrice > baseGasPrice) {
                        return 100 * baseGasPrice / gasPrice;
                }
                else {
                        return 200 - 100 * baseGasPrice / (2 * baseGasPrice - gasPrice);
                }
        }

        event CallExecuted(address indexed executor, uint gasCost, uint payment, uint fee, bool success);

        event _CallAborted(address executor, bytes32 reason);
        function CallAborted(address executor, bytes32 reason) public {
            _CallAborted(executor, reason);
        }

        function execute(Call storage call, uint startGas, address executor, uint basePayment, uint baseFee, uint overhead, uint extraGas) public {
            // Make the call
            bool success = call.contractAddress.call.gas(msg.gas - overhead)(call.abiSignature, call.callData);

            // Compute the scalar (0 - 200) for the fee.
            uint feeScalar = getCallFeeScalar(call.anchorGasPrice, tx.gasprice);

            uint payment = basePayment * feeScalar / 100; 
            uint fee = baseFee * feeScalar / 100;

            // Log how much gas this call used.  EXTRA_CALL_GAS is a fixed
            // amount that represents the gas usage of the commands that
            // happen after this line.
            uint gasCost = tx.gasprice * (startGas - msg.gas + extraGas);

            // Now we need to pay the executor as well as keep fee.
            payment = sendSafe(executor, payment + gasCost);
            fee = sendSafe(creator, fee);

            // Log execution
            CallExecuted(executor, gasCost, payment, fee, success);
        }

        event Cancelled(address indexed cancelledBy);

        function cancel(address sender) public {
                Cancelled(sender);
                suicide(sender);
        }
}


contract FutureCall {
        address public owner;
        address public schedulerAddress;

        uint public basePayment;
        uint public baseFee;

        CallLib.Call call;

        function contractAddress() constant returns (address) {
                return call.contractAddress;
        }

        function abiSignature() constant returns (bytes4) {
                return call.abiSignature;
        }

        function callData() constant returns (bytes) {
                return call.callData;
        }

        function anchorGasPrice() constant returns (uint) {
                return call.anchorGasPrice;
        }

        function suggestedGas() constant returns (uint) {
                return call.suggestedGas;
        }

        function () {
                // Fallback to allow sending funds to this contract.
                // Also allows call data registration.
                if (msg.sender == schedulerAddress && msg.data.length > 0) {
                        if (call.callData.length != 0) {
                            throw;
                        }
                        call.callData = msg.data;
                }
        }

        modifier onlyscheduler { if (msg.sender == schedulerAddress) _ }

        // The author (Piper Merriam) address.
        address constant creator = 0xd3cda913deb6f67967b99d67acdfa1712c293601;

        function registerData() public onlyscheduler {
                if (call.callData.length > 0) {
                        // cannot write over call data
                        throw;
                }
                CallLib.extractCallData(call, msg.data);
        }

        // API for inherited contracts
        function beforeExecute(address executor) public returns (bool);
        function afterExecute(address executor) internal;
        function getOverhead() constant returns (uint);
        function getExtraGas() constant returns (uint);

        function sendSafe(address toAddress, uint value) internal {
                CallLib.sendSafe(toAddress, value);
        }

        modifier onlyowner { if (msg.sender == owner) _ }

        function execute() public onlyowner {
                uint startGas = msg.gas;
                execute(startGas,  msg.sender);
        }

        function execute(uint startGas, address executor) public onlyowner {
            CallLib.execute(call, startGas, executor, basePayment, baseFee, getOverhead(), getExtraGas());

            // Any logic that needs to occur after the call has executed should
            // go in afterExecute
            afterExecute(executor);
        }
}


contract FutureBlockCall is FutureCall {
        uint public targetBlock;
        uint8 public gracePeriod;

        function FutureBlockCall(address _schedulerAddress, uint _targetBlock, uint8 _gracePeriod, address _contractAddress, bytes4 _abiSignature, uint _suggestedGas, uint _basePayment, uint _baseFee) {
                owner = msg.sender;

                schedulerAddress = _schedulerAddress;

                targetBlock = _targetBlock;
                gracePeriod = _gracePeriod;


                basePayment = _basePayment;
                baseFee = _baseFee;

                call.suggestedGas = _suggestedGas;
                call.anchorGasPrice = tx.gasprice;
                call.contractAddress = _contractAddress;
                call.abiSignature = _abiSignature;
        }

        function beforeExecute(address executor) public returns (bool) {
                if (block.number < targetBlock || block.number > targetBlock + gracePeriod) {
                        // Not being called within call window.
                        CallLib.CallAborted(executor, "NOT_IN_CALL_WINDOW");
                        return false;
                }

                return true;
        }

        function afterExecute(address executor) internal {
            suicide(schedulerAddress);
        }

        function getOverhead() constant returns (uint) {
                // TODO
                return 46000;
        }

        function getExtraGas() constant returns (uint) {
                // TODO
                return 17000;
        }

        uint constant BEFORE_CALL_FREEZE_WINDOW = 10;

        function cancel() public onlyscheduler {
                if (block.number < targetBlock - BEFORE_CALL_FREEZE_WINDOW || block.number > targetBlock + gracePeriod) {
                        CallLib.cancel(msg.sender);
                }
        }

        function isAlive() constant returns (bool) {
                return true;
        }
}

// Grove v0.2


/// @title GroveLib - Library for queriable indexed ordered data.
/// @author PiperMerriam - 
library GroveLib {
        /*
         *  Indexes for ordered data
         *
         *  Address: 0x661d36b10dd5b879e496edaf860327812fb81e48
         */
        struct Index {
                bytes32 root;
                mapping (bytes32 => Node) nodes;
        }

        struct Node {
                bytes32 id;
                int value;
                bytes32 parent;
                bytes32 left;
                bytes32 right;
                uint height;
        }

        function max(uint a, uint b) internal returns (uint) {
            if (a >= b) {
                return a;
            }
            return b;
        }

        /*
         *  Node getters
         */
        /// @dev Retrieve the unique identifier for the node.
        /// @param index The index that the node is part of.
        /// @param id The id for the node to be looked up.
        function getNodeId(Index storage index, bytes32 id) constant returns (bytes32) {
            return index.nodes[id].id;
        }

        /// @dev Retrieve the value for the node.
        /// @param index The index that the node is part of.
        /// @param id The id for the node to be looked up.
        function getNodeValue(Index storage index, bytes32 id) constant returns (int) {
            return index.nodes[id].value;
        }

        /// @dev Retrieve the height of the node.
        /// @param index The index that the node is part of.
        /// @param id The id for the node to be looked up.
        function getNodeHeight(Index storage index, bytes32 id) constant returns (uint) {
            return index.nodes[id].height;
        }

        /// @dev Retrieve the parent id of the node.
        /// @param index The index that the node is part of.
        /// @param id The id for the node to be looked up.
        function getNodeParent(Index storage index, bytes32 id) constant returns (bytes32) {
            return index.nodes[id].parent;
        }

        /// @dev Retrieve the left child id of the node.
        /// @param index The index that the node is part of.
        /// @param id The id for the node to be looked up.
        function getNodeLeftChild(Index storage index, bytes32 id) constant returns (bytes32) {
            return index.nodes[id].left;
        }

        /// @dev Retrieve the right child id of the node.
        /// @param index The index that the node is part of.
        /// @param id The id for the node to be looked up.
        function getNodeRightChild(Index storage index, bytes32 id) constant returns (bytes32) {
            return index.nodes[id].right;
        }

        /// @dev Retrieve the node id of the next node in the tree.
        /// @param index The index that the node is part of.
        /// @param id The id for the node to be looked up.
        function getPreviousNode(Index storage index, bytes32 id) constant returns (bytes32) {
            Node storage currentNode = index.nodes[id];

            if (currentNode.id == 0x0) {
                // Unknown node, just return 0x0;
                return 0x0;
            }

            Node memory child;

            if (currentNode.left != 0x0) {
                // Trace left to latest child in left tree.
                child = index.nodes[currentNode.left];

                while (child.right != 0) {
                    child = index.nodes[child.right];
                }
                return child.id;
            }

            if (currentNode.parent != 0x0) {
                // Now we trace back up through parent relationships, looking
                // for a link where the child is the right child of it's
                // parent.
                Node storage parent = index.nodes[currentNode.parent];
                child = currentNode;

                while (true) {
                    if (parent.right == child.id) {
                        return parent.id;
                    }

                    if (parent.parent == 0x0) {
                        break;
                    }
                    child = parent;
                    parent = index.nodes[parent.parent];
                }
            }

            // This is the first node, and has no previous node.
            return 0x0;
        }

        /// @dev Retrieve the node id of the previous node in the tree.
        /// @param index The index that the node is part of.
        /// @param id The id for the node to be looked up.
        function getNextNode(Index storage index, bytes32 id) constant returns (bytes32) {
            Node storage currentNode = index.nodes[id];

            if (currentNode.id == 0x0) {
                // Unknown node, just return 0x0;
                return 0x0;
            }

            Node memory child;

            if (currentNode.right != 0x0) {
                // Trace right to earliest child in right tree.
                child = index.nodes[currentNode.right];

                while (child.left != 0) {
                    child = index.nodes[child.left];
                }
                return child.id;
            }

            if (currentNode.parent != 0x0) {
                // if the node is the left child of it's parent, then the
                // parent is the next one.
                Node storage parent = index.nodes[currentNode.parent];
                child = currentNode;

                while (true) {
                    if (parent.left == child.id) {
                        return parent.id;
                    }

                    if (parent.parent == 0x0) {
                        break;
                    }
                    child = parent;
                    parent = index.nodes[parent.parent];
                }

                // Now we need to trace all the way up checking to see if any parent is the 
            }

            // This is the final node.
            return 0x0;
        }


        /// @dev Updates or Inserts the id into the index at its appropriate location based on the value provided.
        /// @param index The index that the node is part of.
        /// @param id The unique identifier of the data element the index node will represent.
        /// @param value The value of the data element that represents it's total ordering with respect to other elementes.
        function insert(Index storage index, bytes32 id, int value) public {
                if (index.nodes[id].id == id) {
                    // A node with this id already exists.  If the value is
                    // the same, then just return early, otherwise, remove it
                    // and reinsert it.
                    if (index.nodes[id].value == value) {
                        return;
                    }
                    remove(index, id);
                }

                uint leftHeight;
                uint rightHeight;

                bytes32 previousNodeId = 0x0;

                if (index.root == 0x0) {
                    index.root = id;
                }
                Node storage currentNode = index.nodes[index.root];

                // Do insertion
                while (true) {
                    if (currentNode.id == 0x0) {
                        // This is a new unpopulated node.
                        currentNode.id = id;
                        currentNode.parent = previousNodeId;
                        currentNode.value = value;
                        break;
                    }

                    // Set the previous node id.
                    previousNodeId = currentNode.id;

                    // The new node belongs in the right subtree
                    if (value >= currentNode.value) {
                        if (currentNode.right == 0x0) {
                            currentNode.right = id;
                        }
                        currentNode = index.nodes[currentNode.right];
                        continue;
                    }

                    // The new node belongs in the left subtree.
                    if (currentNode.left == 0x0) {
                        currentNode.left = id;
                    }
                    currentNode = index.nodes[currentNode.left];
                }

                // Rebalance the tree
                _rebalanceTree(index, currentNode.id);
        }

        /// @dev Checks whether a node for the given unique identifier exists within the given index.
        /// @param index The index that should be searched
        /// @param id The unique identifier of the data element to check for.
        function exists(Index storage index, bytes32 id) constant returns (bool) {
            return (index.nodes[id].id == id);
        }

        /// @dev Remove the node for the given unique identifier from the index.
        /// @param index The index that should be removed
        /// @param id The unique identifier of the data element to remove.
        function remove(Index storage index, bytes32 id) public {
            Node storage replacementNode;
            Node storage parent;
            Node storage child;
            bytes32 rebalanceOrigin;

            Node storage nodeToDelete = index.nodes[id];

            if (nodeToDelete.id != id) {
                // The id does not exist in the tree.
                return;
            }

            if (nodeToDelete.left != 0x0 || nodeToDelete.right != 0x0) {
                // This node is not a leaf node and thus must replace itself in
                // it's tree by either the previous or next node.
                if (nodeToDelete.left != 0x0) {
                    // This node is guaranteed to not have a right child.
                    replacementNode = index.nodes[getPreviousNode(index, nodeToDelete.id)];
                }
                else {
                    // This node is guaranteed to not have a left child.
                    replacementNode = index.nodes[getNextNode(index, nodeToDelete.id)];
                }
                // The replacementNode is guaranteed to have a parent.
                parent = index.nodes[replacementNode.parent];

                // Keep note of the location that our tree rebalancing should
                // start at.
                rebalanceOrigin = replacementNode.id;

                // Join the parent of the replacement node with any subtree of
                // the replacement node.  We can guarantee that the replacement
                // node has at most one subtree because of how getNextNode and
                // getPreviousNode are used.
                if (parent.left == replacementNode.id) {
                    parent.left = replacementNode.right;
                    if (replacementNode.right != 0x0) {
                        child = index.nodes[replacementNode.right];
                        child.parent = parent.id;
                    }
                }
                if (parent.right == replacementNode.id) {
                    parent.right = replacementNode.left;
                    if (replacementNode.left != 0x0) {
                        child = index.nodes[replacementNode.left];
                        child.parent = parent.id;
                    }
                }

                // Now we replace the nodeToDelete with the replacementNode.
                // This includes parent/child relationships for all of the
                // parent, the left child, and the right child.
                replacementNode.parent = nodeToDelete.parent;
                if (nodeToDelete.parent != 0x0) {
                    parent = index.nodes[nodeToDelete.parent];
                    if (parent.left == nodeToDelete.id) {
                        parent.left = replacementNode.id;
                    }
                    if (parent.right == nodeToDelete.id) {
                        parent.right = replacementNode.id;
                    }
                }
                else {
                    // If the node we are deleting is the root node update the
                    // index root node pointer.
                    index.root = replacementNode.id;
                }

                replacementNode.left = nodeToDelete.left;
                if (nodeToDelete.left != 0x0) {
                    child = index.nodes[nodeToDelete.left];
                    child.parent = replacementNode.id;
                }

                replacementNode.right = nodeToDelete.right;
                if (nodeToDelete.right != 0x0) {
                    child = index.nodes[nodeToDelete.right];
                    child.parent = replacementNode.id;
                }
            }
            else if (nodeToDelete.parent != 0x0) {
                // The node being deleted is a leaf node so we only erase it's
                // parent linkage.
                parent = index.nodes[nodeToDelete.parent];

                if (parent.left == nodeToDelete.id) {
                    parent.left = 0x0;
                }
                if (parent.right == nodeToDelete.id) {
                    parent.right = 0x0;
                }

                // keep note of where the rebalancing should begin.
                rebalanceOrigin = parent.id;
            }
            else {
                // This is both a leaf node and the root node, so we need to
                // unset the root node pointer.
                index.root = 0x0;
            }

            // Now we zero out all of the fields on the nodeToDelete.
            nodeToDelete.id = 0x0;
            nodeToDelete.value = 0;
            nodeToDelete.parent = 0x0;
            nodeToDelete.left = 0x0;
            nodeToDelete.right = 0x0;

            // Walk back up the tree rebalancing
            if (rebalanceOrigin != 0x0) {
                _rebalanceTree(index, rebalanceOrigin);
            }
        }

        bytes2 constant GT = ">";
        bytes2 constant LT = "<";
        bytes2 constant GTE = ">=";
        bytes2 constant LTE = "<=";
        bytes2 constant EQ = "==";

        function _compare(int left, bytes2 operator, int right) internal returns (bool) {
            if (operator == GT) {
                return (left > right);
            }
            if (operator == LT) {
                return (left < right);
            }
            if (operator == GTE) {
                return (left >= right);
            }
            if (operator == LTE) {
                return (left <= right);
            }
            if (operator == EQ) {
                return (left == right);
            }

            // Invalid operator.
            throw;
        }

        function _getMaximum(Index storage index, bytes32 id) internal returns (int) {
                Node storage currentNode = index.nodes[id];

                while (true) {
                    if (currentNode.right == 0x0) {
                        return currentNode.value;
                    }
                    currentNode = index.nodes[currentNode.right];
                }
        }

        function _getMinimum(Index storage index, bytes32 id) internal returns (int) {
                Node storage currentNode = index.nodes[id];

                while (true) {
                    if (currentNode.left == 0x0) {
                        return currentNode.value;
                    }
                    currentNode = index.nodes[currentNode.left];
                }
        }


        /** @dev Query the index for the edge-most node that satisfies the
         *  given query.  For >, >=, and ==, this will be the left-most node
         *  that satisfies the comparison.  For < and <= this will be the
         *  right-most node that satisfies the comparison.
         */
        /// @param index The index that should be queried
        /** @param operator One of '>', '>=', '<', '<=', '==' to specify what
         *  type of comparison operator should be used.
         */
        function query(Index storage index, bytes2 operator, int value) public returns (bytes32) {
                bytes32 rootNodeId = index.root;
                
                if (rootNodeId == 0x0) {
                    // Empty tree.
                    return 0x0;
                }

                Node storage currentNode = index.nodes[rootNodeId];

                while (true) {
                    if (_compare(currentNode.value, operator, value)) {
                        // We have found a match but it might not be the
                        // *correct* match.
                        if ((operator == LT) || (operator == LTE)) {
                            // Need to keep traversing right until this is no
                            // longer true.
                            if (currentNode.right == 0x0) {
                                return currentNode.id;
                            }
                            if (_compare(_getMinimum(index, currentNode.right), operator, value)) {
                                // There are still nodes to the right that
                                // match.
                                currentNode = index.nodes[currentNode.right];
                                continue;
                            }
                            return currentNode.id;
                        }

                        if ((operator == GT) || (operator == GTE) || (operator == EQ)) {
                            // Need to keep traversing left until this is no
                            // longer true.
                            if (currentNode.left == 0x0) {
                                return currentNode.id;
                            }
                            if (_compare(_getMaximum(index, currentNode.left), operator, value)) {
                                currentNode = index.nodes[currentNode.left];
                                continue;
                            }
                            return currentNode.id;
                        }
                    }

                    if ((operator == LT) || (operator == LTE)) {
                        if (currentNode.left == 0x0) {
                            // There are no nodes that are less than the value
                            // so return null.
                            return 0x0;
                        }
                        currentNode = index.nodes[currentNode.left];
                        continue;
                    }

                    if ((operator == GT) || (operator == GTE)) {
                        if (currentNode.right == 0x0) {
                            // There are no nodes that are greater than the value
                            // so return null.
                            return 0x0;
                        }
                        currentNode = index.nodes[currentNode.right];
                        continue;
                    }

                    if (operator == EQ) {
                        if (currentNode.value < value) {
                            if (currentNode.right == 0x0) {
                                return 0x0;
                            }
                            currentNode = index.nodes[currentNode.right];
                            continue;
                        }

                        if (currentNode.value > value) {
                            if (currentNode.left == 0x0) {
                                return 0x0;
                            }
                            currentNode = index.nodes[currentNode.left];
                            continue;
                        }
                    }
                }
        }

        function _rebalanceTree(Index storage index, bytes32 id) internal {
            // Trace back up rebalancing the tree and updating heights as
            // needed..
            Node storage currentNode = index.nodes[id];

            while (true) {
                int balanceFactor = _getBalanceFactor(index, currentNode.id);

                if (balanceFactor == 2) {
                    // Right rotation (tree is heavy on the left)
                    if (_getBalanceFactor(index, currentNode.left) == -1) {
                        // The subtree is leaning right so it need to be
                        // rotated left before the current node is rotated
                        // right.
                        _rotateLeft(index, currentNode.left);
                    }
                    _rotateRight(index, currentNode.id);
                }

                if (balanceFactor == -2) {
                    // Left rotation (tree is heavy on the right)
                    if (_getBalanceFactor(index, currentNode.right) == 1) {
                        // The subtree is leaning left so it need to be
                        // rotated right before the current node is rotated
                        // left.
                        _rotateRight(index, currentNode.right);
                    }
                    _rotateLeft(index, currentNode.id);
                }

                if ((-1 <= balanceFactor) && (balanceFactor <= 1)) {
                    _updateNodeHeight(index, currentNode.id);
                }

                if (currentNode.parent == 0x0) {
                    // Reached the root which may be new due to tree
                    // rotation, so set it as the root and then break.
                    break;
                }

                currentNode = index.nodes[currentNode.parent];
            }
        }

        function _getBalanceFactor(Index storage index, bytes32 id) internal returns (int) {
                Node storage node = index.nodes[id];

                return int(index.nodes[node.left].height) - int(index.nodes[node.right].height);
        }

        function _updateNodeHeight(Index storage index, bytes32 id) internal {
                Node storage node = index.nodes[id];

                node.height = max(index.nodes[node.left].height, index.nodes[node.right].height) + 1;
        }

        function _rotateLeft(Index storage index, bytes32 id) internal {
            Node storage originalRoot = index.nodes[id];

            if (originalRoot.right == 0x0) {
                // Cannot rotate left if there is no right originalRoot to rotate into
                // place.
                throw;
            }

            // The right child is the new root, so it gets the original
            // `originalRoot.parent` as it's parent.
            Node storage newRoot = index.nodes[originalRoot.right];
            newRoot.parent = originalRoot.parent;

            // The original root needs to have it's right child nulled out.
            originalRoot.right = 0x0;

            if (originalRoot.parent != 0x0) {
                // If there is a parent node, it needs to now point downward at
                // the newRoot which is rotating into the place where `node` was.
                Node storage parent = index.nodes[originalRoot.parent];

                // figure out if we're a left or right child and have the
                // parent point to the new node.
                if (parent.left == originalRoot.id) {
                    parent.left = newRoot.id;
                }
                if (parent.right == originalRoot.id) {
                    parent.right = newRoot.id;
                }
            }


            if (newRoot.left != 0) {
                // If the new root had a left child, that moves to be the
                // new right child of the original root node
                Node storage leftChild = index.nodes[newRoot.left];
                originalRoot.right = leftChild.id;
                leftChild.parent = originalRoot.id;
            }

            // Update the newRoot's left node to point at the original node.
            originalRoot.parent = newRoot.id;
            newRoot.left = originalRoot.id;

            if (newRoot.parent == 0x0) {
                index.root = newRoot.id;
            }

            // TODO: are both of these updates necessary?
            _updateNodeHeight(index, originalRoot.id);
            _updateNodeHeight(index, newRoot.id);
        }

        function _rotateRight(Index storage index, bytes32 id) internal {
            Node storage originalRoot = index.nodes[id];

            if (originalRoot.left == 0x0) {
                // Cannot rotate right if there is no left node to rotate into
                // place.
                throw;
            }

            // The left child is taking the place of node, so we update it's
            // parent to be the original parent of the node.
            Node storage newRoot = index.nodes[originalRoot.left];
            newRoot.parent = originalRoot.parent;

            // Null out the originalRoot.left
            originalRoot.left = 0x0;

            if (originalRoot.parent != 0x0) {
                // If the node has a parent, update the correct child to point
                // at the newRoot now.
                Node storage parent = index.nodes[originalRoot.parent];

                if (parent.left == originalRoot.id) {
                    parent.left = newRoot.id;
                }
                if (parent.right == originalRoot.id) {
                    parent.right = newRoot.id;
                }
            }

            if (newRoot.right != 0x0) {
                Node storage rightChild = index.nodes[newRoot.right];
                originalRoot.left = newRoot.right;
                rightChild.parent = originalRoot.id;
            }

            // Update the new root's right node to point to the original node.
            originalRoot.parent = newRoot.id;
            newRoot.right = originalRoot.id;

            if (newRoot.parent == 0x0) {
                index.root = newRoot.id;
            }

            // Recompute heights.
            _updateNodeHeight(index, originalRoot.id);
            _updateNodeHeight(index, newRoot.id);
        }
}
// Resource Pool v0.1.0
import "libraries/GroveLib.sol";
import "libraries/StringLib.sol";


// @title ResourcePoolLib - Library for a set of resources that are ready for use.
// @author Piper Merriam 
library ResourcePoolLib {
        /*
         *  Address: 0x2b8f80bd9fe08f7a13cf5919ee20524cb4a75858
         */
        struct Pool {
                uint rotationDelay;
                uint overlapSize;
                uint freezePeriod;

                uint _id;

                GroveLib.Index generationStart;
                GroveLib.Index generationEnd;

                mapping (uint => Generation) generations;
                mapping (address => uint) bonds;
        }

        /*
         * Generations have the following properties.
         *
         * 1. Must always overlap by a minimum amount specified by MIN_OVERLAP.
         *
         *    1   2   3   4   5   6   7   8   9   10  11  12  13
         *    [1:-----------------]
         *                [4:--------------------->
         */
        struct Generation {
                uint id;
                uint startAt;
                uint endAt;
                address[] members;
        }

        /// @dev Creates the next generation for the given pool.  All members from the current generation are carried over (with their order randomized).  The current generation will have it's endAt block set.
        /// @param self The pool to operate on.
        function createNextGeneration(Pool storage self) public returns (uint) {
                /*
                 *  Creat a new pool generation with all of the current
                 *  generation's members copied over in random order.
                 */
                Generation storage previousGeneration = self.generations[self._id];

                self._id += 1;
                Generation storage nextGeneration = self.generations[self._id];
                nextGeneration.id = self._id;
                nextGeneration.startAt = block.number + self.freezePeriod + self.rotationDelay;
                GroveLib.insert(self.generationStart, StringLib.uintToBytes(nextGeneration.id), int(nextGeneration.startAt));

                if (previousGeneration.id == 0) {
                        // This is the first generation so we just need to set
                        // it's `id` and `startAt`.
                        return nextGeneration.id;
                }

                // Set the end date for the current generation.
                previousGeneration.endAt = block.number + self.freezePeriod + self.rotationDelay + self.overlapSize;
                GroveLib.insert(self.generationEnd, StringLib.uintToBytes(previousGeneration.id), int(previousGeneration.endAt));

                // Now we copy the members of the previous generation over to
                // the next generation as well as randomizing their order.
                address[] memory members = previousGeneration.members;

                for (uint i = 0; i < members.length; i++) {
                    // Pick a *random* index and push it onto the next
                    // generation's members.
                    uint index = uint(sha3(block.blockhash(block.number))) % (members.length - nextGeneration.members.length);
                    nextGeneration.members.length += 1;
                    nextGeneration.members[nextGeneration.members.length - 1] = members[index];

                    // Then move the member at the last index into the picked
                    // index's location.
                    members[index] = members[members.length - 1];
                }

                return nextGeneration.id;
        }

        /// @dev Returns the first generation id that fully contains the block window provided.
        /// @param self The pool to operate on.
        /// @param leftBound The left bound for the block window (inclusive)
        /// @param rightBound The right bound for the block window (inclusive)
        function getGenerationForWindow(Pool storage self, uint leftBound, uint rightBound) constant returns (uint) {
            // TODO: tests
                var left = GroveLib.query(self.generationStart, "<=", int(leftBound));

                if (left != 0x0) {
                    Generation memory leftCandidate = self.generations[StringLib.bytesToUInt(left)];
                    if (leftCandidate.startAt <= leftBound && (leftCandidate.endAt >= rightBound || leftCandidate.endAt == 0)) {
                        return leftCandidate.id;
                    }
                }

                var right = GroveLib.query(self.generationEnd, ">=", int(rightBound));
                if (right != 0x0) {
                    Generation memory rightCandidate = self.generations[StringLib.bytesToUInt(right)];
                    if (rightCandidate.startAt <= leftBound && (rightCandidate.endAt >= rightBound || rightCandidate.endAt == 0)) {
                        return rightCandidate.id;
                    }
                }

                return 0;
        }

        /// @dev Returns the first generation in the future that has not yet started.
        /// @param self The pool to operate on.
        function getNextGenerationId(Pool storage self) constant returns (uint) {
            // TODO: tests
                var next = GroveLib.query(self.generationStart, ">", int(block.number));
                if (next == 0x0) {
                    return 0;
                }
                return StringLib.bytesToUInt(next);
        }

        /// @dev Returns the first generation that is currently active.
        /// @param self The pool to operate on.
        function getCurrentGenerationId(Pool storage self) constant returns (uint) {
            // TODO: tests
                var next = GroveLib.query(self.generationEnd, ">", int(block.number));
                if (next != 0x0) {
                    return StringLib.bytesToUInt(next);
                }

                next = GroveLib.query(self.generationStart, "<=", int(block.number));
                if (next != 0x0) {
                    return StringLib.bytesToUInt(next);
                }
                return 0;
        }

        /*
         *  Pool membership API
         */
        /// @dev Returns a boolean for whether the given address is in the given generation.
        /// @param self The pool to operate on.
        /// @param resourceAddress The address to check membership of
        /// @param generationId The id of the generation to check.
        function isInGeneration(Pool storage self, address resourceAddress, uint generationId) constant returns (bool) {
            // TODO: tests
            if (generationId == 0) {
                return false;
            }
            Generation memory generation = self.generations[generationId];
            for (uint i = 0; i < generation.members.length; i++) {
                if (generation.members[i] == resourceAddress) {
                    return true;
                }
            }
            return false;
        }

        /// @dev Returns a boolean for whether the given address is in the current generation.
        /// @param self The pool to operate on.
        /// @param resourceAddress The address to check membership of
        function isInCurrentGeneration(Pool storage self, address resourceAddress) constant returns (bool) {
            // TODO: tests
            return isInGeneration(self, resourceAddress, getCurrentGenerationId(self));
        }

        /// @dev Returns a boolean for whether the given address is in the next queued generation.
        /// @param self The pool to operate on.
        /// @param resourceAddress The address to check membership of
        function isInNextGeneration(Pool storage self, address resourceAddress) constant returns (bool) {
            // TODO: tests
            return isInGeneration(self, resourceAddress, getNextGenerationId(self));
        }

        /// @dev Returns a boolean for whether the given address is in either the current generation or the next queued generation.
        /// @param self The pool to operate on.
        /// @param resourceAddress The address to check membership of
        function isInPool(Pool storage self, address resourceAddress) constant returns (bool) {
            // TODO: tests
            return (isInCurrentGeneration(self, resourceAddress) || isInNextGeneration(self, resourceAddress));
        }

        event _AddedToGeneration(address indexed resourceAddress, uint indexed generationId);
        /// @dev Function to expose the _AddedToGeneration event to contracts.
        /// @param resourceAddress The address that was added
        /// @param generationId The id of the generation.
        function AddedToGeneration(address resourceAddress, uint generationId) public {
                _AddedToGeneration(resourceAddress, generationId);
        }

        event _RemovedFromGeneration(address indexed resourceAddress, uint indexed generationId);
        /// @dev Function to expose the _AddedToGeneration event to contracts.
        /// @param resourceAddress The address that was removed.
        /// @param generationId The id of the generation.
        function RemovedFromGeneration(address resourceAddress, uint generationId) public {
                _RemovedFromGeneration(resourceAddress, generationId);
        }

        /// @dev Returns a boolean as to whether the provided address is allowed to enter the pool at this time.
        /// @param self The pool to operate on.
        /// @param resourceAddress The address in question
        /// @param minimumBond The minimum bond amount that should be required for entry.
        function canEnterPool(Pool storage self, address resourceAddress, uint minimumBond) constant returns (bool) {
            /*
             *  - bond
             *  - pool is open
             *  - not already in it.
             *  - not already left it.
             */
            // TODO: tests
            if (self.bonds[resourceAddress] < minimumBond) {
                // Insufficient bond balance;
                return false;
            }

            if (isInPool(self, resourceAddress)) {
                // Already in the pool either in the next upcoming generation
                // or the currently active generation.
                return false;
            }

            var nextGenerationId = getNextGenerationId(self);
            if (nextGenerationId != 0) {
                var nextGeneration = self.generations[nextGenerationId];
                if (block.number + self.freezePeriod >= nextGeneration.startAt) {
                    // Next generation starts too soon.
                    return false;
                }
            }

            return true;
        }

        /// @dev Adds the address to pool by adding them to the next generation (as well as creating it if it doesn't exist).
        /// @param self The pool to operate on.
        /// @param resourceAddress The address to be added to the pool
        /// @param minimumBond The minimum bond amount that should be required for entry.
        function enterPool(Pool storage self, address resourceAddress, uint minimumBond) public returns (uint) {
            if (!canEnterPool(self, resourceAddress, minimumBond)) {
                throw;
            }
            uint nextGenerationId = getNextGenerationId(self);
            if (nextGenerationId == 0) {
                // No next generation has formed yet so create it.
                nextGenerationId = createNextGeneration(self);
            }
            Generation storage nextGeneration = self.generations[nextGenerationId];
            // now add the new address.
            nextGeneration.members.length += 1;
            nextGeneration.members[nextGeneration.members.length - 1] = resourceAddress;
            return nextGenerationId;
        }

        /// @dev Returns a boolean as to whether the provided address is allowed to exit the pool at this time.
        /// @param self The pool to operate on.
        /// @param resourceAddress The address in question
        function canExitPool(Pool storage self, address resourceAddress) constant returns (bool) {
            if (!isInCurrentGeneration(self, resourceAddress)) {
                // Not in the pool.
                return false;
            }

            uint nextGenerationId = getNextGenerationId(self);
            if (nextGenerationId == 0) {
                // Next generation hasn't been generated yet.
                return true;
            }

            if (self.generations[nextGenerationId].startAt - self.freezePeriod <= block.number) {
                // Next generation starts too soon.
                return false;
            }

            // They can leave if they are still in the next generation.
            // otherwise they have already left it.
            return isInNextGeneration(self, resourceAddress);
        }


        /// @dev Removes the address from the pool by removing them from the next generation (as well as creating it if it doesn't exist)
        /// @param self The pool to operate on.
        /// @param resourceAddress The address in question
        function exitPool(Pool storage self, address resourceAddress) public returns (uint) {
            if (!canExitPool(self, resourceAddress)) {
                throw;
            }
            uint nextGenerationId = getNextGenerationId(self);
            if (nextGenerationId == 0) {
                // No next generation has formed yet so create it.
                nextGenerationId = createNextGeneration(self);
            }
            // Remove them from the generation
            removeFromGeneration(self, nextGenerationId, resourceAddress);
            return nextGenerationId;
        }

        /// @dev Removes the address from a generation's members array. Returns boolean as to whether removal was successful.
        /// @param self The pool to operate on.
        /// @param generationId The id of the generation to operate on.
        /// @param resourceAddress The address to be removed.
        function removeFromGeneration(Pool storage self, uint generationId, address resourceAddress) public returns (bool){
            Generation storage generation = self.generations[generationId];
            // now remove the address
            for (uint i = 0; i < generation.members.length; i++) {
                if (generation.members[i] == resourceAddress) {
                    generation.members[i] = generation.members[generation.members.length - 1];
                    generation.members.length -= 1;
                    return true;
                }
            }
            return false;
        }

        /*
         *  Bonding
         */

        /// @dev Subtracts the amount from an account's bond balance.
        /// @param self The pool to operate on.
        /// @param resourceAddress The address of the account
        /// @param value The value to subtract.
        function deductFromBond(Pool storage self, address resourceAddress, uint value) public {
                /*
                 *  deduct funds from a bond value without risk of an
                 *  underflow.
                 */
                if (value > self.bonds[resourceAddress]) {
                        // Prevent Underflow.
                        throw;
                }
                self.bonds[resourceAddress] -= value;
        }

        /// @dev Adds the amount to an account's bond balance.
        /// @param self The pool to operate on.
        /// @param resourceAddress The address of the account
        /// @param value The value to add.
        function addToBond(Pool storage self, address resourceAddress, uint value) public {
                /*
                 *  Add funds to a bond value without risk of an
                 *  overflow.
                 */
                if (self.bonds[resourceAddress] + value < self.bonds[resourceAddress]) {
                        // Prevent Overflow
                        throw;
                }
                self.bonds[resourceAddress] += value;
        }

        /// @dev Withdraws a bond amount from an address's bond account, sending them the corresponding amount in ether.
        /// @param self The pool to operate on.
        /// @param resourceAddress The address of the account
        /// @param value The value to withdraw.
        function withdrawBond(Pool storage self, address resourceAddress, uint value, uint minimumBond) public {
                /*
                 *  Only if you are not in either of the current call pools.
                 */
                // Prevent underflow
                if (value > self.bonds[resourceAddress]) {
                        throw;
                }

                // Do a permissions check to be sure they can withdraw the
                // funds.
                if (isInPool(self, resourceAddress)) {
                        if (self.bonds[resourceAddress] - value < minimumBond) {
                            return;
                        }
                }

                deductFromBond(self, resourceAddress, value);
                if (!resourceAddress.send(value)) {
                        // Potentially sending money to a contract that
                        // has a fallback function.  So instead, try
                        // tranferring the funds with the call api.
                        if (!resourceAddress.call.gas(msg.gas).value(value)()) {
                                // Revert the entire transaction.  No
                                // need to destroy the funds.
                                throw;
                        }
                }
        }
}
import "libraries/GroveLib.sol";
import "libraries/ResourcePoolLib.sol";
import "libraries/AccountingLib.sol";
import "libraries/CallLib.sol";


library SchedulerLib {
    /*
     *  Address: 0x873bf63c898791e57fa66e7b9261ea81df0b8044
     */
    struct CallDatabase {
        ResourcePoolLib.Pool callerPool;
        GroveLib.Index callIndex;

        AccountingLib.Bank gasBank;
    }

    // The number of blocks that each caller in the pool has to complete their
    // call.
    uint constant CALL_WINDOW_SIZE = 16;

    function getGenerationIdForCall(CallDatabase storage self, address callAddress) constant returns (uint) {
            FutureBlockCall call = FutureBlockCall(callAddress);
            return ResourcePoolLib.getGenerationForWindow(self.callerPool, call.targetBlock(), call.targetBlock() + call.gracePeriod());
    }

    function getDesignatedCaller(CallDatabase storage self, uint leftBound, uint rightBound, uint blockNumber) constant returns (bool, address) {
            /*
             *  Returns the caller from the current call pool who is
             *  designated as the executor of this call.
             */
            if (leftBound > rightBound || blockNumber < leftBound ||  blockNumber > rightBound) {
                    // Invalid call parameters.  blockNumber has to be
                    // contained in the call window and the call window has to
                    // be valid.
                    throw;
            }


            // Lookup the pool that full contains the call window for this
            // call.
            uint generationId = ResourcePoolLib.getGenerationForWindow(self.callerPool, leftBound, rightBound);
            if (generationId == 0) {
                    // No pool currently in operation.
                    return (false, 0x0);
            }

            var generation = self.callerPool.generations[generationId];
            if (generation.members.length == 0) {
                    // Current pool is empty
                    return (false, 0x0);
            }

            // Check if we are in free-for-all window.
            uint numWindows = (rightBound - leftBound) / CALL_WINDOW_SIZE;
            uint blockWindow = (blockNumber - leftBound) / CALL_WINDOW_SIZE;

            if (blockWindow + 2 > numWindows) {
                    // We are within the free-for-all period.
                    return (true, 0x0);
            }

            uint offset = uint(sha3(leftBound, rightBound, generationId, generation.members)) % generation.members.length;
            return (true, generation.members[(offset + blockWindow) % generation.members.length]);
    }

    event AwardedMissedBlockBonus(address indexed fromCaller, address indexed toCaller, uint indexed generationId, address callAddress, uint blockNumber, uint bonusAmount);

    function getMinimumBond() constant returns (uint) {
            return tx.gasprice * block.gaslimit;
    }

    function doBondBonusTransfer(CallDatabase storage self, address fromCaller, address toCaller) internal returns (uint) {
            uint bonusAmount = getMinimumBond();
            uint bondBalance = self.callerPool.bonds[fromCaller];

            // If the bond balance is lower than the award
            // balance, then adjust the reward amount to
            // match the bond balance.
            if (bonusAmount > bondBalance) {
                    bonusAmount = bondBalance;
            }

            // Transfer the funds fromCaller => toCaller
            ResourcePoolLib.deductFromBond(self.callerPool, fromCaller, bonusAmount);
            ResourcePoolLib.addToBond(self.callerPool, toCaller, bonusAmount);

            return bonusAmount;
    }

    function awardMissedBlockBonus(CallDatabase storage self, address toCaller, address callAddress) public {
            FutureBlockCall call = FutureBlockCall(callAddress);

            var generation = self.callerPool.generations[ResourcePoolLib.getGenerationForWindow(self.callerPool, call.targetBlock(), call.targetBlock() + call.gracePeriod())];
            uint i;
            uint bonusAmount;
            address fromCaller;

            uint numWindows = call.gracePeriod() / CALL_WINDOW_SIZE;
            uint blockWindow = (block.number - call.targetBlock()) / CALL_WINDOW_SIZE;

            // Check if we are within the free-for-all period.  If so, we
            // award from all pool members.
            if (blockWindow + 2 > numWindows) {
                    address firstCaller;
                    (,firstCaller) = getDesignatedCaller(self, call.targetBlock(), call.targetBlock() + call.gracePeriod(), call.targetBlock());
                    for (i = call.targetBlock(); i <= call.targetBlock() + call.gracePeriod(); i += CALL_WINDOW_SIZE) {
                            (,fromCaller) = getDesignatedCaller(self, call.targetBlock(), call.targetBlock() + call.gracePeriod(), i);
                            if (fromCaller == firstCaller && i != call.targetBlock()) {
                                    // We have already gone through all of
                                    // the pool callers so we should break
                                    // out of the loop.
                                    break;
                            }
                            if (fromCaller == toCaller) {
                                    continue;
                            }
                            bonusAmount = doBondBonusTransfer(self, fromCaller, toCaller);

                            // Log the bonus was awarded.
                            AwardedMissedBlockBonus(fromCaller, toCaller, generation.id, callAddress, block.number, bonusAmount);
                    }
                    return;
            }

            // Special case for single member and empty pools
            if (generation.members.length < 2) {
                    return;
            }

            // Otherwise the award comes from the previous caller.
            for (i = 0; i < generation.members.length; i++) {
                    // Find where the member is in the pool and
                    // award from the previous pool members bond.
                    if (generation.members[i] == toCaller) {
                            fromCaller = generation.members[(i + generation.members.length - 1) % generation.members.length];

                            bonusAmount = doBondBonusTransfer(self, fromCaller, toCaller);

                            // Log the bonus was awarded.
                            AwardedMissedBlockBonus(fromCaller, toCaller, generation.id, callAddress, block.number, bonusAmount);

                            // Remove the caller from the next pool.
                            if (ResourcePoolLib.getNextGenerationId(self.callerPool) == 0) {
                                    // This is the first address to modify the
                                    // current pool so we need to setup the next
                                    // pool.
                                    ResourcePoolLib.createNextGeneration(self.callerPool);
                            }
                            ResourcePoolLib.removeFromGeneration(self.callerPool, ResourcePoolLib.getNextGenerationId(self.callerPool), fromCaller);
                            return;
                    }
            }
    }

    /*
     *  Call Scheduling API
     */
    // Ten minutes into the future.
    uint constant MAX_BLOCKS_IN_FUTURE = 40;

    // The minimum gas required to execute a scheduled call on a function that
    // does almost nothing.  This is an approximation and assumes the worst
    // case scenario for gas consumption.
    // 
    // Measured Minimum is closer to 150,000
    uint constant MINIMUM_CALL_GAS = 200000;

    event CallScheduled(address callAddress);

    event CallRejected(address indexed schedulerAddress, bytes32 reason);

    function getCallWindowSize() constant returns (uint) {
        return CALL_WINDOW_SIZE;
    }

    function getMinimumGracePeriod() constant returns (uint) {
        return 4 * CALL_WINDOW_SIZE;
    }

    function getMinimumCallGas() constant returns (uint) {
        return MINIMUM_CALL_GAS;
    }

    function getMinimumCallCost(uint basePayment) constant returns (uint) {
        return getMinimumCallCost(basePayment, basePayment);
    }

    function getMinimumCallCost(uint basePayment, uint baseFee) constant returns (uint) {
        return 2 * (baseFee + basePayment) + MINIMUM_CALL_GAS * tx.gasprice;
    }

    function isKnownCall(CallDatabase storage self, address callAddress) constant returns (bool) {
        return GroveLib.exists(self.callIndex, bytes32(callAddress));
    }

    function scheduleCall(CallDatabase storage self, address schedulerAddress, address contractAddress, bytes4 abiSignature, uint targetBlock, uint suggestedGas, uint8 gracePeriod, uint basePayment, uint baseFee, uint endowment) public returns (address) {
        /*
        * Primary API for scheduling a call.
        *
        * - No sooner than MAX_BLOCKS_IN_FUTURE
        * - Grace Period must be longer than the minimum grace period.
        * - msg.value must be >= MIN_GAS * tx.gasprice + 2 * (baseFee + basePayment)
        */
        bytes32 reason;

        if (targetBlock < block.number + MAX_BLOCKS_IN_FUTURE) {
            // Don't allow scheduling further than
            // MAX_BLOCKS_IN_FUTURE
            reason = "TOO_SOON";
        }
        else if (gracePeriod < getMinimumGracePeriod()) {
            reason = "GRACE_TOO_SHORT";
        }
        else if (endowment < 2 * (baseFee + basePayment) + MINIMUM_CALL_GAS * tx.gasprice) {
            reason = "INSUFFICIENT_FUNDS";
        }

        if (reason != 0x0) {
            CallRejected(schedulerAddress, reason);
            AccountingLib.sendRobust(schedulerAddress, endowment);
            return;
        }

        var call = new FutureBlockCall.value(endowment)(schedulerAddress, targetBlock, gracePeriod, contractAddress, abiSignature, suggestedGas, basePayment, baseFee);

        // Put the call into the grove index.
        GroveLib.insert(self.callIndex, bytes32(address(call)), int(call.targetBlock()));

        CallScheduled(address(call));

        return address(call);
    }

    function execute(CallDatabase storage self, uint startGas, address callAddress, address executor) {
        if (!isKnownCall(self, callAddress)) {
                CallLib.CallAborted(executor, "UNKNOWN_ADDRESS");
                return;
        }

        FutureBlockCall call = FutureBlockCall(callAddress);

        if (!call.isAlive()) {
                CallLib.CallAborted(executor, "SUICIDED_ALREADY");
                return;
        }
        
        bool isDesignated;
        address designatedCaller;

        (isDesignated, designatedCaller) = getDesignatedCaller(self, call.targetBlock(), call.targetBlock() + call.gracePeriod(), block.number);
        if (isDesignated && designatedCaller != 0x0 && designatedCaller != executor) {
                // Wrong caller
                CallLib.CallAborted(executor, "WRONG_CALLER");
                return;
        }

        if (!call.beforeExecute(executor)) {
                return;
        }

        if (isDesignated) {
            uint blockWindow = (block.number - call.targetBlock()) / getCallWindowSize();
            if (blockWindow > 0) {
                // Someone missed their call so this caller
                // gets to claim their bond for picking up
                // their slack.
                awardMissedBlockBonus(self, executor, callAddress);
            }
        }
        call.execute(startGas, executor);
    }
}
// String Utils v0.1

/// @title String Utils - String utility functions
/// @author Piper Merriam - 
library StringLib {
    /*
     *  Address: 0xb06732649abb0e2d4fd1988c7cd74aa182c5453e
     */

    /// @dev Converts an unsigned integert to its string representation.
    /// @param v The number to be converted.
    function uintToBytes(uint v) constant returns (bytes32 ret) {
        if (v == 0) {
            ret = '0';
        }
        else {
            while (v > 0) {
                ret = bytes32(uint(ret) / (2 ** 8));
                ret |= bytes32(((v % 10) + 48) * 2 ** (8 * 31));
                v /= 10;
            }
        }
        return ret;
    }

    /// @dev Converts a numeric string to it's unsigned integer representation.
    /// @param v The string to be converted.
    function bytesToUInt(bytes32 v) constant returns (uint ret) {
        if (v == 0x0) {
            throw;
        }

        uint digit;

        for (uint i = 0; i < 32; i++) {
            digit = uint((uint(v) / (2 ** (8 * (31 - i)))) & 0xff);
            if (digit == 0) {
                break;
            }
            else if (digit < 48 || digit > 57) {
                throw;
            }
            ret *= 10;
            ret += (digit - 48);
        }
        return ret;
    }
}
import "libraries/SchedulerLib.sol";
import "libraries/CallLib.sol";
import "libraries/ResourcePoolLib.sol";


contract Scheduler {
    /*
     *  Address: 0x321a1e5e0ef137f37eeb5563c987d60ab9dcd8de
     *
     *  Constructor
     *
     *  - sets up relays
     *  - configures the caller pool.
     */
    function Scheduler() {
            callDatabase.callerPool.freezePeriod = 80;
            callDatabase.callerPool.rotationDelay = 80;
            callDatabase.callerPool.overlapSize = 256;
    }

    SchedulerLib.CallDatabase callDatabase;

    /*
     *  Call Scheduling
     */
    function getMinimumGracePeriod() constant returns (uint) {
        return SchedulerLib.getMinimumGracePeriod();
    }

    function getDefaultPayment() constant returns (uint) {
        return 1 ether;
    }

    function getDefaultFee() constant returns (uint) {
        return 100 finney;
    }

    function isKnownCall(address callAddress) constant returns (bool) {
        return SchedulerLib.isKnownCall(callDatabase, callAddress);
    }

    function scheduleCall(address contractAddress, bytes4 abiSignature, uint targetBlock) public returns (address) {
        return scheduleCall(contractAddress, abiSignature, targetBlock, 0, 255, getDefaultPayment(), getDefaultFee());
    }

    function scheduleCall(address contractAddress, bytes4 abiSignature, uint targetBlock, uint suggestedGas) public returns (address) {
        return scheduleCall(contractAddress, abiSignature, targetBlock, suggestedGas, 255, getDefaultPayment(), getDefaultFee());
    }

    function scheduleCall(address contractAddress, bytes4 abiSignature, uint targetBlock, uint suggestedGas, uint8 gracePeriod) public returns (address) {
        return scheduleCall(contractAddress, abiSignature, targetBlock, suggestedGas, gracePeriod, getDefaultPayment(), getDefaultFee());
    }

    function scheduleCall(address contractAddress, bytes4 abiSignature, uint targetBlock, uint suggestedGas, uint8 gracePeriod, uint basePayment) public returns (address) {
        return scheduleCall(contractAddress, abiSignature, targetBlock, suggestedGas, gracePeriod, basePayment, getDefaultFee());
    }

    function scheduleCall(address contractAddress, bytes4 abiSignature, uint targetBlock, uint suggestedGas, uint8 gracePeriod, uint basePayment, uint baseFee) public returns (address) {
        return SchedulerLib.scheduleCall(callDatabase, msg.sender, contractAddress, abiSignature, targetBlock, suggestedGas, gracePeriod, basePayment, baseFee, msg.value);
    }

    /*
     *  Call Execution
     */
    function execute(address callAddress) public {
        uint startGas = msg.gas;

        SchedulerLib.execute(callDatabase, startGas, callAddress, msg.sender);
    }

    /*
     *  Caller Pool Bonding
     */
    function getMinimumBond() constant returns (uint) {
        return SchedulerLib.getMinimumBond();
    }

    function depositBond() public {
        ResourcePoolLib.addToBond(callDatabase.callerPool, msg.sender, msg.value);
    }

    function withdrawBond(uint value) public {
        ResourcePoolLib.withdrawBond(callDatabase.callerPool, msg.sender, value, getMinimumBond());
    }

    function getBondBalance() constant returns (uint) {
        return getBondBalance(msg.sender);
    }

    function getBondBalance(address callerAddress) constant returns (uint) {
        return callDatabase.callerPool.bonds[callerAddress];
    }

    /*
     *  Pool Management
     */
    function getGenerationForCall(address callAddress) constant returns (uint) {
            var call = FutureBlockCall(callAddress);
            return ResourcePoolLib.getGenerationForWindow(callDatabase.callerPool, call.targetBlock(), call.targetBlock() + call.gracePeriod());
    }

    function getGenerationSize(uint generationId) constant returns (uint) {
            return callDatabase.callerPool.generations[generationId].members.length;
    }

    function getGenerationStartAt(uint generationId) constant returns (uint) {
            return callDatabase.callerPool.generations[generationId].startAt;
    }

    function getGenerationEndAt(uint generationId) constant returns (uint) {
            return callDatabase.callerPool.generations[generationId].endAt;
    }

    function getCurrentGenerationId() constant returns (uint) {
            return ResourcePoolLib.getCurrentGenerationId(callDatabase.callerPool);
    }

    function getNextGenerationId() constant returns (uint) {
            return ResourcePoolLib.getNextGenerationId(callDatabase.callerPool);
    }

    function isInPool() constant returns (bool) {
            return ResourcePoolLib.isInPool(callDatabase.callerPool, msg.sender);
    }

    function isInPool(address callerAddress) constant returns (bool) {
            return ResourcePoolLib.isInPool(callDatabase.callerPool, callerAddress);
    }

    function isInGeneration(uint generationId) constant returns (bool) {
            return isInGeneration(msg.sender, generationId);
    }

    function isInGeneration(address callerAddress, uint generationId) constant returns (bool) {
            return ResourcePoolLib.isInGeneration(callDatabase.callerPool, callerAddress, generationId);
    }

    /*
     *  Pool Meta information
     */
    function getPoolFreezePeriod() constant returns (uint) {
            return callDatabase.callerPool.freezePeriod;
    }

    function getPoolOverlapSize() constant returns (uint) {
            return callDatabase.callerPool.overlapSize;
    }

    function getPoolRotationDelay() constant returns (uint) {
            return callDatabase.callerPool.rotationDelay;
    }

    /*
     *  Pool Membership
     */
    function canEnterPool() constant returns (bool) {
            return ResourcePoolLib.canEnterPool(callDatabase.callerPool, msg.sender, getMinimumBond());
    }

    function canEnterPool(address callerAddress) constant returns (bool) {
            return ResourcePoolLib.canEnterPool(callDatabase.callerPool, callerAddress, getMinimumBond());
    }

    function canExitPool() constant returns (bool) {
            return ResourcePoolLib.canExitPool(callDatabase.callerPool, msg.sender);
    }

    function canExitPool(address callerAddress) constant returns (bool) {
            return ResourcePoolLib.canExitPool(callDatabase.callerPool, callerAddress);
    }

    function enterPool() public {
            uint generationId = ResourcePoolLib.enterPool(callDatabase.callerPool, msg.sender, getMinimumBond());
            ResourcePoolLib.AddedToGeneration(msg.sender, generationId);
    }

    function exitPool() public {
            uint generationId = ResourcePoolLib.exitPool(callDatabase.callerPool, msg.sender);
            ResourcePoolLib.RemovedFromGeneration(msg.sender, generationId);
    }

    /*
     *  Next Call API
     */
    function getCallWindowSize() constant returns (uint) {
            // TODO: is this function needed
            return SchedulerLib.getCallWindowSize();
    }

    function getGenerationIdForCall(address callAddress) constant returns (uint) {
            // TODO: is this function needed
            return SchedulerLib.getGenerationIdForCall(callDatabase, callAddress);
    }

    function getDesignatedCaller(address callAddress, uint blockNumber) constant returns (bool, address) {
            // TODO: is this function needed
            var call = FutureBlockCall(callAddress);
            return SchedulerLib.getDesignatedCaller(callDatabase, call.targetBlock(), call.targetBlock() + call.gracePeriod(), blockNumber);
    }

    function getNextCall(uint blockNumber) constant returns (address) {
            return address(GroveLib.query(callDatabase.callIndex, ">=", int(blockNumber)));
    }

    function getNextCallSibling(address callAddress) constant returns (address) {
            return address(GroveLib.getNextNode(callDatabase.callIndex, bytes32(callAddress)));
    }
}

Compiled Binary


======= AccountingLib =======
Binary: 
6060604052610360806100126000396000f3650106d6e77ce050606060405236156100745760e060020a600035046312c82bcc81146100795780635548c837146100e45780635c54305e146101405780636b103966146101945780637fcf532c146101c8578063b1df3d8014610214578063b5bc6dbb1461022d578063e62af6c114610264575b610007565b61029660043560243560006000821180156100b05750604051600160a060020a038416908290849082818181858883f19350505050155b1561035657604051600160a060020a038416908390600081818185876185025a03f19250505015156103565750600061035a565b6102a860043560243560443581600160a060020a031683600160a060020a03167f47a08955ce2b7f21ea62ff0024e1ea0ad87430953554a87e6bc65d777f18e639836040518082815260200191505060405180910390a3505050565b6102a860043560243560443560408051838152602081018390528151600160a060020a038616927f9b24879829bed3003de08d5c5d7e18dcbb8dc76faebd95cafc5d4dec8c61a3a5928290030190a2505050565b6102a86004356024356044355b600160a060020a03821660009081526020849052604090205480820110156102aa57610007565b6102a8600435602435604080518281529051600160a060020a038416917fd0c5cf41ee8ebf084ad0bce53de7cbc6e4693d9b53a4019ca36a2f91cdc20b3a919081900360200190a25050565b61029660043560243560443560006102cd8484846101a1565b610296600435602435604435600160a060020a0382166000908152602084905260408120548290106102fc57610304848484610271565b6102a86004356024356044355b600160a060020a0382166000908152602084905260409020548111156102d857610007565b60408051918252519081900360200190f35b005b600160a060020a0382166000908152602084905260409020805482019055505050565b5060015b9392505050565b600160a060020a038216600090815260208490526040902080548290039055505050565b5060006102d1565b604051600160a060020a03841690600090849082818181858883f1935050505015156102cd57604051600160a060020a038416908390600081818185876185025a03f19250505015156102cd57610007565b5060015b9291505056
Binary of the runtime part: 
650106d6e77ce050606060405236156100745760e060020a600035046312c82bcc81146100795780635548c837146100e45780635c54305e146101405780636b103966146101945780637fcf532c146101c8578063b1df3d8014610214578063b5bc6dbb1461022d578063e62af6c114610264575b610007565b61029660043560243560006000821180156100b05750604051600160a060020a038416908290849082818181858883f19350505050155b1561035657604051600160a060020a038416908390600081818185876185025a03f19250505015156103565750600061035a565b6102a860043560243560443581600160a060020a031683600160a060020a03167f47a08955ce2b7f21ea62ff0024e1ea0ad87430953554a87e6bc65d777f18e639836040518082815260200191505060405180910390a3505050565b6102a860043560243560443560408051838152602081018390528151600160a060020a038616927f9b24879829bed3003de08d5c5d7e18dcbb8dc76faebd95cafc5d4dec8c61a3a5928290030190a2505050565b6102a86004356024356044355b600160a060020a03821660009081526020849052604090205480820110156102aa57610007565b6102a8600435602435604080518281529051600160a060020a038416917fd0c5cf41ee8ebf084ad0bce53de7cbc6e4693d9b53a4019ca36a2f91cdc20b3a919081900360200190a25050565b61029660043560243560443560006102cd8484846101a1565b610296600435602435604435600160a060020a0382166000908152602084905260408120548290106102fc57610304848484610271565b6102a86004356024356044355b600160a060020a0382166000908152602084905260409020548111156102d857610007565b60408051918252519081900360200190f35b005b600160a060020a0382166000908152602084905260409020805482019055505050565b5060015b9392505050565b600160a060020a038216600090815260208490526040902080548290039055505050565b5060006102d1565b604051600160a060020a03841690600090849082818181858883f1935050505015156102cd57604051600160a060020a038416908390600081818185876185025a03f19250505015156102cd57610007565b5060015b9291505056

======= CallLib =======
Binary: 
606060405261056a806100126000396000f3650106d6e77ce0506060604052361561005e5760e060020a6000350463115256d881146100635780634c33fe94146100fe5780637c0278fc14610144578063c17e6817146101dc578063da0774ad14610278578063dcb2788314610299575b610007565b6102ea60043560243560443560643560843560a43560c43586546000908190819081908190600160a060020a0316875a038d60000160149054906101000a900460e060020a0260e060020a9004908e6001016000506040518360e060020a02815260040180828054600181600116156101000203166002900480156104955780601f1061046a57610100808354040283529160200191610495565b6102ea600435604051600160a060020a038216907f398bd6b21ae4164ec322fb0eb8c2eb6277f36fd41903fbbed594dfe12559128190600090a280600160a060020a0316ff5b60408051602060248035600481810135601f81018590048502860185019096528585526102ea958135959194604494929390920191819084018382808284375094965050505050505060006004825103836001016000508181546001816001161561010002031660029004825481601f106103365782601f10610370575b826008026101000360020a80910402828001178355610387565b6102ec6004356024355b600030600160a060020a0316318211156102085730600160a060020a03163191505b600082111561044b5773947aaa72162d32135d2af1ed0c6d610d541829c36312c82bcc84846040518360e060020a0281526004018083600160a060020a031681526020018281526020019250505060206040518083038160008760325a03f215610007575083925061044f915050565b6102ec6004356024355b60008282111561045557818360640204905061044f565b6102ea60043560243560408051600160a060020a03841681526020810183905281517f8d7218ca9288bf28867e50b2e471b91bd8247c09cdcf931336f93a49fdcaf18d929181900390910190a15050565b005b60408051918252519081900360200190f35b5081800160010183558181151161038757601f016020900481601f01602090048360005260206000209182019101610387919061035c565b82601f106102fe575082600052602060002080549082601f016020900481019061043c91905b80821115610442576000815560010161035c565b60ff19168360005260206000205581800160010183555b50505050600482511115610446575060005b6001838101546002918116156101000260001901160481101561044657818160040181518110156100075790602001015160f860020a900460f860020a02836001016000508281546001816001161561010002031660029004811015610007578154600116156104185790600052602060002090602091828204019190065b601f036101000a81548160ff0219169060f860020a84040217905550600101610399565b506101c2565b5090565b505050565b5060005b92915050565b818360020203836064020460c803905061044f565b820191906000526020600020905b81548152906001019060200180831161047857829003601f168201915b505091505060006040518083038160008887f1935050505094506104c08c600201600050543a610282565b93506064848a020492506064848902049150855a8c03013a0290506104e78a8285016101e6565b925061050773d3cda913deb6f67967b99d67acdfa1712c293601836101e6565b6040805183815260208101869052808201839052606081018890529051919350600160a060020a038c16917f4538b7ec91dae8fada01e66a052482086d3e690c3db5a80457fbcd55457b4ae19181900360800190a250505050505050505050505056
Binary of the runtime part: 
650106d6e77ce0506060604052361561005e5760e060020a6000350463115256d881146100635780634c33fe94146100fe5780637c0278fc14610144578063c17e6817146101dc578063da0774ad14610278578063dcb2788314610299575b610007565b6102ea60043560243560443560643560843560a43560c43586546000908190819081908190600160a060020a0316875a038d60000160149054906101000a900460e060020a0260e060020a9004908e6001016000506040518360e060020a02815260040180828054600181600116156101000203166002900480156104955780601f1061046a57610100808354040283529160200191610495565b6102ea600435604051600160a060020a038216907f398bd6b21ae4164ec322fb0eb8c2eb6277f36fd41903fbbed594dfe12559128190600090a280600160a060020a0316ff5b60408051602060248035600481810135601f81018590048502860185019096528585526102ea958135959194604494929390920191819084018382808284375094965050505050505060006004825103836001016000508181546001816001161561010002031660029004825481601f106103365782601f10610370575b826008026101000360020a80910402828001178355610387565b6102ec6004356024355b600030600160a060020a0316318211156102085730600160a060020a03163191505b600082111561044b5773947aaa72162d32135d2af1ed0c6d610d541829c36312c82bcc84846040518360e060020a0281526004018083600160a060020a031681526020018281526020019250505060206040518083038160008760325a03f215610007575083925061044f915050565b6102ec6004356024355b60008282111561045557818360640204905061044f565b6102ea60043560243560408051600160a060020a03841681526020810183905281517f8d7218ca9288bf28867e50b2e471b91bd8247c09cdcf931336f93a49fdcaf18d929181900390910190a15050565b005b60408051918252519081900360200190f35b5081800160010183558181151161038757601f016020900481601f01602090048360005260206000209182019101610387919061035c565b82601f106102fe575082600052602060002080549082601f016020900481019061043c91905b80821115610442576000815560010161035c565b60ff19168360005260206000205581800160010183555b50505050600482511115610446575060005b6001838101546002918116156101000260001901160481101561044657818160040181518110156100075790602001015160f860020a900460f860020a02836001016000508281546001816001161561010002031660029004811015610007578154600116156104185790600052602060002090602091828204019190065b601f036101000a81548160ff0219169060f860020a84040217905550600101610399565b506101c2565b5090565b505050565b5060005b92915050565b818360020203836064020460c803905061044f565b820191906000526020600020905b81548152906001019060200180831161047857829003601f168201915b505091505060006040518083038160008887f1935050505094506104c08c600201600050543a610282565b93506064848a020492506064848902049150855a8c03013a0290506104e78a8285016101e6565b925061050773d3cda913deb6f67967b99d67acdfa1712c293601836101e6565b6040805183815260208101869052808201839052606081018890529051919350600160a060020a038c16917f4538b7ec91dae8fada01e66a052482086d3e690c3db5a80457fbcd55457b4ae19181900360800190a250505050505050505050505056

======= FutureBlockCall =======
Binary: 
60606040526040516101008061080e8339610160604052905160805160a05160c05160e051945161012051610140516000805433600160a060020a03199182161782556001805482169099179098556008969096556009805460ff19169095179094556002556003929092556007919091553a600655600480549093161760a060020a63ffffffff021916740100000000000000000000000000000000000000007c0100000000000000000000000000000000000000000000000000000000909404939093029290921790556107349081906100da90396000f3606060405236156100e55760e060020a60003504630a16697a811461012e578063137c638b1461013757806337f4c00e146101425780634136aa351461014d5780634e417a981461015757806361461954146101c05780636560a307146101e957806367ce940d146101f45780636ef25c3a146102005780638da5cb5b14610209578063a06db7dc1461021b578063ae45850b14610227578063b0f07e4414610239578063c032dc301461027a578063c6502da8146102d1578063ca94692d146102da578063ea8a1af014610303578063eec2b62814610397578063f6b4dfb41461045f575b610473600154600160a060020a03908116339091161480156101075750600036115b15610478576005546002600182161561010002600019019091160460001461047a57610002565b61053060085481565b6105305b6142685b90565b61053060065461013f565b610530600161013f565b61054260408051602081810183526000825282516005805460026001821615610100026000190190911604601f8101849004840283018401909552848252929390929183018282801561060f5780601f106105e45761010080835404028352916020019161060f565b61047360008054600160a060020a039081163390911614156106a9575a90506106a98133610284565b61053060075461013f565b6105305b61b3b061013f565b61053060035481565b6105b0600054600160a060020a031681565b6105cd60095460ff1681565b6105b0600154600160a060020a031681565b610473600154600160a060020a0390811633909116141561047857600554600060026001831615610100026000190190921691909104111561061b57610002565b6104736004356024355b600054600160a060020a0390811633909116141561047557732746bcf29bffafcc7906752f639819171d18ce2b63115256d8600460005084846002600050546003600050546106ac6101f8565b61053060025481565b61053060045474010000000000000000000000000000000000000000900460e060020a0261013f565b610473600154600160a060020a03908116339091161415610478576008546009190143108061033a575060085460095460ff160143115b1561047857732746bcf29bffafcc7906752f639819171d18ce2b634c33fe94336040518260e060020a0281526004018082600160a060020a0316815260200191505060006040518083038160008760325a03f21561000257505050565b6105306004356008546000904310806103b8575060085460095460ff160143115b1561072b57604080517fdcb27883000000000000000000000000000000000000000000000000000000008152600160a060020a03841660048201527f4e4f545f494e5f43414c4c5f57494e444f57000000000000000000000000000060248201529051732746bcf29bffafcc7906752f639819171d18ce2b9163dcb278839160448281019260009291908290030181838760325a03f215610002575050506000905061072f565b6105b0600454600160a060020a031661013f565b005b50505b565b600580546000828152602060026001841615610100026000190190931692909204601f908101929092047f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db0908101923692908390106104fc5782800160ff198235161785555b506104759291505b8082111561052c57600081556001016104e8565b828001600101855582156104e0579182015b828111156104e057823582600050559160200191906001019061050e565b5090565b60408051918252519081900360200190f35b60405180806020018281038252838181518152602001915080519060200190808383829060006004602084601f0104600302600f01f150905090810190601f1680156105a25780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b60408051600160a060020a03929092168252519081900360200190f35b6040805160ff929092168252519081900360200190f35b820191906000526020600020905b8154815290600101906020018083116105f257829003601f168201915b5050505050905061013f565b604080517f7c0278fc0000000000000000000000000000000000000000000000000000000081526004818101818152602483019384523660448401819052732746bcf29bffafcc7906752f639819171d18ce2b94637c0278fc946000939190606401848480828437820191505094505050505060006040518083038160008760325a03f21561000257505050565b50565b6106b461013b565b6040518860e060020a0281526004018088815260200187815260200186600160a060020a0316815260200185815260200184815260200183815260200182815260200197505050505050505060006040518083038160008760325a03f2156100025750505061047581600154600160a060020a0316ff5b5060015b91905056
Binary of the runtime part: 
606060405236156100e55760e060020a60003504630a16697a811461012e578063137c638b1461013757806337f4c00e146101425780634136aa351461014d5780634e417a981461015757806361461954146101c05780636560a307146101e957806367ce940d146101f45780636ef25c3a146102005780638da5cb5b14610209578063a06db7dc1461021b578063ae45850b14610227578063b0f07e4414610239578063c032dc301461027a578063c6502da8146102d1578063ca94692d146102da578063ea8a1af014610303578063eec2b62814610397578063f6b4dfb41461045f575b610473600154600160a060020a03908116339091161480156101075750600036115b15610478576005546002600182161561010002600019019091160460001461047a57610002565b61053060085481565b6105305b6142685b90565b61053060065461013f565b610530600161013f565b61054260408051602081810183526000825282516005805460026001821615610100026000190190911604601f8101849004840283018401909552848252929390929183018282801561060f5780601f106105e45761010080835404028352916020019161060f565b61047360008054600160a060020a039081163390911614156106a9575a90506106a98133610284565b61053060075461013f565b6105305b61b3b061013f565b61053060035481565b6105b0600054600160a060020a031681565b6105cd60095460ff1681565b6105b0600154600160a060020a031681565b610473600154600160a060020a0390811633909116141561047857600554600060026001831615610100026000190190921691909104111561061b57610002565b6104736004356024355b600054600160a060020a0390811633909116141561047557732746bcf29bffafcc7906752f639819171d18ce2b63115256d8600460005084846002600050546003600050546106ac6101f8565b61053060025481565b61053060045474010000000000000000000000000000000000000000900460e060020a0261013f565b610473600154600160a060020a03908116339091161415610478576008546009190143108061033a575060085460095460ff160143115b1561047857732746bcf29bffafcc7906752f639819171d18ce2b634c33fe94336040518260e060020a0281526004018082600160a060020a0316815260200191505060006040518083038160008760325a03f21561000257505050565b6105306004356008546000904310806103b8575060085460095460ff160143115b1561072b57604080517fdcb27883000000000000000000000000000000000000000000000000000000008152600160a060020a03841660048201527f4e4f545f494e5f43414c4c5f57494e444f57000000000000000000000000000060248201529051732746bcf29bffafcc7906752f639819171d18ce2b9163dcb278839160448281019260009291908290030181838760325a03f215610002575050506000905061072f565b6105b0600454600160a060020a031661013f565b005b50505b565b600580546000828152602060026001841615610100026000190190931692909204601f908101929092047f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db0908101923692908390106104fc5782800160ff198235161785555b506104759291505b8082111561052c57600081556001016104e8565b828001600101855582156104e0579182015b828111156104e057823582600050559160200191906001019061050e565b5090565b60408051918252519081900360200190f35b60405180806020018281038252838181518152602001915080519060200190808383829060006004602084601f0104600302600f01f150905090810190601f1680156105a25780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b60408051600160a060020a03929092168252519081900360200190f35b6040805160ff929092168252519081900360200190f35b820191906000526020600020905b8154815290600101906020018083116105f257829003601f168201915b5050505050905061013f565b604080517f7c0278fc0000000000000000000000000000000000000000000000000000000081526004818101818152602483019384523660448401819052732746bcf29bffafcc7906752f639819171d18ce2b94637c0278fc946000939190606401848480828437820191505094505050505060006040518083038160008760325a03f21561000257505050565b50565b6106b461013b565b6040518860e060020a0281526004018088815260200187815260200186600160a060020a0316815260200185815260200184815260200183815260200182815260200197505050505050505060006040518083038160008760325a03f2156100025750505061047581600154600160a060020a0316ff5b5060015b91905056

======= FutureCall =======
Binary: 

Binary of the runtime part: 


======= GroveLib =======
Binary: 
60606040526110f7806100126000396000f3650106d6e77ce050606060405236156100a05760e060020a60003504630e9f1a3c81146100a55780632b4096b4146100c95780636ec13982146100eb578063a3119e571461010d578063a749f19b1461012f578063ab7366f714610151578063bacd69581461017f578063bfdf87c0146101c2578063c4144b26146101e1578063caa46c9c1461023c578063e6ce3a6a14610297578063ed5bd7ea146102b6575b610007565b6102d760043560243560008181526001830160205260409020600401545b92915050565b6102d760043560243560008181526001830160205260409020600301546100c3565b6102d760043560243560008181526001830160205260409020600201546100c3565b6102d760043560243560008181526001838101602052604090912001546100c3565b6102d760043560243560008181526001830160205260409020600501546100c3565b6102e96004356024355b60008181526001830160205260408120805482918291829190861461078d576101b9565b6102e9600435602435604435600082815260018401602052604081205481908190819086141561068657604081206001015485141561067c575b50505050505050565b6102d760043560243560008181526001830160205260409020546100c3565b6102d76004356024355b6040805160c08101825260008082526020828101829052828401829052606083018290526080830182905260a08301829052848252600186019052918220805490919083908114156102f9576102f0565b6102d76004356024355b6040805160c08101825260008082526020828101829052828401829052606083018290526080830182905260a08301829052848252600186019052918220805490919083908114156104bd576102f0565b6102d760043560243560443582546000908181811415610a5b57610a82565b6102d7600435602435600081815260018301602052604090205481146100c3565b60408051918252519081900360200190f35b005b815193505b50505092915050565b60048301546000146103d057600483810154600090815260018881016020908152604092839020835160c081018552815481529281015491830191909152600281015492820192909252600382015460608201529181015460808301526005015460a082015291505b60608201516000146102eb57606091820151600090815260018781016020908152604092839020835160c081018552815481529281015491830191909152600281015492820192909252600382015493810193909352600481015460808401526005015460a0830152610362565b60028301546000146104595750506002810154600081815260018681016020908152604092839020835160c081018552865481529286015491830191909152918101929092526003830154606083015260048301546080830152600583015460a08301525b81516003820154141561044b57805493506102f0565b600281015460001415610462575b600093506102f0565b6040805160c081018252825481526001838101546020838101919091526002850154838501819052600386015460608501526004860154608085015260059095015460a0840152600094855290890190529120909150610435565b600383015460001461059457600383810154600090815260018881016020908152604092839020835160c081018552815481529281015491830191909152600281015492820192909252918101546060830152600481015460808301526005015460a082015291505b60808201516000146102eb57608091820151600090815260018781016020908152604092839020835160c081018552815481529281015491830191909152600281015492820192909252600382015460608201526004820154938101939093526005015460a0830152610526565b60028301546000146104595750506002810154600081815260018681016020908152604092839020835160c081018552865481529286015491830191909152918101929092526003830154606083015260048301546080830152600583015460a08301525b81516004820154141561060f57805493506102f0565b60028101546000141561062157610459565b6040805160c081018252825481526001838101546020838101919091526002850154838501819052600386015460608501526004860154608085015260059095015460a08401526000948552908901905291209091506105f9565b610686878761015b565b865460009250821415610697578587555b508554600090815260018701602052604090205b8054600014156107225785815560028101829055600181018590556101b987875b60008181526001830160205260408120905b8154610d849085905b6000818152600183016020526040808220600481015483528183206005908101546003830154855292909320929092015403905b5092915050565b600181015481549250851261075f5760048101546000141561074657600481018690555b60040154600090815260018701602052604090206106ab565b60038101546000141561077457600381018690555b60030154600090815260018701602052604090206106ab565b600381015460001415806107a657506004810154600014155b156107cc5760038101546000146108235780546001880190600090610838908a90610246565b6002810154600014610a255760028101546000908152600188016020526040902060038101548254919550141561080557600060038501555b60048401548154141561081a57600060048501555b83549150610a2a565b8054600188019060009061084f908a906101eb565b815260208101919091526040016000209450610862565b8152602081019190915260400160002094505b600285015460009081526001880160205260409020600381015486549195509092508214156108b6576004850154600385018190556000146108b65760048501546000908152604090208454600282015592505b60048401548554141561091057600385015460048501819055600014610910578660010160005060008660030160005054815260200190815260200160002060005092508250836000016000505483600201600050819055505b60028082015490860181905560001461098157866001016000506000826002016000505481526020019081526020016000206000509350835080600001600050548460030160005054141561096757845460038501555b60048401548154141561097c57845460048501555b610986565b845487555b6003818101549086018190556000146109d3578660010160005060008260030160005054815260200190815260200160002060005092508250846000016000505483600201600050819055505b600481810154908601819055600014610a20578660010160005060008260040160005054815260200190815260200160002060005092508250846000016000505483600201600050819055505b610a2a565b600087555b60008082556001820181905560028201819055600382018190556004820181905582146101b9576101b987836106cc565b50600081815260018601602052604090205b6001810154610a8b908686610aca565b805492505b50509392505050565b15610b875760fa60020a600f02851480610aac575060f060020a613c3d0285145b15610ae757600481015460001415610b305780549250610a82565b86865b600060f960020a601f02831415610cd957508083135b9392505050565b60f960020a601f02851480610b03575060f060020a613e3d0285145b80610b15575060f060020a613d3d0285145b15610b8757600381015460001415610bbe5780549250610a82565b610b69610ac7878360040160005054600081815260018301602052604081205b600381015460001415610d57576001810154915061071b565b15610a7d576004015460009081526001860160205260409020610a6d565b60fa60020a600f02851480610ba3575060f060020a613c3d0285145b15610c1557600381015460001415610c4c5760009250610a82565b610bf7610ac7878360030160005054600081815260018301602052604081205b600481015460001415610d3e576001810154915061071b565b15610a7d576003015460009081526001860160205260409020610a6d565b60f960020a601f02851480610c31575060f060020a613e3d0285145b15610c6557600481015460001415610c985760009250610a82565b6003015460009081526001860160205260409020610a6d565b60f060020a613d3d02851415610cd457600181015484901215610cb157600481015460001415610c985760009250610a82565b6004015460009081526001860160205260409020610a6d565b600181015484901315610cd457600381015460001415610c4c5760009250610a82565b610a6d565b60fa60020a600f02831415610cf15750808312610ae0565b60f060020a613e3d02831415610d0b575080831215610ae0565b60f060020a613c3d02831415610d25575080831315610ae0565b60f060020a613d3d028314156100a05750828114610ae0565b6004015460009081526001840160205260409020610bde565b6003015460009081526001840160205260409020610b50565b600282015460001415610fb3575b50505050565b90508060021415610e1c57610da08483600301600050546106e7565b6000191415610dba57610dba848360030160005054610df4565b8154610e1c9085905b60008181526001830160205260408120600381015490919081908190811415610ff157610007565b8154610e509085905b60008181526001830160205260408120600481015490919081908190811415610e7557610007565b806001191415610e5057610e378483600401600050546106e7565b60011415610deb57610deb848360040160005054610dc3565b8060001913158015610e63575060018113155b15610d70578154610d70908590610f70565b6004840180546000908152600188016020526040812060028088015490820181905592829055945014610f0557856001016000506000856002016000505481526020019081526020016000206000509150836000016000505482600301600050541415610ef057826000016000505482600301600050819055505b835460048301541415610f0557825460048301555b6003830154600014610f36575060038201546000908152600186016020526040902080546004850155835460028201555b82546002808601919091558454600385015583015460001415610f6757826000016000505486600001600050819055505b8354610fdc9087905b6000818152600183016020526040808220600381015483528183206005908101546004830154855292842001549092610fcf9291908183106110f05750816100c3565b60029091015460009081526001840160205260409020906106de565b6001016005820155505050565b8254610fe9908790610f70565b505050505050565b60038401805460009081526001880160205260408120600280880154908201819055928290559450146110815785600101600050600085600201600050548152602001908152602001600020600050915083600001600050548260030160005054141561106c57826000016000505482600301600050819055505b83546004830154141561108157825460048301555b60048301546000146110b357506004820154600081815260018701602052604090206003850191909155835460028201555b82546002808601919091558454600485015583015460001415610f6757826000016000505486600001600050819055508354610fdc908790610f70565b50806100c356
Binary of the runtime part: 
650106d6e77ce050606060405236156100a05760e060020a60003504630e9f1a3c81146100a55780632b4096b4146100c95780636ec13982146100eb578063a3119e571461010d578063a749f19b1461012f578063ab7366f714610151578063bacd69581461017f578063bfdf87c0146101c2578063c4144b26146101e1578063caa46c9c1461023c578063e6ce3a6a14610297578063ed5bd7ea146102b6575b610007565b6102d760043560243560008181526001830160205260409020600401545b92915050565b6102d760043560243560008181526001830160205260409020600301546100c3565b6102d760043560243560008181526001830160205260409020600201546100c3565b6102d760043560243560008181526001838101602052604090912001546100c3565b6102d760043560243560008181526001830160205260409020600501546100c3565b6102e96004356024355b60008181526001830160205260408120805482918291829190861461078d576101b9565b6102e9600435602435604435600082815260018401602052604081205481908190819086141561068657604081206001015485141561067c575b50505050505050565b6102d760043560243560008181526001830160205260409020546100c3565b6102d76004356024355b6040805160c08101825260008082526020828101829052828401829052606083018290526080830182905260a08301829052848252600186019052918220805490919083908114156102f9576102f0565b6102d76004356024355b6040805160c08101825260008082526020828101829052828401829052606083018290526080830182905260a08301829052848252600186019052918220805490919083908114156104bd576102f0565b6102d760043560243560443582546000908181811415610a5b57610a82565b6102d7600435602435600081815260018301602052604090205481146100c3565b60408051918252519081900360200190f35b005b815193505b50505092915050565b60048301546000146103d057600483810154600090815260018881016020908152604092839020835160c081018552815481529281015491830191909152600281015492820192909252600382015460608201529181015460808301526005015460a082015291505b60608201516000146102eb57606091820151600090815260018781016020908152604092839020835160c081018552815481529281015491830191909152600281015492820192909252600382015493810193909352600481015460808401526005015460a0830152610362565b60028301546000146104595750506002810154600081815260018681016020908152604092839020835160c081018552865481529286015491830191909152918101929092526003830154606083015260048301546080830152600583015460a08301525b81516003820154141561044b57805493506102f0565b600281015460001415610462575b600093506102f0565b6040805160c081018252825481526001838101546020838101919091526002850154838501819052600386015460608501526004860154608085015260059095015460a0840152600094855290890190529120909150610435565b600383015460001461059457600383810154600090815260018881016020908152604092839020835160c081018552815481529281015491830191909152600281015492820192909252918101546060830152600481015460808301526005015460a082015291505b60808201516000146102eb57608091820151600090815260018781016020908152604092839020835160c081018552815481529281015491830191909152600281015492820192909252600382015460608201526004820154938101939093526005015460a0830152610526565b60028301546000146104595750506002810154600081815260018681016020908152604092839020835160c081018552865481529286015491830191909152918101929092526003830154606083015260048301546080830152600583015460a08301525b81516004820154141561060f57805493506102f0565b60028101546000141561062157610459565b6040805160c081018252825481526001838101546020838101919091526002850154838501819052600386015460608501526004860154608085015260059095015460a08401526000948552908901905291209091506105f9565b610686878761015b565b865460009250821415610697578587555b508554600090815260018701602052604090205b8054600014156107225785815560028101829055600181018590556101b987875b60008181526001830160205260408120905b8154610d849085905b6000818152600183016020526040808220600481015483528183206005908101546003830154855292909320929092015403905b5092915050565b600181015481549250851261075f5760048101546000141561074657600481018690555b60040154600090815260018701602052604090206106ab565b60038101546000141561077457600381018690555b60030154600090815260018701602052604090206106ab565b600381015460001415806107a657506004810154600014155b156107cc5760038101546000146108235780546001880190600090610838908a90610246565b6002810154600014610a255760028101546000908152600188016020526040902060038101548254919550141561080557600060038501555b60048401548154141561081a57600060048501555b83549150610a2a565b8054600188019060009061084f908a906101eb565b815260208101919091526040016000209450610862565b8152602081019190915260400160002094505b600285015460009081526001880160205260409020600381015486549195509092508214156108b6576004850154600385018190556000146108b65760048501546000908152604090208454600282015592505b60048401548554141561091057600385015460048501819055600014610910578660010160005060008660030160005054815260200190815260200160002060005092508250836000016000505483600201600050819055505b60028082015490860181905560001461098157866001016000506000826002016000505481526020019081526020016000206000509350835080600001600050548460030160005054141561096757845460038501555b60048401548154141561097c57845460048501555b610986565b845487555b6003818101549086018190556000146109d3578660010160005060008260030160005054815260200190815260200160002060005092508250846000016000505483600201600050819055505b600481810154908601819055600014610a20578660010160005060008260040160005054815260200190815260200160002060005092508250846000016000505483600201600050819055505b610a2a565b600087555b60008082556001820181905560028201819055600382018190556004820181905582146101b9576101b987836106cc565b50600081815260018601602052604090205b6001810154610a8b908686610aca565b805492505b50509392505050565b15610b875760fa60020a600f02851480610aac575060f060020a613c3d0285145b15610ae757600481015460001415610b305780549250610a82565b86865b600060f960020a601f02831415610cd957508083135b9392505050565b60f960020a601f02851480610b03575060f060020a613e3d0285145b80610b15575060f060020a613d3d0285145b15610b8757600381015460001415610bbe5780549250610a82565b610b69610ac7878360040160005054600081815260018301602052604081205b600381015460001415610d57576001810154915061071b565b15610a7d576004015460009081526001860160205260409020610a6d565b60fa60020a600f02851480610ba3575060f060020a613c3d0285145b15610c1557600381015460001415610c4c5760009250610a82565b610bf7610ac7878360030160005054600081815260018301602052604081205b600481015460001415610d3e576001810154915061071b565b15610a7d576003015460009081526001860160205260409020610a6d565b60f960020a601f02851480610c31575060f060020a613e3d0285145b15610c6557600481015460001415610c985760009250610a82565b6003015460009081526001860160205260409020610a6d565b60f060020a613d3d02851415610cd457600181015484901215610cb157600481015460001415610c985760009250610a82565b6004015460009081526001860160205260409020610a6d565b600181015484901315610cd457600381015460001415610c4c5760009250610a82565b610a6d565b60fa60020a600f02831415610cf15750808312610ae0565b60f060020a613e3d02831415610d0b575080831215610ae0565b60f060020a613c3d02831415610d25575080831315610ae0565b60f060020a613d3d028314156100a05750828114610ae0565b6004015460009081526001840160205260409020610bde565b6003015460009081526001840160205260409020610b50565b600282015460001415610fb3575b50505050565b90508060021415610e1c57610da08483600301600050546106e7565b6000191415610dba57610dba848360030160005054610df4565b8154610e1c9085905b60008181526001830160205260408120600381015490919081908190811415610ff157610007565b8154610e509085905b60008181526001830160205260408120600481015490919081908190811415610e7557610007565b806001191415610e5057610e378483600401600050546106e7565b60011415610deb57610deb848360040160005054610dc3565b8060001913158015610e63575060018113155b15610d70578154610d70908590610f70565b6004840180546000908152600188016020526040812060028088015490820181905592829055945014610f0557856001016000506000856002016000505481526020019081526020016000206000509150836000016000505482600301600050541415610ef057826000016000505482600301600050819055505b835460048301541415610f0557825460048301555b6003830154600014610f36575060038201546000908152600186016020526040902080546004850155835460028201555b82546002808601919091558454600385015583015460001415610f6757826000016000505486600001600050819055505b8354610fdc9087905b6000818152600183016020526040808220600381015483528183206005908101546004830154855292842001549092610fcf9291908183106110f05750816100c3565b60029091015460009081526001840160205260409020906106de565b6001016005820155505050565b8254610fe9908790610f70565b505050505050565b60038401805460009081526001880160205260408120600280880154908201819055928290559450146110815785600101600050600085600201600050548152602001908152602001600020600050915083600001600050548260030160005054141561106c57826000016000505482600301600050819055505b83546004830154141561108157825460048301555b60048301546000146110b357506004820154600081815260018701602052604090206003850191909155835460028201555b82546002808601919091558454600485015583015460001415610f6757826000016000505486600001600050819055508354610fdc908790610f70565b50806100c356

======= ResourcePoolLib =======
Binary: 
60606040526111fa806100126000396000f3650106d6e77ce050606060405236156100e25760e060020a6000350463068e3ef181146100e7578063079ed96f1461011c578063317c152d14610136578063332a06ac1461014d5780633458e13e1461018157806338f4c9eb1461027a57806354e37911146104755780635748147e146104ae57806367f146ce146104cb5780636a704d7b146104e157806383973eb3146105245780638f00e61a1461053e578063968f7720146105c7578063a163a325146105df578063b6cbfdb214610625578063c75e8f881461075f578063dd8abb6c1461083b578063f117392814610871575b610007565b6108b4600435602435604435600160a060020a0382166000908152600984016020526040902054818101101561113f57610007565b6108b66004356024355b6000610f298383610f3086610766565b6108b6600435602435600060006110c584846105d1565b6108b46004356024356044355b600160a060020a038216600090815260098401602052604090205481111561111957610007565b6108b66004356024356044355b60008281526008840160205260408120815b6003820154811015610e2a5783600160a060020a03168260030160005082815481101561000757600091825260209091200154600160a060020a031614156111045760038201805460001981019081101561000757906000526020600020900160009054906101000a9004600160a060020a03168260030160005082815481101561000757602060002001805473ffffffffffffffffffffffffffffffffffffffff19169092179091558054600019810180835591908290801582901161110c5781836000526020600020918201910161110c9190610a82565b6108b66004356024356044356040805160208181018084526000808452908190528284018190528351808301855281815260608481019190915284518084018087528382528390528086018390528551808501875283815291810191909152845160e160020a6373671d3502815260048981019082015260f060020a613c3d0260248201526044810188905294519194859493859373661d36b10dd5b879e496edaf860327812fb81e489263e6ce3a6a9260648281019391928290030181888760325a03f21561000757505060405151945050838214610b415787600801600050600073b06732649abb0e2d4fd1988c7cd74aa182c5453e6381a33a6f876040518260e060020a0281526004018082815260200191505060206040518083038160008760325a03f215610007575050604080518051909352602093845280862060808401825280548452600181015484860152600281015484830152815160038201805480880283018801909452838252949591946060870194509092909183018282801561043357602002820191906000526020600020905b8154600160a060020a0316815260019190910190602001808311610414575b5050505050815260200150509250868360200151111580156104675750858360400151101580610467575082604001516000145b15610b415782519450610b36565b6108b66004356024356044355b600160a060020a03821660009081526009840160205260408120548190819084901015610f4557610e2f565b6108b6600435602435604435600060006000610fa4868686610482565b6108b66004356024355b6000610f358383610126565b6108b46004356024356040518190600160a060020a038416907f4327115baba128e8ceaca5033a9ef758752c17a483bc96c54bbc5a65ee9c793290600090a35050565b6108b66004356024355b6000610f298383610f3086610545565b6108b66004355b6040805160e160020a6373671d3502815260048381019082015260f960020a601f0260248201524360448201529051600091829173661d36b10dd5b879e496edaf860327812fb81e489163e6ce3a6a9160648281019260209291908290030181878760325a03f2156100075750506040515191505080821415610cfe57610cf8565b6108b66004356024355b600060006110648484610126565b6108b66004356024356044355b604080516020818101808452600080845290819052828401819052835191820190935282815260608201528183811415610e3857610e2f565b6108b66004355b60408051602081810183526000808352600385018054808352600887018452858320600191820192839055828452868420838155885460028a015443010192810192909255865160e060020a6394e8767d028152600481810194909452965193969095919491938793849373661d36b10dd5b879e496edaf860327812fb81e489363bacd695893928c019273b06732649abb0e2d4fd1988c7cd74aa182c5453e926394e8767d926024818101939182900301818a8760325a03f215610007575050506040518051906020015087600101600050546040518460e060020a02815260040180848152602001838152602001828152602001935050505060006040518083038160008760325a03f215610007575050508460000160005054600014156108d757836000016000505495506108cd565b6108b66004355b6040805160e160020a6373671d3502815260068301600482015260f960020a601f0260248201524360448201529051600091829173661d36b10dd5b879e496edaf860327812fb81e489163e6ce3a6a9160648281019260209291908290030181878760325a03f21561000757505060405151915050808214610d575773b06732649abb0e2d4fd1988c7cd74aa182c5453e6381a33a6f826040518260e060020a0281526004018082815260200191505060206040518083038160008760325a03f215610007575050604051519250610cf89050565b6108b4600435602435604435606435600160a060020a038316600090815260098501602052604090205482111561116457610007565b6108b46004356024356040518190600160a060020a038416907fd6940c8c0a181b5bfa95089c2e4c2e9cdaa9dd6b1ac448594436a391d6e4ced190600090a35050565b005b60408051918252519081900360200190f35b835495505b5050505050919050565b6001870154875460028981015443019091019091019086015584546040805160e060020a6394e8767d02815260048101929092525173661d36b10dd5b879e496edaf860327812fb81e489163bacd69589160068b019173b06732649abb0e2d4fd1988c7cd74aa182c5453e916394e8767d91602481810192602092909190829003018160008760325a03f21561000757505060408051805160028c01547fbacd695800000000000000000000000000000000000000000000000000000000835260048301959095526024820152604481019390935251606483810193600093508290030181838760325a03f2156100075750506040805160038801805460208181028401810190945280835291935091830182828015610a2157602002820191906000526020600020905b8154600160a060020a0316815260019190910190602001808311610a02575b50505050509250600091505b82518210156108c8575060408051835160038601805443408452935192839003602001909220600184018084559184900390069290919082908015829011610a9657600083815260209020610a969181019083015b80821115610b2d5760008155600101610a82565b505050508281815181101561000757505060208181028401015160038501805460001981019081101561000757906000526020600020900160006101000a815481600160a060020a03021916908302179055508260018451038151811015610007579060200190602002015183828151811015610007575050600160a060020a031660208281028501015260019190910190610a2d565b5090565b600094505b505050509392505050565b6040805160e160020a6373671d3502815260068a0160048201527f3e3d000000000000000000000000000000000000000000000000000000000000602482015260448101889052905173661d36b10dd5b879e496edaf860327812fb81e489163e6ce3a6a916064828101926020929190829003018160008760325a03f2156100075750506040515192505060008214610b315787600801600050600073b06732649abb0e2d4fd1988c7cd74aa182c5453e6381a33a6f856040518260e060020a0281526004018082815260200191505060206040518083038160008760325a03f215610007575050604080518051845260209485529281902060808401825280548452600181015484860152600281015484830152600381018054835181880281018801909452808452949591946060870194509091830182828015610cb157602002820191906000526020600020905b8154600160a060020a0316815260019190910190602001808311610c92575b505050505081526020015050905086816020015111158015610ce55750858160400151101580610ce5575080604001516000145b15610b315780519450610b36565b600091505b50919050565b73b06732649abb0e2d4fd1988c7cd74aa182c5453e6381a33a6f826040518260e060020a0281526004018082815260200191505060206040518083038160008760325a03f215610007575050604051519250610cf89050565b6040805160e160020a6373671d3502815260048581019082015260f060020a613c3d026024820152436044820152905173661d36b10dd5b879e496edaf860327812fb81e489163e6ce3a6a916064828101926020929190829003018160008760325a03f2156100075750506040515191505060008114610cf35773b06732649abb0e2d4fd1988c7cd74aa182c5453e6381a33a6f826040518260e060020a0281526004018082815260200191505060206040518083038160008760325a03f215610007575050604051519250610cf89050565b600092505b50509392505050565b600084815260088701602090815260409182902082516080810184528154815260018201548184015260028201548185015283516003830180548086028301860190965285825291949293606086019391929190830182828015610ec657602002820191906000526020600020905b8154600160a060020a0316815260019190910190602001808311610ea7575b5050505050815260200150509150600090505b816060015151811015610e2a5784600160a060020a031682606001518281518110156100075790602001906020020151600160a060020a03161415610f215760019250610e2f565b600101610ed9565b9392505050565b6105ec565b80610f295750610f29838361052e565b610f4f86866104d5565b15610f5d5760009250610e2f565b610f6686610545565b915060008214610f9b57506000818152600886016020526040902060018101546002870154430110610f9b5760009250610e2f565b60019250610e2f565b1515610faf57610007565b610fb886610545565b91508160001415610fcf57610fcc8661062c565b91505b506000818152600886016020526040902060038101805460018101808355919082908015829011611013578183600052602060002091820191016110139190610a82565b50505060038201805487925060001981019081101561000757906000526020600020900160006101000a815481600160a060020a0302191690830217905550819250610e2f565b91505b5092915050565b1515611073576000915061105d565b61107c84610545565b90508060001415611090576001915061105d565b6002840154600082815260088601602052604090206001015443919003116110bb576000915061105d565b61105a848461052e565b15156110d057610007565b6110d984610545565b905080600014156110f0576110ed8461062c565b90505b6110fb84828561018e565b5080915061105d565b6001016101a0565b5050505060019250610e2f565b600160a060020a0382166000908152600984016020526040902080548290039055505050565b600160a060020a03821660009081526009840160205260409020805482019055505050565b61116e84846104d5565b156111a057600160a060020a0383166000908152600985016020526040902054829003819010156111a0575b50505050565b6111ab84848461015a565b604051600160a060020a03841690600090849082818181858883f19350505050151561119a5782600160a060020a03165a60405184906000818181858888f19350505050151561119a5761000756
Binary of the runtime part: 
650106d6e77ce050606060405236156100e25760e060020a6000350463068e3ef181146100e7578063079ed96f1461011c578063317c152d14610136578063332a06ac1461014d5780633458e13e1461018157806338f4c9eb1461027a57806354e37911146104755780635748147e146104ae57806367f146ce146104cb5780636a704d7b146104e157806383973eb3146105245780638f00e61a1461053e578063968f7720146105c7578063a163a325146105df578063b6cbfdb214610625578063c75e8f881461075f578063dd8abb6c1461083b578063f117392814610871575b610007565b6108b4600435602435604435600160a060020a0382166000908152600984016020526040902054818101101561113f57610007565b6108b66004356024355b6000610f298383610f3086610766565b6108b6600435602435600060006110c584846105d1565b6108b46004356024356044355b600160a060020a038216600090815260098401602052604090205481111561111957610007565b6108b66004356024356044355b60008281526008840160205260408120815b6003820154811015610e2a5783600160a060020a03168260030160005082815481101561000757600091825260209091200154600160a060020a031614156111045760038201805460001981019081101561000757906000526020600020900160009054906101000a9004600160a060020a03168260030160005082815481101561000757602060002001805473ffffffffffffffffffffffffffffffffffffffff19169092179091558054600019810180835591908290801582901161110c5781836000526020600020918201910161110c9190610a82565b6108b66004356024356044356040805160208181018084526000808452908190528284018190528351808301855281815260608481019190915284518084018087528382528390528086018390528551808501875283815291810191909152845160e160020a6373671d3502815260048981019082015260f060020a613c3d0260248201526044810188905294519194859493859373661d36b10dd5b879e496edaf860327812fb81e489263e6ce3a6a9260648281019391928290030181888760325a03f21561000757505060405151945050838214610b415787600801600050600073b06732649abb0e2d4fd1988c7cd74aa182c5453e6381a33a6f876040518260e060020a0281526004018082815260200191505060206040518083038160008760325a03f215610007575050604080518051909352602093845280862060808401825280548452600181015484860152600281015484830152815160038201805480880283018801909452838252949591946060870194509092909183018282801561043357602002820191906000526020600020905b8154600160a060020a0316815260019190910190602001808311610414575b5050505050815260200150509250868360200151111580156104675750858360400151101580610467575082604001516000145b15610b415782519450610b36565b6108b66004356024356044355b600160a060020a03821660009081526009840160205260408120548190819084901015610f4557610e2f565b6108b6600435602435604435600060006000610fa4868686610482565b6108b66004356024355b6000610f358383610126565b6108b46004356024356040518190600160a060020a038416907f4327115baba128e8ceaca5033a9ef758752c17a483bc96c54bbc5a65ee9c793290600090a35050565b6108b66004356024355b6000610f298383610f3086610545565b6108b66004355b6040805160e160020a6373671d3502815260048381019082015260f960020a601f0260248201524360448201529051600091829173661d36b10dd5b879e496edaf860327812fb81e489163e6ce3a6a9160648281019260209291908290030181878760325a03f2156100075750506040515191505080821415610cfe57610cf8565b6108b66004356024355b600060006110648484610126565b6108b66004356024356044355b604080516020818101808452600080845290819052828401819052835191820190935282815260608201528183811415610e3857610e2f565b6108b66004355b60408051602081810183526000808352600385018054808352600887018452858320600191820192839055828452868420838155885460028a015443010192810192909255865160e060020a6394e8767d028152600481810194909452965193969095919491938793849373661d36b10dd5b879e496edaf860327812fb81e489363bacd695893928c019273b06732649abb0e2d4fd1988c7cd74aa182c5453e926394e8767d926024818101939182900301818a8760325a03f215610007575050506040518051906020015087600101600050546040518460e060020a02815260040180848152602001838152602001828152602001935050505060006040518083038160008760325a03f215610007575050508460000160005054600014156108d757836000016000505495506108cd565b6108b66004355b6040805160e160020a6373671d3502815260068301600482015260f960020a601f0260248201524360448201529051600091829173661d36b10dd5b879e496edaf860327812fb81e489163e6ce3a6a9160648281019260209291908290030181878760325a03f21561000757505060405151915050808214610d575773b06732649abb0e2d4fd1988c7cd74aa182c5453e6381a33a6f826040518260e060020a0281526004018082815260200191505060206040518083038160008760325a03f215610007575050604051519250610cf89050565b6108b4600435602435604435606435600160a060020a038316600090815260098501602052604090205482111561116457610007565b6108b46004356024356040518190600160a060020a038416907fd6940c8c0a181b5bfa95089c2e4c2e9cdaa9dd6b1ac448594436a391d6e4ced190600090a35050565b005b60408051918252519081900360200190f35b835495505b5050505050919050565b6001870154875460028981015443019091019091019086015584546040805160e060020a6394e8767d02815260048101929092525173661d36b10dd5b879e496edaf860327812fb81e489163bacd69589160068b019173b06732649abb0e2d4fd1988c7cd74aa182c5453e916394e8767d91602481810192602092909190829003018160008760325a03f21561000757505060408051805160028c01547fbacd695800000000000000000000000000000000000000000000000000000000835260048301959095526024820152604481019390935251606483810193600093508290030181838760325a03f2156100075750506040805160038801805460208181028401810190945280835291935091830182828015610a2157602002820191906000526020600020905b8154600160a060020a0316815260019190910190602001808311610a02575b50505050509250600091505b82518210156108c8575060408051835160038601805443408452935192839003602001909220600184018084559184900390069290919082908015829011610a9657600083815260209020610a969181019083015b80821115610b2d5760008155600101610a82565b505050508281815181101561000757505060208181028401015160038501805460001981019081101561000757906000526020600020900160006101000a815481600160a060020a03021916908302179055508260018451038151811015610007579060200190602002015183828151811015610007575050600160a060020a031660208281028501015260019190910190610a2d565b5090565b600094505b505050509392505050565b6040805160e160020a6373671d3502815260068a0160048201527f3e3d000000000000000000000000000000000000000000000000000000000000602482015260448101889052905173661d36b10dd5b879e496edaf860327812fb81e489163e6ce3a6a916064828101926020929190829003018160008760325a03f2156100075750506040515192505060008214610b315787600801600050600073b06732649abb0e2d4fd1988c7cd74aa182c5453e6381a33a6f856040518260e060020a0281526004018082815260200191505060206040518083038160008760325a03f215610007575050604080518051845260209485529281902060808401825280548452600181015484860152600281015484830152600381018054835181880281018801909452808452949591946060870194509091830182828015610cb157602002820191906000526020600020905b8154600160a060020a0316815260019190910190602001808311610c92575b505050505081526020015050905086816020015111158015610ce55750858160400151101580610ce5575080604001516000145b15610b315780519450610b36565b600091505b50919050565b73b06732649abb0e2d4fd1988c7cd74aa182c5453e6381a33a6f826040518260e060020a0281526004018082815260200191505060206040518083038160008760325a03f215610007575050604051519250610cf89050565b6040805160e160020a6373671d3502815260048581019082015260f060020a613c3d026024820152436044820152905173661d36b10dd5b879e496edaf860327812fb81e489163e6ce3a6a916064828101926020929190829003018160008760325a03f2156100075750506040515191505060008114610cf35773b06732649abb0e2d4fd1988c7cd74aa182c5453e6381a33a6f826040518260e060020a0281526004018082815260200191505060206040518083038160008760325a03f215610007575050604051519250610cf89050565b600092505b50509392505050565b600084815260088701602090815260409182902082516080810184528154815260018201548184015260028201548185015283516003830180548086028301860190965285825291949293606086019391929190830182828015610ec657602002820191906000526020600020905b8154600160a060020a0316815260019190910190602001808311610ea7575b5050505050815260200150509150600090505b816060015151811015610e2a5784600160a060020a031682606001518281518110156100075790602001906020020151600160a060020a03161415610f215760019250610e2f565b600101610ed9565b9392505050565b6105ec565b80610f295750610f29838361052e565b610f4f86866104d5565b15610f5d5760009250610e2f565b610f6686610545565b915060008214610f9b57506000818152600886016020526040902060018101546002870154430110610f9b5760009250610e2f565b60019250610e2f565b1515610faf57610007565b610fb886610545565b91508160001415610fcf57610fcc8661062c565b91505b506000818152600886016020526040902060038101805460018101808355919082908015829011611013578183600052602060002091820191016110139190610a82565b50505060038201805487925060001981019081101561000757906000526020600020900160006101000a815481600160a060020a0302191690830217905550819250610e2f565b91505b5092915050565b1515611073576000915061105d565b61107c84610545565b90508060001415611090576001915061105d565b6002840154600082815260088601602052604090206001015443919003116110bb576000915061105d565b61105a848461052e565b15156110d057610007565b6110d984610545565b905080600014156110f0576110ed8461062c565b90505b6110fb84828561018e565b5080915061105d565b6001016101a0565b5050505060019250610e2f565b600160a060020a0382166000908152600984016020526040902080548290039055505050565b600160a060020a03821660009081526009840160205260409020805482019055505050565b61116e84846104d5565b156111a057600160a060020a0383166000908152600985016020526040902054829003819010156111a0575b50505050565b6111ab84848461015a565b604051600160a060020a03841690600090849082818181858883f19350505050151561119a5782600160a060020a03165a60405184906000818181858888f19350505050151561119a5761000756

======= Scheduler =======
Binary: 
606060405260506002819055600055610100600155611243806100226000396000f3606060405236156101c15760e060020a60003504630199131381146101c3578063049ae734146101e357806304dd69fa1461020757806308f235ec1461027d5780631ae460e51461028e57806321bacf281461030357806323306ed614610315578063299179541461036c578063306b031d1461045057806333613cbe1461046e578063345006b6146104935780633cbfed74146105d6578063480b70bd146105e457806348107843146106065780634b64e4921461069657806350a3bd391461072b578063523ccfa8146107545780635a5383ac146107ca5780635a8dd79f1461083f578063616494721461099657806368402460146109a1578063741b3c39146109c95780637772a38014610a4c5780638b676ae814610ae45780638baced6414610bc65780638dd5e29814610c3e57806398e00e5414610c6a5780639f927be714610cc0578063a502aae814610d6e578063a6c01cfd14610dea578063b010d94a14610dfc578063b0171fa414610e74578063b355946014610ef0578063c0f6885914610f0d578063c3daab9614610f63578063c630f92b14610f8f578063c831391d14610fb8578063ed2b8e0b14610fc3578063f8b1185314610fce575b005b610feb600435602435604435600061103a848484600060ff611042610281565b610feb60043560243560443560643560843560006110588686868686611042610281565b611007600435600073873bf63c898791e57fa66e7b9261ea81df0b80446362352f336000600050846040518360e060020a0281526004018083815260200182600160a060020a031681526020019250505060206040518083038160008760325a03f2156100025750506040515191506104699050565b6110075b670de0b6b3a76400005b90565b6110076040805160e160020a6333f8a367028152600060048201819052600160a060020a03331660248301529151732b8f80bd9fe08f7a13cf5919ee20524cb4a75858916367f146ce9160448281019260209291908290030181878760325a03f21561000257505060405151915061028b9050565b6110075b67016345785d8a000061028b565b6110075b600073873bf63c898791e57fa66e7b9261ea81df0b80446323306ed66040518160e060020a02815260040180905060206040518083038160008760325a03f21561000257505060405151915061028b9050565b6101c1604080517f317c152d000000000000000000000000000000000000000000000000000000008152600060048201819052600160a060020a03331660248301529151732b8f80bd9fe08f7a13cf5919ee20524cb4a758589163317c152d9160448281019260209291908290030181878760325a03f2156100025750506040805180517ff1173928000000000000000000000000000000000000000000000000000000008252600160a060020a0333166004830152602482018190529151919363f1173928926044838101938290030181838760325a03f2156100025750505050565b6110076004356000818152600860205260409020600201545b919050565b6110076004355b600160a060020a038116600090815260096020526040902054610469565b61100760043560006000829050732b8f80bd9fe08f7a13cf5919ee20524cb4a758586338f4c9eb600060005060000160005083600160a060020a0316630a16697a6040518160e060020a0281526004018090506020604051808303816000876161da5a03f11561000257505060408051805160e260020a63281b6df7028252915191929163a06db7dc91600481810192602092909190829003018188876161da5a03f11561000257505060408051805160e160020a63050b34bd028252915160ff9092169291630a16697a91600481810192602092909190829003018189876161da5a03f1156100025750505060405180519060200150016040518460e060020a02815260040180848152602001838152602001828152602001935050505060206040518083038160008760325a03f21561000257505060405151949350505050565b61100760006110c033610475565b610feb600435602435604435606435600061104f8585858560ff611042610281565b610feb600435604080517fc4144b26000000000000000000000000000000000000000000000000000000008152600a6004820152600160a060020a0383166024820152905160009173661d36b10dd5b879e496edaf860327812fb81e489163c4144b26916044818101926020929091908290030181878760325a03f2156100025750506040515191506104699050565b6101c160043560005a604080517f21df594c0000000000000000000000000000000000000000000000000000000081526004810184905260248101839052600160a060020a038086166044830152331660648201529051919273873bf63c898791e57fa66e7b9261ea81df0b8044926321df594c9260848082019392918290030181838760325a03f215610002575050505050565b6101c16000732b8f80bd9fe08f7a13cf5919ee20524cb4a75858635748147e8233611178610319565b611007600435600073873bf63c898791e57fa66e7b9261ea81df0b804463d17b9e106000600050846040518360e060020a0281526004018083815260200182600160a060020a031681526020019250505060206040518083038160008760325a03f2156100025750506040515191506104699050565b6110076040805160e560020a6304b47bb9028152600060048201819052600160a060020a03331660248301529151732b8f80bd9fe08f7a13cf5919ee20524cb4a758589163968f77209160448281019260209291908290030181878760325a03f21561000257505060405151915061028b9050565b61101960043560243560006000600084905073873bf63c898791e57fa66e7b9261ea81df0b8044637da85730600060005083600160a060020a0316630a16697a6040518160e060020a0281526004018090506020604051808303816000876161da5a03f11561000257505060408051805160e260020a63281b6df7028252915191929163a06db7dc91600481810192602092909190829003018188876161da5a03f11561000257505060408051805160e160020a63050b34bd028252915160ff9092169291630a16697a91600481810192602092909190829003018189876161da5a03f115610002575050506040518051906020015001886040518560e060020a0281526004018085815260200184815260200183815260200182815260200194505050505060406040518083038160008760325a03f2156100025750506040518051602091909101519097909650945050505050565b61100760025461028b565b610feb60043560243560443560643560843560a435600061106287878787878761104a610307565b6101c1604080517f068e3ef1000000000000000000000000000000000000000000000000000000008152600060048201819052600160a060020a03331660248301523460448301529151732b8f80bd9fe08f7a13cf5919ee20524cb4a758589263068e3ef192606481810193918290030181838760325a03f21561000257505050565b6110076004356024355b604080517fa163a325000000000000000000000000000000000000000000000000000000008152600060048201819052600160a060020a0385166024830152604482018490529151732b8f80bd9fe08f7a13cf5919ee20524cb4a758589163a163a3259160648281019260209291908290030181878760325a03f21561000257505060405151949350505050565b610feb60043560243560443560643560843560a43560c4355b604080517f7365bb9a000000000000000000000000000000000000000000000000000000008152600060048201819052600160a060020a0333811660248401528a166044830152606482018990526084820188905260a4820187905260ff861660c483015260e48201859052610104820184905234610124830152915173873bf63c898791e57fa66e7b9261ea81df0b804491637365bb9a916101448083019260209291908290030181878760325a03f215610002575050604051519998505050505050505050565b6110076004356040805160e160020a6333f8a367028152600060048201819052600160a060020a03841660248301529151732b8f80bd9fe08f7a13cf5919ee20524cb4a75858916367f146ce9160448281019260209291908290030181878760325a03f2156100025750506040515191506104699050565b6110076004356000732b8f80bd9fe08f7a13cf5919ee20524cb4a758586354e379118284611123610319565b611007600073873bf63c898791e57fa66e7b9261ea81df0b80446398e00e546040518160e060020a02815260040180905060206040518083038160008760325a03f21561000257505060405151915061028b9050565b610feb600435604080517fe6ce3a6a000000000000000000000000000000000000000000000000000000008152600a60048201527f3e3d000000000000000000000000000000000000000000000000000000000000602482015260448101839052905160009173661d36b10dd5b879e496edaf860327812fb81e489163e6ce3a6a916064818101926020929091908290030181878760325a03f2156100025750506040515191506104699050565b611007604080517f8f00e61a0000000000000000000000000000000000000000000000000000000081526000600482018190529151732b8f80bd9fe08f7a13cf5919ee20524cb4a7585891638f00e61a9160248281019260209291908290030181878760325a03f21561000257505060405151915061028b9050565b61100760043560006110c73383610a56565b6110076004356040805160e560020a6304b47bb9028152600060048201819052600160a060020a03841660248301529151732b8f80bd9fe08f7a13cf5919ee20524cb4a758589163968f77209160448281019260209291908290030181878760325a03f2156100025750506040515191506104699050565b611007604080517fc75e8f880000000000000000000000000000000000000000000000000000000081526000600482018190529151732b8f80bd9fe08f7a13cf5919ee20524cb4a758589163c75e8f889160248281019260209291908290030181878760325a03f21561000257505060405151915061028b9050565b611007600435600081815260086020526040902060030154610469565b611007600073873bf63c898791e57fa66e7b9261ea81df0b804463c0f688596040518160e060020a02815260040180905060206040518083038160008760325a03f21561000257505060405151915061028b9050565b6101c1600435732b8f80bd9fe08f7a13cf5919ee20524cb4a7585863dd8abb6c6000338461106d610319565b6110076000732b8f80bd9fe08f7a13cf5919ee20524cb4a758586354e3791182336110ce610319565b61100760015461028b565b61100760005461028b565b611007600435600081815260086020526040902060010154610469565b60408051600160a060020a039092168252519081900360200190f35b60408051918252519081900360200190f35b60408051928352600160a060020a0390911660208301528051918290030190f35b949350505050565b61104a610307565b610afd565b95945050505050565b9695505050505050565b979650505050505050565b6040518560e060020a0281526004018085815260200184600160a060020a0316815260200183815260200182815260200194505050505060006040518083038160008760325a03f2156100025750505050565b905061028b565b9050610469565b6040518460e060020a0281526004018084815260200183600160a060020a03168152602001828152602001935050505060206040518083038160008760325a03f21561000257505060405151915061028b9050565b6040518460e060020a0281526004018084815260200183600160a060020a03168152602001828152602001935050505060206040518083038160008760325a03f2156100025750506040515191506104699050565b6040518460e060020a0281526004018084815260200183600160a060020a03168152602001828152602001935050505060206040518083038160008760325a03f2156100025750506040805180517f6a704d7b000000000000000000000000000000000000000000000000000000008252600160a060020a0333166004830152602482018190529151919350732b8f80bd9fe08f7a13cf5919ee20524cb4a758589250636a704d7b9160448281019260009291908290030181838760325a03f215610002575050505056
Binary of the runtime part: 
606060405236156101c15760e060020a60003504630199131381146101c3578063049ae734146101e357806304dd69fa1461020757806308f235ec1461027d5780631ae460e51461028e57806321bacf281461030357806323306ed614610315578063299179541461036c578063306b031d1461045057806333613cbe1461046e578063345006b6146104935780633cbfed74146105d6578063480b70bd146105e457806348107843146106065780634b64e4921461069657806350a3bd391461072b578063523ccfa8146107545780635a5383ac146107ca5780635a8dd79f1461083f578063616494721461099657806368402460146109a1578063741b3c39146109c95780637772a38014610a4c5780638b676ae814610ae45780638baced6414610bc65780638dd5e29814610c3e57806398e00e5414610c6a5780639f927be714610cc0578063a502aae814610d6e578063a6c01cfd14610dea578063b010d94a14610dfc578063b0171fa414610e74578063b355946014610ef0578063c0f6885914610f0d578063c3daab9614610f63578063c630f92b14610f8f578063c831391d14610fb8578063ed2b8e0b14610fc3578063f8b1185314610fce575b005b610feb600435602435604435600061103a848484600060ff611042610281565b610feb60043560243560443560643560843560006110588686868686611042610281565b611007600435600073873bf63c898791e57fa66e7b9261ea81df0b80446362352f336000600050846040518360e060020a0281526004018083815260200182600160a060020a031681526020019250505060206040518083038160008760325a03f2156100025750506040515191506104699050565b6110075b670de0b6b3a76400005b90565b6110076040805160e160020a6333f8a367028152600060048201819052600160a060020a03331660248301529151732b8f80bd9fe08f7a13cf5919ee20524cb4a75858916367f146ce9160448281019260209291908290030181878760325a03f21561000257505060405151915061028b9050565b6110075b67016345785d8a000061028b565b6110075b600073873bf63c898791e57fa66e7b9261ea81df0b80446323306ed66040518160e060020a02815260040180905060206040518083038160008760325a03f21561000257505060405151915061028b9050565b6101c1604080517f317c152d000000000000000000000000000000000000000000000000000000008152600060048201819052600160a060020a03331660248301529151732b8f80bd9fe08f7a13cf5919ee20524cb4a758589163317c152d9160448281019260209291908290030181878760325a03f2156100025750506040805180517ff1173928000000000000000000000000000000000000000000000000000000008252600160a060020a0333166004830152602482018190529151919363f1173928926044838101938290030181838760325a03f2156100025750505050565b6110076004356000818152600860205260409020600201545b919050565b6110076004355b600160a060020a038116600090815260096020526040902054610469565b61100760043560006000829050732b8f80bd9fe08f7a13cf5919ee20524cb4a758586338f4c9eb600060005060000160005083600160a060020a0316630a16697a6040518160e060020a0281526004018090506020604051808303816000876161da5a03f11561000257505060408051805160e260020a63281b6df7028252915191929163a06db7dc91600481810192602092909190829003018188876161da5a03f11561000257505060408051805160e160020a63050b34bd028252915160ff9092169291630a16697a91600481810192602092909190829003018189876161da5a03f1156100025750505060405180519060200150016040518460e060020a02815260040180848152602001838152602001828152602001935050505060206040518083038160008760325a03f21561000257505060405151949350505050565b61100760006110c033610475565b610feb600435602435604435606435600061104f8585858560ff611042610281565b610feb600435604080517fc4144b26000000000000000000000000000000000000000000000000000000008152600a6004820152600160a060020a0383166024820152905160009173661d36b10dd5b879e496edaf860327812fb81e489163c4144b26916044818101926020929091908290030181878760325a03f2156100025750506040515191506104699050565b6101c160043560005a604080517f21df594c0000000000000000000000000000000000000000000000000000000081526004810184905260248101839052600160a060020a038086166044830152331660648201529051919273873bf63c898791e57fa66e7b9261ea81df0b8044926321df594c9260848082019392918290030181838760325a03f215610002575050505050565b6101c16000732b8f80bd9fe08f7a13cf5919ee20524cb4a75858635748147e8233611178610319565b611007600435600073873bf63c898791e57fa66e7b9261ea81df0b804463d17b9e106000600050846040518360e060020a0281526004018083815260200182600160a060020a031681526020019250505060206040518083038160008760325a03f2156100025750506040515191506104699050565b6110076040805160e560020a6304b47bb9028152600060048201819052600160a060020a03331660248301529151732b8f80bd9fe08f7a13cf5919ee20524cb4a758589163968f77209160448281019260209291908290030181878760325a03f21561000257505060405151915061028b9050565b61101960043560243560006000600084905073873bf63c898791e57fa66e7b9261ea81df0b8044637da85730600060005083600160a060020a0316630a16697a6040518160e060020a0281526004018090506020604051808303816000876161da5a03f11561000257505060408051805160e260020a63281b6df7028252915191929163a06db7dc91600481810192602092909190829003018188876161da5a03f11561000257505060408051805160e160020a63050b34bd028252915160ff9092169291630a16697a91600481810192602092909190829003018189876161da5a03f115610002575050506040518051906020015001886040518560e060020a0281526004018085815260200184815260200183815260200182815260200194505050505060406040518083038160008760325a03f2156100025750506040518051602091909101519097909650945050505050565b61100760025461028b565b610feb60043560243560443560643560843560a435600061106287878787878761104a610307565b6101c1604080517f068e3ef1000000000000000000000000000000000000000000000000000000008152600060048201819052600160a060020a03331660248301523460448301529151732b8f80bd9fe08f7a13cf5919ee20524cb4a758589263068e3ef192606481810193918290030181838760325a03f21561000257505050565b6110076004356024355b604080517fa163a325000000000000000000000000000000000000000000000000000000008152600060048201819052600160a060020a0385166024830152604482018490529151732b8f80bd9fe08f7a13cf5919ee20524cb4a758589163a163a3259160648281019260209291908290030181878760325a03f21561000257505060405151949350505050565b610feb60043560243560443560643560843560a43560c4355b604080517f7365bb9a000000000000000000000000000000000000000000000000000000008152600060048201819052600160a060020a0333811660248401528a166044830152606482018990526084820188905260a4820187905260ff861660c483015260e48201859052610104820184905234610124830152915173873bf63c898791e57fa66e7b9261ea81df0b804491637365bb9a916101448083019260209291908290030181878760325a03f215610002575050604051519998505050505050505050565b6110076004356040805160e160020a6333f8a367028152600060048201819052600160a060020a03841660248301529151732b8f80bd9fe08f7a13cf5919ee20524cb4a75858916367f146ce9160448281019260209291908290030181878760325a03f2156100025750506040515191506104699050565b6110076004356000732b8f80bd9fe08f7a13cf5919ee20524cb4a758586354e379118284611123610319565b611007600073873bf63c898791e57fa66e7b9261ea81df0b80446398e00e546040518160e060020a02815260040180905060206040518083038160008760325a03f21561000257505060405151915061028b9050565b610feb600435604080517fe6ce3a6a000000000000000000000000000000000000000000000000000000008152600a60048201527f3e3d000000000000000000000000000000000000000000000000000000000000602482015260448101839052905160009173661d36b10dd5b879e496edaf860327812fb81e489163e6ce3a6a916064818101926020929091908290030181878760325a03f2156100025750506040515191506104699050565b611007604080517f8f00e61a0000000000000000000000000000000000000000000000000000000081526000600482018190529151732b8f80bd9fe08f7a13cf5919ee20524cb4a7585891638f00e61a9160248281019260209291908290030181878760325a03f21561000257505060405151915061028b9050565b61100760043560006110c73383610a56565b6110076004356040805160e560020a6304b47bb9028152600060048201819052600160a060020a03841660248301529151732b8f80bd9fe08f7a13cf5919ee20524cb4a758589163968f77209160448281019260209291908290030181878760325a03f2156100025750506040515191506104699050565b611007604080517fc75e8f880000000000000000000000000000000000000000000000000000000081526000600482018190529151732b8f80bd9fe08f7a13cf5919ee20524cb4a758589163c75e8f889160248281019260209291908290030181878760325a03f21561000257505060405151915061028b9050565b611007600435600081815260086020526040902060030154610469565b611007600073873bf63c898791e57fa66e7b9261ea81df0b804463c0f688596040518160e060020a02815260040180905060206040518083038160008760325a03f21561000257505060405151915061028b9050565b6101c1600435732b8f80bd9fe08f7a13cf5919ee20524cb4a7585863dd8abb6c6000338461106d610319565b6110076000732b8f80bd9fe08f7a13cf5919ee20524cb4a758586354e3791182336110ce610319565b61100760015461028b565b61100760005461028b565b611007600435600081815260086020526040902060010154610469565b60408051600160a060020a039092168252519081900360200190f35b60408051918252519081900360200190f35b60408051928352600160a060020a0390911660208301528051918290030190f35b949350505050565b61104a610307565b610afd565b95945050505050565b9695505050505050565b979650505050505050565b6040518560e060020a0281526004018085815260200184600160a060020a0316815260200183815260200182815260200194505050505060006040518083038160008760325a03f2156100025750505050565b905061028b565b9050610469565b6040518460e060020a0281526004018084815260200183600160a060020a03168152602001828152602001935050505060206040518083038160008760325a03f21561000257505060405151915061028b9050565b6040518460e060020a0281526004018084815260200183600160a060020a03168152602001828152602001935050505060206040518083038160008760325a03f2156100025750506040515191506104699050565b6040518460e060020a0281526004018084815260200183600160a060020a03168152602001828152602001935050505060206040518083038160008760325a03f2156100025750506040805180517f6a704d7b000000000000000000000000000000000000000000000000000000008252600160a060020a0333166004830152602482018190529151919350732b8f80bd9fe08f7a13cf5919ee20524cb4a758589250636a704d7b9160448281019260009291908290030181838760325a03f215610002575050505056

======= SchedulerLib =======
Binary: 
6060604052611de2806100126000396000f3650106d6e77ce050606060405236156100a05760e060020a600035046321df594c81146100a557806323306ed6146100c657806362352f33146100d15780636822abae146102145780637365bb9a1461022657806376a765ec146102825780637da85730146105b857806396cff3df146105f757806398c9cdf41461061557806398e00e5414610621578063c0f688591461062c578063d17b9e1014610637575b610007565b6106cd60043560243560443560643560006000600060006110f78887610641565b6106cf5b453a025b90565b6106cf60043560243560006000829050732b8f80bd9fe08f7a13cf5919ee20524cb4a758586338f4c9eb8560000160005083600160a060020a0316630a16697a6040518160e060020a0281526004018090506020604051808303816000876161da5a03f11561000757505060408051805160e260020a63281b6df7028252915191929163a06db7dc9160048181019260209290919082900301818c876161da5a03f11561000757505060408051805160e160020a63050b34bd028252915160ff9092169291630a16697a9160048181019260209290919082900301818d876161da5a03f1156100075750505060405180519060200150016040518460e060020a02815260040180848152602001838152602001828152602001935050505060206040518083038160008760325a03f2156100075750506040515195945050505050565b6106cf600435600061060f8283610601565b6106e160043560243560443560643560843560a43560c43560e435610104356101243560006000600060284301891015610edd577f544f4f5f534f4f4e0000000000000000000000000000000000000000000000009150610e27565b6106cd6004356024356044355b600060006000600060006000600060008897508a6000016000506008016000506000732b8f80bd9fe08f7a13cf5919ee20524cb4a758586338f4c9eb8e6000016000508c600160a060020a0316630a16697a6040518160e060020a0281526004018090506020604051808303816000876161da5a03f11561000757505050604051805190602001508d600160a060020a031663a06db7dc6040518160e060020a0281526004018090506020604051808303816000876161da5a03f115610007575050506040518051906020015060ff168e600160a060020a0316630a16697a6040518160e060020a0281526004018090506020604051808303816000876161da5a03f11561000757505060408051805160e060020a6338f4c9eb0282526004820196909652602481019490945291909301604483015251606482810193506020928290030181878760325a03f215610007575050604080518051909352602093845280852060e260020a63281b6df70284529051909a50601093600160a060020a038d169363a06db7dc935060048181019391829003018188876161da5a03f115610007575050506040518051906020015060ff16049250601088600160a060020a0316630a16697a6040518160e060020a0281526004018090506020604051808303816000876161da5a03f1156100075750506040515143039190910492505060028201839011156108a7576108ba8b89600160a060020a0316630a16697a6040518160e060020a0281526004018090506020604051808303816000876161da5a03f11561000757505050604051805190602001508a600160a060020a031663a06db7dc6040518160e060020a0281526004018090506020604051808303816000876161da5a03f115610007575050506040518051906020015060ff168b600160a060020a0316630a16697a6040518160e060020a0281526004018090506020604051808303816000876161da5a03f1156100075750505060405180519060200150018b600160a060020a0316630a16697a6040518160e060020a0281526004018090506020604051808303816000876161da5a03f1156100075750506040515190506105c8565b6106fe6004356024356044356064355b6000600060006000600060006000888a11806105e357508988105b806105ed57508888115b156107d657610007565b6106cf6004356024355b8082016002023a62030d4002015b92915050565b6106cf62030d406100ce565b6106cf5b60106100ce565b6106cf5b60406100ce565b6106cf6004356024355b604080517fed5bd7ea000000000000000000000000000000000000000000000000000000008152600a84016004820152600160a060020a0383166024820152905160009173661d36b10dd5b879e496edaf860327812fb81e489163ed5bd7ea916044818101926020929091908290030181878760325a03f21561000757505060405151915061060f9050565b005b60408051918252519081900360200190f35b60408051600160a060020a03929092168252519081900360200190f35b60408051928352600160a060020a039190911660208301528051918290030190f35b604080516003860180548d8352602083018d90529282018890528c918c918991606081018287801561077c57602002820191906000526020600020905b8154600160a060020a031681526001919091019060200180831161075d575b505060405190819003902060038b0180549790910697506001969095508789018190069450841015925061000791505057600091825260209091200154909750600160a060020a031695505b505050505094509492505050565b6040805160e060020a6338f4c9eb028152600481018d9052602481018c9052604481018b90529051732b8f80bd9fe08f7a13cf5919ee20524cb4a75858916338f4c9eb916064828101926020929190829003018160008760325a03f21561000757505060405151955050600085141561085557600096508695506107c8565b600085815260088c01602052604081206003810154909550141561087f57600096508695506107c8565b60108a8a0304925060108a8903049150828260020111156107205760019650600095506107c8565b60038701546002901015610b7657610ad1565b90508091505087600160a060020a0316630a16697a6040518160e060020a0281526004018090506020604051808303816000876161da5a03f115610007575050604051519650505b87600160a060020a031663a06db7dc6040518160e060020a0281526004018090506020604051808303816000876161da5a03f115610007575050506040518051906020015060ff1688600160a060020a0316630a16697a6040518160e060020a0281526004018090506020604051808303816000876161da5a03f115610007575050604051519190910187119050610ad157610a6e8b89600160a060020a0316630a16697a6040518160e060020a0281526004018090506020604051808303816000876161da5a03f11561000757505050604051805190602001508a600160a060020a031663a06db7dc6040518160e060020a0281526004018090506020604051808303816000876161da5a03f115610007575050506040518051906020015060ff168b600160a060020a0316630a16697a6040518160e060020a0281526004018090506020604051808303816000876161da5a03f115610007575050604051519091019050896105c8565b945050600160a060020a03848116908216148015610acb575087600160a060020a0316630a16697a6040518160e060020a0281526004018090506020604051808303816000876161da5a03f1156100075750506040515187141590505b15610b42575b5050505050505050505050565b604080518954600160a060020a038d811683524360208401528284018590529251939850928d8316928816917f01effaa2e368da793f55f20f86b32a3b29089a47746eac4df8cc17305a051cdd919081900360600190a45b60109590950194610902565b89600160a060020a031684600160a060020a03161415610b6157610b36565b610ade8b858c5b6000600060006114b26100ca565b600095505b6003870154861015610ad15789600160a060020a03168760030160005087815481101561000757600091825260209091200154600160a060020a03161415610bf757600387018054808801600019018190069081101561000757600091825260209091200154600160a060020a03169350610c038b858c610b68565b60019590950194610b7b565b604080518954600160a060020a038d811683524360208401528284018590529251939850928d8316928816917f01effaa2e368da793f55f20f86b32a3b29089a47746eac4df8cc17305a051cdd919081900360600190a4732b8f80bd9fe08f7a13cf5919ee20524cb4a75858638f00e61a8c6000016000506040518260e060020a0281526004018082815260200191505060206040518083038160008760325a03f21561000757505060405151600014159050610d0e57732b8f80bd9fe08f7a13cf5919ee20524cb4a7585863b6cbfdb28c6000016000506040518260e060020a0281526004018082815260200191505060206040518083038160008760325a03f215610007575050505b732b8f80bd9fe08f7a13cf5919ee20524cb4a75858633458e13e8c600001600050732b8f80bd9fe08f7a13cf5919ee20524cb4a75858638f00e61a8f6000016000506040518260e060020a0281526004018082815260200191505060206040518083038160008760325a03f2156100075750506040805180517f3458e13e00000000000000000000000000000000000000000000000000000000825260048201949094526024810193909352600160a060020a03891660448401525160648381019360209350829003018160008760325a03f2156100075750610ad1915050565b3a62030d400286860160020201841015610e27577f494e53554646494349454e545f46554e4453000000000000000000000000000091505b60008214610f1757604080518381529051600160a060020a038e16917f513485fc54ef019ef1bc1ea683ef7d5d522f2865224ae10871ff992749c0ba4f919081900360200190a273947aaa72162d32135d2af1ed0c6d610d541829c36312c82bcc8d866040518360e060020a0281526004018083600160a060020a031681526020018281526020019250505060206040518083038160008760325a03f215610007575050505b50509a9950505050505050505050565b610ee5610630565b8760ff161015610def577f47524143455f544f4f5f53484f525400000000000000000000000000000000009150610e27565b838c8a898e8e8d8c8c60405161080e806115d48339018089600160a060020a031681526020018881526020018760ff16815260200186600160a060020a03168152602001858152602001848152602001838152602001828152602001985050505050505050506040518091039082f09050905073661d36b10dd5b879e496edaf860327812fb81e4863bacd69588e600a0160005083600160a060020a031660010284600160a060020a0316630a16697a6040518160e060020a0281526004018090506020604051808303816000876161da5a03f1156100075750506040805180517fbacd69580000000000000000000000000000000000000000000000000000000082526004820195909552602481019290925260448201939093529151606483810193600093508290030181838760325a03f21561000757505060408051600160a060020a038416815290517f2b05d346f0b0b9fd470024751c52d3b5dac5c37796f077c1a66241f2eada44b792509081900360200190a1809250610ecd565b83600160a060020a031663c032dc3088876040518360e060020a0281526004018083815260200182600160a060020a03168152602001925050506000604051808303816000876161da5a03f115610007575050505b5050505050505050565b1515611185576040805160e060020a63dcb27883028152600160a060020a03871660048201527f554e4b4e4f574e5f41444452455353000000000000000000000000000000000060248201529051732746bcf29bffafcc7906752f639819171d18ce2b9163dcb278839160448281019260009291908290030181838760325a03f215610007575050506110ed565b85935083600160a060020a0316634136aa356040518160e060020a0281526004018090506020604051808303816000876161da5a03f1156100075750506040515115159050611256576040805160e060020a63dcb27883028152600160a060020a03871660048201527f53554943494445445f414c52454144590000000000000000000000000000000060248201529051732746bcf29bffafcc7906752f639819171d18ce2b9163dcb278839160448281019260009291908290030181838760325a03f215610007575050506110ed565b6113268885600160a060020a0316630a16697a6040518160e060020a0281526004018090506020604051808303816000876161da5a03f11561000757505060408051805160e260020a63281b6df7028252915191929163a06db7dc9160048181019260209290919082900301816000876161da5a03f11561000757505060408051805160e160020a63050b34bd028252915160ff9092169291630a16697a9160048181019260209290919082900301816000876161da5a03f11561000757505060405151919091019050436105c8565b9093509150828015611342575081600160a060020a0316600014155b8015611360575084600160a060020a031682600160a060020a031614155b156113ed576040805160e060020a63dcb27883028152600160a060020a03871660048201527f57524f4e475f43414c4c4552000000000000000000000000000000000000000060248201529051732746bcf29bffafcc7906752f639819171d18ce2b9163dcb278839160448281019260009291908290030181838760325a03f215610007575050506110ed565b83600160a060020a031663eec2b628866040518260e060020a0281526004018082600160a060020a031681526020019150506020604051808303816000876161da5a03f1156100075750506040515115159050611449576110ed565b821561109857611457610625565b84600160a060020a0316630a16697a6040518160e060020a0281526004018090506020604051808303816000876161da5a03f1156100075750506040515143039190910491505060008111156110985761109888868861028f565b600160a060020a03861660009081526009880160205260409020549092509050808211156114de579050805b604080517f332a06ac00000000000000000000000000000000000000000000000000000000815260048101889052600160a060020a0387166024820152604481018490529051732b8f80bd9fe08f7a13cf5919ee20524cb4a758589163332a06ac9160648281019260009291908290030181838760325a03f215610007575050604080517f068e3ef100000000000000000000000000000000000000000000000000000000815260048101899052600160a060020a038716602482015260448101859052905163068e3ef1916064818101926000929091908290030181838760325a03f2156100075750929796505050505050505660606040526040516101008061080e8339610160604052905160805160a05160c05160e051945161012051610140516000805433600160a060020a03199182161782556001805482169099179098556008969096556009805460ff19169095179094556002556003929092556007919091553a600655600480549093161760a060020a63ffffffff021916740100000000000000000000000000000000000000007c0100000000000000000000000000000000000000000000000000000000909404939093029290921790556107349081906100da90396000f3606060405236156100e55760e060020a60003504630a16697a811461012e578063137c638b1461013757806337f4c00e146101425780634136aa351461014d5780634e417a981461015757806361461954146101c05780636560a307146101e957806367ce940d146101f45780636ef25c3a146102005780638da5cb5b14610209578063a06db7dc1461021b578063ae45850b14610227578063b0f07e4414610239578063c032dc301461027a578063c6502da8146102d1578063ca94692d146102da578063ea8a1af014610303578063eec2b62814610397578063f6b4dfb41461045f575b610473600154600160a060020a03908116339091161480156101075750600036115b15610478576005546002600182161561010002600019019091160460001461047a57610002565b61053060085481565b6105305b6142685b90565b61053060065461013f565b610530600161013f565b61054260408051602081810183526000825282516005805460026001821615610100026000190190911604601f8101849004840283018401909552848252929390929183018282801561060f5780601f106105e45761010080835404028352916020019161060f565b61047360008054600160a060020a039081163390911614156106a9575a90506106a98133610284565b61053060075461013f565b6105305b61b3b061013f565b61053060035481565b6105b0600054600160a060020a031681565b6105cd60095460ff1681565b6105b0600154600160a060020a031681565b610473600154600160a060020a0390811633909116141561047857600554600060026001831615610100026000190190921691909104111561061b57610002565b6104736004356024355b600054600160a060020a0390811633909116141561047557732746bcf29bffafcc7906752f639819171d18ce2b63115256d8600460005084846002600050546003600050546106ac6101f8565b61053060025481565b61053060045474010000000000000000000000000000000000000000900460e060020a0261013f565b610473600154600160a060020a03908116339091161415610478576008546009190143108061033a575060085460095460ff160143115b1561047857732746bcf29bffafcc7906752f639819171d18ce2b634c33fe94336040518260e060020a0281526004018082600160a060020a0316815260200191505060006040518083038160008760325a03f21561000257505050565b6105306004356008546000904310806103b8575060085460095460ff160143115b1561072b57604080517fdcb27883000000000000000000000000000000000000000000000000000000008152600160a060020a03841660048201527f4e4f545f494e5f43414c4c5f57494e444f57000000000000000000000000000060248201529051732746bcf29bffafcc7906752f639819171d18ce2b9163dcb278839160448281019260009291908290030181838760325a03f215610002575050506000905061072f565b6105b0600454600160a060020a031661013f565b005b50505b565b600580546000828152602060026001841615610100026000190190931692909204601f908101929092047f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db0908101923692908390106104fc5782800160ff198235161785555b506104759291505b8082111561052c57600081556001016104e8565b828001600101855582156104e0579182015b828111156104e057823582600050559160200191906001019061050e565b5090565b60408051918252519081900360200190f35b60405180806020018281038252838181518152602001915080519060200190808383829060006004602084601f0104600302600f01f150905090810190601f1680156105a25780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b60408051600160a060020a03929092168252519081900360200190f35b6040805160ff929092168252519081900360200190f35b820191906000526020600020905b8154815290600101906020018083116105f257829003601f168201915b5050505050905061013f565b604080517f7c0278fc0000000000000000000000000000000000000000000000000000000081526004818101818152602483019384523660448401819052732746bcf29bffafcc7906752f639819171d18ce2b94637c0278fc946000939190606401848480828437820191505094505050505060006040518083038160008760325a03f21561000257505050565b50565b6106b461013b565b6040518860e060020a0281526004018088815260200187815260200186600160a060020a0316815260200185815260200184815260200183815260200182815260200197505050505050505060006040518083038160008760325a03f2156100025750505061047581600154600160a060020a0316ff5b5060015b91905056
Binary of the runtime part: 
650106d6e77ce050606060405236156100a05760e060020a600035046321df594c81146100a557806323306ed6146100c657806362352f33146100d15780636822abae146102145780637365bb9a1461022657806376a765ec146102825780637da85730146105b857806396cff3df146105f757806398c9cdf41461061557806398e00e5414610621578063c0f688591461062c578063d17b9e1014610637575b610007565b6106cd60043560243560443560643560006000600060006110f78887610641565b6106cf5b453a025b90565b6106cf60043560243560006000829050732b8f80bd9fe08f7a13cf5919ee20524cb4a758586338f4c9eb8560000160005083600160a060020a0316630a16697a6040518160e060020a0281526004018090506020604051808303816000876161da5a03f11561000757505060408051805160e260020a63281b6df7028252915191929163a06db7dc9160048181019260209290919082900301818c876161da5a03f11561000757505060408051805160e160020a63050b34bd028252915160ff9092169291630a16697a9160048181019260209290919082900301818d876161da5a03f1156100075750505060405180519060200150016040518460e060020a02815260040180848152602001838152602001828152602001935050505060206040518083038160008760325a03f2156100075750506040515195945050505050565b6106cf600435600061060f8283610601565b6106e160043560243560443560643560843560a43560c43560e435610104356101243560006000600060284301891015610edd577f544f4f5f534f4f4e0000000000000000000000000000000000000000000000009150610e27565b6106cd6004356024356044355b600060006000600060006000600060008897508a6000016000506008016000506000732b8f80bd9fe08f7a13cf5919ee20524cb4a758586338f4c9eb8e6000016000508c600160a060020a0316630a16697a6040518160e060020a0281526004018090506020604051808303816000876161da5a03f11561000757505050604051805190602001508d600160a060020a031663a06db7dc6040518160e060020a0281526004018090506020604051808303816000876161da5a03f115610007575050506040518051906020015060ff168e600160a060020a0316630a16697a6040518160e060020a0281526004018090506020604051808303816000876161da5a03f11561000757505060408051805160e060020a6338f4c9eb0282526004820196909652602481019490945291909301604483015251606482810193506020928290030181878760325a03f215610007575050604080518051909352602093845280852060e260020a63281b6df70284529051909a50601093600160a060020a038d169363a06db7dc935060048181019391829003018188876161da5a03f115610007575050506040518051906020015060ff16049250601088600160a060020a0316630a16697a6040518160e060020a0281526004018090506020604051808303816000876161da5a03f1156100075750506040515143039190910492505060028201839011156108a7576108ba8b89600160a060020a0316630a16697a6040518160e060020a0281526004018090506020604051808303816000876161da5a03f11561000757505050604051805190602001508a600160a060020a031663a06db7dc6040518160e060020a0281526004018090506020604051808303816000876161da5a03f115610007575050506040518051906020015060ff168b600160a060020a0316630a16697a6040518160e060020a0281526004018090506020604051808303816000876161da5a03f1156100075750505060405180519060200150018b600160a060020a0316630a16697a6040518160e060020a0281526004018090506020604051808303816000876161da5a03f1156100075750506040515190506105c8565b6106fe6004356024356044356064355b6000600060006000600060006000888a11806105e357508988105b806105ed57508888115b156107d657610007565b6106cf6004356024355b8082016002023a62030d4002015b92915050565b6106cf62030d406100ce565b6106cf5b60106100ce565b6106cf5b60406100ce565b6106cf6004356024355b604080517fed5bd7ea000000000000000000000000000000000000000000000000000000008152600a84016004820152600160a060020a0383166024820152905160009173661d36b10dd5b879e496edaf860327812fb81e489163ed5bd7ea916044818101926020929091908290030181878760325a03f21561000757505060405151915061060f9050565b005b60408051918252519081900360200190f35b60408051600160a060020a03929092168252519081900360200190f35b60408051928352600160a060020a039190911660208301528051918290030190f35b604080516003860180548d8352602083018d90529282018890528c918c918991606081018287801561077c57602002820191906000526020600020905b8154600160a060020a031681526001919091019060200180831161075d575b505060405190819003902060038b0180549790910697506001969095508789018190069450841015925061000791505057600091825260209091200154909750600160a060020a031695505b505050505094509492505050565b6040805160e060020a6338f4c9eb028152600481018d9052602481018c9052604481018b90529051732b8f80bd9fe08f7a13cf5919ee20524cb4a75858916338f4c9eb916064828101926020929190829003018160008760325a03f21561000757505060405151955050600085141561085557600096508695506107c8565b600085815260088c01602052604081206003810154909550141561087f57600096508695506107c8565b60108a8a0304925060108a8903049150828260020111156107205760019650600095506107c8565b60038701546002901015610b7657610ad1565b90508091505087600160a060020a0316630a16697a6040518160e060020a0281526004018090506020604051808303816000876161da5a03f115610007575050604051519650505b87600160a060020a031663a06db7dc6040518160e060020a0281526004018090506020604051808303816000876161da5a03f115610007575050506040518051906020015060ff1688600160a060020a0316630a16697a6040518160e060020a0281526004018090506020604051808303816000876161da5a03f115610007575050604051519190910187119050610ad157610a6e8b89600160a060020a0316630a16697a6040518160e060020a0281526004018090506020604051808303816000876161da5a03f11561000757505050604051805190602001508a600160a060020a031663a06db7dc6040518160e060020a0281526004018090506020604051808303816000876161da5a03f115610007575050506040518051906020015060ff168b600160a060020a0316630a16697a6040518160e060020a0281526004018090506020604051808303816000876161da5a03f115610007575050604051519091019050896105c8565b945050600160a060020a03848116908216148015610acb575087600160a060020a0316630a16697a6040518160e060020a0281526004018090506020604051808303816000876161da5a03f1156100075750506040515187141590505b15610b42575b5050505050505050505050565b604080518954600160a060020a038d811683524360208401528284018590529251939850928d8316928816917f01effaa2e368da793f55f20f86b32a3b29089a47746eac4df8cc17305a051cdd919081900360600190a45b60109590950194610902565b89600160a060020a031684600160a060020a03161415610b6157610b36565b610ade8b858c5b6000600060006114b26100ca565b600095505b6003870154861015610ad15789600160a060020a03168760030160005087815481101561000757600091825260209091200154600160a060020a03161415610bf757600387018054808801600019018190069081101561000757600091825260209091200154600160a060020a03169350610c038b858c610b68565b60019590950194610b7b565b604080518954600160a060020a038d811683524360208401528284018590529251939850928d8316928816917f01effaa2e368da793f55f20f86b32a3b29089a47746eac4df8cc17305a051cdd919081900360600190a4732b8f80bd9fe08f7a13cf5919ee20524cb4a75858638f00e61a8c6000016000506040518260e060020a0281526004018082815260200191505060206040518083038160008760325a03f21561000757505060405151600014159050610d0e57732b8f80bd9fe08f7a13cf5919ee20524cb4a7585863b6cbfdb28c6000016000506040518260e060020a0281526004018082815260200191505060206040518083038160008760325a03f215610007575050505b732b8f80bd9fe08f7a13cf5919ee20524cb4a75858633458e13e8c600001600050732b8f80bd9fe08f7a13cf5919ee20524cb4a75858638f00e61a8f6000016000506040518260e060020a0281526004018082815260200191505060206040518083038160008760325a03f2156100075750506040805180517f3458e13e00000000000000000000000000000000000000000000000000000000825260048201949094526024810193909352600160a060020a03891660448401525160648381019360209350829003018160008760325a03f2156100075750610ad1915050565b3a62030d400286860160020201841015610e27577f494e53554646494349454e545f46554e4453000000000000000000000000000091505b60008214610f1757604080518381529051600160a060020a038e16917f513485fc54ef019ef1bc1ea683ef7d5d522f2865224ae10871ff992749c0ba4f919081900360200190a273947aaa72162d32135d2af1ed0c6d610d541829c36312c82bcc8d866040518360e060020a0281526004018083600160a060020a031681526020018281526020019250505060206040518083038160008760325a03f215610007575050505b50509a9950505050505050505050565b610ee5610630565b8760ff161015610def577f47524143455f544f4f5f53484f525400000000000000000000000000000000009150610e27565b838c8a898e8e8d8c8c60405161080e806115d48339018089600160a060020a031681526020018881526020018760ff16815260200186600160a060020a03168152602001858152602001848152602001838152602001828152602001985050505050505050506040518091039082f09050905073661d36b10dd5b879e496edaf860327812fb81e4863bacd69588e600a0160005083600160a060020a031660010284600160a060020a0316630a16697a6040518160e060020a0281526004018090506020604051808303816000876161da5a03f1156100075750506040805180517fbacd69580000000000000000000000000000000000000000000000000000000082526004820195909552602481019290925260448201939093529151606483810193600093508290030181838760325a03f21561000757505060408051600160a060020a038416815290517f2b05d346f0b0b9fd470024751c52d3b5dac5c37796f077c1a66241f2eada44b792509081900360200190a1809250610ecd565b83600160a060020a031663c032dc3088876040518360e060020a0281526004018083815260200182600160a060020a03168152602001925050506000604051808303816000876161da5a03f115610007575050505b5050505050505050565b1515611185576040805160e060020a63dcb27883028152600160a060020a03871660048201527f554e4b4e4f574e5f41444452455353000000000000000000000000000000000060248201529051732746bcf29bffafcc7906752f639819171d18ce2b9163dcb278839160448281019260009291908290030181838760325a03f215610007575050506110ed565b85935083600160a060020a0316634136aa356040518160e060020a0281526004018090506020604051808303816000876161da5a03f1156100075750506040515115159050611256576040805160e060020a63dcb27883028152600160a060020a03871660048201527f53554943494445445f414c52454144590000000000000000000000000000000060248201529051732746bcf29bffafcc7906752f639819171d18ce2b9163dcb278839160448281019260009291908290030181838760325a03f215610007575050506110ed565b6113268885600160a060020a0316630a16697a6040518160e060020a0281526004018090506020604051808303816000876161da5a03f11561000757505060408051805160e260020a63281b6df7028252915191929163a06db7dc9160048181019260209290919082900301816000876161da5a03f11561000757505060408051805160e160020a63050b34bd028252915160ff9092169291630a16697a9160048181019260209290919082900301816000876161da5a03f11561000757505060405151919091019050436105c8565b9093509150828015611342575081600160a060020a0316600014155b8015611360575084600160a060020a031682600160a060020a031614155b156113ed576040805160e060020a63dcb27883028152600160a060020a03871660048201527f57524f4e475f43414c4c4552000000000000000000000000000000000000000060248201529051732746bcf29bffafcc7906752f639819171d18ce2b9163dcb278839160448281019260009291908290030181838760325a03f215610007575050506110ed565b83600160a060020a031663eec2b628866040518260e060020a0281526004018082600160a060020a031681526020019150506020604051808303816000876161da5a03f1156100075750506040515115159050611449576110ed565b821561109857611457610625565b84600160a060020a0316630a16697a6040518160e060020a0281526004018090506020604051808303816000876161da5a03f1156100075750506040515143039190910491505060008111156110985761109888868861028f565b600160a060020a03861660009081526009880160205260409020549092509050808211156114de579050805b604080517f332a06ac00000000000000000000000000000000000000000000000000000000815260048101889052600160a060020a0387166024820152604481018490529051732b8f80bd9fe08f7a13cf5919ee20524cb4a758589163332a06ac9160648281019260009291908290030181838760325a03f215610007575050604080517f068e3ef100000000000000000000000000000000000000000000000000000000815260048101899052600160a060020a038716602482015260448101859052905163068e3ef1916064818101926000929091908290030181838760325a03f2156100075750929796505050505050505660606040526040516101008061080e8339610160604052905160805160a05160c05160e051945161012051610140516000805433600160a060020a03199182161782556001805482169099179098556008969096556009805460ff19169095179094556002556003929092556007919091553a600655600480549093161760a060020a63ffffffff021916740100000000000000000000000000000000000000007c0100000000000000000000000000000000000000000000000000000000909404939093029290921790556107349081906100da90396000f3606060405236156100e55760e060020a60003504630a16697a811461012e578063137c638b1461013757806337f4c00e146101425780634136aa351461014d5780634e417a981461015757806361461954146101c05780636560a307146101e957806367ce940d146101f45780636ef25c3a146102005780638da5cb5b14610209578063a06db7dc1461021b578063ae45850b14610227578063b0f07e4414610239578063c032dc301461027a578063c6502da8146102d1578063ca94692d146102da578063ea8a1af014610303578063eec2b62814610397578063f6b4dfb41461045f575b610473600154600160a060020a03908116339091161480156101075750600036115b15610478576005546002600182161561010002600019019091160460001461047a57610002565b61053060085481565b6105305b6142685b90565b61053060065461013f565b610530600161013f565b61054260408051602081810183526000825282516005805460026001821615610100026000190190911604601f8101849004840283018401909552848252929390929183018282801561060f5780601f106105e45761010080835404028352916020019161060f565b61047360008054600160a060020a039081163390911614156106a9575a90506106a98133610284565b61053060075461013f565b6105305b61b3b061013f565b61053060035481565b6105b0600054600160a060020a031681565b6105cd60095460ff1681565b6105b0600154600160a060020a031681565b610473600154600160a060020a0390811633909116141561047857600554600060026001831615610100026000190190921691909104111561061b57610002565b6104736004356024355b600054600160a060020a0390811633909116141561047557732746bcf29bffafcc7906752f639819171d18ce2b63115256d8600460005084846002600050546003600050546106ac6101f8565b61053060025481565b61053060045474010000000000000000000000000000000000000000900460e060020a0261013f565b610473600154600160a060020a03908116339091161415610478576008546009190143108061033a575060085460095460ff160143115b1561047857732746bcf29bffafcc7906752f639819171d18ce2b634c33fe94336040518260e060020a0281526004018082600160a060020a0316815260200191505060006040518083038160008760325a03f21561000257505050565b6105306004356008546000904310806103b8575060085460095460ff160143115b1561072b57604080517fdcb27883000000000000000000000000000000000000000000000000000000008152600160a060020a03841660048201527f4e4f545f494e5f43414c4c5f57494e444f57000000000000000000000000000060248201529051732746bcf29bffafcc7906752f639819171d18ce2b9163dcb278839160448281019260009291908290030181838760325a03f215610002575050506000905061072f565b6105b0600454600160a060020a031661013f565b005b50505b565b600580546000828152602060026001841615610100026000190190931692909204601f908101929092047f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db0908101923692908390106104fc5782800160ff198235161785555b506104759291505b8082111561052c57600081556001016104e8565b828001600101855582156104e0579182015b828111156104e057823582600050559160200191906001019061050e565b5090565b60408051918252519081900360200190f35b60405180806020018281038252838181518152602001915080519060200190808383829060006004602084601f0104600302600f01f150905090810190601f1680156105a25780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b60408051600160a060020a03929092168252519081900360200190f35b6040805160ff929092168252519081900360200190f35b820191906000526020600020905b8154815290600101906020018083116105f257829003601f168201915b5050505050905061013f565b604080517f7c0278fc0000000000000000000000000000000000000000000000000000000081526004818101818152602483019384523660448401819052732746bcf29bffafcc7906752f639819171d18ce2b94637c0278fc946000939190606401848480828437820191505094505050505060006040518083038160008760325a03f21561000257505050565b50565b6106b461013b565b6040518860e060020a0281526004018088815260200187815260200186600160a060020a0316815260200185815260200184815260200183815260200182815260200197505050505050505060006040518083038160008760325a03f2156100025750505061047581600154600160a060020a0316ff5b5060015b91905056

======= StringLib =======
Binary: 
606060405260f8806100116000396000f3650106d6e77ce050606060405260e060020a600035046381a33a6f8114602e57806394e8767d146042575b6007565b6079600435600080808381141560b8576007565b607960043560008160001415608357507f30000000000000000000000000000000000000000000000000000000000000005b919050565b6060908152602090f35b5b6000821115607457600a808304920660300160f860020a02610100909104176084565b600a929092028101602f1901916001015b602081101560db57601f81900360080260020a840460ff169150600082141560e2575b5050919050565b603082108060f05750603982115b1560a757600756
Binary of the runtime part: 
650106d6e77ce050606060405260e060020a600035046381a33a6f8114602e57806394e8767d146042575b6007565b6079600435600080808381141560b8576007565b607960043560008160001415608357507f30000000000000000000000000000000000000000000000000000000000000005b919050565b6060908152602090f35b5b6000821115607457600a808304920660300160f860020a02610100909104176084565b600a929092028101602f1901916001015b602081101560db57601f81900360080260020a840460ff169150600082141560e2575b5050919050565b603082108060f05750603982115b1560a757600756