
    X-Ph                       U d Z ddlmZ ddlmZ ddlmZmZmZm	Z	m
Z
mZ ddlmZmZ ddlmZ ddlmZ ddlmZmZ dd	lmZ  G d
 de          Z ee	j        edd           ee	j        edd           ee	j        edd           ee	j        edd           ee	j        edd           ee	j        edd          dZde d<   d,dZ! ed          d-d             Z" ed!          d-d"            Z# ed#          d-d$            Z$ ed%          d-d&            Z% ed'          d-d(            Z& ed)          d-d*            Z'd+S ).z4Convert tagged int primitive ops to lower-level ops.    )annotations)
NamedTuple)Assign
BasicBlockBranchComparisonOpRegisterValue)bool_rprimitiveis_short_int_rprimitive)LowLevelIRBuilder)lower_primitive_op)
int_equal_int_less_than_)CFunctionDescriptionc                  8    e Zd ZU ded<   ded<   ded<   ded<   dS )	IntComparisonOpDescriptionintbinary_op_variantr   c_func_descriptionboolc_func_negatedc_func_swap_operandsN)__name__
__module____qualname____annotations__     S/var/www/html/test/jupyter/venv/lib/python3.11/site-packages/mypyc/lower/int_ops.pyr   r      sB         ,,,,r   r   FT)==!=<<=>>=z%dict[str, IntComparisonOpDescription]int_comparison_op_mappingselfr   lhsr
   rhsopstrliner   returnc                X   t          |j                  st          |j                  r|dv rd}n(t          |j                  ot          |j                  }|r)|                     ||t          |         d         |          S t          |         \  }}}}	t	          t
                    }
t                      t                      t                      }}}|                     ||d          }|dv r0|                     t          |||t          j
                             nt                      }|                     t          |||t          j
                             |                     |           |                     ||d          }|                     t          |||t          j
                             |                     |           |	r||g}n||g}|                     |||          }|r|                     |d|          }n|}|                     t          |
||                     |                     |           |                     |           |                     ||||          }|                     t          |
||                     |                     |           |
S )zACompare two tagged integers using given operator (value context).)r!   r"   Tr   )negatednot)r   typecomparison_opr'   r	   r   r   check_tagged_short_intaddr   BOOLactivate_blockcall_cunary_opr   gotogoto_and_activate)r(   r)   r*   r+   r-   quickop_typec_func_descnegate_resultswap_opresultshort_int_block	int_blockout	check_lhs	short_lhs	check_rhsargscallcall_resulteqs                        r    compare_taggedrL   )   s    	 )) X-DSX-N-N XTV [ U U '11W6Mch6W6W T!!#s,Eb,I!,LdSSS3LR3P0G[-o&&F&0llJLL*,,YO++Ct+DDI	\	9ov{KKLLLL LL		9iEEFFFI&&&//T4/HH		9ov{KKLLL	""" SzSz;;{D$//D mmD%66HHVFK..///IIcNNN(((			Cgt	4	4BHHVFB%%&&&3Mr   int_eqbuilderrH   list[Value]c                @    t          | |d         |d         d|          S )Nr      r!   rL   rN   rH   r-   s      r    lower_int_eqrT   V        '47DGT4@@@r   int_nec                @    t          | |d         |d         d|          S )Nr   rQ   r"   rR   rS   s      r    lower_int_nerX   [   rU   r   int_ltc                @    t          | |d         |d         d|          S )Nr   rQ   r#   rR   rS   s      r    lower_int_ltr[   `        '47DGS$???r   int_lec                @    t          | |d         |d         d|          S )Nr   rQ   r$   rR   rS   s      r    lower_int_ler_   e   rU   r   int_gtc                @    t          | |d         |d         d|          S )Nr   rQ   r%   rR   rS   s      r    lower_int_gtrb   j   r\   r   int_gec                @    t          | |d         |d         d|          S )Nr   rQ   r&   rR   rS   s      r    lower_int_gere   o   rU   r   N)r(   r   r)   r
   r*   r
   r+   r,   r-   r   r.   r
   )rN   r   rH   rO   r-   r   r.   r
   )(__doc__
__future__r   typingr   mypyc.ir.opsr   r   r   r   r	   r
   mypyc.ir.rtypesr   r   mypyc.irbuild.ll_builderr   mypyc.lower.registryr   mypyc.primitives.int_opsr   r   mypyc.primitives.registryr   r   EQNEQSLTSLESGTSGEr'   r   rL   rT   rX   r[   r_   rb   re   r   r   r    <module>ru      s   : : : " " " " " "       R R R R R R R R R R R R R R R R D D D D D D D D 6 6 6 6 6 6 3 3 3 3 3 3 ? ? ? ? ? ? ? ? : : : : : :        %
$\_j%
O
O
$
$\%5z4
O
O	#	#L$4neU	S	S
$
$\%5~tT
R
R	#	#L$4neT	R	R
$
$\%5~tU
S
SD D     * * * *Z HA A A A HA A A A H@ @ @ @ HA A A A H@ @ @ @ HA A A A A Ar   