Ë
    ÃÓ^j+  ã                   ó,   — d dl Z d dlmZ  G d„ d«      Zy)é    N)ÚAnyc                   ól   — e Zd ZdZdededdfd„Zdedefd„Zdd„Zde	dz  fd	„Z
defd
„Zde	dz  fd„Zy)Ú_PyInstDecoderzH
    Decodes Python bytecode instructions to extract variable names
    Úcode_objectÚlastiÚreturnNc                 ó„   — || _         t        t        j                  |«      «      | _        | j                  |«      | _        y )N)r   ÚlistÚdisÚget_instructionsÚinstructionsÚ_find_instruction_indexÚoffset)Úselfr   r   s      úi/var/www/ramen.bs-engineer-server.com/venv/lib/python3.12/site-packages/functorch/dim/_py_inst_decoder.pyÚ__init__z_PyInstDecoder.__init__
   s4   € Ø&ˆÔÜ ¤×!5Ñ!5°kÓ!BÓCˆÔØ×2Ñ2°5Ó9ˆ�ó    c                 ól   — d}t        | j                  «      D ]  \  }}|j                  |k  r|}Œ |S  |S )z<Find instruction index corresponding to lasti (byte offset).r   )Ú	enumerater   r   )r   r   Úbest_idxÚiÚinstrs        r   r   z&_PyInstDecoder._find_instruction_index   sG   € ð ˆÜ! $×"3Ñ"3Ó4ò 	‰HˆAˆuØ�|‰|˜uÒ$Ø‘àØˆð	ð
 ˆr   c                 ó.   — | xj                   dz  c_         y)z Advance to the next instruction.é   N)r   ©r   s    r   Únextz_PyInstDecoder.next   s   € à�Š�qÑŽr   c                 óŽ   — | j                   t        | j                  «      k  r#| j                  | j                      j                  S y)z/Get the opcode name of the current instruction.N)r   Úlenr   Úopnamer   s    r   Úopcodez_PyInstDecoder.opcode   s7   € à�;‰;œ˜T×.Ñ.Ó/Ò/Ø×$Ñ$ T§[¡[Ñ1×8Ñ8Ð8Ør   c                 ó–   — | j                   t        | j                  «      k  r'| j                  | j                      j                  xs dS y)z,Get the argument of the current instruction.r   )r   r   r   Úargr   s    r   Úopargz_PyInstDecoder.oparg%   s<   € à�;‰;œ˜T×.Ñ.Ó/Ò/Ø×$Ñ$ T§[¡[Ñ1×5Ñ5Ò:¸Ð:Ør   c                 ó`  — | j                  «       }|syd}|dv r| j                  j                  }nQ|dk(  r| j                  j                  }n5|dk(  r/| j                  j                  }|s| j                  j
                  }ny| j                  «       }|rd|cxk  rt        |«      k  r||   S  yy)zA
        Extract variable name from current instruction.
        N)Ú
STORE_NAMEÚSTORE_GLOBALÚ
STORE_FASTÚSTORE_DEREFr   )r    r   Úco_namesÚco_varnamesÚco_cellvarsÚco_freevarsr#   r   )r   r   Únamesr"   s       r   Únamez_PyInstDecoder.name+   s¯   € ð —‘“ˆÙØàˆØÐ3Ñ3Ø×$Ñ$×-Ñ-‰EØ�|Ò#Ø×$Ñ$×0Ñ0‰EØ�}Ò$Ø×$Ñ$×0Ñ0ˆEÙØ×(Ñ(×4Ñ4‘àà�j‰j‹lˆÙ�Q˜#Ô*¤ E£
Ò*Ø˜‘:Ðð +ñ r   )r   N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   Úintr   r   r   Ústrr    r#   r.   © r   r   r   r      se   „ ñð: Cð :°ð :¸ó :ð

¨Sð 
°Só 
óð˜˜d™
ó ð�só ð�c˜D‘jô r   r   )r   Útypingr   r   r5   r   r   ú<module>r7      s   ðÛ 
Ý ÷>ò >r   