+
    ,ik3                     j   ^ RI t ^ RIt^ RIt^ RIHt ^ RIHtHt ^ RI	H
t
 R t]! R4      t]! R4      t]! R4      t]! R4      t]! R	4      t]! R
4      t]! R4      t]! R4      t]! R4      t]! R4      t]! R4      t]! R4      t]! R4      t]! R4      t]! R4      t]! R4      t]! R4      t]! R4      t]! R4      t]! R4      t]! R4      t ]! R4      t!]! R4      t"]! R4      t#]! R4      t$]! R4      t%]! R4      t&]! R 4      t']! R!4      t(]! R"4      t)]! R#4      t*]! R$4      t+]! R%4      t, ! R& R'4      t- ! R( R)4      t. ! R* R+]/4      t0 ! R, R-]/4      t1R. t2] Pf                  R/,          R:8  d   ]2M]Ph                  t5]0! 4       t6R0 t7R1 t8 ! R2 R3]/4      t9 ! R4 R5]/4      t:R6 t;R7 t< ! R8 R9]/4      t=R# );    N)_decode_string_is_shutting_down)get_library_namec                 f    \        V \        P                  3/ 4      p\        P                  ! V4      # N)typectypes	StructurePOINTER)namenewclss   & R/var/www/html/photoedit/myenv/lib/python3.14/site-packages/llvmlite/binding/ffi.py_make_opaque_refr   
   s(    $))+R0F>>&!!    LLVMContext
LLVMModule	LLVMValueLLVMTypeLLVMExecutionEngineLLVMPassManagerBuilderLLVMPassManagerLLVMTargetDataLLVMTargetLibraryInfo
LLVMTargetLLVMTargetMachineLLVMMemoryBufferLLVMAttributeListIteratorLLVMElementIteratorLLVMAttributeSetIteratorLLVMGlobalsIteratorLLVMFunctionsIteratorLLVMBlocksIteratorLLVMArgumentsIteratorLLVMInstructionsIteratorLLVMOperandsIteratorLLVMIncomingBlocksIteratorLLVMTypesIteratorLLVMObjectCacheLLVMObjectFileLLVMSectionIteratorLLVMOrcLLJITRefLLVMOrcDylibTrackerRefLLVMTimePassesHandlerLLVMPipeLineTuningOptionsLLVMModulePassManagerLLVMFunctionPassManagerLLVMPassBuilderc                   B   a  ] tR t^2t o RtR tR tR tR tR t	Rt
V tR# )		_LLVMLocka"  A Lock to guarantee thread-safety for the LLVM C-API.

This class implements __enter__ and __exit__ for acquiring and releasing
the lock as a context manager.

Also, callbacks can be attached so that every time the lock is acquired
and released the corresponding callbacks will be invoked.
c                H    \         P                  ! 4       V n        . V n        R # r   )	threadingRLock_lock_cblistselfs   &r   __init___LLVMLock.__init__;   s     __&
r   c                >    V P                   P                  W34       R# )zRegister callbacks that are invoked immediately after the lock is
acquired (``acq_fn()``) and immediately before the lock is released
(``rel_fn()``).
N)r8   appendr:   acq_fnrel_fns   &&&r   register_LLVMLock.registerA   s    
 	V,-r   c                >    V P                   P                  W34       R# )z)Remove the registered callbacks.
        N)r8   remover?   s   &&&r   
unregister_LLVMLock.unregisterH   s     	V,-r   c                r    V P                   P                  4        V P                   F  w  rV! 4        K  	  R # r   )r7   acquirer8   r?   s   &  r   	__enter___LLVMLock.__enter__M   s'    

"llNFH +r   c                r    V P                    F  w  r#V! 4        K  	  V P                  P                  4        R # r   )r8   r7   release)r:   exc_detailsr@   rA   s   &*  r   __exit___LLVMLock.__exit__S   s'    "llNFH +

r   )r8   r7   N)__name__
__module____qualname____firstlineno____doc__r;   rB   rF   rJ   rO   __static_attributes____classdictcell____classdict__s   @r   r3   r3   2   s(     ..
 r   r3   c                   2   a  ] tR t^Zt o R tR tR tRtV tR# )_suppress_cleanup_errorsc                    Wn         R # r   _context)r:   contexts   &&r   r;   !_suppress_cleanup_errors.__init__[   s    r   c                6    V P                   P                  4       # r   )r^   rJ   r9   s   &r   rJ   "_suppress_cleanup_errors.__enter__^   s    }}&&((r   c                `     V P                   P                  WV4      #   \         d     R # i ; ir   )r^   rO   PermissionError)r:   exc_type	exc_value	tracebacks   &&&&r   rO   !_suppress_cleanup_errors.__exit__a   s0    	==))(yII 		s    --r]   N)	rQ   rR   rS   rT   r;   rJ   rO   rV   rW   rX   s   @r   r[   r[   Z   s      ) r   r[   c                   n   a  ] tR t^ht o Rt. R
OtR tR t]R 4       t	R t
]R 4       t]R 4       tRtV tR	# )_lib_wrapperzoWrap libllvmlite with a lock such that only one thread may access it at
a time.

This class duck-types a CDLL.
c                @    R V n         / V n        \        4       V n        R # r   )_lib_handle_fntabr3   r7   r9   s   &r   r;   _lib_wrapper.__init__p   s    [
r   c                   R p\         P                  R4      ^ ,          p\        4       p\        \	        W#4      4      ;_uu_ 4       p \
        P                  ! \        V4      4      V n        \        V P                  V4      ! 4         RRR4       R#   \         d    RT RT R2p\        T4      h\         d    RT RT R2p\        T4      hi ; i  + '       g   i     R# ; i)	LLVMPY_GetVersionInfo.z(Could not find/load shared object file 'z' from resource location: 'z'. This could mean that the library literally cannot be found, but may also mean that the permissions are incorrect or that a dependency of/a symbol in the library could not be resolved.z-During testing of symbol lookup, the symbol 'z%' could not be found in the library ''N)rQ   
rpartitionr   r[   _importlib_resources_pathr	   CDLLstrrl   getattrOSErrorAttributeError)r:   test_symmod_namelib_namelib_pathmsgs   &     r   	_load_lib_lib_wrapper._load_libu   s    *&&s+A.#%%&?&.': ; ;>F##);;s8}#= (((35; ;  	# B( L33;* =## cl"! ##* %#*A' cl"#!; ; ;s$   C?B'C9CCC#	c                ^    V P                   '       g   V P                  4        V P                   # r   )rl   r   r9   s   &r   _lib_lib_wrapper._lib   s&     NNr   c                     V P                   V,          #   \         d     Mi ; i\        T P                  T4      p\	        T P
                  T4      pY0P                   T&   T# r   )rm   KeyErrorrw   r   _lib_fn_wrapperr7   )r:   r   cfnwrappeds   &&  r   __getattr___lib_wrapper.__getattr__   s[    	;;t$$ 		 dii&!$**c2#Ds    ##c                .    V P                   P                  # )zWThe name of the library passed in the CDLL constructor.

For duck-typing a ctypes.CDLL
)r   _namer9   s   &r   r   _lib_wrapper._name   s     yyr   c                .    V P                   P                  # )zMThe system handle used to access the library.

For duck-typing a ctypes.CDLL
)r   _handler9   s   &r   r   _lib_wrapper._handle   s     yy   r   )rm   rl   r7   N)rl   rm   r7   )rQ   rR   rS   rT   rU   	__slots__r;   r   propertyr   r   r   r   rV   rW   rX   s   @r   rj   rj   h   s\     
 3I!
#:    	   ! !r   rj   c                      a  ] tR t^t o RtRR.tR t]R 4       t]P                  R 4       t]R 4       t
]
P                  R 4       t
R	 tR
tV tR# )r   zWraps and duck-types a ctypes.CFUNCTYPE to provide
automatic locking when the wrapped function is called.

TODO: we can add methods to mark the function as threadsafe
      and remove the locking-step on call when marked.
r7   _cfnc                    Wn         W n        R # r   r7   r   )r:   lockr   s   &&&r   r;   _lib_fn_wrapper.__init__   s    
	r   c                .    V P                   P                  # r   r   argtypesr9   s   &r   r   _lib_fn_wrapper.argtypes   s    yy!!!r   c                &    WP                   n        R # r   r   )r:   r   s   &&r   r   r      s    %		r   c                .    V P                   P                  # r   r   restyper9   s   &r   r   _lib_fn_wrapper.restype   s    yy   r   c                &    WP                   n        R # r   r   )r:   r   s   &&r   r   r      s    #		r   c                    V P                   ;_uu_ 4        V P                  ! V/ VB uuR R R 4       #   + '       g   i     R # ; ir   r   )r:   argskwargss   &*,r   __call___lib_fn_wrapper.__call__   s(    ZZZ99d-f- ZZZs	   2A	)r   r7   N)rQ   rR   rS   rT   rU   r   r;   r   r   setterr   r   rV   rW   rX   s   @r   r   r      s}      &!I " " __& & ! ! ^^$ $. .r   r   c                d    \         P                  ! \         P                  ! V 4      V,          4      # )a  Replacement implementation of `import.resources.path` to avoid
deprecation warning following code at importlib_resources/_legacy.py
as suggested by https://importlib-resources.readthedocs.io/en/latest/using.html#migrating-from-legacy

Notes on differences from importlib.resources implementation:

The `_common.normalize_path(resource)` call is skipped because it is an
internal API and it is unnecessary for the use here. What it does is
ensuring `resource` is a str and that it does not contain path separators.
)_impresas_filefiles)packageresources   &&r   _importlib_resources_path_replr      s!     ??7==1H<==r   :N   Nc                D    \         P                  P                  W4       R# )zvRegister callback functions for lock acquire and release.
*acq_fn* and *rel_fn* are callables that take no arguments.
N)libr7   rB   r@   rA   s   &&r   register_lock_callbackr      s     IIv&r   c                D    \         P                  P                  W4       R# )zRemove the registered callback functions for lock acquire and release.
The arguments are the same as used in `register_lock_callback()`.
N)r   r7   rF   r   s   &&r   unregister_lock_callbackr      s     II(r   c                       ] tR t^tRtRtR# )_DeadPointerz2
Dummy class to make error messages more helpful.
 N)rQ   rR   rS   rT   rU   rV   r   r   r   r   r      s    r   r   c                      a  ] tR tRt o Rt]! 4       t]R 4       tRR lt	R t
R tR t]3R	 ltR
 tR t]t]R 4       tRtV tR# )OutputStringi  z4
Object for managing the char* output of LLVM APIs.
c                Z    V ! \         P                  ! V\         P                  4      R7      # )zConstructing from a pointer returned from the C-API.
The pointer must be allocated with LLVMPY_CreateString.

Note
----
Because ctypes auto-converts *restype* of *c_char_p* into a python
string, we must use *c_void_p* to obtain the raw pointer.
)init)r	   castc_char_p)clsptrs   &&r   from_returnOutputString.from_return  s     C9::r   Nc                    Ve   TM\         P                  ! R 4      V n        \         P                  ! V P                  4      V n        Wn        R # r   )r	   r   _ptrbyref_as_parameter__owned)r:   ownedr   s   &&&r   r;   OutputString.__init__  s3     ,D&//$2G	$ll4995r   c                    V P                   e=   V P                  '       d    \        P                  V P                   4       R V n         V =R # R # r   )r   r   r   LLVMPY_DisposeStringr   r9   s   &r   closeOutputString.close  s9    99 {{{((3DI#	 !r   c                    V # r   r   r9   s   &r   rJ   OutputString.__enter__  s    r   c                &    V P                  4        R # r   r   r:   re   exc_valexc_tbs   &&&&r   rO   OutputString.__exit__"      

r   c                d    V! 4       '       g#   V P                   e   V P                  4        R # R # R # r   r   r:   r   s   &&r   __del__OutputString.__del__%  s*     !""zz%

 & #r   c                p    V P                   f   R# V P                   P                  pVf   Q h\        V4      # )Nz<dead OutputString>)r   valuer   )r:   ss   & r   __str__OutputString.__str__,  s1    99(IIOO}}a  r   c                ,    \        V P                  4      # r   boolr   r9   s   &r   __bool__OutputString.__bool__3      DIIr   c                .    V P                   P                  # )z:Get the raw bytes of content of the char pointer.
        )r   r   r9   s   &r   bytesOutputString.bytes8  s     yyr   )r   r   r   )TN)rQ   rR   rS   rT   rU   r   r   classmethodr   r;   r   rJ   rO   r   r   r   r   __nonzero__r   r   rV   rW   rX   s   @r   r   r     sf      "^N	; 	;
$ ): ! K r   r   c                J    V e   \        \        P                  V 4      4      # R# )z,To wrap string return-value from C-API.
    N)rv   r   r   r   s   &r   
ret_stringr   ?  s$     <++C011 r   c                L    V e    \         P                  V 4      P                  # R# )z+To wrap bytes return-value from C-API.
    N)r   r   r   r   s   &r   	ret_bytesr   F  s%     '',222 r   c                      a  ] tR tRt o RtRt]! 4       tRtR t	R t
R tR t]R 4       tR	 tR
 t]3R ltR tR t]tR tRtV tR# )	ObjectRefiM  zB
A wrapper around a ctypes pointer to a LLVM object ("resource").
Fc                R    Vf   \        R4      hWn        Wn        \        V n        R # )NzNULL pointer)
ValueErrorr   r   r   _capi)r:   r   s   &&r   r;   ObjectRef.__init__V  s$    ;^,,	!
r   c                     V P                   '       g#   V P                  '       g   V P                  4        V P                  4        R#   T P                  4        i ; i)z9
Close this object and do any required clean-up actions.
N)_closedr   _disposedetachr9   s   &r   r   ObjectRef.close]  s4    	<<<KKMDKKMs   A A A Ac                N    V P                   '       g   V =RV n         RV n        R# R# )z>
Detach the underlying LLVM resource without disposing of it.
TN)r   r   r   r9   s   &r   r   ObjectRef.detachg  s&     |||#DLDI r   c                    R# )z
Dispose of the underlying LLVM resource.  Should be overriden
by subclasses.  Automatically called by close(), __del__() and
__exit__() (unless the resource has been detached).
Nr   r9   s   &r   r   ObjectRef._disposep  s    r   c                    V P                   # )zN
Whether this object has been closed.  A closed object can't
be used anymore.
)r   r9   s   &r   closedObjectRef.closedw  s     ||r   c                    \        V R 4      '       g   Q hV P                  '       d   \        V P                  : R24      hV # )r   z instance already closed)hasattrr   RuntimeError	__class__r9   s   &r   rJ   ObjectRef.__enter__  s5    tW%%%%<<<t~~OPPr   c                &    V P                  4        R # r   r   r   s   &&&&r   rO   ObjectRef.__exit__  r   r   c                d    V! 4       '       g#   V P                   e   V P                  4        R # R # R # r   r   r   s   &&r   r   ObjectRef.__del__  s(     ""zz%

 & #r   c                ,    \        V P                  4      # r   r   r9   s   &r   r   ObjectRef.__bool__  r   r   c                    \        VR 4      '       g   R# \        P                  ! V P                  ^ ,          4      \        P                  ! VP                  ^ ,          4      8H  # )r   F)r  r	   	addressofr   )r:   others   &&r   __eq__ObjectRef.__eq__  sH    uf%%		!-UZZ]+, 	,r   c                    \        \        P                  ! V P                  \        P                  4      P
                  4      # r   )hashr	   r   r   c_void_pr   r9   s   &r   __hash__ObjectRef.__hash__  s&    FKK		6??;AABBr   )r   r   r   r   N)rQ   rR   rS   rT   rU   r   r   r   r   r;   r   r   r   r   r  rJ   rO   r   r   r   r  r   r  rV   rW   rX   s   @r   r   r   M  sv      G!^NF   ): 
, KC Cr   r   )   
   )>sysr	   r5   importlib.resources	resourcesr   llvmlite.binding.commonr   r   llvmlite.utilsr   r   LLVMContextRefLLVMModuleRefLLVMValueRefLLVMTypeRefLLVMExecutionEngineRefLLVMPassManagerBuilderRefLLVMPassManagerRefLLVMTargetDataRefLLVMTargetLibraryInfoRefLLVMTargetRefLLVMTargetMachineRefLLVMMemoryBufferRefr   r   r   r    r!   r"   r#   r$   r%   r&   r'   LLVMObjectCacheRefLLVMObjectFileRefLLVMSectionIteratorRefr+   r,   LLVMTimePassesHandlerRefLLVMPipelineTuningOptionsRefLLVMModulePassManagerRefLLVMFunctionPassManagerRefLLVMPassBuilderRefr3   r[   objectrj   r   r   version_infopathrt   r   r   r   r   r   r   r   r   r   r   r   <module>r6     sA   
   % E +"
 "-0 .,z*)*?@ ,-EF %&78 $%56 +,CD  .'(;< &'9: ,-HI &'<= +,FG &'<= ()@A %&:; ()@A +,FG '(>? -.JK $%89 %&78 $%56 )*?@ "#45)*BC +,CD /0KL +,CD -.GH %&78 % %P J!6 J!Z.f .D> !$ 0 0 4 ? <"),, 
 n')6 ;6 ;|23MC MCr   