from typing import Any

from pony.py23compat import PY37 as PY37
from pony.py23compat import PY38 as PY38
from pony.py23compat import PY39 as PY39
from pony.py23compat import PY310 as PY310
from pony.py23compat import PYPY as PYPY
from pony.utils import get_codeobject_id as get_codeobject_id
from pony.utils import throw as throw

class DecompileError(NotImplementedError): ...

ast_cache: Any

def decompile(x: Any) -> Any: ...
def simplify(clause: Any) -> Any: ...

class InvalidQuery(Exception): ...

def binop(node_type: Any) -> Any: ...

operator_mapping: Any

def clean_assign(node: Any) -> Any: ...
def make_const(value: Any) -> Any: ...
def is_const(value: Any) -> Any: ...
def unwrap_str(key: Any) -> Any: ...

class Decompiler:
    def __init__(
        decompiler, code: Any, start: int = ..., end: Any | None = ...
    ) -> None: ...
    def get_instructions(decompiler) -> None: ...
    def analyze_jumps(decompiler) -> None: ...
    def decompile(decompiler) -> None: ...
    def pop_items(decompiler, size: Any) -> Any: ...
    def store(decompiler, node: Any) -> None: ...
    BINARY_POWER: Any
    BINARY_MULTIPLY: Any
    BINARY_DIVIDE: Any
    BINARY_FLOOR_DIVIDE: Any
    BINARY_ADD: Any
    BINARY_SUBTRACT: Any
    BINARY_LSHIFT: Any
    BINARY_RSHIFT: Any
    BINARY_AND: Any
    BINARY_XOR: Any
    BINARY_OR: Any
    BINARY_TRUE_DIVIDE: Any
    BINARY_MODULO: Any
    def BINARY_SUBSCR(decompiler: Any) -> Any: ...
    def BUILD_CONST_KEY_MAP(decompiler, length: Any) -> Any: ...
    def BUILD_LIST(decompiler, size: Any) -> Any: ...
    def BUILD_MAP(decompiler, length: Any) -> Any: ...
    def BUILD_SET(decompiler, size: Any) -> Any: ...
    def BUILD_SLICE(decompiler, size: Any) -> Any: ...
    def BUILD_TUPLE(decompiler, size: Any) -> Any: ...
    def BUILD_STRING(decompiler, count: Any) -> Any: ...
    def CALL_FUNCTION(
        decompiler, argc: Any, star: Any | None = ..., star2: Any | None = ...
    ) -> Any: ...
    def CALL_FUNCTION_VAR(decompiler, argc: Any) -> Any: ...
    def CALL_FUNCTION_KW(decompiler, argc: Any) -> Any: ...
    def CALL_FUNCTION_VAR_KW(decompiler, argc: Any) -> Any: ...
    def CALL_FUNCTION_EX(decompiler, argc: Any) -> Any: ...
    def CALL_METHOD(decompiler, argc: Any) -> Any: ...
    def COMPARE_OP(decompiler, op: Any) -> Any: ...
    def CONTAINS_OP(decompiler, invert: Any) -> Any: ...
    def DUP_TOP(decompiler: Any) -> Any: ...
    def FOR_ITER(decompiler, endpos: Any) -> Any: ...
    def FORMAT_VALUE(decompiler, flags: Any) -> Any: ...
    def GEN_START(decompiler, kind: Any) -> None: ...
    def GET_ITER(decompiler) -> None: ...
    def JUMP_IF_FALSE(decompiler, endpos: Any) -> Any: ...
    JUMP_IF_FALSE_OR_POP: Any
    def JUMP_IF_NOT_EXC_MATCH(decompiler, endpos: Any) -> None: ...
    def JUMP_IF_TRUE(decompiler, endpos: Any) -> Any: ...
    JUMP_IF_TRUE_OR_POP: Any
    def conditional_jump(decompiler, endpos: Any, if_true: Any) -> Any: ...
    def conditional_jump_old(decompiler, endpos: Any, if_true: Any) -> Any: ...
    def conditional_jump_new(decompiler, endpos: Any, if_true: Any) -> Any: ...
    def process_target(decompiler, pos: Any, partial: bool = ...) -> None: ...
    def JUMP_FORWARD(decompiler, endpos: Any) -> Any: ...
    def IS_OP(decompiler, invert: Any) -> Any: ...
    def LIST_APPEND(decompiler, offset: Any | None = ...) -> None: ...
    def LIST_EXTEND(decompiler, offset: Any) -> Any: ...
    def LOAD_ATTR(decompiler, attr_name: Any) -> Any: ...
    def LOAD_CLOSURE(decompiler, freevar: Any) -> Any: ...
    def LOAD_CONST(decompiler, const_value: Any) -> Any: ...
    def LOAD_DEREF(decompiler, freevar: Any) -> Any: ...
    def LOAD_FAST(decompiler, varname: Any) -> Any: ...
    def LOAD_GLOBAL(decompiler, varname: Any) -> Any: ...
    def LOAD_METHOD(decompiler, methname: Any) -> Any: ...
    LOOKUP_METHOD: Any
    def LOAD_NAME(decompiler, varname: Any) -> Any: ...
    def MAKE_CLOSURE(decompiler, argc: Any) -> Any: ...
    def MAKE_FUNCTION(decompiler, argc: Any) -> Any: ...
    POP_JUMP_IF_FALSE: Any
    POP_JUMP_IF_TRUE: Any
    def POP_TOP(decompiler) -> None: ...
    def RETURN_VALUE(decompiler) -> Any: ...
    def ROT_TWO(decompiler) -> None: ...
    def ROT_THREE(decompiler) -> None: ...
    def SETUP_LOOP(decompiler, endpos: Any) -> None: ...
    def STORE_ATTR(decompiler, attrname: Any) -> None: ...
    def STORE_DEREF(decompiler, freevar: Any) -> None: ...
    def STORE_FAST(decompiler, varname: Any) -> None: ...
    def STORE_MAP(decompiler) -> None: ...
    def STORE_SUBSCR(decompiler) -> None: ...
    def UNARY_POSITIVE(decompiler) -> Any: ...
    def UNARY_NEGATIVE(decompiler) -> Any: ...
    def UNARY_NOT(decompiler) -> Any: ...
    def UNARY_INVERT(decompiler) -> Any: ...
    def UNPACK_SEQUENCE(decompiler, count: Any) -> Any: ...
    def YIELD_VALUE(decompiler) -> Any: ...

test_lines: str

def test(test_line: Any | None = ...) -> None: ...
