3

V'íc¡ã@sˆdZddlZddlmZmZmZmZmZmZm	Z	ddl
mZmZddl
mZddlmZmZmZmZmZmZmZmZmZmZddd	d
ddd
dddddddgZGdd„deƒZdd„ZGdd„deƒZGdd	„d	eƒZGdd
„d
eƒZGdd„deƒZ Gdd„deƒZ!Gdd
„d
eƒZ"Gdd„deƒZ#Gdd„deƒZ$Gd d„deƒZ%Gd!d„deƒZ&Gd"d„deƒZ'Gd#d„deƒZ(Gd$d„deƒZ)dS)%zÉ
    pygments.lexers.asm
    ~~~~~~~~~~~~~~~~~~~

    Lexers for assembly languages.

    :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS.
    :license: BSD, see LICENSE for details.
éN)Ú
RegexLexerÚincludeÚbygroupsÚusingÚwordsÚDelegatingLexerÚdefault)ÚCppLexerÚCLexer)ÚDLexer)
ÚTextÚNameÚNumberÚStringÚCommentÚPunctuationÚOtherÚKeywordÚOperatorÚ
WhitespaceÚGasLexerÚObjdumpLexerÚ
DObjdumpLexerÚCppObjdumpLexerÚ
CObjdumpLexerÚ
HsailLexerÚ	LlvmLexerÚLlvmMirBodyLexerÚLlvmMirLexerÚ	NasmLexerÚNasmObjdumpLexerÚ	TasmLexerÚ	Ca65LexerÚDasm16Lexerc@sÈeZdZdZdZddgZddgZdgZdZd	Z	d
e	de	dZ
d
Zde
dZe
dƒe
dejfde
ejdfdejfe
ejdfdefge
ejfeefde
ejfeejfeejfdedfdejdfdejfdejdfe
dƒe
dƒgde
deejeeejeƒfde
dedeejeeejeejeƒfe
ejfeejfeejfd eejfd!ejfdedfdejdfdejfdejdfe
dƒe
dƒg
d"efd#efdejfd$ejfgd%efgd&œZ d'd(„Z!d)S)*rz'
    For Gas (AT&T) assembly code.
    ZGASZgasÚasmz*.sz*.Sz
text/x-gasz
"(\\"|[^"])*"z[\w$.@-]z
(?:[a-zA-Z$_]z*|\.z+)z(?:0[xX][a-fA-F0-9]+|#?-?\d+)ú%z\bÚ
whitespaceú:z\.zdirective-argszlock|rep(n?z)?|data\d+zinstruction-argsz[\r\n]+ú@z#popz([;#]|//).*?\nz/[*].*?[*]/z/[*].*?\n[\w\W]*?[*]/Úpunctuationz([a-z0-9]+)( )(<)(z)(>)z)([-+])(ú$z
$'(.|\\')'z\nz\s+z/[*][\w\W]*?[*]/z[-*,.()\[\]!:{}]+)Úrootzdirective-argszinstruction-argsr&r)cCs,tjd|tjƒrdStjd|tjƒr(dSdS)Nz^\.(text|data|section)Tz^\.\w+gš™™™™™¹?)ÚreÚsearchÚM)Útext©r0ú7/tmp/pip-build-gk9425m9/Pygments/pygments/lexers/asm.pyÚanalyse_textfszGasLexer.analyse_textN)"Ú__name__Ú
__module__Ú__qualname__Ú__doc__ÚnameÚaliasesÚ	filenamesÚ	mimetypesÚstringÚcharÚ
identifierÚnumberÚregisterrr
ÚLabelÚ	AttributeÚFunctionrÚConstantrrÚIntegerÚVariablerrÚSingleÚ	MultilinerÚHexrÚCharÚtokensr2r0r0r0r1rsd






cCspd}ddttjtttƒfdtttjtƒfd|dttjtttj	ttjtƒfd|dttjtttj	tƒfd|d	||d
tttjttjtt
|ƒƒfd|dtttjtt
|ƒƒfd|d	||dtttjttjttƒfd|d	||d
tttjttjƒfdtfd|d|dtttjttjttjttjƒfd|dtttjttjttjƒfdt
fgiS)z;
    Common objdump lexer tokens to wrap an ASM lexer.
    z[0-9A-Za-z]r+z(.*?)(:)( +file format )(.*?)$z"(Disassembly of section )(.*?)(:)$ú(z++)( )(<)(.*?)([-+])(0[xX][A-Za-z0-9]+)(>:)$z+)( )(<)(.*?)(>:)$z( *)(z+:)(\t)((?:z )+)( *	)([a-zA-Z].*?)$z+:)( *\t)([a-zA-Z].*?)$z )+)( *)(.*?)$z )+)$z	\t\.\.\.$z	(\t\t\t)(z +:)( )([^\t]+)(\t)(.*?)([-+])(0xz+)$z+:)( )([^\t]+)(\t)(.*?)$z[^\n]+\n)rr
r@rrrrrHrrBrZPropertyrCr)Z	asm_lexerZhex_rer0r0r1Ú_objdump_lexer_tokensms<






rLc@s.eZdZdZdZdgZdgZdgZee	ƒZ
dS)rz,
    For the output of ``objdump -dr``.
    Úobjdumpz	*.objdumpztext/x-objdumpN)r3r4r5r6r7r8r9r:rLrrJr0r0r0r1r¢scs6eZdZdZdZdgZdgZdgZ‡fdd„Z‡Z	S)rz@
    For the output of ``objdump -Sr`` on compiled D files.
    z	d-objdumpz*.d-objdumpztext/x-d-objdumpcstƒjttf|ŽdS)N)ÚsuperÚ__init__rr)ÚselfÚoptions)Ú	__class__r0r1rO·szDObjdumpLexer.__init__)
r3r4r5r6r7r8r9r:rOÚ
__classcell__r0r0)rRr1r®scs>eZdZdZdZdddgZdddgZdgZ‡fd	d
„Z‡Z	S)rzB
    For the output of ``objdump -Sr`` on compiled C++ files.
    zcpp-objdumpzc++-objdumbzcxx-objdumpz
*.cpp-objdumpz
*.c++-objdumpz
*.cxx-objdumpztext/x-cpp-objdumpcstƒjttf|ŽdS)N)rNrOr	r)rPrQ)rRr0r1rOÄszCppObjdumpLexer.__init__)
r3r4r5r6r7r8r9r:rOrSr0r0)rRr1r»s

cs6eZdZdZdZdgZdgZdgZ‡fdd„Z‡Z	S)rz@
    For the output of ``objdump -Sr`` on compiled C files.
    z	c-objdumpz*.c-objdumpztext/x-c-objdumpcstƒjttf|ŽdS)N)rNrOr
r)rPrQ)rRr0r1rOÑszCObjdumpLexer.__init__)
r3r4r5r6r7r8r9r:rOrSr0r0)rRr1rÈscð@sfeZdZdZdZddgZdgZdgZdZdZ	d	Z
d
e
dZdZd
Z
dZdZdZdZdZdZedƒedƒeefde	dejfeejjfedƒde	ejjfde	ejfeejfdejfeejfeejfdejfdefgde fgde!j"fd e!j#fgd!ee$j%fd"e$fe&d"d5d6e$fee$fee$fd7ed8e
d9e$fd:e$fd;e$fe&d#ƒe$fde$fg
d œZ'd!S($rz=
    For HSAIL assembly code.

    .. versionadded:: 2.2
    ZHSAILZhsailZhsaz*.hsailztext/x-hsailz"[^"]*?"z[a-zA-Z_][\w.]*z[0-9]+z(\$(c|s|d|q)z)\bz(align\(\d+\))z(width\((\d+|all)\))z(alloc\(agent\))z ((_ftz)?(_up|_down|_zero|_near))zò_(u8x4|s8x4|u16x2|s16x2|u8x8|s8x8|u16x4|s16x4|u32x2|s32x2|u8x16|s8x16|u16x8|s16x8|u32x4|s32x4|u64x2|s64x2|f16x2|f16x4|f16x8|f32x2|f32x4|f64x2|u8|s8|u16|s16|u32|s32|u64|s64|b128|b8|b16|b32|b64|b1|f16|f32|f64|roimg|woimg|rwimg|samp|sig32|sig64)z ((\d+\.)|(\d*\.\d+))[eE][+-]?\d+zL0[xX](([0-9a-fA-F]+\.[0-9a-fA-F]*)|([0-9a-fA-F]*\.[0-9a-fA-F]+))[pP][+-]?\d+z?0((h|H)[0-9a-fA-F]{4}|(f|F)[0-9a-fA-F]{8}|(d|D)[0-9a-fA-F]{16})r&Úcommentsr(z:?Úkeywordú&r%z0[xX][a-fA-F0-9]+z\d+z[=<>{}\[\]()*.,:;!]|x\bz(\n|\s)+z	/\*.*?\*/z//.*?\nZkernargz+\$(full|base|small|large|default|zero|near)ÚmoduleÚ	extensionÚpragmaÚprogÚindirectÚ	signatureÚdeclÚkernelÚfunctionÚenablebreakexceptionsÚenabledetectexceptionsÚmaxdynamicgroupsizeÚmaxflatgridsizeÚmaxflatworkgroupsizeÚrequireddimÚrequiredgridsizeÚrequiredworkgroupsizeÚrequirenopartialworkgroupsz\b)Úsuffixz_(ú|ú)Ú_kernargz(nop|imagefence)\bÚcleardetectexceptÚclockÚcuidÚ	debugtrapÚdimÚgetdetectexceptÚgroupbaseptrÚkernargbaseptrÚlaneidÚmaxcuidÚ	maxwaveidÚpacketidÚsetdetectexceptÚwaveidÚworkitemflatabsidÚworkitemflatidÚnullptrÚabsÚbitrevÚcurrentworkgroupsizeÚcurrentworkitemflatidÚfractÚncosÚnegÚnexp2Únlog2ÚnrcpÚnrsqrtÚnsinÚnsqrtÚ
gridgroupsÚgridsizeÚnotÚsqrtÚworkgroupidÚ
workgroupsizeÚ
workitemabsidÚ
workitemidÚceilÚfloorÚrintÚtruncÚaddÚbitmaskÚborrowÚcarryÚcopysignÚdivÚremÚsubÚshlÚshrÚandÚorÚxorÚunpackhiÚunpackloÚmaxÚminÚfmaÚmadÚ
bitextractÚ	bitselectÚshuffleÚcmovÚbitalignÚ	bytealignÚlerpÚnfmaÚmulÚmulhiÚmul24hiÚmul24Úmad24Úmad24hiÚ	bitinsertÚcombineÚexpandÚldaÚmovÚpackÚunpackÚpackcvtÚ	unpackcvtÚsadÚsementpÚftosÚstofÚcmpÚldÚstÚ_eqÚ_neÚ_ltÚ_leÚ_gtÚ_geÚ_equÚ_neuÚ_ltuÚ_leuÚ_gtuÚ_geuÚ_numÚ_nanÚ_seqÚ_sneÚ_sltÚ_sleÚ_sgtÚ_sgeÚ_snumÚ_snanÚ_sequÚ_sneuÚ_sltuÚ_sleuÚ_sgtuÚ_sgeuÚatomicÚ_ldÚ_stÚ_casÚ_addÚ_andÚ_exchÚ_maxÚ_minÚ_orÚ_subÚ_wrapdecÚ_wrapincÚ_xorÚretÚcvtÚ	_readonlyÚ_globalÚbrÚcbrÚsbrÚ_scacqÚ_screlÚ_scarÚ_rlxÚ_waveÚ_wgÚ_agentÚ_systemÚldimageÚstimageÚ_v2Ú_v3Ú_v4Ú_1dÚ_2dÚ_3dÚ_1daÚ_2daÚ_1dbÚ_2ddepthÚ	_2dadepthÚ_widthÚ_heightÚ_depthÚ_arrayÚ
_channelorderÚ_channeltypeÚquerysamplerÚ_coordÚ_filterÚ_addressingÚbarrierÚwavebarrierÚinitfbarÚjoinfbarÚwaitfbarÚ
arrivefbarÚ	leavefbarÚreleasefbarÚldfÚactivelaneidÚactivelanecountÚactivelanemaskÚactivelanepermuteÚcallÚscallÚicallÚallocaÚpacketcompletionsigÚaddqueuewriteindexÚcasqueuewriteindexÚldqueuereadindexÚstqueuereadindexÚreadonlyÚglobalÚprivateÚgroupÚspillÚargÚ_upiÚ_downiÚ_zeroiÚ_neariÚ_upi_satÚ
_downi_satÚ
_zeroi_satÚ
_neari_satÚ_supiÚ_sdowniÚ_szeroiÚ_sneariÚ	_supi_satÚ_sdowni_satÚ_szeroi_satÚ_sneari_satÚ_ppÚ_psÚ_spÚ_ssÚ_sÚ_pÚ_pp_satÚ_ps_satÚ_sp_satÚ_ss_satÚ_s_satÚ_p_satz	i[1-9]\d*)r+r&rTrUN)rWrXrYrZr[r\r]r^r_r`rarbrcrdrerfrgrh)ärmrnrorprqrrrsrtrurvrwrxryrzr{r|r}r~rr€rr‚rƒr„r…r†r‡rˆr‰rŠr‹rŒrrŽrrr‘r’r“r”r•r–r—r˜r™ršr›rœrržrŸr r¡r¢r£r¤r¥r¦r§r¨r©rªr«r¬r­r®r¯r°r±r²r³r´rµr¶r·r¸r¹rºr»r¼r½r¾r¿rÀrÁrÂrÃrÄrÅrÆrÇrÈrÉrÊrËrÌrÍrÎrÏrÐrÑrÒrÓrÔrÕrÖr×rØrÙrÚrÛrÜrÝrÞrßràrárârãrärårærçrèrérêrërìrírîrïrðrñròrórôrlrõrör÷rørùrúrûrürýrþrÿrrrrrrrrrr	r
rrr
rrrrrrrrrrrrrrrrrrr r!r"r#r$r%r&r'r(r)r*r+r,r-r.r/r0r1r2r3r4r5r6r7r8r9r:r;r<r=r>r?r@rArBrCrDrErFrGrHrIrJrKrLrMrNrO)(r3r4r5r6r7r8r9r:r;r=Zregister_numberr?Z	alignQualZ	widthQualZ	allocQualZroundingModZdatatypeModÚfloatZhexfloatZ	ieeefloatrrr
r@rEÚ	AnonymousÚGlobalrrHÚFloatrDrrrrGrFrÚTyperrJr0r0r0r1rÕs®




c‹@seZdZdZdZdZdgZdgZdgZdZ	de	d	Z
d
e
dZedƒed
e
jfedƒde
e
jfde
e
jjfde
jjfde
jjfde
jjfde
e
jfde
jjfde	efdefdefdefgdefdefged³d¤d¥efed´ƒejfd°ejfgd±œZd²S(µrz!
    For LLVM assembly code.
    ZLLVMz"https://llvm.org/docs/LangRef.htmlZllvmz*.llztext/x-llvmz"[^"]*?"z([-a-zA-Z$._][\w\-$.]*|rkrKz|(\d+))r&z\s*:rUr%r(z%\d+z@\d+z#\d+ú!z!\d+zc?z0[xX][a-fA-F0-9]+z,-?\d+(?:[.]\d+)?(?:[eE][-+]?\d+(?:[.]\d+)?)?z[=<>{}\[\]()*.,!]|x\bz	(\n|\s+)+z;.*?\nÚaarch64_sve_vector_pcsÚaarch64_vector_pcsÚacq_relÚacquirer—Ú	addrspaceÚ
addrspacecastÚafnÚaliasÚaliaseeÚalignÚ	alignLog2Ú
alignstackr(Ú	allocsizeÚallOnesÚalwaysinlineÚalwaysInlineÚ	amdgpu_csÚ	amdgpu_esÚ
amdgpu_gfxÚ	amdgpu_gsÚ	amdgpu_hsÚ
amdgpu_kernelÚ	amdgpu_lsÚ	amdgpu_psÚ	amdgpu_vsr¡ÚanyÚanyregccÚ	appendingÚarcpÚ
argmemonlyÚargsÚarm_aapcs_vfpccÚarm_aapcsccÚ
arm_apcsccÚashrr$räÚ	atomicrmwÚ
attributesÚavailable_externallyÚ
avr_intrccÚavr_signalccÚbitÚbitcastÚbitMaskÚblockaddressÚ
blockcountröÚbranchFunnelÚbuiltinÚbyArgÚbyrefÚbyteÚ	byteArrayÚbyvalÚcr%ÚcallbrÚcalleeÚcallerÚcallsÚcanAutoHideÚcatchÚcatchpadÚcatchretÚcatchswitchÚccÚcccÚcfguard_checkccÚcleanupÚ
cleanuppadÚ
cleanupretÚcmpxchgÚcoldÚcoldccÚcomdatÚcommonÚconstantÚcontractÚ
convergentÚcriticalÚcxx_fast_tlsccÚ
datalayoutÚdeclarerÚdefineÚdeplibsÚdereferenceableÚdereferenceable_or_nullÚdistinctÚ	dllexportÚ	dllimportÚ	dso_localÚdso_local_equivalentÚdso_preemptableÚdsoLocalÚeqÚexactÚ
exactmatchÚextern_weakÚexternalÚexternally_initializedÚextractelementÚextractvalueÚfaddÚfalseÚfastÚfastccÚfcmpÚfdivÚfenceÚfilterÚflagsÚfmulÚfnegÚfpextÚfptosiÚfptouiÚfptruncÚfreezeÚfremÚfromÚfsubÚ	funcFlagsr_ÚgcÚ
getelementptrÚghcccr/ÚguidÚgvÚhashÚhhvm_cccÚhhvmccÚhiddenÚhotÚhotnessÚicmpÚifuncÚinaccessiblemem_or_argmemonlyÚinaccessiblememonlyÚinallocaÚinboundsÚindirÚ
indirectbrÚinfoÚinitialexecÚinlineÚ
inlineBitsÚ
inlinehintÚinrangeÚinregÚ
insertelementÚinsertvalueÚinstsÚintel_ocl_biccÚinteldialectÚinternalÚinttoptrÚinvokeÚ	jumptableÚkindÚ
landingpadÚlargestÚlinkageÚlinkonceÚlinkonce_odrÚliveÚloadÚlocal_unnamed_addrÚlocaldynamicÚ	localexecÚlshrr¦Úmetadatar§ÚminsizerWÚ	monotonicÚ
msp430_intrccr²ÚmustprogressÚmusttailÚnakedr7ÚnandÚneÚnestÚninfÚnnanÚnoaliasÚ	nobuiltinÚ
nocallbackÚ	nocaptureÚ
nocf_checkÚnoduplicateÚnoduplicatesÚnofreeÚnoimplicitfloatÚnoinlineÚnoInlineÚnomergeÚnoneÚnonlazybindÚnonnullÚ	noprofileÚ	norecurseÚ	noRecurseÚ	noredzoneÚnoreturnÚnosyncÚnotailÚnotEligibleToImportÚnoundefÚnounwindÚnswÚnszÚnullÚnull_pointer_is_validÚnuwÚoeqÚoffsetÚogeÚogtÚoleÚoltÚoneÚopaqueÚ
optforfuzzingÚoptnoneÚoptsizer¢ÚordÚparamÚparamsÚ	partitionÚpathÚpersonalityÚphiÚpoisonÚpreallocatedÚprefixÚpreserve_allccÚpreserve_mostccr0ÚprologueÚ	protectedÚptrtointÚ
ptx_deviceÚ
ptx_kernelÚreadnoneÚreadNoner.ÚreadOnlyÚreassocÚrefsÚrelbfÚreleaseÚresByArgÚresumeròÚreturnDoesNotAliasÚreturnedÚ
returns_twiceÚ	safestackÚsamesizeÚsanitize_addressÚsanitize_hwaddressÚsanitize_memoryÚsanitize_memtagÚsanitize_threadÚsdivÚsectionÚselectÚseq_cstÚsextÚsgeÚsgtÚshadowcallstackrŸÚ
shufflevectorÚ
sideeffectÚsignextÚsingleÚ
singleImplÚsingleImplNameÚsitofpÚsizeM1ÚsizeM1BitWidthÚsleÚsltÚsource_filenameÚspeculatableÚspeculative_load_hardeningÚ	spir_funcÚspir_kernelÚsremÚsretÚsspÚsspreqÚ	sspstrongÚstoreÚstrictfpržÚ	summariesÚsummaryÚswiftccÚ
swifterrorÚ	swiftselfÚswitchÚ	syncscopeÚtailÚtailccÚtargetÚthread_localÚtoÚtokenÚtripleÚtruer–ÚtypeÚtypeCheckedLoadConstVCallsÚtypeCheckedLoadVCallsÚtypeidÚtypeidCompatibleVTableÚ
typeIdInfoÚtypeTestAssumeConstVCallsÚtypeTestAssumeVCallsÚtypeTestResÚ	typeTestsÚudivÚueqÚugeÚugtÚuitofpÚuleÚultÚumaxÚuminÚundefÚuneÚ
uniformRetValÚuniqueRetValÚunknownÚunnamed_addrÚunoÚ	unorderedÚunreachableÚunsatÚunwindÚuremÚuselistorderÚuselistorder_bbÚuwtableÚva_argÚvarFlagsÚvariableÚvcall_visibilityÚvFuncIdÚvirtFuncÚvirtualConstPropÚvoidÚvolatileÚvscaleÚvTableFuncsÚweakÚweak_odrÚwebkit_jsccÚwin64ccÚwithinÚwpdResÚwpdResolutionsÚ	writeonlyÚxÚ
x86_64_sysvccÚx86_fastcallccÚ
x86_intrccÚx86_mmxÚ
x86_regcallccÚ
x86_stdcallccÚx86_thiscallccÚx86_vectorcallccÚxchgr£ÚzeroextÚzeroinitializerÚzextÚimmargÚ
willreturnz\b)riÚhalfÚbfloatrPÚdoubleÚfp128Úx86_fp80Ú	ppc_fp128ÚlabelÚx86_amxÚptrz	i[1-9]\d*)r+r&rUN(ˆrVrWrXrYr—rZr[r\r]r^r_r`rar(rbrcrdrerfrgrhrirjrkrlrmrnr¡rorprqrrrsrtrurvrwrxr$räryrzr{r|r}r~rr€rr‚rörƒr„r…r†r‡rˆr‰rŠr%r‹rŒrrŽrrr‘r’r“r”r•r–r—r˜r™ršr›rœrržrŸr r¡r¢r£r¤r¥rr¦r§r¨r©rªr«r¬r­r®r¯r°r±r²r³r´rµr¶r·r¸r¹rºr»r¼r½r¾r¿rÀrÁrÂrÃrÄrÅrÆrÇrÈrÉrÊrËrÌr_rÍrÎrÏr/rÐrÑrÒrÓrÔrÕrÖr×rØrÙrÚrÛrÜrÝrÞrßràrárârãrärårærçrèrérêrërìrírîrïrðrñròrórôrõrör÷rørùrúrûr¦rür§rýrWrþrÿr²rrrr7rrrrrrr	r
rrr
rrrrrrrrrrrrrrrrrrr r!r"r#r$r%r&r'r(r)r*r+r,r-r.r/r0r¢r1r2r3r4r5r6r7r8r9r:r;r<r0r=r>r?r@rArBrCr.rDrErFrGrHrIrJròrKrLrMrNrOrPrQrRrSrTrUrVrWrXrYrZr[r\rŸr]r^r_r`rarbrcrdrerfrgrhrirjrkrlrmrnrorprqrrrsržrtrurvrwrxryrzr{r|r}r~rr€rr‚r–rƒr„r…r†r‡rˆr‰rŠr‹rŒrrŽrrr‘r’r“r”r•r–r—r˜r™ršr›rœrržrŸr r¡r¢r£r¤r¥r¦r§r¨r©rªr«r¬r­r®r¯r°r±r²r³r´rµr¶r·r¸r¹rºr»r¼r½r¾r¿rÀrÁr£rÂrÃrÄrÅrÆ)r¬rÇrÈrPrÉrÊrËrÌrÍrür¼rÎr€rÏ)r3r4r5r6r7Úurlr8r9r:r;r=Zblock_labelrr
r@rErRrQrrrrrrrrTrJr0r0r0r1r\sæ




c@seZdZdZdZdZdgZgZgZe	dXdde
fd	ejfd
ejfdejfdefd
efdej
dfedƒdej
jfe	dYdddejfe	dZd%ddejfd&ejfd'efd(ejfd)ejfe	d[ƒe
fd,ee
jeƒd-fd.e
jd/fed0ƒd1eeeƒd2fd3efd4efd5efged0ƒd6ed7fged8ƒd6ed7fgd9eee
ƒd\fd;eeeƒd<fd6ed7fgd=eeej
jƒfd>eeej
ƒfd;eeeƒd<fd6ed7fgd?eee
jƒfd@eee
jƒfded7fd6ed7fgdAefdBefe	d]ƒe
fdNefdOefdPefed0ƒedƒdQefdRefded7fgdSejfgdTejfgdUej
jfgdVœ
ZdWS)^rzT
    For LLVM MIR examples without the YAML wrapper.

    .. versionadded:: 2.6
    z
LLVM-MIR Bodyz%https://llvm.org/docs/MIRLangRef.htmlz
llvm-mir-bodyÚliveinsÚ
successorsr')riz4bb\.[0-9]+(\.[a-zA-Z0-9_.-]+)?( \(address-taken\))?:z5bb\.[0-9]+ \(%[a-zA-Z0-9_.-]+\)( \(address-taken\))?:z%bb\.[0-9]+(\.\w+)?z%stack\.[0-9]+(\.\w+\.addr)?z%subreg\.\w+z%[a-zA-Z0-9_]+ *Úvregr/zintrinsic\(\@[a-zA-Z0-9_.]+\)r±rr[rZrgrfrrr“r’z	intpred\(z\))r:rir&r,r)r(r+r*zfloatpred\(z\$\w+ú=a(G_ANYEXT|G_[SZ]EXT|G_SEXT_INREG|G_TRUNC|G_IMPLICIT_DEF|G_PHI|G_FRAME_INDEX|G_GLOBAL_VALUE|G_INTTOPTR|G_PTRTOINT|G_BITCAST|G_CONSTANT|G_FCONSTANT|G_VASTART|G_VAARG|G_CTLZ|G_CTLZ_ZERO_UNDEF|G_CTTZ|G_CTTZ_ZERO_UNDEF|G_CTPOP|G_BSWAP|G_BITREVERSE|G_ADDRSPACE_CAST|G_BLOCK_ADDR|G_JUMP_TABLE|G_DYN_STACKALLOC|G_ADD|G_SUB|G_MUL|G_[SU]DIV|G_[SU]REM|G_AND|G_OR|G_XOR|G_SHL|G_[LA]SHR|G_[IF]CMP|G_SELECT|G_GEP|G_PTR_MASK|G_SMIN|G_SMAX|G_UMIN|G_UMAX|G_[US]ADDO|G_[US]ADDE|G_[US]SUBO|G_[US]SUBE|G_[US]MULO|G_[US]MULH|G_FNEG|G_FPEXT|G_FPTRUNC|G_FPTO[US]I|G_[US]ITOFP|G_FABS|G_FCOPYSIGN|G_FCANONICALIZE|G_FMINNUM|G_FMAXNUM|G_FMINNUM_IEEE|G_FMAXNUM_IEEE|G_FMINIMUM|G_FMAXIMUM|G_FADD|G_FSUB|G_FMUL|G_FMA|G_FMAD|G_FDIV|G_FREM|G_FPOW|G_FEXP|G_FEXP2|G_FLOG|G_FLOG2|G_FLOG10|G_FCEIL|G_FCOS|G_FSIN|G_FSQRT|G_FFLOOR|G_FRINT|G_FNEARBYINT|G_INTRINSIC_TRUNC|G_INTRINSIC_ROUND|G_LOAD|G_[ZS]EXTLOAD|G_INDEXED_LOAD|G_INDEXED_[ZS]EXTLOAD|G_STORE|G_INDEXED_STORE|G_ATOMIC_CMPXCHG_WITH_SUCCESS|G_ATOMIC_CMPXCHG|G_ATOMICRMW_(XCHG|ADD|SUB|AND|NAND|OR|XOR|MAX|MIN|UMAX|UMIN|FADD|FSUB)|G_FENCE|G_EXTRACT|G_UNMERGE_VALUES|G_INSERT|G_MERGE_VALUES|G_BUILD_VECTOR|G_BUILD_VECTOR_TRUNC|G_CONCAT_VECTORS|G_INTRINSIC|G_INTRINSIC_W_SIDE_EFFECTS|G_BR|G_BRCOND|G_BRINDIRECT|G_BRJT|G_INSERT_VECTOR_ELT|G_EXTRACT_VECTOR_ELT|G_SHUFFLE_VECTOR)\bz6(COPY|PHI|INSERT_SUBREG|EXTRACT_SUBREG|REG_SEQUENCE)\bÚkilledÚimplicitz
(i[0-9]+)( +)Úconstantintz(half|float|double) +Ú
constantfloatÚintegerz(::)( *)Úmmoz;.*z
[a-zA-Z0-9_]+z	[(), \n]+z(?=.)ú#poprPz( *)(:(?!:))Úvreg_bank_or_classz( *)(\()Ú	vreg_typez( *)(_)z( *)([a-zA-Z0-9_]+)z( *)([sp][0-9]+)z( *)(<[0-9]+ *x *[sp][0-9]+>)z\(z +r÷rrÚonÚintorÊr_rþrYrHrXrXz%ir\.[a-zA-Z0-9_.-]+z%ir-block\.[a-zA-Z0-9_.-]+z[-+]ú,z\), \(z-?[0-9]+z-?[0-9]+\.[0-9]+(e[+-][0-9]+)?z\@[a-zA-Z0-9_.]+)
r+r×rØrÓrÜrÝrÚrÙrPr/N)rÑrÒ)
r±rr[rZrgrfrrr“r’)
r&r,r)r(r+r*rrr“r’)rÕrÖ)rÛrÜ)r÷rrrÞrßrÊr_rþrYrHrXrX)r3r4r5r6r7rÐr8r9r:rrr
r@rErrRÚBuiltinrrFrrrTrrrZMagicrrrDrSrJr0r0r0r1rês‚












c@seZdZdZdZdZdgZdgZdefde	dfd	e	d
fde
fgde	d
fdeee
ƒƒfgdefde	d
fde	dfed-dde	dfed.dde	dfed/dde	fd!e	d"fd#e
fd$efg	d%efed
ƒgd&ejfed
ƒgd'efed
ƒgde	d(fd)eeeƒƒfd*eeeƒƒfgd+œZd,S)0ran
    Lexer for the overall LLVM MIR document format.

    MIR is a human readable serialization format that's used to represent LLVM's
    machine specific intermediate representation. It allows LLVM's developers to
    see the state of the compilation process at various points, as well as test
    individual pieces of the compiler.

    .. versionadded:: 2.6
    zLLVM-MIRz%https://llvm.org/docs/MIRLangRef.htmlzllvm-mirz*.mirz#.*z--- \|$Úllvm_irz---Úllvm_mirz[^-#]+|.z(\.\.\.|(?=---))z#popz((?:.|\n)+?)(?=(\.\.\.|---))zname:r7Ú	alignmentr')rir>Ú	legalizedÚregBankSelectedÚtracksRegLivenessÚselectedÚexposesReturnsTwiceÚbooleanÚ	registersÚstackÚ
fixedStackrÑÚ	frameInfoÚmachineFunctionInfoz	body: *\|Ú
llvm_mir_bodyz.+z\nz[^\n]+z *(true|false)z *[0-9]+z#pop:2z((?:.|\n)+?)(?=\.\.\.|---)z(?!\.\.\.|---)((?:.|\n)+))r+rârãr7rêr>rðN)rä)rårærçrèré)rërìrírÑrîrï)r3r4r5r6r7rÐr8r9rrrrrrrrr
rrárrrJr0r0r0r1rvsD

c
@sŽeZdZdZdZdgZdddgZdgZdZd	Z	d
Z
dZdZd
Z
e
de
Zd.ZdZdZdZdZdZejejBZdejdfedƒe	dejfde	eeje e!j"ƒdfee!dfee!j"dfe	ej#dfde fgee$fe
e%j&fee%j'fee%j(fee%j)fe
e%j*fedƒeej+fe	ej,fde dfedƒgd ejfd!ej-dfd"ejdfgd"e fd#e fd$ej-fd%ej-fgd&e.fd'e/fd(e!jfee/j0fee!j1fgd)œZ2d*d+„Z3d,S)/rz)
    For Nasm (Intel) assembly code.
    ZNASMZnasmz*.asmz*.ASMz*.nasmztext/x-nasmgð?z[a-z$._?][\w$.?#@~]*z,(?:0x[0-9a-f]+|$0[0-9a-f]*|[0-9]+[0-9a-f]*h)z[0-7]+qz[01]+bz[0-9]+z\.e?z"(\\"|[^"\n])*"|z'(\\'|[^'\n])*'|z`(\\`|[^`\n])*`z(?:res|d)[bwdqt]|timeszŸ(r[0-9][0-5]?[bwd]?|[a-d][lh]|[er]?[a-d]x|[er]?[sb]p|[er]?[sd]i|[c-gs]s|st[0-7]|mm[0-7]|cr[0-4]|dr[0-367]|tr[3-7]|k[0-7]|[xyz]mm(?:[12][0-9]?|3[01]?|[04-9]))\bzseg|wrt|strict|rel|abszbyte|[dq]?wordz’(?:BITS|USE16|USE32|SECTION|SEGMENT|ABSOLUTE|EXTERN|GLOBAL|ORG|ALIGN|STRUC|ENDSTRUC|COMMON|CPU|GROUP|UPPERCASE|IMPORT|EXPORT|LIBRARY|MODULE)(?=\s)z^\s*%Úpreprocr&r'z(%s)(\s+)(equ)zinstruction-argsz[\r\n]+r)z#popz[^;\n]+z;.*?\nz\nz[ \t]+z;.*z#.*z
[,{}():\[\]]+z[&|^<>+*/%~-]+z[$]+)r+zinstruction-argsrñr&r)cCstjd|tjƒrdSdS)NÚPROCF)r,ÚmatchÚ
IGNORECASE)r/r0r0r1r2szNasmLexer.analyse_textNz "(\\"|[^"\n])*"|'(\\'|[^'\n])*'|z/"(\\"|[^"\n])*"|'(\\'|[^'\n])*'|`(\\`|[^`\n])*`)4r3r4r5r6r7r8r9r:Úpriorityr=ÚhexnÚoctnÚbinnÚdecnÚfloatnr;Údeclkwr?ÚwordoprƒÚ
directivesr,rôÚ	MULTILINErÁrÚPreprocrr
r@rrCrrÚDeclarationrBrrrHÚOctÚBinrSrDrárErFrrÚWordrTrJr2r0r0r0r1rÆsj





c@s.eZdZdZdZdgZdgZdgZee	ƒZ
dS)r zO
    For the output of ``objdump -d -M intel``.

    .. versionadded:: 2.0
    zobjdump-nasmz*.objdump-intelztext/x-nasm-objdumpN)r3r4r5r6r7r8r9r:rLrrJr0r0r0r1r sc@s¨eZdZdZdZdgZdddgZdgZdZd	Z	d
Z
dZdZed
eZ
d0ZdZdZdZdZdZdZejejBZdejdfedƒedejfeedfdeefeej e!ej"ƒdfeej"dfeej#dfde!fgee$fe	e%j&fe
e%j'fee%j(fe
e%j)fee%j*fedƒeej+feej,fdee-e!ej.e!ƒfde!d fedƒgd!ejfd"ej.d fd#ejd fgd$e!fd%ee-e!ƒfd&e!fd'ej.fgd(e/fd)e0fd*ej fee0j1feej2fgd+œZ3d,d-„Z4d.S)1r!z3
    For Tasm (Turbo Assembler) assembly code.
    ZTASMZtasmz*.asmz*.ASMz*.tasmztext/x-tasmz[@a-z$._?][\w$.?#@~]*z,(?:0x[0-9a-f]+|$0[0-9a-f]*|[0-9]+[0-9a-f]*h)z[0-7]+qz[01]+bz[0-9]+z\.e?z"(\\"|[^"\n])*"|z'(\\'|[^'\n])*'|z`(\\`|[^`\n])*`z(?:res|d)[bwdqt]|timeszs(r[0-9][0-5]?[bwd]|[a-d][lh]|[er]?[a-d]x|[er]?[sb]p|[er]?[sd]i|[c-gs]s|st[0-7]|mm[0-7]|cr[0-4]|dr[0-367]|tr[3-7])\bzseg|wrt|strictzbyte|[dq]?wordzÛBITS|USE16|USE32|SECTION|SEGMENT|ABSOLUTE|EXTERN|GLOBAL|ORG|ALIGN|STRUC|ENDSTRUC|ENDS|COMMON|CPU|GROUP|UPPERCASE|INCLUDE|EXPORT|LIBRARY|MODULE|PROC|ENDP|USES|ARG|DATASEG|UDATASEG|END|IDEAL|P386|MODEL|ASSUME|CODESEG|SIZEzdb|dd|dw|T[A-Z][a-z]+z^\s*%rñr&r'zinstruction-argsz
(%s)(\s+)(%s)z[\r\n]+r)z(\\)(\s*)(;.*)([\r\n])z#popz[^;\n]+z;.*?\nz\nz[\n\r]z(\\)([\n\r])z[ \t]+z;.*z[,():\[\]]+z[&|^<>+*=/%~-]+z[$]+)r+zinstruction-argsrñr&r)cCstjd|tjƒrdSdS)NròT)r,róÚI)r/r0r0r1r2zszTasmLexer.analyse_textNz "(\\"|[^"\n])*"|'(\\'|[^'\n])*'|z/"(\\"|[^"\n])*"|'(\\'|[^'\n])*'|`(\\`|[^`\n])*`)5r3r4r5r6r7r8r9r:r=rör÷rørùrúr;rûr?rürƒrýÚdatatyper,rôrþrÁrrÿrr
r@rrrCrrrBrrrHrrrSrDrárErrFrrrrTrJr2r0r0r0r1r!*sn






c@s’eZdZdZdZdgZdgZejZ	dde
jfdefde
jfd	efd
ejfdefdefd
ejfdejfdejfdejfdefde
fg
iZdd„ZdS)r"z@
    For ca65 assembler sources.

    .. versionadded:: 1.6
    zca65 assemblerZca65z*.sr+z;.*z\s+z[a-z_.@$][\w.@$]*:z·((ld|st)[axy]|(in|de)[cxy]|asl|lsr|ro[lr]|adc|sbc|cmp|cp[xy]|cl[cvdi]|se[cdi]|jmp|jsr|bne|beq|bpl|bmi|bvc|bvs|bcc|bcs|p[lh][ap]|rt[is]|brk|nop|ta[xy]|t[xy]a|txs|tsx|and|ora|eor|bit)\bz\.\w+z[-+~*/^&|!<>=]z	"[^"\n]*.z	'[^'\n]*.z\$[0-9a-f]+|[0-9a-f]+h\bz\d+z%[01]+z
[#,.:()=\[\]]z[a-z_.@$][\w.@$]*cCstjd|tjƒrdSdS)Nz^\s*;gÍÌÌÌÌÌì?)r,r-rþ)rPr/r0r0r1r2¡szCa65Lexer.analyse_textN)r3r4r5r6r7r8r9r,rôrÁrrFrr
r@rZPseudorrrIrrHrDrrrJr2r0r0r0r1r"€s*c$@sÊeZdZdZdZdZdgZddgZdgZdd	d
ddd
ddddddddddddddddddd d!d"d#d$d%d&d'd(d)d*d+g$Z	d,d-d.d/d0d1d2d3d4d5d6d7d8d9gZ
d:Zd;ed<ed=Zd>Z
d?Zd@dAje	ƒdBZdCedDZdEZdFdG„ZedHƒdIeejfedIejfeejdJfdKeejdLfdMefgeejfe
ejfeefgeefedNƒgdOefdPedQfedRƒedHƒgdMedQfdSedQfedHƒgdTefdUedVfedRƒedWƒgdTefedNƒeefedWƒgdXefdYefdZefgd[œZd\S)]r#z:
    For DCPU-16 Assembly.

    .. versionadded:: 2.4
    ZDASM16z http://0x10c.com/doc/dcpu-16.txtZdasm16z*.dasm16z*.dasmz
text/x-dasm16ZSETZADDZSUBZMULZMLIZDIVZDVIZMODZMDIÚANDZBORZXORZSHRZASRZSHLZIFBZIFCZIFEZIFNZIFGZIFAZIFLZIFUZADXZSBXZSTIZSTDZJSRÚINTZIAGZIASZRFIZIAQZHWNZHWQZHWIÚAÚBÚCÚXÚYÚZrÚJÚSPÚPCZEXÚPOPZPEEKZPUSHz[a-zA-Z0-9_$@.]z
(?:[a-zA-Z$_]z*|\.z+)z[+-]?(?:0[xX][a-zA-Z0-9]+|\d+)z0b[01_]+z(?i)(rjrkz'\\?ú'z
"(\\"|[^"])*"ccs8|jdƒ}|jƒ|jkrtjntj}|jƒ||fVdS)Nr)r1ÚupperÚ	REGISTERSr
rEr@Ústart)ÚlexerróÚidentÚklassr0r0r1Úguess_identifierÓs
zDasm16Lexer.guess_identifierr&r'zinstruction-argsz\.z	data-argsz[\r\n]+Únumericz\+z\]z#popr3z;.*?$ràz\[Úderefzinstruction-linez\nz\s+z;.*?\n)r+rr3rzinstruction-linezinstruction-argsz	data-argsr&N)r3r4r5r6r7rÐr8r9r:ZINSTRUCTIONSrr<r=r>Z
binary_numberÚjoinZinstructionZsingle_charr;rrr
r@rBrrrDrrrrJr0r0r0r1r#§sx

)*r6r,Zpygments.lexerrrrrrrrZpygments.lexers.c_cppr	r
Zpygments.lexers.drZpygments.tokenrr
rrrrrrrrÚ__all__rrLrrrrrrrrrr r!r"r#r0r0r0r1Ú<module>	s6$0S5



PVV'