from . import ffi as ffi
from typing import Any, Optional

def get_process_triple(): ...

class FeatureMap(dict):
    def flatten(self, sort: bool = ...): ...

def get_host_cpu_features(): ...
def get_default_triple(): ...
def get_host_cpu_name(): ...
def get_object_format(triple: Optional[Any] = ...): ...
def create_target_data(layout: Any): ...

class TargetData(ffi.ObjectRef):
    def get_abi_size(self, ty: Any): ...
    def get_element_offset(self, ty: Any, position: Any): ...
    def get_pointee_abi_size(self, ty: Any): ...
    def get_pointee_abi_alignment(self, ty: Any): ...

RELOC: Any
CODEMODEL: Any

class Target(ffi.ObjectRef):
    @classmethod
    def from_default_triple(cls) -> Target: ...
    @classmethod
    def from_triple(cls, triple: Any) -> Target: ...
    @property
    def name(self): ...
    @property
    def description(self): ...
    @property
    def triple(self): ...
    def create_target_machine(
        self,
        cpu: str = ...,
        features: str = ...,
        opt: int = ...,
        reloc: str = ...,
        codemodel: str = ...,
        jitdebug: bool = ...,
        printmc: bool = ...,
    ) -> TargetMachine: ...

class TargetMachine(ffi.ObjectRef):
    def add_analysis_passes(self, pm: Any) -> None: ...
    def set_asm_verbosity(self, verbose: Any) -> None: ...
    def emit_object(self, module: Any) -> bytes: ...
    def emit_assembly(self, module: Any) -> str: ...
    @property
    def target_data(self) -> TargetData: ...
    @property
    def triple(self) -> str: ...

def has_svml(): ...
