"""
Auto-generated Python stub file from llvmlite.__verify.py
Module: llvmlite.__verify
"""


import t, c
from stdint import *
import string
import viperlib
import memhub
from linkedlist import GSListNode, GSList
from .__function import Function, BasicBlock, Line, Param
from .__module import LLVMModule

VERIFY_OK:               t.CDefine = 0
VERIFY_ERR_NO_TERMINATOR:  t.CDefine = 1
VERIFY_ERR_DUPLICATE_DEF:  t.CDefine = 2
VERIFY_ERR_UNDEFINED_USE:  t.CDefine = 3
VERIFY_ERR_PHI_NOT_FIRST:  t.CDefine = 4

@t.NoVTable
class NameEntry(GSListNode[NameEntry]):
    Name: t.CChar | t.CPtr
class VerifyResult:
    ErrorCount: t.CInt
    WarningCount: t.CInt
    ErrorCode: t.CInt
    ErrorBuf: t.CChar | t.CPtr
    ErrorBufSize: t.CSizeT

def _new_verify_result(pool: memhub.MemBuddy | t.CPtr, buf_size: t.CSizeT) -> VerifyResult | t.CPtr: pass

def _report_error(result: VerifyResult | t.CPtr, code: t.CInt, msg: t.CChar | t.CPtr) -> t.CInt: pass

def _append_cstr(dst: t.CChar | t.CPtr, dst_size: t.CSizeT, src: t.CChar | t.CPtr) -> t.CInt: pass

def _new_name_table(pool: memhub.MemBuddy | t.CPtr) -> GSList[NameEntry] | t.CPtr: pass


NENTRY_SIZE: t.CDefine = 16

def _name_table_add(table: GSList[NameEntry] | t.CPtr, pool: memhub.MemBuddy | t.CPtr, name: t.CChar | t.CPtr) -> t.CInt: pass

def _name_table_contains(table: GSList[NameEntry] | t.CPtr, name: t.CChar | t.CPtr) -> t.CInt: pass

def _is_char_name(ch: t.CChar) -> t.CInt: pass

def _extract_def_name(pool: memhub.MemBuddy | t.CPtr, text: t.CChar | t.CPtr) -> t.CChar | t.CPtr: pass

def _is_terminator(text: t.CChar | t.CPtr) -> t.CInt: pass

def _is_phi(text: t.CChar | t.CPtr) -> t.CInt: pass

def _check_uses_in_line(table: GSList[NameEntry] | t.CPtr, text: t.CChar | t.CPtr, def_name: t.CChar | t.CPtr) -> t.CInt: pass

def _name_matches_at(text: t.CChar | t.CPtr, start: t.CInt, length: t.CInt, table: GSList[NameEntry] | t.CPtr) -> t.CInt: pass

def _str_matches_at(text: t.CChar | t.CPtr, start: t.CInt, length: t.CInt, target: t.CChar | t.CPtr) -> t.CInt: pass

def verify_function(pool: memhub.MemBuddy | t.CPtr, func: Function | t.CPtr, result: VerifyResult | t.CPtr) -> t.CInt: pass

def verify_module(pool: memhub.MemBuddy | t.CPtr, mod: LLVMModule | t.CPtr, result: VerifyResult | t.CPtr) -> t.CInt: pass
