
    0;ji                     t    d Z ddlmZ ddlmZ ddlmZmZ ed             Zed             Z	ed             Z
dS )	z
This file provides internal compiler utilities that support certain special
operations with bytes and workarounds for limitations enforced in userland.
    )	intrinsic)ir)typescgutilsc                 b    d }t          j        t           j        t           j                  }||fS )Nc                     |\  }}|                     |t          j        d                                                    }|                    |                    ||g                    }|S )N   bitcastr   IntType
as_pointerloadgepcontextbuilder	signatureargsdataidxptrchs           Q/root/voice-cloning/.venv/lib/python3.11/site-packages/numba/core/unsafe/bytes.pyimplzgrab_byte.<locals>.impl   sX    	coodBJqMM$<$<$>$>??\\'++cC51122	    )r   uint8voidptrintp	typingctxr   offsetr   sigs        r   	grab_byter#      s2       +emUZ
0
0C9r   c                 b    d }t          j        t           j        t           j                  }||fS )Nc                     |\  }}|                     |t          j        d                                                    }|                    |                    ||g                    }|S )N@   r
   r   s           r   r   zgrab_uint64_t.<locals>.impl   sX    	coodBJrNN$=$=$?$?@@\\'++cC51122	r   )r   uint64r   r   r   s        r   grab_uint64_tr(      s2      
 ,u}ej
1
1C9r   c                     d }t          j        t           j        t           j        t           j        t           j        t           j        t           j                  }||fS )z;Copy nbytes from *(src + src_offset) to *(dst + dst_offset)c                     |\  }}}}}}	|                     ||g          }
|                     ||g          }t          j        |||
||	           |                                 S )N)r   r   
raw_memcpyget_dummy_value)r   r   r   r   dst_valdst_offset_valsrc_valsrc_offset_val
nbytes_val	align_valsrc_ptrdst_ptrs               r   codegenzmemcpy_region.<locals>.codegen'   sn    	.'>:	++g'788++g'7887GWj)LLL&&(((r   )r   voidr   r   )	r    dst
dst_offsetsrc
src_offsetnbytesalignr5   r"   s	            r   memcpy_regionr=   $   sG    ) ) ) *U]EJuzZ- -C<r   N)__doc__numba.core.extendingr   llvmliter   
numba.corer   r   r#   r(   r=    r   r   <module>rC      s    
 + * * * * *       % % % % % % % % 	 	 	        r   