// File: Push0CloneDeployer.sol



// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

contract Push0CloneDeployer {
    function deploy(address implementation) public payable returns (address instance) {
        /// @solidity memory-safe-assembly
        assembly {
            mstore(0x24, 0x5af43d5f5f3e6025573d5ffd5b3d5ff3)
            mstore(0x14, implementation)
            mstore(0x00, 0x602a3d8160093d39f35f5f365f5f73)
            instance := create(callvalue(), 0x11, 0x33)
            // Restore the part of the free memory pointer that has been overwritten.
            mstore(0x24, 0)
            // If `instance` is zero, revert.
            if iszero(instance) {
                // Store the function selector of `DeploymentFailed()`.
                mstore(0x00, 0x30116425)
                // Revert with (offset, size).
                revert(0x1c, 0x04)
            }
        }
    }
}