
    5 f?$                       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
 ddlmZmZmZmZmZmZmZmZmZmZmZmZ ddlmZmZmZmZmZmZ dD ]DZ eeed	            eeeged
e            eeegede            eeeegede           E edegeded          Z  edegeded           ee	fd]dZ! e!dd            e!d d!            e!d"d#            e!d$d%            e!d&d'            e!d(d)            e!d*d+e,            e!d-d.e,            e!d/d0e,            e!d1d2e,            e!d3d4ee5            e!d6d            e!d7d!            e!d8d#            e!d9d%            e!d:d'            e!d;d)            e!d<d+e,            e!d=d.e,            e!d>d0e,            e!d?d2e,           d^dAZ" e"d dB          Z# e"dCdD          Z$ G dE dFe          Z% eeegedGe	H          Z& eeegedIe	H          Z' e%e
j(        e&dJdJ           e%e
j)        e&dKdJ           e%e
j*        e'dJdJ           e%e
j+        e'dKdK           e%e
j,        e'dJdK           e%e
j-        e'dKdJ          dLZ.dMe/dN<    eeegedOeH          Z0 eeegedPeH          Z1 eeegedQeH          Z2 eeegedReH          Z3 eeegedSeH          Z4 eeegedTeH          Z5 eegedUeH          Z6 eegedVeH          Z7 eegedWeH          Z8 eegedXeH          Z9 eg edYeH          Z: eg edZeH          Z; eg ed[eH          Z<d\S )_a<  Arbitrary-precision integer primitive ops.

These mostly operate on (usually) unboxed integers that use a tagged pointer
representation (CPyTagged) and correspond to the Python 'int' type.

See also the documentation for mypyc.rtypes.int_rprimitive.

Use mypyc.ir.ops.IntOp for operations on fixed-width/C integers.
    )annotations)
NamedTuple)
ERR_ALWAYS	ERR_MAGICERR_MAGIC_OVERLAPPING	ERR_NEVERComparisonOp)RTypebit_rprimitivebool_rprimitivec_pyssize_t_rprimitivefloat_rprimitiveint16_rprimitiveint32_rprimitiveint64_rprimitiveint_rprimitiveobject_rprimitivestr_rprimitive
void_rtype)CFunctionDescription	binary_op	custom_opfunction_opload_address_opunary_op)zbuiltins.intzmypy_extensions.i64zmypy_extensions.i32zmypy_extensions.i16zmypy_extensions.u8PyLong_Type)nametypesrcCPyTagged_FromFloatr   	arg_typesreturn_typec_function_name
error_kindCPyLong_FromStrCPyLong_FromStrWithBasezbuiltins.strCPyTagged_Str   )r   r"   r#   r$   r%   priorityCPyBool_Str   r   strr$   r#   r
   r%   intreturnNonec                F    t          | t          t          g|||           d S )Nr!   )r   r   )r   r$   r#   r%   s       N/var/www/equiseq/venv/lib/python3.11/site-packages/mypyc/primitives/int_ops.pyint_binary_opr3   h   s9     !>2'         +CPyTagged_Add-CPyTagged_Subtract*CPyTagged_Multiply&CPyTagged_And|CPyTagged_Or^CPyTagged_Xorz//CPyTagged_FloorDivide)r%   %CPyTagged_Remainderz>>CPyTagged_Rshiftz<<CPyTagged_Lshift/CPyTagged_TrueDivide)r#   r%   z+=z-=z*=z&=z|=z^=z//=z%=z>>=z<<=r   c                H    t          | t          t          |t                    S )N)r   arg_typer#   r$   r%   )r   r   r   )r   r$   s     r2   int_unary_oprJ      s(    "'   r4   CPyTagged_Negate~CPyTagged_Invertc                  8    e Zd ZU ded<   ded<   ded<   ded<   dS )	IntComparisonOpDescriptionr.   binary_op_variantr   c_func_descriptionboolc_func_negatedc_func_swap_operandsN)__name__
__module____qualname____annotations__ r4   r2   rO   rO      sB         ,,,,r4   rO   CPyTagged_IsEq_)r"   r#   r$   r%   CPyTagged_IsLt_FT)z==z!=<z<=>z>=z%dict[str, IntComparisonOpDescription]int_comparison_op_mappingCPyInt64_DivideCPyInt64_RemainderCPyInt32_DivideCPyInt32_RemainderCPyInt16_DivideCPyInt16_RemainderCPyLong_AsInt64CPyTagged_FromSsize_tCPyTagged_FromInt64CPyLong_AsInt32CPyInt32_OverflowCPyInt16_OverflowCPyUInt8_OverflowN)
r   r-   r$   r-   r#   r
   r%   r.   r/   r0   )r   r-   r$   r-   r/   r   )=__doc__
__future__r   typingr   mypyc.ir.opsr   r   r   r   r	   mypyc.ir.rtypesr
   r   r   r   r   r   r   r   r   r   r   r   mypyc.primitives.registryr   r   r   r   r   r   int_nameint_to_str_opr3   rJ   
int_neg_opint_invert_oprO   
int_equal_int_less_than_EQNEQSLTSLESGTSGEr^   rX   int64_divide_opint64_mod_opint32_divide_opint32_mod_opint16_divide_opint16_mod_opint_to_int64_opssize_t_to_int_opint64_to_int_opint_to_int32_opint32_overflowint16_overflowuint8_overflowrY   r4   r2   <module>r      s     # " " " " "       ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^                                           ( (H O(9}MMMM K#$"-    K!"%)    K!>2%1     	#   	!    (	    $ c? # # # c' ( ( ( c' ( ( ( c? # # # c> " " " c? # # # d+	 B B B B c(Y ? ? ? ? d&9 = = = = d&9 = = = = 	-=J_    dO $ $ $ d( ) ) ) d( ) ) ) dO $ $ $ dN # # # dO $ $ $ e, C C C C d)i @ @ @ @ e'I > > > > e'I > > > >    \#122
S"455        Y~.%	  
 ~.%	   %
$\_j%
O
O
$
$\%5z4
O
O	#	#L$4neU	S	S
$
$\%5~tT
R
R	#	#L$4neT	R	R
$
$\%5~tU
S
SD D      )!12 %$	   y!12 ($	   )!12 %$	   y!12 ($	   )!12 %$	   y!12 ($	   ) ! %$	   I%&+	    ) )	   ) ! %$	   '	   '	   '	  r4   