+
    iM  c                   s   ^ RI t ^ RIt^ RIt^ RIt] P                  R8X  Ed   R tR tR t^ RIt^ RIH	t	 ]P                  ! RRR	7      t]R
,          t]	P                  ]n        ]R,          t]	P                   ]n        ]	P"                  ]	P$                  ]	P                   3]n        ]P                  ! RRR	7      t]R,          t]	P,                  ]n        ]	P                  ]P.                  ! ]	P"                  4      ]	P                   ]	P0                  3]n        R R ltR tR tEM<] P                  R8X  dU   ]P8                  R29   dD   ^ RIHt R t^ RIt]P@                  ! ]! R4      4      t!]!R,          t"]PF                  ]"n        R tM]P8                  PI                  R4      '       d   ^ RI%Ht M]P8                  R8X  d   R tM]P8                  R8X  d   R t&R tM] P                  R8X  dr   ^ RI't'^ RI(t(R t)R  t*]P8                  R!8X  d   R" t+MR# t+]P8                  PI                  R34      '       d   R$ t,R% tM#]P8                  R!8X  d
   R& t-R4R' ltM	R( t.R) t/R* t] P                  R8X  d   ]P8                  R29  d   ^ RIt]0! ]P@                  ! R4      ;t!R+4      '       d    ! R, R-]Pb                  4      t2]Pf                  ! ]Ph                  ]P.                  ! ]24      ]Pj                  ]P.                  ! ]Pl                  4      4      t7]7R. 4       t8]!R+,          t9]7]P.                  ! ]Pl                  4      .]9n        ]Ph                  ]9n        R/ tR0 t:];R18X  d
   ]:! 4        R# R# )5    Nntc                 st   Rp \         P                  P                  V 4      pVR8X  d   ^# V\        V 4      ,           p\         P                  VR P	                  R^4      w  r#\        VRR 4      ^,
          pV^8  d
   V^,          p\        VR,          4      R,          pV^8X  d   ^ pV^8  d	   WE,           # R# )zReturn the version of MSVC that was used to build Python.

For Python 2.3 and up, the version number is included in
sys.version.  For earlier versions, assume the compiler is MSVC 6.
zMSC v.NZ :   i   Ng      $@i)sysversionZfindlensplitint)ZprefixiZsZrestZmajorVersionZminorVersion         $/usr/lib64/python3.14/ctypes/util.py_get_build_versionr   	   s     KKV$7FO++ab/''Q/1Sb6{Q2AL1S6{T)1L1..    c                 s    \        4       p V f   R# V ^8:  d   RpMV ^8:  d   RV ^
,          ,          pMR# ^ RIpRVP                  P                  9   d
   VR,          pVR,           # )z%Return the name of the VC runtime dllNmsvcrtzmsvcr%dz_d.pydd.dll)r   Zimportlib.machineryZ	machineryZEXTENSION_SUFFIXES)r   ZclibnameZ	importlibs      r   find_msvcrtr   "   sd    $&?a<H] GbL1H  	#y**===OHr   c                 s   V R9   d   \        4       # \        P                  R,          P                  \        P                  4       F  p\        P
                  P                  W4      p\        P
                  P                  V4      '       d   Vu # VP                  4       P                  R4      '       d   Kr  VR,           p\        P
                  P                  V4      '       g   K  Vu # 	  R# )cZPATHr   N)r   m)
r   osenvironr   ZpathseppathjoinisfileZlowerZendswithnameZ	directoryZfname   &  r   find_libraryr   7   s    := F+11"**=IGGLL1Eww~~e$${{}%%f--FNEww~~e$$ > r   )wintypesZkernel32T)Zuse_last_errorZGetCurrentProcessZGetModuleFileNameWZpsapiZEnumProcessModulesc                s8    V ^8  d   QhR\         P                  /# )r   module)r   HMODULE)Zformats   "r   __annotate__r    b   s      X%5%5 r   c                 s    \         P                  R ,          ! 4       p\        W\        V4      4      '       d   VP                  # R# )i  N)r   ZWCHAR_k32_get_module_file_namer   value)r   r      & r   _get_module_filenamer$   b   s1    &)$V3t9==::r   c                  s4   \        4       p \        P                  ! 4       pR p \        P                  V,          ! 4       p\	        V V\
        P                  ! V4      \
        P                  ! V4      4      '       gT   \
        P                  ! 4       p\
        P                  ! V4      P                  4       p\
        P                  ! VRV 24      hVP                  \
        P                  ! \        P                  4      ,          pV\        V4      8:  g   K  VRV # )i   zEnumProcessModules failed: N)_get_current_processr   DWORDr   _enum_process_modulesctypesZsizeofbyrefZget_last_errorZFormatErrorstripZWinErrorr"   r   )ZprocessZspace_neededZnmodulesZerrZmsgr
   r   _get_module_handlesr,   i   s    &(~~'''!+.G()0)/w)?)/l)CE E ++-((-335ooc-H+NOO""fmmH4D4D&EEACL r{"r   c                 sh    \        4       p V  Uu. uF  p\        V4      ;pf   K  VNK  	  ppV# u upi z@Return a list of loaded shared libraries in the current process.)r,   r$   )r+   Zhr   	libraries       r   dllistr0   z   sB    %'#* J7a$8$;;D T7	 JJs   //posix)	dyld_findc                 s    R V ,          RV ,          V : RV : 2.pV F  p  \        V 4      u # 	  R#   \         d     K#  i ; i)zlib%s.dylibz%s.dylibz.framework/N)
_dyld_find
ValueError)r   Zpossibler#   r   r   r      sV    !D(%)-t46 D!$'' 
   s   
2A Ar   _dyld_get_image_namec                 s    \         P                  4       p \        V 4       Uu. uF*  p\        V4      ;pf   K  \        P
                  ! V4      NK,  	  ppV# u upi r-   )_libcZ_dyld_image_countZranger5   r   fsdecode)Z
num_imagesr	   r   r.   r/   r   r0   r0      sZ    ,,.
05j0A J0A1$8$;;D 'R[[&0A	 J Js
   AAaix)r   Zandroidc                 s    R pR\         P                  ! 4       P                  9   d
   VR,          pV RV  R2p\         P                  P	                  V4      '       d   V# R# )z/system/libZ64z/lib.soN)r   unamemachiner   r   r   r   r   r   r      sT    !	288:%%%I+T$s+u--u747r   Z
emscriptenc                 s    R p\        V R4      ;_uu_ 4       pVP                  ^4      V8H  uuRRR4       #   + '       g   i     R# ; i)s    asmbrN)openread)filenameZwasm_headerthefiler   r   _is_wasmrA      s5     (D!!W<<?k1 "!!!s	   6A	c                 sZ   R V  R2R V  R2.p\         P                  P                  RR4      pVP                  R4       Fi  pV F`  p \         P                  P                  W04      p\         P                  P                  V4      '       g   KI  \        V4      '       g   K\  Vu u # 	  Kk  	  R# )Zlibr9   z.wasmLD_LIBRARY_PATHZ :N)r   r   getr   r   r   r   rA   )r   Z
candidatespathsZlibdirlibfile   &    r   r   r      s    D6oTF%'89


0"5kk#&F"'',,v477>>'**x/@/@"N	 # ' r   c                s    Rp \        V R4      ;_uu_ 4       pVP                  ^4      V8H  uuRRR4       #   + '       g   i     R# ; i  \         d     R# i ; i)z,Return True if the given file is an ELF files   ELFr<   NF)r=   r>   FileNotFoundError)r?   Z
elf_headerr@   r   r   _is_elfrI      sK    
	h%%||A*4 &%%%  		s+   A 7
A A	A A AAc                 s   \         P                  ! R \        P                  ! V 4      ,          4      p\        P
                  ! R4      pV'       g   \        P
                  ! R4      pV'       g   R# \        P                  ! 4       p VRRVP                  RV ,           .p\        \         P                  4      pRVR&   RVR	&    \        P                  ! V\        P                  \        P                  VR
7      pT;_uu_ 4        TP$                  P'                  4       pRRR4        TP!                  4        \        P(                  ! TX4      pT'       g   R# T F,  p	\+        T	4      '       g   K  \         P,                  ! T	4      u # 	  R#   \         d(      TP!                  4        R#   \"         d     R# i ; ii ; i  + '       g   i     L; i  \"         d     Li ; i   TP!                  4        i   \"         d     i i ; i; i)[^\(\)\s]*lib%s\.[^\(\)\s]*ZgccZccNz-Wl,-t-oz-lCLC_ALLLANGstdoutstderrenv)r   fsencodereescapeshutilwhichtempfileZNamedTemporaryFiler   dictr   
subprocessPopenPIPEZSTDOUTOSErrorZcloserH   rP   r>   findallrI   r7   )
r   exprZ
c_compilerZtempargsrR   procZtraceresfiles
   &         r   _findLib_gccrd      s   
 {{9BIIdOKL\\%(
d+J**,	$		4$;GDrzz"CCMCK!''/9/9/@/@,/1 ((* 


 jju%D 4==;;t$$   

$  
 %  

$  s   ;G$ 6F 8
G$ G G$ &G F=G$ F* *F98F9<F==G$  G	G$ G! G!$H&G76H7HHHHZsunos5c                 s   V '       g   R #  \         P                  ! RRV 3\         P                  \         P                  R7      pT;_uu_ 4        TP
                  P                  4       pR R R 4       \        P                  ! RX4      pT'       g   R # \        P                  ! TP                  ^4      4      #   \         d     R # i ; i  + '       g   i     Lh; i)Nz/usr/ccs/bin/dumpz-LpvrP   rQ   s   \[.*\]\sSONAME\s+([^\s]+))rZ   r[   r\   DEVNULLr]   rP   r>   rT   searchr   r7   group)fra   datarb   s   &   r   _get_sonamerk     s    !'')<fa(H/9/9/A/AC
 {{'') ))94@C;;syy|,,  s   8B7 C	7CC	C	c                 s   V '       g   R # \         P                  ! R4      pV'       g   R #  \        P                  ! VRRRV 3\        P                  \        P
                  R7      pT;_uu_ 4        TP                  P                  4       pR R R 4       \        P                  ! RX4      pT'       g   R # \        P                  ! TP                  ^4      4      #   \         d     R # i ; i  + '       g   i     Lh; i)Nobjdump-pz-jz.dynamicre   s   \sSONAME\s+([^\s]+))rV   rW   rZ   r[   r\   rf   r]   rP   r>   rT   rg   r   r7   rh   )ri   rl   ra   Zdumprb   rG   r   rk   rk     s    ll9-G!''$j!(L/9/9/A/AC
 {{'') ))3T:C;;syy|,,  s   :C 0C+C('C(+C;	c                 s    V P                  R 4      p. p V'       d,   VP                  ^ \        VP                  4       4      4       K3   T;'       g    \
        P                  .#   \         d     L(i ; i)s   .)r   Zinsertr   Zpopr4   r   maxsize)ZlibnameZpartsZnumsr   r   _num_versionro   -  se    MM$'EDKK3uyy{#34  ((CKK=(  s   A$ +A$ $A21A2c                 sN   \         P                  ! V 4      pR V: RV: R2p\        P                  ! V4      p \        P
                  ! R\        P                  \        P                  R7      pV;_uu_ 4        VP                  P                  4       pRRR4       \         P                  ! TX4      pT'       g   \        \        T 4      4      # TP                  \        R7       \        P                   ! TR,          4      #   + '       g   i     Lv; i  \         d    Rp Li ; i)	z:-lz\.\S+ => \S*/(libz\.\S+)re   Nr   )Zkey)/sbin/ldconfigz-rr   )rT   rU   r   rS   rZ   r[   r\   rf   rP   r>   r]   r^   rk   rd   Zsortro   r7   )r   Zenamer_   ra   rj   rb   s   &     r   r   r   8  s    IIdOE8=uED;;t$D.!''(@/9/9/A/AC T;;++-D  **T4(C"<#566HHH&;;s2w'' T  s   5D 8DD	D$#D$c                 s>   \         P                  P                  R 4      '       g   R# \        \         P                  4      pRVR&   V'       d   RpMR	pRp \
        P                  ! V\
        P                  \
        P                  VR7      pT;_uu_ 4        TP                   FW  pTP                  4       pTP                  R4      '       g   K,  \         P                  ! T4      P                  4       ^,          pKY  	  RRR4       T'       g   R# TP                  R4       FS  p\         P                  P                  TRT ,          4      p\         P                  P                  T4      '       g   KQ  Tu # 	  R#   \         d     R# i ; i  + '       g   i     L; i)
/usr/bin/crleNrL   rM   rO   s   Default Library Path (ELF):rC   zlib%s.so)rq   -64)rq   )r   r   ZexistsrY   r   rZ   r[   r\   rf   r]   rP   r*   
startswithr7   r   r   )	r   is64rR   r`   rE   ra   ZlineZdirrF   s	   &&       r   _findLib_crleru   O  s'   77>>/22rzz"CCM/)E!''/9/9/A/A,/1  KKD::<D'EFF "D 1 7 7 9! < (  {{3''',,sJ,=>77>>'**"N (
 !  s$   6E: 4F/F:F	F	F	c                 sP    \        \        W4      ;'       g    \        V 4      4      # N)rk   ru   rd   )r   rt   s   &&r   r   r   s  s    }T8NNL<NOOr   c           
      sL   ^ RI pVP                  R4      ^8X  d(   \        P                  ! 4       P                  R,           pM&\        P                  ! 4       P                  R,           pRRRRR	RR
RRR/pVP                  VR4      pRp\        P                  ! V\        P                  ! V 4      V3,          4      p \        P                  ! RR.\        P                  \        P                  \        P                  RRRR/R7      ;_uu_ 4       p\        P                  ! WVP                  P                  4       4      pV'       d0   \        P                   ! VP#                  ^4      4      uuRRR4       #  RRR4       R#   + '       g   i     R# ; i  \$         d     R# i ; i)r    NZlz-32rr   z	x86_64-64zlibc6,x86-64zppc64-64zlibc6,64bitz
sparc64-64zs390x-64zia64-64zlibc6,IA-64Zlibc6z\s+(lib%s\.[^\s]+)\s+\(%srp   rm   rM   rL   rN   )ZstdinrQ   rP   rR   )structZcalcsizer   r:   r;   rD   rS   rT   rU   rZ   r[   rf   r\   rg   rP   r>   r7   rh   r]   )r   rw   r;   Zmach_mapZabi_typeZregexprb   s   &       r   _findSoname_ldconfigry   x  sU   s#q(((*,,u4((*,,u4^MmM=H  ||GW5H 1EKK4((C CDE
%%'7&>,6,>,>-7-?-?-7__+3S&#*F	H H LM))E88==?;C!{{399Q<8H H H H H H  s8   <AF AF *
F 6F  F	F F F#"F#c                 s   R \         P                  ! V 4      ,          pRR.p\        P                  P	                  R4      pV'       d,   VP                  R4       F  pVP                  RV.4       K  	  VP                  R\        P                  RV ,          .4       Rp \        P                  ! V\        P                  \        P                  R	R
7      pVP                  4       w  rx\         P                  ! V\        P                  ! V4      4      p	V	 F,  p
\        V
4      '       g   K  \        P                  ! V
4      u # 	  V#   \         d     T# i ; i)rJ   Zldz-trB   rC   z-LrK   z-l%sNT)rP   rQ   Zuniversal_newlines)rT   rU   r   r   rD   r   ZextendZdevnullrZ   r[   r\   Zcommunicater^   r7   rI   Z	Exception)r   r_   ZcmdZlibpathr   Zresultrx   ZoutZ_rb   rc   s   &          r   _findLib_ldrz     s   1BIIdOCD,Cjjnn%67G s+AJJay) ,JJbjj&4-89F$$S,6OO8<> jjr{{3'78D #4== ;;t,,   M  Ms    B"E E EEc                 s    \        V 4      ;'       g1    \        \        V 4      4      ;'       g    \        \        V 4      4      # rv   )ry   rk   rd   rz   )r   s   &r   r   r     sB    '- U U|D12U U6A+dBS6TUr   Zdl_iterate_phdrc                   s    ] tR tRtR]P
                  3R]P                  3R]P
                  3R]P                  3.tRt	R# )_dl_phdr_infoi  Z	dlpi_addr	dlpi_nameZ	dlpi_phdrZ
dlpi_phnum N)
__name__Z
__module__Z__qualname__Z__firstlineno__r(   Zc_void_pc_char_pZc_ushortZ_fields_Z__static_attributes__r}   r   r   r{   r{     s9    foo.foo.foo.v/	Hr   r{   c                 s    VP                   P                  p\        P                  ! V P                   P                  4      pVP                  V4       ^ # )r    )Zcontentsr"   r   r7   r|   Zappend)ZinfoZ_sizerj   r.   r   s   &&&  r   _info_callbackr     s:    ++I;;t}}667DT"r   c                 sz    . p \        \        \        P                  ! \        P                  ! V 4      4      4       V # r-   )_dl_iterate_phdrr   r(   r)   	py_object)r.   s    r   r0   r0     s/    I^#\\&*:*:9*EFHr   c                  s8   ^ RI Hp  \        P                  R8X  dD   \	        V P
                  4       \	        V P                  R4      4       \	        \        R4      4       \        P                  R8X  Edo   \	        \        R4      4       \	        \        R4      4       \	        \        R4      4       \        P                  R8X  dk   \	        V P                  R	4      4       \	        V P                  R
4      4       \	        V P                  R4      4       \	        V P                  R4      4       EM\        P                  P                  R4      '       EdF   ^ RI Hp \        P                  R8  dp   \	        RV! R\        P                  4       24       \	        RV P                  R4       24       \	        \        R4      4       \	        V P                  R4      4       M@\	        RV! R\        P                  4       24       \	        RV P                  R4       24       \	        R\        R4       24       \	        RV P                  \        R4      4       24       \	        R\        R4       24       \	        RV P                  \        R4      4       24       MH\	        V P                  R4      4       \	        V P                  R4      4       \	        \        R4      4        \         \	        \        4       4       R#   \          d    \	        R4        R# i ; i)r    )cdllr   r   r1   r   r   Zbz2darwinz
libm.dylibzlibcrypto.dylibzlibSystem.dylibzSystem.framework/Systemr8   )CDLLz"Using CDLL(name, os.RTLD_MEMBER): zlibc.a(shr.o)zUsing cdll.LoadLibrary(): Zrpmz	librpm.sozlibc.a(shr_64.o)z	crypt	:: Zcryptz
crypto	:: Zcryptozlibm.sozlibcrypt.sozdllist() not availableNl        )r(   r   r   r   Zprintr   Zloadr   r   platformZLoadLibraryrs   r   rn   ZRTLD_MEMBERr0   Z	NameError)r   r   s     r   testr     sP   	ww$dkkdii!"l8$%	ww'l3 l3 l5!" <<8#$""<01$""#456$""#456$""#<=>\\$$U++#{{U":4QSQ_Q_;`:abc243C3CO3T2UVWl5)*d&&{34:4@RTVTbTb;c:def243C3CDV3W2XYZJ|G4567Jt//W0EFGHIKX 6789K 0 0h1G HIJK$""9-.$""=12,w'( 	fh  (&'(s   $K? ?LLZ__main__>   ZiosZtvosr   Zwatchos)ZfreebsdZopenbsdZ	dragonfly)F)<r   rV   rZ   r   r   r   r   r   r(   r   ZWinDLLZ	_kernel32r%   ZHANDLEZrestyper!   r&   r   ZLPWSTRZargtypesZ_psapir'   ZBOOLZPOINTERZLPDWORDr$   r,   r0   r   Zctypes.macholib.dyldr2   r3   r   r6   r5   r   rs   Zctypes._aixrA   rT   rX   rI   rd   rk   ro   ru   ry   rz   ZhasattrZ	Structurer{   Z	CFUNCTYPEZc_intZc_size_tr   Z_dl_phdr_callbackr   r   r   r~   r}   r   r   <module>r      s   	   
 77d?2*$ j>I$%89#+??  )*> ?(0%*& ]]748F"#78$,MM!x''(	&"#" WWCLL,PP<	 KKS)*E !78#)??  	\\U## )\\Y8 	\\\!2
 WW/%d ||x	-"	-, ||BCC		)	(* 
	!"	H	P
	<	6	U GGwLL<<T**->??	F,, 	 #,,LLNN=)OONN6++,	
 
	 
	 !!23NN6++,%
! $*<< 	-^ zF r   