cops = {
    "0x00":"STOP",
    "0x01":"ADD",
    "0x02":"MUL",
    "0x03":"SUB",
    "0x04":"DIV",
    "0x05":"SDIV",
    "0x06":"MOD",
    "0x07":"SMOD",
    "0x08":"ADDMOD",
    "0x09":"MULMOD",
    "0x0a":"EXP",
    "0x0b":"SIGNEXTEND",
    "0x10":"LT",
    "0x11":"GT",
    "0x12":"SLT",
    "0x13":"SGT",
    "0x14":"EQ",
    "0x15":"ISZERO",
    "0x16":"AND",
    "0x17":"OR",
    "0x18":"XOR",
    "0x19":"NOT",
    "0x1a":"BYTE",
    "0x20":"SHA3",
    "0x30":"ADDRESS",
    "0x31":"BALANCE",
    "0x32":"ORIGIN",
    "0x33":"CALLER",
    "0x34":"CALLVALUE",
    "0x35":"CALLDATALOAD",
    "0x36":"CALLDATASIZE",
    "0x37":"CALLDATACOPY",
    "0x38":"CODESIZE",
    "0x39":"CODECOPY",
    "0x3a":"GASPRICE",
    "0x3b":"EXTCODESIZE",
    "0x3c":"EXTCODECOPY",
    "0x3d":"MCOPY",
    "0x40":"BLOCKHASH",
    "0x41":"COINBASE",
    "0x42":"TIMESTAMP",
    "0x43":"NUMBER",
    "0x44":"DIFFICULTY",
    "0x45":"GASLIMIT",
    "0x50":"POP",
    "0x51":"MLOAD",
    "0x52":"MSTORE",
    "0x53":"MSTORE8",
    "0x54":"SLOAD",
    "0x55":"SSTORE",
    "0x56":"JUMP",
    "0x57":"JUMPI",
    "0x58":"PC",
    "0x59":"MSIZE",
    "0x5a":"GAS",
    "0x5b":"JUMPDEST",
    "0x5c":"SLOADEXT",
    "0x5c":"SLOADBYTESEXT",
    "0x5d":"SSTOREEXT",
    "0x5d":"SSTOREBYTESEXT",
    "0x60":"PUSH1",
    "0x61":"PUSH2",
    "0x62":"PUSH3",
    "0x63":"PUSH4",
    "0x64":"PUSH5",
    "0x65":"PUSH6",
    "0x66":"PUSH7",
    "0x67":"PUSH8",
    "0x68":"PUSH9",
    "0x69":"PUSH10",
    "0x6a":"PUSH11",
    "0x6b":"PUSH12",
    "0x6c":"PUSH13",
    "0x6d":"PUSH14",
    "0x6e":"PUSH15",
    "0x6f":"PUSH16",
    "0x70":"PUSH17",
    "0x71":"PUSH18",
    "0x72":"PUSH19",
    "0x73":"PUSH20",
    "0x74":"PUSH21",
    "0x75":"PUSH22",
    "0x76":"PUSH23",
    "0x77":"PUSH24",
    "0x78":"PUSH25",
    "0x79":"PUSH26",
    "0x7a":"PUSH27",
    "0x7b":"PUSH28",
    "0x7c":"PUSH29",
    "0x7d":"PUSH30",
    "0x7e":"PUSH31",
    "0x7f":"PUSH32",
    "0x80":"DUP1",
    "0x81":"DUP2",
    "0x82":"DUP3",
    "0x83":"DUP4",
    "0x84":"DUP5",
    "0x85":"DUP6",
    "0x86":"DUP7",
    "0x87":"DUP8",
    "0x88":"DUP9",
    "0x89":"DUP10",
    "0x8a":"DUP11",
    "0x8b":"DUP12",
    "0x8c":"DUP13",
    "0x8d":"DUP14",
    "0x8e":"DUP15",
    "0x8f":"DUP16",
    "0x90":"SWAP1",
    "0x91":"SWAP2",
    "0x92":"SWAP3",
    "0x93":"SWAP4",
    "0x94":"SWAP5",
    "0x95":"SWAP6",
    "0x96":"SWAP7",
    "0x97":"SWAP8",
    "0x98":"SWAP9",
    "0x99":"SWAP10",
    "0x9a":"SWAP11",
    "0x9b":"SWAP12",
    "0x9c":"SWAP13",
    "0x9d":"SWAP14",
    "0x9e":"SWAP15",
    "0x9f":"SWAP16",
    "0xa0":"LOG0",
    "0xa1":"LOG1",
    "0xa2":"LOG2",
    "0xa3":"LOG3",
    "0xa4":"LOG4",
    "0xf0":"CREATE",
    "0xf1":"CALL",
    "0xf2":"CALLCODE",
    "0xf3":"RETURN",
    "0xf4":"DELEGATECALL",
    "0xf5":"BREAKPOINT",
    "0xf6":"RNGSEED",
    "0xf7":"SSIZEEXT",
    "0xf8":"SLOADBYTES",
    "0xf9":"SSTOREBYTES",
    "0xfa":"SSIZE",
    "0xfb":"STATEROOT",
    "0xfc":"TXEXECGAS",
    "0xfd":"REVERT",
    "0xfe":"INVALID",
    "0xff":"SUICIDE"
}

allops = {
    "STOP": [0x00, 0, 0],
    "ADD": [0x01, 2, 1],
    "MUL": [0x02, 2, 1],
    "SUB": [0x03, 2, 1],
    "DIV": [0x04, 2, 1],
    "SDIV": [0x05, 2, 1],
    "MOD": [0x06, 2, 1],
    "SMOD": [0x07, 2, 1],
    "ADDMOD": [0x08, 3, 1],
    "MULMOD": [0x09, 3, 1],
    "EXP": [0x0a, 2, 1],
    "SIGNEXTEND": [0x0b, 2, 1],
    "LT": [0x10, 2, 1],
    "GT": [0x11, 2, 1],
    "SLT": [0x12, 2, 1],
    "SGT": [0x13, 2, 1],
    "EQ": [0x14, 2, 1],
    "ISZERO": [0x15, 1, 1],
    "AND": [0x16, 2, 1],
    "OR": [0x17, 2, 1],
    "XOR": [0x18, 2, 1],
    "NOT": [0x19, 1, 1],
    "BYTE": [0x1a, 2, 1],
    "SHA3": [0x20, 2, 1],
    "ADDRESS": [0x30, 0, 1],
    "BALANCE": [0x31, 1, 1],
    "ORIGIN": [0x32, 0, 1],
    "CALLER": [0x33, 0, 1],
    "CALLVALUE": [0x34, 0, 1],
    "CALLDATALOAD": [0x35, 1, 1],
    "CALLDATASIZE": [0x36, 0, 1],
    "CALLDATACOPY": [0x37, 3, 0],
    "CODESIZE": [0x38, 0, 1],
    "CODECOPY": [0x39, 3, 0],
    "GASPRICE": [0x3a, 0, 1],
    "EXTCODESIZE": [0x3b, 1, 1],
    "EXTCODECOPY": [0x3c, 4, 0],
    "MCOPY": [0x3d, 3, 0],
    "BLOCKHASH": [0x40, 1, 1],
    "COINBASE": [0x41, 0, 1],
    "TIMESTAMP": [0x42, 0, 1],
    "NUMBER": [0x43, 0, 1],
    "DIFFICULTY": [0x44, 0, 1],
    "GASLIMIT": [0x45, 0, 1],
    "POP": [0x50, 1, 0],
    "MLOAD": [0x51, 1, 1],
    "MSTORE": [0x52, 2, 0],
    "MSTORE8": [0x53, 2, 0],
    "SLOAD": [0x54, 1, 1],
    "SSTORE": [0x55, 2, 0],
    "JUMP": [0x56, 1, 0],
    "JUMPI": [0x57, 2, 0],
    "PC": [0x58, 0, 1],
    "MSIZE": [0x59, 0, 1],
    "GAS": [0x5a, 0, 1],
    "JUMPDEST": [0x5b, 0, 0],
    "SLOADEXT": [0x5c, 2, 1],
    "SSTOREEXT": [0x5d, 3, 0],
    "SLOADBYTESEXT": [0x5c, 4, 0],
    "SSTOREBYTESEXT": [0x5d, 4, 0],
    "PUSH1": [0x60, 0, 1],
    "PUSH2": [0x61, 0, 1],
    "PUSH3": [0x62, 0, 1],
    "PUSH4": [0x63, 0, 1],
    "PUSH5": [0x64, 0, 1],
    "PUSH6": [0x65, 0, 1],
    "PUSH7": [0x66, 0, 1],
    "PUSH8": [0x67, 0, 1],
    "PUSH9": [0x68, 0, 1],
    "PUSH10": [0x69, 0, 1],
    "PUSH11": [0x6a, 0, 1],
    "PUSH12": [0x6b, 0, 1],
    "PUSH13": [0x6c, 0, 1],
    "PUSH14": [0x6d, 0, 1],
    "PUSH15": [0x6e, 0, 1],
    "PUSH16": [0x6f, 0, 1],
    "PUSH17": [0x70, 0, 1],
    "PUSH18": [0x71, 0, 1],
    "PUSH19": [0x72, 0, 1],
    "PUSH20": [0x73, 0, 1],
    "PUSH21": [0x74, 0, 1],
    "PUSH22": [0x75, 0, 1],
    "PUSH23": [0x76, 0, 1],
    "PUSH24": [0x77, 0, 1],
    "PUSH25": [0x78, 0, 1],
    "PUSH26": [0x79, 0, 1],
    "PUSH27": [0x7a, 0, 1],
    "PUSH28": [0x7b, 0, 1],
    "PUSH29": [0x7c, 0, 1],
    "PUSH30": [0x7d, 0, 1],
    "PUSH31": [0x7e, 0, 1],
    "PUSH32": [0x7f, 0, 1],
    "DUP1":  [0x80, 1, 2],
    "DUP2":  [0x81, 2, 3],
    "DUP3":  [0x82, 3, 4],
    "DUP4":  [0x83, 4, 5],
    "DUP5":  [0x84, 5, 6],
    "DUP6":  [0x85, 6, 7],
    "DUP7":  [0x86, 7, 8],
    "DUP8":  [0x87, 8, 9],
    "DUP9":  [0x88, 9, 10],
    "DUP10": [0x89, 10, 11],
    "DUP11": [0x8a, 11, 12],
    "DUP12": [0x8b, 12, 13],
    "DUP13": [0x8c, 13, 14],
    "DUP14": [0x8d, 14, 15],
    "DUP15": [0x8e, 15, 16],
    "DUP16": [0x8f, 16, 17],
    "SWAP1": [0x90, 2, 2],
    "SWAP2": [0x91, 3, 3],
    "SWAP3": [0x92, 4, 4],
    "SWAP4": [0x93, 5, 5],
    "SWAP5": [0x94, 6, 6],
    "SWAP6": [0x95, 7, 7],
    "SWAP7": [0x96, 8, 8],
    "SWAP8": [0x97, 9, 9],
    "SWAP9": [0x98, 10, 10],
    "SWAP10": [0x99, 11, 11],
    "SWAP11": [0x9a, 12, 12],
    "SWAP12": [0x9b, 13, 13],
    "SWAP13": [0x9c, 14, 14],
    "SWAP14": [0x9d, 15, 15],
    "SWAP15": [0x9e, 16, 16],
    "SWAP16": [0x9f, 17, 17],
    "LOG0": [0xa0, 2, 0],
    "LOG1": [0xa1, 3, 0],
    "LOG2": [0xa2, 4, 0],
    "LOG3": [0xa3, 5, 0],
    "LOG4": [0xa4, 6, 0],
    "CREATE": [0xf0, 3, 1],
    "CALL": [0xf1, 7, 1],
    "CALLCODE": [0xf2, 7, 1],
    "RETURN": [0xf3, 2, 0],
    "DELEGATECALL": [0xf4, 6, 1],
    "BREAKPOINT": [0xf5, 0, 0],
    "RNGSEED": [0xf6, 1, 1],
    "SSIZEEXT": [0xf7, 2, 1],
    "SLOADBYTES": [0xf8, 3, 0],
    "SSTOREBYTES": [0xf9, 3, 0],
    "SSIZE": [0xfa, 1, 1],
    "STATEROOT": [0xfb, 1, 1],
    "TXEXECGAS": [0xfc, 0, 1],
    "REVERT": [0xfd, 0, 0],
#    "CALLSTATIC": [0xfd, 7, 1],
    "INVALID": [0xfe, 0, 0],  # 
    "SUICIDE": [0xff, 1, 0],
    "STOP": [0x00, 0, 0]
}

