
    UHj                   *   d Z ddlmZ ddlZddlZddlZddlmZ ddlm	Z	  ee
      j                         j                  d   Zedz  ZdZd	Zd
ZdZdZdZdZdZdZdZddddZd,dZd-dZd.dZd/dZd0dZd0dZd1dZ d2dZ!d3dZ"d4dZ#d5d Z$d6d!Z%ef	 	 	 	 	 	 	 d7d"Z&	 	 	 	 	 	 d8d#Z'	 	 	 	 d9d$Z(d:d%Z)	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 d;	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 d<d&Z*d=d'Z+d=d(Z,efd>d)Z-d?d*Z.e/d+k(  r e.        yy)@z6Summarize why the current gate base is still unproven.    )annotationsN)Path)Any   outmap1_01amap2_02d
0x005428bc
0x005428a8
0x005428c4
0x005428cci  @ i  zKruntime_selected_pointer_predecessor_direction_sweep_active_order_poll.jsonzSruntime_selected_pointer_predecessor_left_overrun_activation_active_order_poll.jsondprove opcode 0x20 runtime descriptor/base path before 0x005428c4; active order alone is insufficient8prove predecessor 1:0 state persistence into current 2:0Hfind strict map1_01a source hotspot or equivalent non-coordinate trigger)opcode20-runtime-base-pathpredecessor-state-persistencestrict-source-hotspotc                p    | j                         s|S t        j                  | j                  d            S )Nutf-8encoding)existsjsonloads	read_text)pathfallbacks     H/home/exedev/hwanse/tools/summarize_save_selector_gate_base_proof_gap.py	load_jsonr   &   s*    ;;=::dnngn677    c                "    | rt        | d      S d S N   )int)values    r   	parse_hexr&   ,   s    "3ub>,,r    c                B    dj                  d | xs g D              xs dS )N,c              3  2   K   | ]  }t        |        y w)N)str).0r%   s     r   	<genexpr>zlist_text.<locals>.<genexpr>1   s     ;5CJ;s   -)join)valuess    r   	list_textr0   0   s     88;V\r;;BsBr    c                (    t        d | D        i       S )Nc              3  R   K   | ]  }|j                  d       t        k(  s| ! yw)writerVaHexN)getCURRENT_WRITERr+   rows     r   r,   z%current_writer_row.<locals>.<genexpr>5   s!     a8NR`8`as   '')next)current_writer_pathss    r   current_writer_rowr:   4   s    a 4aceffr    c                   g }| j                  d      xs i j                  d      xs g }|D ]  }|j                  d      }|dk(  rJ|j                  |j                  d      |j                  d      |dd|j                  d	      xs d
d       c|dv sh|j                  |j                  d      |j                  d      |dddd        |S )NactivationContextcontextRows	opcodeHex0x20vaHexvalueHexznested descriptor runnerFmeaningz>dispatch/load runtime object or party-member script references)r@   rA   r>   kinddirectBaseSetterrB   >   0x280x400x410x420x43zbase-selector-shaped local rowzQlow-byte shape only in save-selector stream; not proven as general nested handler)r4   append)writerrowscontext_rowsr7   opcodes        r   local_base_affecting_rowsrO   8   s    DJJ239r>>}MSQSL %VKK)GGJ/#2$)779-q1q  ??KK)GGJ/#8$)n ( Kr    c                   i }t        t              }t        t              }| j                  d      xs i j                  d      xs g D ]  }|j                  d      }t        |      }|||||cxk  r|k  sn 3||j                  d      |j                  d      |j                  d      xs d|j                  d      xs d	d
||<    | j                  d      xs g D ]  }|j                  d      }t        |      }|||||cxk  r|k  sn 3|j                  |i       }||j                  d      xs |j                  d      |j                  d      xs |j                  d      |j                  d      xs |j                  d      xs d|j                  d      xs( |j                  d      xs |j                  d      xs d	d
||<    g }t	        |j                         d       D ]O  \  }}t        |      }|t        k(  |d<   |t        k(  |d<   |j                  d      dv |d<   |j                  |       Q |S )Nr<   r=   r@   rA   r>   handlerVaHexr-   rB    )r@   rA   r>   rQ   rB   trace
stopReasonc                &    t        | d         xs dS )Nr   )r&   items    r   <lambda>z"gate_window_rows.<locals>.<lambda>p   s    9TRSWCUCZYZ r    keyisWriterisFirstGate>   r?   rE   rF   rG   rH   rI   isBaseSetterCandidate)	r&   CURRENT_OPCODE20
FIRST_GATEr4   sorteditemsdictr5   rJ   )	rK   
rows_by_vastartendr7   va_hexvapreviousrL   s	            r   gate_window_rowsri   R   s:   "$J&'E
J
C

./52::=IOR 
!v:#+er>PS>P
+-GGN3:swwy)/R

6
 zz'"(b 
!v:#+er>PS>P>>&"-
+Gx||J/G-Jk1JGGN3Zx||N7SZWZwwy)cX\\)-DcP\H]cac

6
 Dj..06Z[ 3i N2J#z1M'*ww{';?o'o#$C Kr    c                @    | sy 	 t        | d      S # t        $ r Y y w xY wr"   )r$   
ValueError)	value_hexs    r   parse_order_indexrm   y   s,    9b!! s    	c                    t        |       }t        |      }||y ||cxk  r|t        z   k  rn y dt        ||z
  z   dS y )N0x08x)r&   
IMAGE_SIZE
IMAGE_BASE)rl   loaded_base_hexr%   loaded_bases       r   static_from_runtime_hexru      sW    i EO,K}+e6kJ66 J%+"56s;<<r    c                r    |si S | j                  d      xs g D ]  }|j                  d      |k(  s|c S  i S )NdescriptorRowsdescriptorVaHexr4   )descriptor_scriptsdescriptor_hexr7   s      r   descriptor_row_for_descriptorr|      sH    	!%%&67=2 77$%7J Ir    c                    | j                  d      xs g D ch c]$  }|j                  d      r|j                  d      & c}S c c}w )NuniqueSelectorContextsselectorry   )r7   contexts     r   row_selectorsr      sH     ww78>B;;z" 	J  s   )Ac                   i }| D ]  }|j                  d      xs i j                         D ]j  \  }}|j                  |i       }|xs g D ]J  }|j                  d      }||j                  |d      t        |j                  d      xs d      z   ||<   L l  t	        |j                               D 	ci c]8  \  }}|t	        |j                         d       D 	cg c]
  \  }}	||	d c}	}: c}	}}}S c c}	}w c c}	}}}w )NuniqueWatchValuesrA   r   countc                     | d    | d   xs dfS )Nr   r   rR    rV   s    r   rX   z-aggregate_poll_watch_values.<locals>.<lambda>   s"    RVWXRYQY[_`a[b[hfhPi r    rY   )rA   r   )r4   ra   
setdefaultr$   r`   )
rL   	aggregater7   namer/   target	value_rowrl   
value_rowsr   s
             r   aggregate_poll_watch_valuesr      s%   +-I ` WW%89?RFFH 	`LD&))$3F#\r `	%MM*5	$$*JJy!$<s9==QXCYC^]^?_$_y!	`	`` !'y'8 9 
 D*	 	$*:+;+;+=Ci$j
 	5 #U3
 	
 
s   8(D
 C;/D
;D
c                r    | j                  |      xs g }t        |      dk7  ry |d   j                  d      S )Nr   r   rA   r4   len)watch_valuesr   rL   s      r   watch_value_hexr      s8    D!'RD
4yA~7;;z""r    c                @	   | xs i } | sd|dS t        | j                  d      xs g       }| j                  d      xs g D cg c]  }|t        |      z  r| }}t        |      t	        d |D              }t        d      }|rt        |d      nd }dD 	cg c]  }	t        |	       }
}	|
d |xs d	 D cg c]  }||	 }}t        d
 |D        d       }t        d      }t        ||      }t        ||      }|j                  d      xs i }t        |xr |j                  d      xs d	d	kD  xs |j                  d      xs d	d	kD  xsf |j                  d      xs d	d	kD  xsL |j                  d      xs d	d	kD  xs2 |j                  d      xs d	d	kD  xs |j                  d      xs d	d	kD        }g d}i ddd|d| j                  d      d| j                  d      xs | j                  d       d| j                  d      d| j                  d      d| j                  d      d|dt        |      d |D cg c]  }|j                  d!       c}d"| j                  d"      xs g d| j                  d      xs g d#| j                  d      d$| j                  d      d%|d&|d|i d'|
D cg c]  }||	 c}d(|d)|d*|d+t        |xr |j                  d,      |k(        d-t        d.      d/t        d0      t        d1      t        d2      fD cg c]  }|| c}d3t        fd4|D              d5|j                  d6      d7|j                  d8      d9|j                  d:      xs g d;|j                  d<      xs g d=|j                  d      d>|j                  d      d?|j                  d@      dA|j                  dB      dC|j                  dD      |j                  dE      |j                  d      |j                  d      |j                  d      |j                  d      |j                  dF      |j                  dG      |j                  dH      |dI	S c c}w c c}	w c c}w c c}w c c}w c c}w )JNF	available
sourcePollobservedPublicSaveSelectorsrL   c              3  @   K   | ]  }|j                  d d        yw)sampleCountr   Nry   r6   s     r   r,   zAbuild_public_predecessor_active_order_evidence.<locals>.<genexpr>   s     HSsww}a0Hs   activeOrderCountr#   )activeOrder0activeOrder1activeOrder2r   c              3  b   K   | ]'  }|j                  d       s|j                  d        ) yw)loadedBaseHexNry   r6   s     r   r,   zAbuild_public_predecessor_active_order_evidence.<locals>.<genexpr>   s%     hswwWfOgCGGO4hs   //activeSlot0Descriptorscript4LastContextA8SetterRowscript4GateWriterCountscript4GateReaderCountscript4FieldRecordCount$script4CurrentFrontierDirectRefCount+script4EncodedTargetPromotingCandidateCount(script4ContextA8NonPointerSetterRowCount)	r   r   r   r   r   runtimeSlotBaseTable0runtimeObjectTable0runtimeObjectTable1runtimeObjectTable2r   Tr   stagedSaveKindnotRouteProofanyReachedCurrentRootanyReachedRouteSelectorContextpromotionStatustotalSampleCountr   totalSequenceCountsequenceCountpublicSequenceNamesr   observedSelectorsreachedCurrentRootreachedRouteSelectorr   activeOrderCountHexorderByteHexesactiveOrderHexesfirstDescriptorRuntimeHexfirstDescriptorHexfirstDescriptorMatchesScriptrx   runtimeSlotBaseTable0Hexr   runtimeObjectTableHexesr   r   r   allPublicWatchedValuesStablec              3  `   K   | ]%  }t        j                  |      xs g       d k(   ' yw)r   N)r   r4   )r+   r   r   s     r   r,   zAbuild_public_predecessor_active_order_evidence.<locals>.<genexpr>  s0      ,
7;C  &,"-2,
s   +.descriptorScript0VaHexscript0VaHexdescriptorScript4VaHexscript4VaHexdescriptorScript0LinkedCnsscript0LinkedCnsdescriptorScript4LinkedCnsscript4LinkedCns!descriptorScript4FieldRecordCount.descriptorScript4CurrentFrontierDirectRefCount,descriptorScript4EncodedTargetClassification"script4EncodedTargetClassification5descriptorScript4EncodedTargetRawScalarCandidateCount+script4EncodedTargetRawScalarCandidateCount?descriptorScript4EncodedTargetRouteProofRawScalarCandidateCount5script4EncodedTargetRouteProofRawScalarCandidateCount7script4EncodedTargetRouteContextRawScalarCandidateCountisPointerDwordshapeClassificationr@   )	AdescriptorScript4EncodedTargetRouteContextRawScalarCandidateCount5descriptorScript4EncodedTargetPromotingCandidateCount descriptorScript4GateWriterCount descriptorScript4GateReaderCount2descriptorScript4ContextA8NonPointerSetterRowCount,descriptorScript4LastContextA8IsPointerDword#descriptorScript4LastContextA8Shape#descriptorScript4LastContextA8VaHexgateBaseProven)setr4   r   r   sumr   r$   r8   ru   r|   boolr   all)active_order_pollrz   source_pollpublic_selectorsr7   public_rowssample_countactive_order_count_hexactive_order_countr   order_byte_hexesr%   active_order_hexesrs   first_descriptor_runtime_hexfirst_descriptor_hexdescriptor_rowlast_context_a8gate_base_provenstable_watch_namesr   s                       @r   .build_public_predecessor_active_order_evidencer      s   
 */R%
 	
 ,001NOUSUV(,,V4:mC00 	K  /{;LHKHHL,\;MN<R3R8X\ E 	d+ 
 ,,D-?-D1EIZ  hhjnoO#2<AX#Y 23OQ`a23EG[\N$(()HIORO 	
 89>Q!C Y""#;<AQFY""#<=BaGY ""#IJOaSTTY ""#PQVUVZ[[	Y
 ""#MNSRSWXX

DTDkD 	+//0@AD 	!!"9: G $$%EF
	D 	,001BCD 	-11-@D 	/33ODD 	|D 	[)D 	;GCGD 	.223FGM2D 	&'8'<'<=Z'['a_aD  	/334KL!D" 	 1 5 56V W#D$ 	%D& 	5'D( 	.)D* 	.>TU%BS5T+D, 	.-D. 	$%A/D0 	21D2 	' b^%7%78I%JNb%b)
3D8 	#OLBY$Z9D: 	".CD.CD.CD $

   $
;DJ 	' ,
?Q,
 )
KDP 	!."4"4^"DQDR 	!."4"4^"DSDT 	%n&8&89K&L&RPRUDV 	%n&8&89K&L&RPRWDX 	,^-?-?@Y-ZYDZ 	9.:L:LMs:t[D\ 	78J8JKo8p]D^ 	@ASAS9B
_Dd 	J>K]K]CL
eDj N\M_M_EN
 BPASAS9B
 -;,>,>?W,X,:,>,>?W,X>L>P>P6?
 9H8K8KL\8]/>/B/BCX/Y/>/B/B7/K*GD DUV  H U$
s0   RR:RRRR

R
/R
c                   | xs i j                  d      xs i }|r|j                  d      durd|j                  d      xs ddS |j                  d      xs g }|r|d	   nd }|j                  d
      xs g }|r|d	   nd }t        ||      }|j                  d      xs i }t        |xr |j                  d      xs d	d	kD  xs |j                  d      xs d	d	kD  xsf |j                  d      xs d	d	kD  xsL |j                  d      xs d	d	kD  xs2 |j                  d      xs d	d	kD  xs |j                  d      xs d	d	kD        }	i ddd|j                  d      d|j                  d      d|j                  d      d|j                  d      d|j                  d      d|j                  d      xs g d|j                  d      d|d|j                  d      xs g dt        |      d|dt        |xr |j                  d      |k(        d|j                  d      d |j                  d!      d"|j                  d#      xs g d$|j                  d%      xs g |j                  d      |j                  d      |j                  d&      |j                  d'      |j                  d(      |j                  d)      |j                  d      |j                  d      |j                  d      |j                  d      |j                  d*      |j                  d+      |j                  d,      |	d-S ).NactiveOrderRuntimeEvidencer   TFr   zKruntime_selected_pointer_patched_public_selector_2_0_active_order_poll.jsonr   r   r   activeSlotFirstDwordsStaticHexr   r   r   r   r   r   r   r   r   notRoutePromotionProofr   r   r   r   r   firstDescriptorIndexr   r   rx   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   )r4   r|   r   rm   )
)runtime_patched_selector_followup_contextrz   active_orderr   first_order_hexfirst_descriptor_hexesr   r   r   r   s
             r   &build_diagnostic_active_order_evidencer   4  s'    >CHHIefljlL<++K8D&**<8 ]\
 	

 &))*<=C/A(+tO)--.NOUSU8N1!4TX23EG[\N$(()HIORO 	
 89>Q!C Y""#;<AQFY""#<=BaGY ""#IJOaSTTY ""#PQVUVZ[[	Y
 ""#MNSRSWXX
,T,l&&|4, 	,**+;<, 	))*BC	,
 	<++,=>, 	|''6, 	\--.ABHb, 	|//0EF, 	., 	,**+;<B, 	 1/ B, 	2, 	' b^%7%78I%JNb%b)
,  	!."4"4^"D!," 	!."4"4^"D#,$ 	%n&8&89K&L&RPR%,& 	%n&8&89K&L&RPR',( .<-?-?@Y-Z:H:L:LMs:t8F8J8JKo8pAOASAS9B
 LZK]K]CL
 N\M_M_EN
 BPASAS9B
 -;,>,>?W,X,:,>,>?W,X>L>P>P6?
 9H8K8KL\8]/>/B/BCX/Y/>/B/B7/K*W, ,r    c                $   | xs i j                  d      xs i }|j                  d      xs i }|j                  d      xs i }|sddiS |j                  d      xs ddkD  xrH |j                  d      xs ddk(  xr. |j                  d      xs ddk(  xr |j                  d      d	k(  }i dd
d|j                  d      d|j                  d      d|j                  d      d|j                  d      d|j                  d      d|j                  d      d|j                  d      xs g d|j                  d      d|j                  d      d|j                  d      d|j                  d      d|j                  d      xs g d|j                  d      d|j                  d      d|j                  d      xs g d|j                  d      |j                  d      |j                  d      |j                  d      ||dS )NleftStabilityRuntimeEvidencerecheckactiveOrderRecheckr   FrouteSelectorHitCountr   routeHitReproducibilityznot-reproducedTr   recheckSourcePollactiveOrderRecheckSourcePollr   r   r   routeHitReproducedByRecheck&routeHitReproducedWithActiveOrderWatchrecheckSampleCountrecheckObservedSelectorsrecheckRouteSelectorHitCountactiveOrderRecheckSampleCount#activeOrderRecheckObservedSelectors'activeOrderRecheckRouteSelectorHitCountactiveOrderCountValuesactiveSlot0DescriptorValuesruntimeSlotBaseTable0Values)(activeOrderRecheckActiveOrderCountValues'activeOrderRecheckSlot0DescriptorValues-activeOrderRecheckRuntimeSlotBaseTable0Values#notReproducedWithActiveOrderRecheckgateBaseStillUnprovenry   )r   left_stabilityr   active_order_rechecknot_reproduceds        r   .build_diagnostic_active_order_recheck_evidencer    s    @E2JJKijpnpN  +1rG)--.BCIrU##			3	4	9Q> 	N[[016Q1<	N!%%&=>C!I	N 89=MM	 Tn((6 	W[[6 	'(<(@(@(N	
 	>--.?@ 	~))-8 	 !3!34K!L 	^//0CDJ 	">#5#56O#P 	&~'9'9:W'X 	1.2D2D43
 	gkk-8 	#GKK0C$D$J  	'4K(L!" 	()=)A)A-)P#$ 	./C/G/GH[/\/b`b%& 	23G3K3KLc3d'( 5I4L4LMe4f3G3K3K)4
 :N9Q9Q):
 0>!/9 r    c                @   | xs i } | sddiS | j                  d      xs i }i ddddd| j                  d      d| j                  d      d	| j                  d	      d
| j                  d
      d| j                  d      d| j                  d      d| j                  d      d| j                  d      d| j                  d      d| j                  d      d| j                  d      d| j                  d      d| j                  d      d| j                  d      d| j                  d      | j                  d      | j                  d      t        | j                  d      xs g       | j                  d      |j                  d      |j                  d      |j                  d      |j                  d      |j                  d      |j                  d      xs g |j                  d      xs g |j                  d       |j                  d      d!S )"Nr   F$diagnosticRuntimeObjectTableEvidenceTsourceArtifact.save_selector_opcode20_context_f2_sources.jsoncontextFieldOffsetHexruntimeObjectTableHexreferenceCountreadReferenceCountwriteReferenceCountruntimeObjectTableReaderCountdirectInitializerCountcopyWriterCountconstantWriteCountobjectBaseCandidateCountcontextF2ObjectSelectorCountfixedStream2ObjectSelectorCountcurrentFrontierSampleCoveredactiveOrderAlonePromotesRoute+fixedContextF2ValueProvenForCurrentFrontier"specificRuntimeObjectPointerProvenruntimeObjectTableStateRequiredremainingProofsr   diagnosticOnlyrouteSampleCountr   r   r   runtimeObjectTableStaticHexesnormalRouteProof)r+  r,  remainingProofCountr   diagnosticAvailabler.  diagnosticRouteSampleCountdiagnosticTotalSampleCountdiagnosticActiveOrderCountHexdiagnosticActiveOrderHexes'diagnosticRuntimeObjectTableStaticHexesdiagnosticNormalRouteProofdiagnosticPromotionStatusr   )context_f2_sources
diagnostics     r    build_context_f2_source_evidencer=    s   +1rU###''(NOUSUJ'T'J' 	 !3!7!78O!P' 	 !3!7!78O!P	'
 	,001AB' 	0445IJ' 	1556KL' 	();)?)?@_)`' 	!"4"8"89Q"R' 	-112CD' 	0445IJ' 	#$6$:$:;U$V' 	'(:(>(>?](^' 	*+=+A+ABc+d' 	'(:(>(>?](^'  	();)?)?@_)`!'" 	67I7M7M98
#'( /A.D.D0/
 ,>+A+A-,
  ##5#9#9:K#L#RPRS-112CD)~~k:$..)9:&0nn5G&H&0nn5G&H)38M)N&0nn5G&H&NB3=>>+4
 4&0nn5G&H%/^^4E%FM' 'r    c                   | | nt        t        dz  g       } ||nt        t        dz  i       }||nt        t        dz  i       }||nt        t        dz  i       }||nt        t        dz  i       }||nt        t        dz  i       }||nt        t        t        z  i       }||nt        t        t        z  i       }||nt        t        dz  i       }|	|	nt        t        dz  i       }	|
|
nt        t        d	z  i       }
||nt        t        d
z  i       }||nt        t        dz  i       }||nt        t        dz  i       }||nt        t        dz  i       }||nt        t        dz  i       }||nt        t        dz  i       }||nt        t        dz  i       }||nt        t        dz  i       }t	        |       }t        |      }t        |      }|D cg c]  }|j                  d      s| }}t        |      dk(  xr |d   j                  d      t        k(  }|D cg c]  }|j                  d      s| }}|D cg c]  }|j                  d      dk(  s| }}|j                  d      xs g D cg c]$  }|j                  d      r|j                  d      & }}|j                  d      du xr* |j                  d      dk(  xr |j                  d      dk(  }|j                  d      dk(  xr* |j                  d       dk(  xr |j                  d!      dk(  }|j                  d"      du xr* |j                  d#      dk(  xr |j                  d$      dk(  }|j                  d%      dk(  xr* |j                  d&      dk(  xr |j                  d'      dk(  }|xr
 |xr |xr | } t        ||      }!t        |      }"t        ||      }#t        ||t              }$t        |      }%|j                  d(      xs i j                  d)      xs g }&t        d* |&D              }'|j                  d+      xs i }(| d,u xr= |!j                  d-      d,u xs( |#j                  d-      d,u xs |$j                  d-      d,u })|j                  d      d,u xsg |j                  d"      d,u xsR |%j                  d.      d,u xs= |!j                  d-      d,u xs( |#j                  d-      d,u xs |$j                  d-      d,u }*|j                  d/      du }+|j                  d0      du },g }-|*s|-j                  d1       |+s|-j                  d2       |,s|-j                  d3       |-D .cg c]  }.t         j                  |.|.       }/}.|- }0d4}1d5g d6d7d8g d9d7d:g d;d7d<g d=d7d>g d?d7d@g dAd7dBt         g dCd7dBt         g dCd7dDg dEd7dFg dGd7dHg dId7dJg dKd7dLg dMd7dNg dOd7dPg dQd7dRg dSd7dTg dUd7dVg dWd7dXg dYd7g}2i dZt"        d[t$        d\t&        d]d^d_d`da|j                  db      dc|ddt        |      de|df|dgt        |      dht        |      dit        |      dj|rt        nd dk|j                  dl      dm|j                  dn      do|j                  dp      i dq|'drt        |&      ds|(j                  dt      du|(j                  dv      dw|j                  d      dx|j                  d      dy|j                  d      dz|j                  d      d{|j                  d       d||j                  d}      d~|j                  d      d|j                  d      d|j                  d      d|j                  d!      d|j                  d      xs i d|j                  d      xs i d|j                  d      xs i i d|j                  d      d|d|j                  d"      d|j                  d#      d|j                  d$      d|j                  d      d|j                  d%      d|j                  d&      d|j                  d      d|j                  d      d|j                  d      d|j                  d      d|j                  d'      d|j                  d      xs i d|j                  d      xs i d|j                  d      xs i d| i d| du d|!d|"d|#d|$d|%d|%j                  d      d|%j                  d      d|%j                  d      d|%j                  d      d|%j                  d      d|%j                  d      d|%j                  d      d|%j                  d      d|%j                  d      d|%j                  d.      d|%j                  d      i d|%j                  d      d|%j                  dë      d|%j                  dū      d|	j                  dƫ      d|	j                  dȫ      xs g d|	j                  dʫ      d|
j                  d˫      d|
j                  dͫ      xs g d|
j                  dʫ      d|j                  dϫ      d|j                  dѫ      xs g d|j                  dʫ      d|j                  dӫ      d|j                  dի      xs g d|j                  dʫ      d|j                  d׫      d|j                  d٫      xs g i d|j                  dʫ      d|j                  d۫      d|j                  dݫ      xs g d|j                  dʫ      d|j                  d߫      d|j                  d      xs g d|j                  dʫ      d|j                  d      d|j                  d      xs g d|j                  dʫ      d|j                  d      d|j                  d      xs g d|j                  dʫ      d|j                  d      d|j                  d      xs g d|j                  dʫ      d|j                  d      i d|j                  d      d|0d|0d|)d|*d|+d|,d|-d|/d|j                  d      d|j                  d      xs g d|j                  d      |j                  d       k(  xr |j                  d       xs ddkD  dg dd|2dt        |2      dŐdd|1S c c}w c c}w c c}w c c}w c c}.w (  N'save_selector_current_writer_paths.json-save_selector_opcode20_nested_base_modes.json.save_selector_opcode20_descriptor_scripts.json0save_selector_opcode20_sample_order_effects.json#save_selector_gate_pass_matrix.json.runtime_patched_selector_followup_context.jsonr  z&save_selector_gate_offset_sources.jsonz'save_selector_gate_offset_patterns.jsonz'save_selector_gate_base_candidates.jsonz%save_selector_gate_sample_values.jsonz)save_selector_selection_buffer_bases.jsonz2save_selector_opcode20_object_base_candidates.jsonz'save_selector_opcode20_order_space.jsonz(save_selector_opcode20_slot_sources.jsonz3save_selector_opcode20_slot_descriptor_writers.jsonz1save_selector_opcode20_runtime_materializers.jsonr]   r   r   r@   rD   r>   r?   1script4ContextA8NonPointerBaseExpressionHistogramr%   script4SpecificGateBaseProvenFr   r   r   r   r    allScriptsSpecificGateBaseProvenallScriptGateWriterCountallScriptGateReaderCountallScriptFieldRecordCount&allScriptCurrentFrontierDirectRefCount-allScriptEncodedTargetPromotingCandidateCountopcode20SignatureSummarysignatureMatchesc              3  D   K   | ]  }|j                  d       sd  yw)foundr   Nry   r6   s     r   r,   z build_summary.<locals>.<genexpr>  s       )37773C)s     nestedRunnerTr   r+  #predecessorPersistenceProofRequiredstrictHotspotProofRequiredr   r   r   aE
  The current gate pass calculation only becomes useful if the gate-time context+0xa8 base is known. The local stream before 0x005428c4 has no direct context+0xa8 base setter; the only base-affecting candidate in the activation window is opcode 0x20 at 0x005428a8, which runs runtime descriptor+4 nested scripts through the general handler table. The opcode 0x20 handler signature scan confirms that this row uses the descriptor+4 nested stream shape, and the nested runner swaps into the general dispatcher rather than executing the save-selector stream inline. Static descriptor scanning finds no descriptor+4 field-map records, no direct or encoded-scalar current-frontier/route refs, and no 0xe8/0xea gate readers or writers. The same gate-offset count is zero across descriptor+0, descriptor+4, and descriptor+8 scripts even though those scripts contain 362 selection-buffer opcode-shaped rows, so the active descriptor order alone cannot prove this route. The patched selector 2:0 diagnostic active order selects descriptor 0x004f867c, but its descriptor+4 script has no field-map/current-frontier/gate rows and its last context+0xa8 setter is a pointer-dword-low-byte-collision, so that diagnostic path is also non-promoting. A public predecessor direction sweep reaches selector 1:0 with active order 0x01/[0x00] and the same descriptor 0x004f867c, but it still does not reach selector 2:0 or the route context and descriptor+4 remains without field/frontier/gate rows. The constructed diagnostic left-route hit is not reproduced by either the selector-only recheck or the active-order recheck, and that active-order recheck stays at count 0, so it does not prove the gate-time base. A public predecessor left-overrun activation sweep also reaches selector 1:0 with the same non-promoting active-order evidence and still misses selector 2:0/current root. Therefore the context+0xf2 source scan is part of this gate-base proof: it sees runtime object-table reads and copies, not a fixed current-route object pointer. The supporting gate-offset, base-candidate, sample-value, selection-buffer-base, object-base, order-space, slot-source, descriptor-writer, and runtime-materializer reports also remain blocked/non-promoting: the gate offsets are inherited reader-only state, public samples do not cover selector 2:0, active order is not proven for the current frontier, and slot/materializer scans still require runtime descriptor/object state. save/runtime pass matrix narrows the hypothesis but cannot promote map1_01a -> map2_02d until the opcode 0x20 runtime descriptor/base path or an equivalent runtime trace is proven.z+out/save_selector_current_writer_paths.json)classificationrootHexr3   r<   rS   )r   fieldsz1out/save_selector_opcode20_nested_base_modes.json)currentModeIsNestedObjectPlus4directContextA8SetterCountrQ  rM  r   z2out/save_selector_opcode20_descriptor_scripts.json)rF  r   r   rG  allScriptSelectionOpcodeCountruntimeActiveOrderRequiredz4out/save_selector_opcode20_sample_order_effects.json)r   r(  +sampleFinalNonPointerContextA8BaseHistogramr   z'out/save_selector_gate_pass_matrix.json)saveRuntimePassMatrix,saveRuntimePredecessorAllGatePassSampleCount*saveRuntimeZeroTableAllGatePassSampleCountruntimeBaseProofRequiredrR  rS  r   z2out/runtime_patched_selector_followup_context.json)r   r   r   zout/)r   rL   r   r   r   z*out/save_selector_gate_offset_sources.json)gateOffsetsHexanyScriptLocalSelectionWriteranyGlobalScriptSelectionWritercontrolPathGateStatuscontrolPathProofStatus
proofFoundgateOffsetSourceProofFoundfailedGateOffsetSourceGateIdsmissingEvidenceevidenceRefsevidenceRefCountr   z+out/save_selector_gate_offset_patterns.json)
offsetstotalReaderCounttotalWriterCountre  gateOffsetPatternProofFoundfailedGateOffsetPatternGateIdsrh  ri  rj  r   z+out/save_selector_gate_base_candidates.json)candidateCountdirectRefCandidateCountpartySlotStatByteCandidateCountruntimePointerModeStillRequiredre  gateBaseCandidateProofFoundfailedGateBaseCandidateGateIdsrh  ri  rj  r   z)out/save_selector_gate_sample_values.json)r   uniqueSelectorCountr(  rs  re  gateSampleValueProofFoundfailedGateSampleValueGateIdsrh  ri  rj  r   z-out/save_selector_selection_buffer_bases.json)	#knownStaticGateOffsetDirectRefCountrs  re  selectionBufferBaseProofFound failedSelectionBufferBaseGateIdsrh  ri  rj  r   z6out/save_selector_opcode20_object_base_candidates.json)rp  r&  fieldMapRowsAfterCandidateCount&currentFrontierRowsAfterCandidateCount$gateSelectionRowsAfterCandidateCount!runtimeObjectPointerProofRequiredre  opcode20ObjectBaseProofFoundfailedOpcode20ObjectBaseGateIdsrh  ri  rj  r   z+out/save_selector_opcode20_order_space.json)descriptorRowCountr(  r)  $runtimeDescriptorObjectStateRequiredre  opcode20OrderSpaceProofFoundfailedOpcode20OrderSpaceGateIdsrh  ri  rj  r   z,out/save_selector_opcode20_slot_sources.json)
runtimeSlotCountRequired%runtimeSlotDescriptorPointersRequiredrd  re  opcode20SlotSourceProofFoundfailedOpcode20SlotSourceGateIdsrh  ri  rj  r   z7out/save_selector_opcode20_slot_descriptor_writers.json)descriptorWriteCountopcode20Mode0ScriptSourcerZ  rd  re  "opcode20DescriptorWriterProofFound%failedOpcode20DescriptorWriterGateIdsrh  ri  rj  r   z5out/save_selector_opcode20_runtime_materializers.json)materializersloadRebuildEvidencecurrentRouteSameLowByteRowCount descriptorScriptMutationRowCount currentFrontierActiveOrderProven"opcode20SelfMutationPathEliminatedrd  re  %opcode20RuntimeMaterializerProofFound(failedOpcode20RuntimeMaterializerGateIdsrh  ri  rj  r   z2out/save_selector_opcode20_context_f2_sources.json)r  r  r   r!  r+  r,  r  r   sourcer   currentWriterVaHexfirstGateVaHexr   secondGateVaHexr   writerStreamStartHexstreamStartHexgateWindowRows"gateWindowBaseSetterCandidateCount#gateWindowOnlyOpcode20BaseCandidate localBaseAffectingRowsBeforeGatelocalBaseAffectingRowCountlocalDirectBaseSetterCountopcode20CandidateCountopcode20CandidateVaHexopcode20CurrentModecurrentMode&opcode20CurrentModeIsNestedObjectPlus4rW  /opcode20DirectContextA8SetterCountInNestedTablerX  "opcode20HandlerSignatureFoundCount"opcode20HandlerSignatureTotalCount(opcode20NestedDispatcherUsesGeneralTabledispatcherUsesGeneralTable&opcode20NestedRunnerSwapsContextStream#runnerTemporarilySwapsContextStream'descriptorScript4SpecificGateBaseProvenr   r   r   r   r   r   r   r   r   r   r   r   r   )descriptorScript4EncodedTargetGroupCountsscript4EncodedTargetGroupCounts)descriptorScript4EncodedTargetLabelCountsscript4EncodedTargetLabelCounts(descriptorScript4EncodedTargetKindCountsscript4EncodedTargetKindCountsr   r   *descriptorScript4NonPointerBaseExpressions)descriptorAllScriptSpecificGateBaseProven"descriptorAllScriptGateWriterCount"descriptorAllScriptGateReaderCount'descriptorAllScriptSelectionOpcodeCountrY  #descriptorAllScriptFieldRecordCount0descriptorAllScriptCurrentFrontierDirectRefCount.descriptorAllScriptEncodedTargetClassification$allScriptEncodedTargetClassification7descriptorAllScriptEncodedTargetRawScalarCandidateCount-allScriptEncodedTargetRawScalarCandidateCountAdescriptorAllScriptEncodedTargetRouteProofRawScalarCandidateCount7allScriptEncodedTargetRouteProofRawScalarCandidateCountCdescriptorAllScriptEncodedTargetRouteContextRawScalarCandidateCount9allScriptEncodedTargetRouteContextRawScalarCandidateCount7descriptorAllScriptEncodedTargetPromotingCandidateCount+descriptorAllScriptEncodedTargetGroupCounts!allScriptEncodedTargetGroupCounts+descriptorAllScriptEncodedTargetLabelCounts!allScriptEncodedTargetLabelCounts*descriptorAllScriptEncodedTargetKindCounts allScriptEncodedTargetKindCounts&activeOrderAloneSufficientForGateProofactiveOrderOnlyProofEliminateddiagnosticActiveOrderEvidence$diagnosticActiveOrderRecheckEvidence$publicPredecessorActiveOrderEvidence/publicPredecessorLeftOverrunActiveOrderEvidenceopcode20ContextF2SourceEvidenceopcode20ContextF2ReferenceCountr  #opcode20ContextF2ReadReferenceCountr  $opcode20ContextF2WriteReferenceCountr   .opcode20ContextF2RuntimeObjectTableReaderCountr!  'opcode20ContextF2DirectInitializerCountr"   opcode20ContextF2CopyWriterCountr#  #opcode20ContextF2ConstantWriteCountr$  $opcode20ContextF2ObjectSelectorCountr&  0opcode20ContextF2FixedStream2ObjectSelectorCountr'  3opcode20ContextF2SpecificRuntimeObjectPointerProven0opcode20ContextF2RuntimeObjectTableStateRequiredr,  +opcode20ContextF2DiagnosticRouteSampleCountr4  *opcode20ContextF2DiagnosticPromotionStatusr:   opcode20ContextF2PromotionStatusr   rf  gateOffsetSourceFailedGateIdsrg   gateOffsetSourceEvidenceRefCountrj  rn  gateOffsetPatternFailedGateIdsro  !gateOffsetPatternEvidenceRefCountrt  gateBaseCandidateFailedGateIdsru  !gateBaseCandidateEvidenceRefCountrw  gateSampleValueFailedGateIdsrx  gateSampleValueEvidenceRefCountrz   selectionBufferBaseFailedGateIdsr{  #selectionBufferBaseEvidenceRefCountr  opcode20ObjectBaseFailedGateIdsr  "opcode20ObjectBaseEvidenceRefCountr  opcode20OrderSpaceFailedGateIdsr  "opcode20OrderSpaceEvidenceRefCountr  opcode20SlotSourceFailedGateIdsr  "opcode20SlotSourceEvidenceRefCountr  %opcode20DescriptorWriterFailedGateIdsr  (opcode20DescriptorWriterEvidenceRefCountr  (opcode20RuntimeMaterializerFailedGateIdsr  +opcode20RuntimeMaterializerEvidenceRefCount5opcode20RuntimeMaterializerSelfMutationPathEliminatedr  ;opcode20RuntimeMaterializerCurrentFrontierActiveOrderProvenr  re  gateBaseProofFoundactiveOrderProofFoundgateTimeBaseProofFound predecessorPersistenceProofFoundstrictHotspotProofFoundfailedGateBaseGateIdsrh  sampleCurrentFrontierCoveredr(  r[  ,gatePassIfSaveRuntimeBaseAndPredecessorStater]  !saveRuntimePredecessorSampleCountr-  )r   r   r   ri  blocked
conclusion)r   OUT$PUBLIC_PREDECESSOR_ACTIVE_ORDER_POLL1PUBLIC_PREDECESSOR_LEFT_OVERRUN_ACTIVE_ORDER_POLLr:   rO   ri   r4   r   r^   r   r  r   r=  r   rJ   "GATE_BASE_MISSING_EVIDENCE_BY_GATESOURCETARGETr5   )3r9   opcode20_nestedrz   sample_order_effectsgate_pass_matrixr   5runtime_predecessor_direction_sweep_active_order_poll2runtime_predecessor_left_overrun_active_order_pollopcode20_context_f2_sourcesgate_offset_sourcesgate_offset_patternsgate_base_candidatesgate_sample_valuesselection_buffer_basesopcode20_object_base_candidatesopcode20_order_spaceopcode20_slot_sources opcode20_slot_descriptor_writersopcode20_runtime_materializersrK   
local_rowslocal_gate_window_rowsr7   gate_window_base_candidates(gate_window_only_opcode20_base_candidatedirect_local_settersopcode20_rows$descriptor_script4_non_pointer_basesdescriptor_script4_gate_quietdescriptor_script4_route_quiet descriptor_all_script_gate_quiet!descriptor_all_script_route_quietactive_order_alone_sufficientdiagnostic_active_orderdiagnostic_active_order_recheckpublic_predecessor_active_order,public_predecessor_left_overrun_active_ordercontext_f2_source_evidenceopcode20_signature_matchesopcode20_signature_found_countnested_runneractive_order_proof_foundgate_time_base_proof_found#predecessor_persistence_proof_foundstrict_hotspot_proof_foundfailed_gate_base_gate_idsgate_idmissing_evidenceproof_foundr   evidence_refss3                                                      r   build_summaryr4    s   * 4H3S/Yb77
Z *9)Do)==
KO 0B/M+S\>>
T 4H3S/Yb@@
Z ,<+G'Y33
N 5@ 	2sMMrR . AL 	>sAA2F : >I 	;sNNPRS 7 '2 	$sMMrR   * 	sEErJ   + 	sFFK   + 	sFFK  ) 	sDDbI  "- 	sHH"M  +6 	(sQQSUV $  + 	sFFK  !, 	sGGL  ,7 	)sRRTVW % *5 	'sPPRTU #
   45F*62J-f52H"m3CGGTkLl3"m"m'(A- 	L'*..w7;KK - ,6UCAS9TCUU$.QS#''+2F&2PSQMQ &))*]^dbd,777 	,( , 	>?5H 	B""#;<A	B""#;<A " 	89Q> 	W""#IJaO	W""#PQUVV # 	ABeK 	D""#=>!C	D""#=>!C % 	:;q@ 	Y""#KLPQQ	Y""#RSWXX & 	& 	.*	.,	. .	%! E1 'U1'# 'U='# 4b:940
 "BB]!^"1"5"56P"Q"WUW!\!\" "	  &) )/) &" $''7=2M%- 	
#''(89TA Z.223CDLZ;??@PQUYY  	>?4G 	V!!"DEM	V%))*NOSWW	V #&&'78D@	V +../?@DH		V
 8;;<LMQUU  	BCuL ( "2!5!56R!SW\!\ "%!(()EF.!(()HI%!(()@A 1 	+..w@  0/K	 > B		
 H		
 I
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&';'?'?@]'^ctd 	)*>*B*BCc*d*jhjetf 	,-A-E-EFX-Ygth 	&';'?'?@]'^itj 	)*>*B*BCc*d*jhjktl 	,-A-E-EFX-Ymtn 	$%7%;%;<W%Xotp 	'(:(>(>?](^(dbdqtr 	*+=+A+ABT+Ustt 	()?)C)CDc)dutv 	+,B,F,FGi,j,pnpwtx 	./E/I/IJ\/]ytz 	'(G(K(KLj(k{t| 	*+//0QRXVXtB 	-.M.Q.QRd.eCtD 	'(<(@(@A_(`EtF 	*+?+C+CDe+f+ljlGtH 	-.B.F.FGY.ZItJ 	'(=(A(AB`(aKtL 	*+@+D+DEf+g+mkmMtN 	-.C.G.GHZ.[OtP 	-.N.R.R0/
QtV 	0,001XY_]_Yt\ 	34T4X4XYk4l]t^ 	01O1S1S32
_td 	3*../YZ`^`gtj 	67U7Y7YZl7mktl 	@A_AcAc0B
mtr 	FGeGiGi.H
stx 	kytz 	k{t| 	 !9}t~ 	!"<t@ 	+,OAtB 	"#=CtD 	 !:EtF 	+GtH 	'(<(@(@A_(`ItJ 	67K7O7OP}7~  8E  CEKtL 	7  !OP##$GHI U!%%&IJOaSTTStV 	 
Wt` 	atb 	C.ctd 	9etf 	jgt ty #n
 VQ,ds0   #t,:t,/t1t1t6*t6)t;1u c                   | j                  d      xs i }| j                  d      xs i }| j                  d      xs i }| j                  d      xs i }| j                  d      xs i }g ddd| d	    d
| d    d| d    dd| d    d| d    dd| d    dd| d    d| d    d| d    d| d    d| d    dd| d     d!| d"    d#| d$    d%| d&    d'| d(    d)| d*    d+| d,    d+| d-    d.| d/    d+| d0    d1| d2    d3| d4    d5| d6    d+| d7    d8| d9    d+| d:    d;| d<    d=| d>    d+| d?    d@| dA    d+| dB    dC| dD    dE| dF    dG| dH    dI| dJ    d+| dK    dL| dM    d+| dN    dO| dP    d+| dQ    d+| dR    dS| dT    dU	dV| dW    dX| dY    dZ| d[    d+| d\    d]| d^    d_| d`    d+| da    db| dc    d+| dd    d+| de    dS| df    dU	dg| dh    di|j                  dj       dk|j                  dl       ddm|j                  dj      r|j                  dn       ndo dp|j                  dq       dr|j                  ds       dt|j                  dj      r|j                  du       ndo dv|j                  dw       d+|j                  dx       d+|j                  dy       dz|j                  d{       dd||j                  d}       d~|j                  dj       d|j                  dl       dd|j                  dj      r|j                  dn       ndo d|j                  dq       d|j                  dj       d|j                  dl       dd|j                  dj      r|j                  dn       ndo d|j                  dq       d| d    d| d    d| d    d| d    dt        | j                  d             ddt        | j                  d      xs g        d| d    d| d    d| d    d| ds    dd| d   ddd| j                  d      xs g D cg c]  }d| 	 c}ddddd}| j                  d      xs g D ]A  }|j                  d|j                  d       dt        |j                  d             d       C |j	                  g d       | d   D ]8  }	|j                  d|	d    d|	d    d|	d    d|	d    d|	d    d|	d    d       : | d   s|j                  d       |j	                  g d       | d   D ]H  }	|j                  d|	d    d|	d    d|	d    d|	d    d|	d    d|	d    d|	d    d|	d   xs d d       J | d   s|j                  d       |j	                  g dddddd| dM    d| dN    d| dP    d#| dQ    d#| dR    d| dJ    d| dK    d| dW    ddj                  | d         xs d d| dh    dddddddj                  g d|j                  dë      xs d d|j                  dī       d+|j                  dū       d+|j                  dƫ       d|j                  dǫ       d|j                  dȫ       d+|j                  dɫ       d+|j                  dʫ       d|j                  d˫       d|j                  d̫       d|j                  dͫ       d|j                  dΫ       d|j                  dϫ       d|j                  dЫ       d#|j                  dѫ       dґ|j                  dӫ      xs d d#dj                  |j                  dի      xs g       xs d d֑|j                  d׫       d|j                  ds       d      ddؑddّdڑd| d`    d| da    d| dc    d#| dd    d#| de    d| d^    d| d[    d| d\    d| dY    dddۑddܑdݑdj                  g d|j                  dl      xs d d|j                  dޫ      xs d d|j                  dn       d|j                  d߫      xs d d#dj                  |j                  d      xs g       xs d d|j                  d      xs d d|j                  d       d|j                  dM       d+|j                  dN       d|j                  dP       d+|j                  dQ       d+|j                  dR       d|j                  dJ       d+|j                  dK       d|j                  dW       d|j                  d      xs d d|j                  dq       d      dddddd|j                  dl      xs d d|j                  dw       d|j                  d      xs d d|j                  dx       ddj                  |j                  d      xs g       xs d d|j                  d      xs d d|j                  dy       ddj                  |j                  d      xs g       xs d d|j                  d{      xs d d|j                  d      xs d d|j                  dj      r|j                  du       ndo d|j                  d}       dddddddj                  g d|j                  dl      xs d d|j                  dޫ      xs d d|j                  dn       d|j                  d       d#|j                  d       d|j                  d߫      xs d d#dj                  |j                  d      xs g       xs d d|j                  d      xs d d#|j                  d      xs d d|j                  d      xs d ddj                  |j                  d      xs g       xs d d|j                  d       d|j                  dM       d+|j                  dN       d|j                  dP       d+|j                  dQ       d+|j                  dR       d|j                  dJ       d+|j                  dK       d|j                  dW       d|j                  d      xs d d|j                  dq       d      ddddddj                  g d|j                  dl      xs d d|j                  dޫ      xs d d|j                  dn       d|j                  d       d#|j                  d       d|j                  d߫      xs d d#dj                  |j                  d      xs g       xs d d|j                  d      xs d d#|j                  d      xs d d|j                  d      xs d ddj                  |j                  d      xs g       xs d d|j                  d       d|j                  dM       d+|j                  dN       d|j                  dP       d+|j                  dQ       d+|j                  dR       d|j                  dJ       d+|j                  dK       d|j                  dW       d|j                  d      xs d d|j                  dq       d      ddddd       | d   D ]   }	|j                  d|	d    d|	d    d       " |j	                  g d       |j	                  d | d   D               |j                  d       d j                  |      S c c}w (  Nr  r  r  r  r  z## Save Selector Gate Base Proof GaprR   z	- route: r  z -> r   z- current writer: `r  `z
- gates: `r  z`, `r  z- writer stream start: `r  z&- gate window base-setter candidates: r  z/- gate window only opcode 0x20 base candidate: r  z)- local base-affecting rows before gate: r  z)- local direct base setters before gate: r  z- opcode 0x20 candidate: `r  z- opcode 0x20 mode: r  z(- opcode 0x20 handler signatures found: r  /r  z4- opcode 0x20 nested dispatcher uses general table: r  z2- opcode 0x20 nested runner swaps context stream: r  z,- opcode 0x20 context+0xf2 refs/read/write: r   / r  r  zF- opcode 0x20 context+0xf2 object selectors/fixed stream+2 selectors: r  r  z:- opcode 0x20 context+0xf2 runtime object pointer proven: r  z@- opcode 0x20 context+0xf2 runtime object-table state required: r  z*- gate offset source/pattern proof found: rf  rn  z*- gate base candidate/sample proof found: rt  rw  z%- selection-buffer base proof found: rz  z(- opcode 0x20 object/order proof found: r  r  z2- opcode 0x20 slot/descriptor-writer proof found: r  r  z0- opcode 0x20 runtime materializer proof found: r  z-- opcode 0x20 self-mutation path eliminated: r  z*- descriptor+4 specific gate base proven: r  z%- descriptor+4 gate writers/readers: r   r   z0- descriptor+4 field-map/current-frontier refs: r   r   z-- descriptor+4 encoded route-target scalars: r   r   r   z (r   )z1- descriptor+4 non-pointer context+0xa8 setters: r   z3- all descriptor-script specific gate base proven: r  z.- all descriptor-script gate writers/readers: r  r  z=- all descriptor-script selection-buffer opcode-shaped rows: r  z9- all descriptor-script field-map/current-frontier refs: r  r  z6- all descriptor-script encoded route-target scalars: r  r  r  r  z0- active order alone sufficient for gate proof: r  z%- diagnostic active order available: r   z#- diagnostic active order source: `r   z'- diagnostic active order route proof: r   Fz,- diagnostic active order gate base proven: r   z+- diagnostic active-order recheck status: `r   z`; reproduced=r  z.- diagnostic active-order recheck route hits: r   r  r  z*- diagnostic active-order recheck count: `r  z<- diagnostic active-order recheck gate base still unproven: r  z-- public predecessor active order available: z+- public predecessor active order source: `z/- public predecessor active order route proof: z4- public predecessor active order gate base proven: z:- public predecessor left-overrun active order available: z8- public predecessor left-overrun active order source: `z<- public predecessor left-overrun active order route proof: zA- public predecessor left-overrun active order gate base proven: z- proof found: re  z- gate base proof found: r  z- active order proof found: r  z- gate-time base proof found: r  z- failed gate-base gates: `r  z- missing evidence count: rh  z#- sample current frontier covered: r  z8- gate pass if save/runtime base and predecessor state: r  z- evidence refs: rj  z- promotion status: `r   z## Missing Evidence- z## Evidence Refsz| path | fields |z| --- | --- |ri  z| `r   z` | `rV  z` |)rR   z## Local Base-Affecting RowsrR   z8| va | value | opcode | kind | direct setter | meaning |z%| --- | --- | --- | --- | --- | --- |r  r@   rA   r>   z` | rC   z | rD   rB   z |z| - | - | - | - | - | - |)rR   z## Gate Window TracerR   zR| va | value | opcode | handler | base candidate | writer | first gate | meaning |z1| --- | --- | --- | --- | --- | --- | --- | --- |r  rQ   r]   r[   r\   r-   z!| - | - | - | - | - | - | - | - |z$## Descriptor+4 Static Gate Evidencez| field-map records | current frontier refs | encoded raw/proof/promoting | gate writers | gate readers | non-pointer context+0xa8 setters | non-pointer bases | active order alone sufficient |z7| ---: | ---: | ---: | ---: | ---: | ---: | --- | --- |z| z | `, r  z+## Opcode 0x20 Context+0xf2 Source Evidencez| artifact | refs/read/write | object readers | init/copy/constant writes | object selectors | fixed stream+2 selectors | current sample covered | pointer proven | runtime table required | diagnostic object table | status |zH| --- | ---: | ---: | ---: | ---: | ---: | --- | --- | --- | --- | --- |r  r  r  r   r!  r"  r#  r$  r&  r'  r(  r+  r,  r4  r5  z `r6  r(   r7  z` r:  z+## Descriptor All-Slot Static Gate Evidencez| field-map records | current frontier refs | encoded raw/proof/promoting | selection opcodes | gate writers | gate readers | specific gate base proven |z1| ---: | ---: | ---: | ---: | ---: | ---: | --- |z(## Diagnostic Active-Order Gate Evidencea  | source poll | staged save | not route proof | active order | first descriptor | matches descriptor script | field/frontier refs | encoded raw/proof/promoting | gate writers/readers | non-pointer context+0xa8 setters | last context+0xa8 shape | gate base proven |zM| --- | --- | --- | --- | --- | --- | ---: | ---: | ---: | ---: | --- | --- |r   r   r   r   r   r   z"## Diagnostic Active-Order Recheckz| stability poll | route hits | selector recheck | active-order recheck | active-order count | slot0 descriptor | reproduced | gate base still unproven |z2| --- | ---: | --- | --- | --- | --- | --- | --- |r  z hits / r  r  r
  r  z0## Public Predecessor Active-Order Gate Evidencea@  | source poll | staged save | not route proof | samples | active order | first descriptor runtime/static | runtime slot base table0 | runtime object table | stable | field/frontier refs | encoded raw/proof/promoting | gate writers/readers | non-pointer context+0xa8 setters | last context+0xa8 shape | gate base proven |z`| --- | --- | --- | ---: | --- | --- | --- | --- | --- | ---: | ---: | ---: | ---: | --- | --- |r   r   r   r   r   r   z=## Public Predecessor Left-Overrun Active-Order Gate Evidencez1## Sample Non-Pointer Context+0xa8 Base Histogramz"| base expression | sample count |z| --- | ---: |r[  r%   r   )rR   z## Remaining ProofsrR   c              3  &   K   | ]	  }d |   yw)r:  Nr   r+   rW   s     r   r,   zmarkdown.<locals>.<genexpr>  s     D2dVDs   r-  
)r4   r0   r   rJ   extendr.   )
summaryr<  diagnostic_recheckpublic_predecessorpublic_predecessor_leftcontext_f2_sourcerW   linesrefr7   s
             r   markdownrG    s   <=CJ %KLRPR %KLRPR%kk*[\b`b$EFL"b-b
b GH%&d78+<*=>b g&:;<A>	b
 W-./tG<M4N3OqQb #7+A#B"C1Eb 19]1^0_`b :'Bg:h9ijb 4G<X4Y3Z[b 4G<X4Y3Z[b %W-E%F$GqIb w'<=>?b 37;_3`2aabcj  lP  dQ  cR  	Sb ?wGq?r>stb =WEm=n<opb  745
6c89
:#9:
;	=!b( Q9:
;3EF
G	I)b. EHI
J	L/b2 KEF
G	I3b6 5/0
1W=Z5[4\	^7b: 501
2#g>Y6Z5[	];b> 08W0X/YZ?b@ 312
33w?]7^6_	aAbD =12
33w?c7d6e	gEbH ;:;
<	>IbL 8JK
L	NMbP 5W=f5g4hiQbR 08Z0[/\\_`g  iK  aL  `M  	NSbT ;7Cf;g:hhkls  ue  mf  lg  	hUbV 8JK
LCTU
VVYJK
L MBCDA		GWb` <GDx<y;z{abb >gFq>r=stcbd 9Ae9f8ggjkr  tX  lY  kZ  	[ebf HPyHzG{|gbh DGLqDrCssvw~  @r  xs  wt  	uibj ALM
NcVW
XX[LM
N ODEFa		Ikbt ;7Ck;l:mnubv 0
{0K/LMwbx .jnn\.J-K1Mybz 2YcYgYghsYtjnn_6U2Uz  2A  	B{b| 7z~~FV7W6XY}b~ 66H6L6LM^6_5``n  uG  uK  uK  LW  uX  tF  tJ  tJ  Kp  tq  pq  ^c  od  	eb@ 99K9O9OPg9h8iilm  nD  nD  Ec  nd  me  eh  i{  i  i  @i  ij  hk  	lAbB 55G5K5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	= #&&'^_
`	= ad	= #&&'hi
j	= kn	=  #&&'^_
`!	=  ad!	=" #&&'IJ
K#	=" LO#	=$ #&&'IJ
K%	=$ LO%	=& #&&'[\
]'	=& ^a'	=( #&&'LMTQT
U)	=( VY)	=* #&&'78
9+	=* :<+	=uU` 	aUb 	<cUd 	eUf 	-gUh 	iU Ul DE ?s3w<.S\N"=>?	LL01	LLD1B)CDD	LL99UG 
Hs   3c                #   | j                  d      xs i }| j                  d      xs i }| j                  d      xs i }| j                  d      xs i }| j                  d      xs i }g }| d   D ]  }|j                  dt        j                  |d          d	t        j                  |d
          d	t        j                  |d          dt        j                  |d          d|d    dt        j                  |d          d        |s|j                  d       g }| d   D ]  }|j                  dt        j                  |d   xs d       d	t        j                  |d
   xs d       d	t        j                  |d   xs d       d	t        j                  |d   xs d       d|d    d|d    d|d    dt        j                  |d   xs d       d        |s|j                  d       | d   D cg c]$  }dt        j                  |d          d|d    d& }	}| j                  d      xs g D 
cg c]\  }
dt        j                  |
j                  d      xs d       d	t        j                  t	        |
j                  d                   d ^ }}
|s|j                  d!       d"j                  | d#         xs d}d$j                  d% | d&   D              }d$j                  d' | j                  d(      xs g D              }|j                  d)      xs d d*d+j                  |j                  d,      xs g       xs d }|j                  d)      xs d d*d+j                  |j                  d,      xs g       xs d }|j                  d)      xs d d*d+j                  |j                  d,      xs g       xs d }d-j                  g d.d/d0d1d2d3d4d5d6d7d8d9d:d;d<d=d>d?d@dAd$j                  g dBt        j                  | dC          dDt        j                  | dE          dFt        j                  | dG          dHt        j                  | dI   xs d       dJ| dK    d*| dL    dM| dN    dO| dP    dQ| dR    d*| dS    d*| dT    dU| dV    dW| dX    dY| dZ    d[| d\    d]| d^    d*| d_    d*| d`    da| db    d*| dc    dd| de    df| dg    d*| dh    d*| di    dj| dk    dl|j                  dm       dn|j                  do       d*|j                  dp       d*|j                  dq       drt        j                  t        |j                  ds                   dt|j                  du       dv|j                  dm       dw|j                  dm       dx| dy    dz| d{    d|| d}    d~| d    dt        j                  t	        | j                  d                   dt        | j                  d(      xs g        d| j                  d       d| d    dt        j                  | d          d      dt        j                  | d          ddd| ddd|ddd|dddd|ddddd| d    d| d    d| d^    d*| d_    d*| d`    d| d    d| d    d| d    dt        j                  |       d| d    dddddd$j                  g dt        j                  |j                  d      xs d       d|j                  d       d|j                  d       d|j                  d       d|j                  d       d|j                  d       d|j                  d       d|j                  d       d|j                  d       d|j                  d       d|j                  d       d|j                  d       d|j                  d       d|j                  d       d*|j                  d       dt        j                  |j                  d      xs d       d*t        j                  d+j                  |j                  d      xs g       xs d       d|j                  d       d|j                  d       d      ddddd| d    d| d    d| dg    d*| dh    d*| di    d| de    d| db    d| dc    d| dk    dddddÑd$j                  g dt        j                  |j                  dī      xs d       dt        j                  |j                  dū      xs d       d|j                  dƫ       dt        j                  |       d	t        j                  |j                  dǫ      xs d       d|j                  dȫ       d|j                  d       d|j                  d       d|j                  d^       d|j                  d_       d|j                  d`       d|j                  d       d|j                  d       d|j                  d       dt        j                  |j                  dɫ      xs d       d|j                  dm       d      ddʑdˑd̑dt        j                  |j                  dī      xs d       d|j                  do       dt        j                  |j                  dͫ      xs d       d|j                  dp       dt        j                  d+j                  |j                  dϫ      xs g       xs d       d	t        j                  |j                  dЫ      xs d       d|j                  dq       dt        j                  d+j                  |j                  dѫ      xs g       xs d       d	t        j                  |j                  ds      xs d       d	t        j                  |j                  dҫ      xs d       d|j                  dӫ      r|j                  dԫ       nd՛ d|j                  du       ddd֑dבdؑd$j                  g dt        j                  |j                  dī      xs d       dt        j                  |j                  dū      xs d       d|j                  dƫ       d|j                  d٫       d*|j                  dګ       dt        j                  |       d	t        j                  |j                  d۫      xs d       dt        j                  |j                  dǫ      xs d       d	t        j                  |j                  dܫ      xs d       d	t        j                  d+j                  |j                  dݫ      xs g       xs d       d|j                  dޫ       d|j                  d       d|j                  d       d|j                  d^       d|j                  d_       d|j                  d`       d|j                  d       d|j                  d       d|j                  d       dt        j                  |j                  dɫ      xs d       d|j                  dm       d      ddߑddؑd$j                  g dt        j                  |j                  dī      xs d       dt        j                  |j                  dū      xs d       d|j                  dƫ       d|j                  d٫       d*|j                  dګ       dt        j                  |       d	t        j                  |j                  d۫      xs d       dt        j                  |j                  dǫ      xs d       d	t        j                  |j                  dܫ      xs d       d	t        j                  d+j                  |j                  dݫ      xs g       xs d       d|j                  dޫ       d|j                  d       d|j                  d       d|j                  d^       d|j                  d_       d|j                  d`       d|j                  d       d|j                  d       d|j                  d       dt        j                  |j                  dɫ      xs d       d|j                  dm       d      ddd|	ddd| dddd$      S c c}w c c}
w )Nr  r  r  r  r  r  z<tr><td><code>r@   z</code></td><td><code>rA   r>   z</code></td><td>rC   z	</td><td>rD   rB   z
</td></tr>zE<tr><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td></tr>r  r-   rQ   r]   r[   r\   zY<tr><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td><td>-</td></tr>r[  r%   r   ri  r   rV  z</code></td></tr>z8<tr><td colspan="2">No evidence refs recorded.</td></tr>r;  r  rR   c              3  N   K   | ]  }d t        j                  |       d  ywz<li>z</li>Nhtmlescaper=  s     r   r,   zhtml_page.<locals>.<genexpr>  s#     \tDKK-.e4\   #%r-  c              3  N   K   | ]  }d t        j                  |       d  ywrJ  rK  r=  s     r   r,   zhtml_page.<locals>.<genexpr>  s(      ,0$t{{4 !'rN  rh  r   r7  r(   r   r>  z<!doctype html>z<html lang="en">z<head>z  <meta charset="utf-8">zF  <meta name="viewport" content="width=device-width, initial-scale=1">z2  <title>Save Selector Gate Base Proof Gap</title>z	  <style>zg    :root { color-scheme: dark; font-family: system-ui, sans-serif; background: #101010; color: #eee; }z&    body { margin: 0; padding: 24px; }z,    h1 { margin: 0 0 8px; font-size: 24px; }z/    h2 { margin: 24px 0 8px; font-size: 18px; }z<    p { max-width: 1120px; color: #bbb; line-height: 1.45; }z[    table { width: 100%; border-collapse: collapse; margin: 12px 0 20px; font-size: 13px; }zi    th, td { border-bottom: 1px solid #303030; padding: 7px 8px; text-align: left; vertical-align: top; }zF    th { position: sticky; top: 0; background: #181818; color: #ddd; }z    code { color: #d7f0ff; }z
  </style>z</head>z<body>z,  <h1>Save Selector Gate Base Proof Gap</h1>z  <p>route r  z -&gt; r   z; current writer <code>r  z%</code>; opcode 0x20 candidate <code>r  z</code>; handler signatures r  r  z'; nested dispatcher uses general table r  z%; nested runner swaps context stream r  z; context+0xf2 refs/read/write r  r  r  z ; context+0xf2 object selectors r  z&; context+0xf2 runtime table required r  z(; local direct base setters before gate r  z); descriptor+4 specific gate base proven r  z,; descriptor+4 encoded route-target scalars r   r   r   z-; all descriptor-script gate writers/readers r  r  z<; all descriptor-script selection-buffer opcode-shaped rows r  z5; all descriptor-script encoded route-target scalars r  r  r  z2; all descriptor-script specific gate base proven r  z+; diagnostic active order gate base proven r   z-; diagnostic active-order recheck route hits r   r  r  z(; diagnostic active-order recheck count r  z;; diagnostic active-order recheck gate base still unproven r  z3; public predecessor active order gate base proven z@; public predecessor left-overrun active order gate base proven z; proof found re  z; gate base proof found r  z; active order proof found r  z; gate-time base proof found r  z; failed gate-base gates <code>r  z </code>; missing evidence count z; evidence refs rj  z7; gate pass if save/runtime base and predecessor state r  z; promotion status <code>r   z</code>.</p>z  <p>r   z</p>z  <h2>Missing Evidence</h2>z  <ul>z</ul>z  <h2>Evidence Refs</h2>zD  <table><thead><tr><th>path</th><th>fields</th></tr></thead><tbody>z  </tbody></table>z$  <h2>Local Base-Affecting Rows</h2>z  <table><thead><tr><th>va</th><th>value</th><th>opcode</th><th>kind</th><th>direct setter</th><th>meaning</th></tr></thead><tbody>z  <h2>Gate Window Trace</h2>z  <p>The gate window trace shows that between opcode 0x20 and the first 0xe8 gate, the gate window only opcode 0x20 base candidate flag is true.</p>z  <table><thead><tr><th>va</th><th>value</th><th>opcode</th><th>handler</th><th>base candidate</th><th>writer</th><th>first gate</th><th>meaning</th></tr></thead><tbody>z,  <h2>Descriptor+4 Static Gate Evidence</h2>z  <p>descriptor+4 field-map/current-frontier refs and gate offset rows are kept separate from active order alone sufficient for gate proof.</p>a    <table><thead><tr><th>field-map records</th><th>current frontier refs</th><th>encoded raw/proof/promoting</th><th>gate writers</th><th>gate readers</th><th>non-pointer context+0xa8 setters</th><th>non-pointer bases</th><th>active order alone sufficient</th></tr></thead><tbody>z    <tr><td>r   r   r   r   r   z</td><td><code>r  z3  <h2>Opcode 0x20 Context+0xf2 Source Evidence</h2>z  <p>The context+0xf2 source scan is kept inside this gate-base proof so the non-pointer context+0xa8 rows cannot be read as fixed route bases.</p>aH    <table><thead><tr><th>artifact</th><th>refs/read/write</th><th>object readers</th><th>init/copy/constant writes</th><th>object selectors</th><th>fixed stream+2 selectors</th><th>current sample covered</th><th>pointer proven</th><th>runtime table required</th><th>diagnostic object table</th><th>status</th></tr></thead><tbody>z    <tr><td><code>r  r  r8  r  r   r!  r"  r#  r$  r&  r'  r(  r+  r,  r4  r5  z <code>r6  r7  z</code> r:  z3  <h2>Descriptor All-Slot Static Gate Evidence</h2>z  <p>descriptor+0, descriptor+4, and descriptor+8 are scanned together to rule out a gate-offset row hiding in another descriptor script slot.</p>z  <table><thead><tr><th>field-map records</th><th>current frontier refs</th><th>encoded raw/proof/promoting</th><th>selection opcodes</th><th>gate writers</th><th>gate readers</th><th>specific gate base proven</th></tr></thead><tbody>r  r  z0  <h2>Diagnostic Active-Order Gate Evidence</h2>z  <p>The diagnostic active order came from a patched public-base save load, so it is diagnostic active order evidence and not route proof.</p>al    <table><thead><tr><th>source poll</th><th>staged save</th><th>not route proof</th><th>active order</th><th>first descriptor</th><th>matches script</th><th>field/frontier refs</th><th>encoded raw/proof/promoting</th><th>gate writers/readers</th><th>non-pointer context+0xa8 setters</th><th>last context+0xa8 shape</th><th>gate base proven</th></tr></thead><tbody>r   r   r   r   r   r   z*  <h2>Diagnostic Active-Order Recheck</h2>zq  <p>The selector-only and active-order rechecks are kept separate from the first constructed left-route hit.</p>z  <table><thead><tr><th>stability poll</th><th>route hits</th><th>selector recheck</th><th>active-order recheck</th><th>active-order count</th><th>slot0 descriptor</th><th>reproduced</th><th>gate base still unproven</th></tr></thead><tbody>r  z hits / <code>r  r  r
  r  r   r  Fz8  <h2>Public Predecessor Active-Order Gate Evidence</h2>z  <p>The public predecessor active order came from the real public savedat direction sweep. It reaches selector 1:0 but not selector 2:0 or the route context.</p>a    <table><thead><tr><th>source poll</th><th>staged save</th><th>not route proof</th><th>samples</th><th>active order</th><th>first descriptor runtime/static</th><th>runtime slot base table0</th><th>runtime object table</th><th>stable</th><th>field/frontier refs</th><th>encoded raw/proof/promoting</th><th>gate writers/readers</th><th>non-pointer context+0xa8 setters</th><th>last context+0xa8 shape</th><th>gate base proven</th></tr></thead><tbody>r   r   r   r   r   r   zE  <h2>Public Predecessor Left-Overrun Active-Order Gate Evidence</h2>z  <p>The left-overrun activation sweep is a second public predecessor calibration run. It reaches selector 1:0 but not selector 2:0 or the current root.</p>z9  <h2>Sample Non-Pointer Context+0xa8 Base Histogram</h2>zU  <table><thead><tr><th>base expression</th><th>sample count</th></tr></thead><tbody>z  <h2>Remaining Proofs</h2>z</body>z</html>)r4   rJ   rL  rM  r0   r.   r*   r   )r@  r<  rA  rB  rC  rD  r  r7   	gate_rowssample_rowsrF  evidence_ref_rowsdescriptor_basesproofsmissing_itemsdiagnostic_orderpublic_predecessor_orderpublic_predecessor_left_orders                     r   	html_pagerY    s2   <=CJ %KLRPR %KLRPR%kk*[\b`b$EFL"J9: 

S\23 4S_56 7S%567 8;;s6{+, -)*+ ,;;s9~./ 0		


 abI'( 
S\%8S9: ;S_%;<= >S%5%<=> ?S%8%?C@A B./0 1z?# $}%& ';;s9~456 7		

 tu HI S\233CCL>Q[\K  ;;~.4"
 		[[!7C89 :[[3778+<!=>? @	    ![\yy)U!VW^[^WW\IZA[\\FGG 4;KK@Q4R4XVX M >>/07C
888JNN#56<"=D
E	G 
 !!"78?C
@88&**+=>D"EL
M	O 
 #&&'<=D
EQ88+//0BCIrJQc
R	T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	G	 "%%&IJK	 LO	 !!"RS
T	U	 "%%&]^_	 `c	 !!"cd
e	 fi	 !!"YZ
[	\	  "%%&HIJ!	  KN!	" !!"DE
F#	"G#	$ "%%&Z[\%	$]%	& {{-112WX_\_`a'	&b'	( "%%&678)	(9)	gmR 	SmT 	PUmV 	gWmX 	LYmZ	 	 	 	[[!8!<!<\!J!QcRS	T	{{2667GHOCPQ	R	 '**?;<	=	 '**=9:		 ;<		 =T<W<WXj<k;l		m		
 [[!>?@	
A	 [[!8!<!<=X!Y!`]`ab	 cf	 ;;.223GHOCP
Q	R	 [[!8!<!<=W!X!_\_`a	b	 [[*A*E*EF_*`*fdf!g!nknop	q	 '**+IJK	L	 '**+NOP	 QT	 #&&'WX
Y	Z	 '**+bcd	 eh	 #&&'hi
j	 kn	 #&&'^_
`	a	  '**+MNO!	  PS!	" #&&'IJ
K#	"L#	$ '**+_`a%	$b%	& {{2667\]dadef'	&g'	( '**+;<=)	(>)	[mF 	GmH 	DImJ 	`KmL 
MmN 	OmP 	&QmR SmT 	UmV 	WmX 	Ym m m=s   9)AG;A!AGc                    |j                  dd       |dz  j                  t        j                  | dd      dz   d	       |d
z  j                  t	        |       d	       y )NT)parentsexist_okz&save_selector_gate_base_proof_gap.jsonF   )ensure_asciiindentr>  r   r   &save_selector_gate_base_proof_gap.html)mkdir
write_textr   dumpsrY  )r@  out_dirs     r   write_outputsre    se    MM$M.77CC

7q9D@ D  77CCIgDVahCir    c                    t        j                  t              } | j                  dt        t
        dz         | j                  dt        t
        dz         | j                  dt        t
        dz         | j                  d	t        t
        d
z         | j                  dt        t
        dz         | j                  dt        t
        dz         | j                  dt        t
        t        z         | j                  dt        t
        t        z         | j                  dt        t
        dz         | j                  dt        t
               | j                         }t        t        |j                  g       t        |j                  i       t        |j                  i       t        |j                  i       t        |j                  i       t        |j                   i       t        |j"                  i       t        |j$                  i       t        |j&                  i       	      }t)        ||j*                         t-        d|j*                  dz          y )N)descriptionz--current-writer-pathsr?  )typedefaultz--opcode20-nestedr@  z--descriptor-scriptsrA  z--sample-order-effectsrB  z--gate-pass-matrixrC  z+--runtime-patched-selector-followup-contextrD  z'--runtime-predecessor-active-order-pollz4--runtime-predecessor-left-overrun-active-order-pollz--opcode20-context-f2-sourcesr  z	--out-dirz+wrote save selector gate base proof gap -> r`  )argparseArgumentParser__doc__add_argumentr   r  r  r  
parse_argsr4  r   r9   r  rz   r  r	  r   %runtime_predecessor_active_order_pollr  r  re  rd  print)parserargsr@  s      r   mainrs    s   $$9F
0tSKtEtu
+$Fu@uv
.T3IyCyz
0tSK}E}~
,4GlAlm
5FF  
 1::  
 >GG  
 'FF  
 $<D$++R0$&&+$))2.$++R0$'',$@@"E$<<bA$II2N$22B7
G '4<<(	7Go8o7p
qrr    __main__)r   r   r   r   returnr   )r%   
str | Noneru  
int | None)r/   zlist[Any] | Noneru  r*   )r9   
list[dict]ru  rb   )rK   rb   ru  rx  )rl   rv  ru  rw  )rl   rv  rs   rv  ru  rv  )rz   rb   r{   rv  ru  rb   )r7   rb   ru  zset[str])rL   rx  ru  dict[str, list[dict[str, Any]]])r   ry  r   r*   ru  rv  )r   dict | Nonerz   rb   r   r*   ru  rb   )r   rz  rz   rb   ru  rb   )r   rz  ru  rb   )r;  rz  ru  rb   )NNNNNNNNNNNNNNNNNNN)(r9   zlist[dict] | Noner  rz  rz   rz  r  rz  r	  rz  r   rz  r
  rz  r  rz  r  rz  r  rz  r  rz  r  rz  r  rz  r  rz  r  rz  r  rz  r  rz  r  rz  r  rz  ru  rb   )r@  rb   ru  r*   )r@  rb   rd  r   ru  None)ru  r{  )0rl  
__future__r   rj  rL  r   pathlibr   typingr   __file__resolver[  ROOTr  r  r  r5   r^   r_   SECOND_GATErr   rq   r  r  r  r   r&   r0   r:   rO   ri   rm   ru   r|   r   r   r   r   r   r  r=  r4  rG  rY  re  rs  __name__r   r    r   <module>r     s   < "      H~''*
Ul		 


't $Y 2
	- &`R	& "8-Cg4$N&# <z"zz z 
	zzH/:HH 
HV+/:+	+\,` /3#'&*(,$(=AIMFJ/3'+(,(,&**.37(,)-4826'b
+b
 b
 $b
 &	b

 "b
 0;b
 <Gb
 9Db
 "-b
 %b
 &b
 &b
 $b
 (b
 &1b
  &!b
" '#b
$ '2%b
& %0'b
( 
)b
JeP	od	 25 j)sX zF r    