§
    OŠtjß  ã                   óÊ   — 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mZmZmZmZmZmZmZmZmZ  ed¦  «        \  ZZd„ Zd„ Zd„ Zd	„ Zd
„ Zd„ Zd„ Zd„ Z d„ Z!d„ Z"dS )é    )Úsymbols)Úccode)ÚDeclarationÚVariableÚfloat64Úint64ÚStringÚ	CodeBlock)ÚalignofÚCommaOperatorÚgotoÚLabelÚPreDecrementÚPostDecrementÚPreIncrementÚPostIncrementÚsizeofÚunionÚstructzx yc                  ó‚   — t          t          ¦  «        } t          | ¦  «        dk    sJ ‚ | j        | j        Ž | k    sJ ‚d S )Nz
alignof(x))r   Úxr   ÚfuncÚargs)Úaxs    ú]/var/www/html/CA-Chatbot/venv/lib/python3.11/site-packages/sympy/codegen/tests/test_cnodes.pyÚtest_alignofr      sF   € Ý	•‰Œ€BÝ�‰9Œ9˜Ò$Ð$Ð$Ð$Øˆ2Œ7�B”GÐ Ò"Ð"Ð"Ð"Ð"Ð"ó    c                  ó®   — t          t          t          ¦  «        dt          z  ¦  «        } t          | ¦  «        dk    sJ ‚ | j        | j        Ž | k    sJ ‚d S )Né   z(++(x), 2*x))r   r   r   r   r   r   )Úexprs    r   Útest_CommaOperatorr!      sT   € Ý�¥a™œ¨!­A©#Ñ.Ô.€DÝ�‰;Œ;˜.Ò(Ð(Ð(Ð(Øˆ4Œ9�d”iÐ  DÒ(Ð(Ð(Ð(Ð(Ð(r   c                  óŽ  — d} t          | ¦  «        } |j        |j        Ž |k    sJ ‚|t          d¦  «        k    sJ ‚t          |¦  «        dk    sJ ‚t	          | ¦  «        }t          |¦  «        dk    sJ ‚|t	          d¦  «        k    sJ ‚|t	          d¦  «        k    sJ ‚t          t          ¦  «        g}t	          | |¦  «        }|j        t          d¦  «        k    sJ ‚|j	        t          t          t          ¦  «        ¦  «        k    sJ ‚t          |¦  «        dk    sJ ‚t          t          ¦  «        t          t          ¦  «        g}t	          | |¦  «        }|j        t          d¦  «        k    sJ ‚|j	        t          t          t          ¦  «        t          t          ¦  «        ¦  «        k    sJ ‚t          |¦  «        dk    sJ ‚d S )NÚ
early_exitÚfoobarzgoto early_exitzearly_exit:zearly_exit:
++(x);z#early_exit:
{
   ++(x);
   --(y);
})r   r   r   r   r   r   r   Únamer	   Úbodyr
   r   Úy)ÚsÚgÚl1r&   Úl2s        r   Útest_goto_Labelr,      s¼  € Ø€AÝˆQ‰Œ€AØˆ1Œ6�1”6ˆ?˜aÒÐÐÐØ•�X‘”ÒÐÐÐÝ�‰8Œ8Ð(Ò(Ð(Ð(Ð(å	ˆq‰Œ€BÝ�‰9Œ9˜Ò%Ð%Ð%Ð%Ø•�|Ñ$Ô$Ò$Ð$Ð$Ð$Ø•�x‘”Ò Ð Ð Ð å�‰OŒOÐ€DÝ	ˆq�$‰Œ€BØŒ7•f˜\Ñ*Ô*Ò*Ð*Ð*Ð*ØŒ7•i¥­Q¡¤Ñ0Ô0Ò0Ð0Ð0Ð0Ý�‰9Œ9ð ò ð ð ð õ �‰OŒO�\­!™_œ_Ð-€DÝ	ˆq�$‰Œ€BØŒ7•f˜\Ñ*Ô*Ò*Ð*Ð*Ð*ØŒ7•i¥­Q¡¤µ½a±´ÑAÔAÒAÐAÐAÐAÝ�‰9Œ9ð %ò &ð &ð &ð &ð &ð &r   c                  ó‚   — t          t          ¦  «        }  | j        | j        Ž | k    sJ ‚t	          | ¦  «        dk    sJ ‚d S )Nz--(x))r   r   r   r   r   ©Úps    r   Útest_PreDecrementr0   3   óE   € Ý•Q‰Œ€AØˆ1Œ6�1”6ˆ?˜aÒÐÐÐÝ�‰8Œ8�wÒÐÐÐÐÐr   c                  ó‚   — t          t          ¦  «        }  | j        | j        Ž | k    sJ ‚t	          | ¦  «        dk    sJ ‚d S )Nz(x)--)r   r   r   r   r   r.   s    r   Útest_PostDecrementr3   9   óG   € Ý•aÑÔ€AØˆ1Œ6�1”6ˆ?˜aÒÐÐÐÝ�‰8Œ8�wÒÐÐÐÐÐr   c                  ó‚   — t          t          ¦  «        }  | j        | j        Ž | k    sJ ‚t	          | ¦  «        dk    sJ ‚d S )Nz++(x))r   r   r   r   r   r.   s    r   Útest_PreIncrementr6   ?   r1   r   c                  ó‚   — t          t          ¦  «        }  | j        | j        Ž | k    sJ ‚t	          | ¦  «        dk    sJ ‚d S )Nz(x)++)r   r   r   r   r   r.   s    r   Útest_PostIncrementr8   E   r4   r   c                  ó   — d} t          | ¦  «        }t          |¦  «        d| z  k    sJ ‚ |j        |j        Ž |k    sJ ‚|j        rJ ‚|                     ¦   «         t          d¦  «        t          d¦  «        hk    sJ ‚d S )Nzunsigned intz
sizeof(%s)r   )r   r   r   r   Úis_AtomÚatomsr	   )ÚtypenameÚszs     r   Útest_sizeofr>   K   s�   € Ø€HÝ	�Ñ	Ô	€BÝ�‰9Œ9˜ xÑ/Ò/Ð/Ð/Ð/Øˆ2Œ7�B”GÐ Ò"Ð"Ð"Ð"ØŒzÐÐˆ>Ø�8Š8‰:Œ:�& Ñ0Ô0µ&¸Ñ2BÔ2BÐCÒCÐCÐCÐCÐCÐCr   c                  óò  — t          t          t          ¬¦  «        t          t          t          ¬¦  «        }} t	          d| |g¦  «        } |j        |j        Ž |k    sJ ‚|t	          d| |f¦  «        k    sJ ‚|t	          d|| f¦  «        k    sJ ‚t          |j        ¦  «        dk    sJ ‚t          |j
        ¦  «        dk    sJ ‚t          d„ |j
        D ¦   «         ¦  «        sJ ‚t          |¦  «        dk    sJ ‚d S )N©ÚtypeÚvec2r   c              3   ó@   K  — | ]}t          |t          ¦  «        V — Œd S ©N©Ú
isinstancer   ©Ú.0Úargs     r   ú	<genexpr>ztest_struct.<locals>.<genexpr>\   ó,   è è € ÐFÐF°�z˜#�{Ñ+Ô+ÐFÐFÐFÐFÐFÐFr   z)struct vec2 {
   double x;
   double y;
})r   r   r   r'   r   r   r   Ústrr%   ÚlenÚdeclarationsÚallr   )ÚvxÚvyr(   s      r   Útest_structrR   T   s  € Ý•a�gÐ&Ñ&Ô&­µ½Ð(AÑ(AÔ(Aˆ€BÝˆv˜˜B�xÑ Ô €AØˆ1Œ6�1”6ˆ?˜aÒÐÐÐØ•�v  B˜xÑ(Ô(Ò(Ð(Ð(Ð(Ø•�v  B˜xÑ(Ô(Ò(Ð(Ð(Ð(ÝˆqŒv‰;Œ;˜&Ò Ð Ð Ð ÝˆqŒ~ÑÔ !Ò#Ð#Ð#Ð#ÝÐFÐF°q´~ÐFÑFÔFÑFÔFÐFÐFÐFÝ�‰8Œ8ð	òð ð ð ð ð r   c                  óÂ  — t          t          t          ¬¦  «        t          t          t          ¬¦  «        }} t          d| |g¦  «        } |j        |j        Ž |k    sJ ‚|t          d| |f¦  «        k    sJ ‚t          |j	        ¦  «        dk    sJ ‚t          |j        ¦  «        dk    sJ ‚t          d„ |j        D ¦   «         ¦  «        sJ ‚t          |¦  «        dk    sJ ‚d S )Nr@   Údualuser   c              3   ó@   K  — | ]}t          |t          ¦  «        V — Œd S rD   rE   rG   s     r   rJ   ztest_union.<locals>.<genexpr>k   rK   r   z,union dualuse {
   double x;
   int64_t y;
})r   r   r   r'   r   r   r   r   rL   r%   rM   rN   rO   r   )rP   rQ   Úus      r   Ú
test_unionrW   d   s÷   € Ý•a�gÐ&Ñ&Ô&­µ½Ð(?Ñ(?Ô(?ˆ€BÝˆi˜"˜b˜Ñ"Ô"€AØˆ1Œ6�1”6ˆ?˜aÒÐÐÐØ•�i " b Ñ*Ô*Ò*Ð*Ð*Ð*ÝˆqŒv‰;Œ;˜)Ò#Ð#Ð#Ð#ÝˆqŒ~ÑÔ !Ò#Ð#Ð#Ð#ÝÐFÐF°q´~ÐFÑFÔFÑFÔFÐFÐFÐFÝ�‰8Œ8ð	òð ð ð ð ð r   N)#Úsympy.core.symbolr   Úsympy.printing.codeprinterr   Úsympy.codegen.astr   r   r   r   r	   r
   Úsympy.codegen.cnodesr   r   r   r   r   r   r   r   r   r   r   r   r'   r   r!   r,   r0   r3   r6   r8   r>   rR   rW   © r   r   ú<module>r]      s‘  ðØ %Ð %Ð %Ð %Ð %Ð %Ø ,Ð ,Ð ,Ð ,Ð ,Ð ,Ø VÐ VÐ VÐ VÐ VÐ VÐ VÐ VÐ VÐ VÐ VÐ VÐ VÐ VÐ VÐ Vðð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð
 €wˆu�~„~�€€1ð#ð #ð #ð)ð )ð )ð&ð &ð &ð6ð ð ðð ð ðð ð ðð ð ðDð Dð Dðð ð ð ð ð ð ð r   