
    i                     4    S SK Jr  S SKJr    " S S\5      rg)    )find_integer)Shrinkerc                   Z    \ rS rSrSrS rS rS rS rS r	S r
\S	\4S
 j5       rS rSrg)Integer   zAttempts to find a smaller integer. Guaranteed things to try ``0``,

``1``, ``initial - 1``, ``initial - 2``. Plenty of optimisations beyond
that but those are the guaranteed ones.
c                 F   [        S5       H  nU R                  U5      (       d  M    g   U R                  5         U R                  S:  aI  U R                  U R                  U R                  S-
  -	  5        U R                  U R                  S-  5        U R                  S:H  $ )N   T      )rangeconsidermask_high_bitssizecurrent)selfis     o/var/www/html/ai-image-ml/venv/lib/python3.13/site-packages/hypothesis/internal/conjecture/shrinking/integer.pyshort_circuitInteger.short_circuit   s|    qA}}Q  	99q=MM$,,499q=9:MM$,,-.||q      c                     US:  d   eg Nr    )r   values     r   check_invariantsInteger.check_invariants%   s    zzr   c                 
    X:  $ Nr   )r   leftrights      r   left_is_betterInteger.left_is_better(   s
    |r   c                 h    U R                  5         U R                  S5        U R                  S5        g )Nr	      )shift_rightshrink_by_multiplesr   s    r   run_stepInteger.run_step+   s*      #  #r   c                 @   ^ ^ T R                   m[        UU 4S j5        g )Nc                 X   > U TR                   :*  =(       a    TR                  TU -	  5      $ r   )r   r   )kbaser   s    r   <lambda>%Integer.shift_right.<locals>.<lambda>2   s"    qDII~J$--	2JJr   r   r   )r   r-   s   `@r   r%   Integer.shift_right0   s    ||JKr   c                 d   ^ ^^ T R                   mTR                  5       m[        UUU 4S j5       ng )Nc                 P   > U T:  a  gSTU -
  -  S-
  nTR                  UT-  5      $ )NFr$   r   )r,   maskr-   nr   s     r   try_mask(Integer.mask_high_bits.<locals>.try_mask8   s2    Av!a%LA%D==--r   )r   
bit_lengthr   )r   r7   r-   r6   s   ` @@r   r   Integer.mask_high_bits4   s*    ||OO		. 
	.r   returnc                 6    U R                   R                  5       $ r   )r   r9   r'   s    r   r   Integer.size?   s    ||&&((r   c                 L   ^ ^^ T R                   m[        UUU 4S j5       nUS:  $ )Nc                 N   > TU T-  -
  nUS:  =(       a    TR                  U5      $ r   r4   )r6   attemptr-   r,   r   s     r   shrunk+Integer.shrink_by_multiples.<locals>.shrunkF   s(    QUlGa<:DMM'$::r   r   r0   )r   r,   rA   r-   s   `` @r   r&   Integer.shrink_by_multiplesC   s*    ||		; 
	; zr   r   N)__name__
__module____qualname____firstlineno____doc__r   r   r!   r(   r%   r   propertyintr   r&   __static_attributes__r   r   r   r   r      sF    	!$
L	. )c ) )r   r   N))hypothesis.internal.conjecture.junkdrawerr   /hypothesis.internal.conjecture.shrinking.commonr   r   r   r   r   <module>rN      s    C D
8h 8r   