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


import t, c
from stdint import *
import string
import viperlib
import memhub
import stdio
from linkedlist import GSListNode, GSList
from .__types import LLVMType, ParamNode, TypePrint

@t.NoVTable
class Line(GSListNode[Line]):
    Buf: t.CChar | t.CPtr
    Len: t.CSizeT
@t.NoVTable
class BasicBlock(GSListNode[BasicBlock]):
    Name: t.CChar | t.CPtr
    Lines: GSList[Line] | t.CPtr
    IsTerminated: t.CInt
@t.NoVTable
class Param(GSListNode[Param]):
    Ty: LLVMType | t.CPtr
    Name: t.CChar | t.CPtr
    Attrs: t.CChar | t.CPtr
@t.NoVTable
class Function(GSListNode[Function]):
    Name: t.CChar | t.CPtr
    RetTy: LLVMType | t.CPtr
    Params: GSList[Param] | t.CPtr
    Blocks: GSList[BasicBlock] | t.CPtr
    IsDeclared: t.CInt
    IsVarArg: t.CInt
    Attrs: t.CChar | t.CPtr

LINE_SIZE: t.CDefine = 24

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

def _new_gslist(pool: memhub.MemBuddy | t.CPtr, list_size: t.CSizeT) -> t.CPtr: pass


BLOCK_SIZE: t.CDefine = 32

def new_basic_block(pool: memhub.MemBuddy | t.CPtr, name: t.CChar | t.CPtr) -> BasicBlock | t.CPtr: pass


PARAM_SIZE: t.CDefine = 32

def new_param(pool: memhub.MemBuddy | t.CPtr, ty: LLVMType | t.CPtr, name: t.CChar | t.CPtr) -> Param | t.CPtr: pass


FUNC_SIZE: t.CDefine = 56

def new_function(pool: memhub.MemBuddy | t.CPtr, name: t.CChar | t.CPtr, ret_ty: LLVMType | t.CPtr) -> Function | t.CPtr: pass

def function_add_param(func: Function | t.CPtr, param: Param | t.CPtr) -> t.CInt: pass

def function_add_block(func: Function | t.CPtr, block: BasicBlock | t.CPtr) -> t.CInt: pass

def function_move_block_to_end(func: Function | t.CPtr, block: BasicBlock | t.CPtr) -> t.CInt: pass

def block_append_line(block: BasicBlock | t.CPtr, line: Line | t.CPtr) -> t.CInt: pass

def block_append_text(pool: memhub.MemBuddy | t.CPtr, block: BasicBlock | t.CPtr, text: t.CChar | t.CPtr) -> t.CInt: pass

def function_set_attrs(func: Function | t.CPtr, attrs: t.CChar | t.CPtr) -> t.CInt: pass

def param_set_attrs(param: Param | t.CPtr, attrs: t.CChar | t.CPtr) -> t.CInt: pass

def _ll_name_needs_quote(name: str) -> t.CInt: pass

def FunctionPrint(buf: t.CChar | t.CPtr, size: t.CSizeT, func: Function | t.CPtr, pool: memhub.MemBuddy | 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 function_get_name(func: Function | t.CPtr) -> t.CChar | t.CPtr: pass

def function_get_ret_ty(func: Function | t.CPtr) -> LLVMType | t.CPtr: pass

def function_get_params(func: Function | t.CPtr) -> GSList[Param] | t.CPtr: pass

def function_get_param_head(func: Function | t.CPtr) -> Param | t.CPtr: pass

def function_get_next(func: Function | t.CPtr) -> Function | t.CPtr: pass

def function_is_declared(func: Function | t.CPtr) -> t.CInt: pass

def param_get_name(param: Param | t.CPtr) -> t.CChar | t.CPtr: pass

def param_get_ty(param: Param | t.CPtr) -> LLVMType | t.CPtr: pass

def param_get_next(param: Param | t.CPtr) -> Param | t.CPtr: pass
