+
    Biڭ             "       3   ^ RI t ^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RI	t	^ RI
t
^ RIt^ RIt^ RIHtHtHtHtHtHtHt ^ RIHt ]P.                  R,          tR t]! 4       P4                  P6                  t ! R R4      tR]P<                  P>                  P@                  ]P<                  P>                  P@                  ^,           3,          t!R	t"R
]PF                  P>                  P@                  ]PF                  P>                  P@                  ^,           3,          t$R]PJ                  P>                  P@                  ]PJ                  P>                  P@                  ^,           3,          t&R]P<                  PN                  : R]!: R]PF                  PN                  : R]$: R]PJ                  PN                  : R]&: R2t(R t)R])P>                  P@                  ])P>                  P@                  ^,           ])P>                  P@                  ^,           3,          t*R])P>                  P@                  ])P>                  P@                  ^,           ])P>                  P@                  ^,           3,          t+Rt,Rt-R t.R].P>                  P@                  ].P>                  P@                  ^,           ].P>                  P@                  ^,           ].P>                  P@                  ^,           ].P>                  P@                  ^,           ].P>                  P@                  ^,           3,          t/. 3R lt0R]0P>                  P@                  ]0P>                  P@                  ^,           ]1]0P>                  P@                  ^,           ]0P>                  P@                  ^,           ]0P>                  P@                  ^,           3,          t2R t3]3P>                  Pi                  RR7      ]3n        Rt5]6! ]P.                  R,          ^]P.                  R,          ^]P.                  R,          ^]P.                  R,          ^)]P.                  R ,          ^ .
4      t7R!t8]6! ]Pr                  ^]Pr                  ^]Pr                  ^]P.                  R",          ^.4      t:R#t;R$ t<R% t=R&]=P>                  P@                  ]=P>                  P@                  ^,           3,          t>R't?R(t@R)tAR*tBR+tCR,tDR-tER.tFR/tGR0tHR1tIR2tJR3tKR4tLR5tMR6tNR7]P@                  ]P@                  ^,           ]P@                  ^,           ]P@                  ^,           ]P@                  ^,           ]P@                  ^,           ]P@                  ^,           ]P@                  ^,           3,          tOR8 tPR9]PP>                  P@                  ]PP>                  P@                  ^,           3,          tQR: tRR;]RP>                  P@                  ]RP>                  P@                  ^,           ]RP>                  P@                  ^,           ]RP>                  P@                  ^,           ]RP>                  P@                  ^,           ]RP>                  P@                  ^,           ]RP>                  P@                  ^,           3,          tSR< tTR=]TP>                  P@                  ]TP>                  P@                  ^,           ]TP>                  P@                  ^,           ]TP>                  P@                  ^,           ]TP>                  P@                  ^,           ]TP>                  P@                  ^,           ]TP>                  P@                  ^,           3,          tUR> tVR? tWR@]VP>                  P@                  ]VP>                  P@                  ^,           ]VP>                  P@                  ^,           ]VP>                  P@                  ^,           ]VP>                  P@                  ^,           3,          tXRA]WP>                  P@                  ]WP>                  P@                  ^,           ]WP>                  P@                  ^,           ]WP>                  P@                  ^,           ]WP>                  P@                  ^,           3,          tYRB tZRC t[RD t\RE t]RF]]P>                  P@                  ]]P>                  P@                  ^,           ]1]]P>                  P@                  ^,           ]]P>                  P@                  ^,           3,          t^RG]^]1]]P>                  P@                  ^,           ]]P>                  P@                  ^,           ]]P>                  P@                  ^,           ]1]]P>                  P@                  ^,           3,          t_RH]_]1]]P>                  P@                  ^,           ]]P>                  P@                  ^,           3,          t`ERRI ltaRJ]aP>                  P@                  ]aP>                  P@                  ^,           ]aP>                  P@                  ^,           3,          tbRK tcRL]cP>                  P@                  ]cP>                  P@                  ^,           ]cP>                  P@                  ^,           ]cP>                  P@                  ^,           3,          tdRM teRN]eP>                  P@                  ]eP>                  P@                  ^,           3,          tf ! RO RP]P                  4      th ! RQ RR]h4      ti ! RS RT]i4      tj]P                  P                  f   RUtmMRVtmRW]m RX2tn]oERRZ. /R[ ll4       tpR\tq]pP                  P>                  P                  ^ ,          ttR]tuR^tvR_twR`txRa tyRbtz ! Rc Rd]P                  4      t{ERRe lt|Rf t}^t~]|P>                  P@                  ^,
          t]|P>                  P                  ^,          t]P@                  ],
          t]P                  ^,          t]P@                  ],
          t^tRg tRh t]EP                  EP                  t]! Ri^ RjRj^ ^ RYRRk7      ]! Ri^RlRl^^RmRRk7      ]! Rn^ ^ Ro^^RY^Rk7      ]! R^ERRp^^RY^Rk7      ]! Rq^ RjRj^^Rm^Rk7      ]! Rq^RlRl^
^
Rm^Rk7      ]! Rr^^Ro^^Rm^Rk7      ]! R^]]! ]4      ^^Rm^Rk7      ]! RsRRRo^^Rm^Rk7      ]! Rt^^Ru^^Rm^Rk7      ]! Rt^^Rv^^Rm^Rk7      ]! Rw^RxRx^^Rm^Rk7      ]! Ry^RzR{^^RY^. EROR|7	      ]! R}^ RjRj^"^"Rm^Rk7      ]! R}^RlRl^$^$Rm^Rk7      ]! R^RoR~^&^&Rm^Rk7      ]! R^^Ro^(^(Rm^Rk7      ]! R^ ^ Ro^*^*Rm^Rk7      ]! R^ ^ Ro^,^,Rm^Rk7      ]! R^RR^.^.Rm^Rk7      ]! R^^Ro^0^0Rm^ERER.R|7	      ]! RRRRo^8^8Rm^Rk7      ]! Rq^RxRx^:^:RY^Rk7      ]! R RRRo^<^<Rm^Rk7      .t]! R^^Ro^ ^ RYRRk7      ]! Ri^ RR^^RmRRk7      ]! Ri^RR^^RmRRk7      ]! Rn^ ^ Ro^^RY^Rk7      ]! R^ER R^^RY^Rk7      ]! Rq^RjRj^
^
Rm^Rk7      ]! Rq^RlRl^^Rm^Rk7      ]! Rq^ RR^^Rm^Rk7      ]! Rq^RR^^Rm^Rk7      ]! Rr^^Ro^^Rm^Rk7      ]! R^]]! ]4      ^^Rm^Rk7      ]! RsRRRo^^Rm^Rk7      ]! Rt^^Ru^^Rm^Rk7      ]! Rt^^Rv^^Rm^Rk7      ]! Rw^RR^^Rm^Rk7      ]! Ry^RzR{^^RY^. EROR|7	      ]! R}^RjRj^(^(Rm^Rk7      ]! R}^RlRl^*^*Rm^Rk7      ]! R}^ RR^,^,Rm^Rk7      ]! R}^RR^.^.Rm^Rk7      ]! R^^Ro^0^0Rm^ERER.R|7	      ]! RRRRo^8^8Rm^Rk7      ]! Rq^RR^:^:RY^Rk7      ]! R RRRo^<^<Rm^Rk7      .t]! R^^Ro^ ^ RYRRk7      ]! Rn^ ^ Ro^^RY^Rk7      ]! Ry^RzR{^^RY^. EROR|7	      ]! R}^RjRj^^Rm^Rk7      ]! R}^RlRl^^Rm^Rk7      ]! R}^RR^^Rm^Rk7      ]! R}^RR^^Rm^Rk7      ]! R^ER!R^^Rm^Rk7      ]! R^^Ro^^Rm^ERER.R|7	      ]! RRRRo^ ^ Rm^Rk7      ]! R^ RR^"^"Rm^Rk7      ]! R RRRo^$^$Rm^Rk7      .t. ]! Rn^ ^ Ro^ ^ RY^Rk7      N]! Ry^RR^^RY^. EROR|7	      N]! R^
^
Ro^^Rm^Rk7      N]! R^^Ro^^Rm^ERER.R|7	      N]! RRRRo^^Rm^Rk7      N]! R^ ^\R^^Rm^^ER.R7
      N]! Rw^ RR^^Rm^Rk7      N]! Ry^RzR{^^RY^. EROR|7	      N]! Rq^ RR^(^(Rm^Rk7      N]! R^^Ro^*^*Rm^ERER.R|7	      N]! RRRRo^2^2Rm^Rk7      N]! Rq^ RR^4^4RY^Rk7      N]! R^^Ro^6^6Rm^Rk7      N]! R^RR^8^8Rm^ER.R|7	      N]! R^^FR^<^<Rm^ER.R|7	      N]! RRRRo^@^@Rm^Rk7      N]! R^^R^B^BRY^ER.R|7	      N]! Rq^ RR^F^FRY^^R7	      N]! R^^Ro^H^HRm^Rk7      N]! R^RR^J^JRm^ER.R|7	      N]! R^^XR^N^NRm^ER.R|7	      N]! RRRRo^R^RRm^Rk7      N]! R^ ^R^T^TRm^ER.R|7	      N]! RRRRo^X^XRY^^R7	      N]! R"^^vR^Z^ZRm^Rk7      N]! RRRRo^\^\RY^^R7	      N]! RRRRo^^^^Rm^Rk7      N]! Ry^RzR{^`^`RY^
. EROR|7	      N]! R^RR^j^jRm^
Rk7      N]! R^^Ro^l^lRm^
ERER.R|7	      N]! RRRRo^t^tRm^
Rk7      N]! R^ RR^v^vRY^^R7	      N]! RRRRo^x^xRm^ERER".R|7	      N]! R^(^R^^Rm^ER.R|7	      N]! RRRRo^^Rm^Rk7      N]! Ry^RzR{^^RY^. EROR|7	      N]! Rq^ RR^^Rm^Rk7      N]! R^^Ro^^Rm^ERER.R|7	      N]! RRRRo^^Rm^Rk7      N]! Rq^ RR^^RY^Rk7      N]! R^^Ro^^Rm^Rk7      N]! R^^R^^Rm^ERER#.R|7	      N]! Rw^ RR^^Rm^Rk7      N]! Rq^ RR^^RY^Rk7      N]! R^^Ro^^Rm^Rk7      N]! R^RR^^Rm^ER.R|7	      N]! R^^R^^Rm^ER.R|7	      N]! RRRRo^^Rm^Rk7      N]! R^%^vR^^RY^ER.R|7	      N]! Rq^ RR^^RY^^R7	      N]! R^^Ro^^Rm^Rk7      N]! R^RR^^Rm^ER.R|7	      N]! R^^R^^Rm^ER.R|7	      N]! RRRRo^^Rm^Rk7      N]! R^.^vR^^Rm^ER.R|7	      N]! R"^^R^^RY^^R7	      N]! Ry^RzR{^^RY^^. EROR7
      N]! R^RR^^Rm^Rk7      N]! R^^Ro^^Rm^ERER.R|7	      N]! RRRRo^^Rm^Rk7      N]! RRRRo^^RY^^	R7	      N]! R^^Ro^^RY^Rk7      N]! R^ ^ Ro^^Rm^Rk7      N]! R^^R^^Rm^ERER#.R|7	      N]! RRRRo^^Rm^Rk7      N]! Rq^ RR^^RY^Rk7      N]! R^^RoRRRm^Rk7      N]! R^^RRRRm^Rk7      N]! R^^RoRRRm^Rk7      N]! R^^RoRRRm^Rk7      N]! R^ ^ RRRRm^Rk7      N]! R^ ^ RoRRRm^ERER.R|7	      N]! Rw^RRRRRm^Rk7      N]! Ry^RzR{RRRY^. EROR|7	      N]! R^RRRRRm^Rk7      N]! R^^RoRRRm^ERER.R|7	      N]! RRRRoRRRm^Rk7      N]! R^RRRRRY^Rk7      N]! R^RRRRRm^Rk7      N]! R^RRRRRm^Rk7      N]! R^^RoRRRm^ERER.R|7	      N]! RRRRoRRRm^Rk7      N]! Ry^RzR{RRRY^^
. EROR7
      N]! R^RRRRRm^Rk7      N]! R^^RoRRRm^ERER.R|7	      N]! RRRRoRRRm^Rk7      N]! R^RRRRRm^Rk7      N]! R RRRoRRRm^Rk7      N]! RRRRoRRRY^Rk7      N]! RRRRoRRRm^Rk7      N]! RRRRoRRRm^ERER".R|7	      N]! R^RRRRRm^ER.R|7	      N]! RRRRoRRRm^Rk7      N]! R^^RoRRRm^Rk7      N]! RRRRoRRRm^^R7	      N]! RRRRoRRRm^Rk7      N]! RRRRoRRRm^Rk7      N]! RRRRoRRRm^Rk7      N]! RRRRoRRRm^Rk7      N]! R^RRRRRm^Rk7      N]! R^^RoRRRYRRk7      N]! RRRRoRRRmRRk7      N]! R^^RoRRRmRRk7      N]! RRRRoRRRmRRk7      N]! Ry^RRRRRY^. EROR|7	      N]! RRRRoRRRm^Rk7      N]! R^RRRRRm^ER.R|7	      N]! RRRRoRRRm^Rk7      N]! RRRRoRRRm^Rk7      N]! Ry^RzR{RRRY^. EROR|7	      N]! R^RRRRRm^Rk7      N]! R^^RoRRRm^ERER.R|7	      N]! RRRRoRRRm^Rk7      N]! RRRRoRRRm^Rk7      N]! R^8RRRRRm^Rk7      N]! R^ ^ RoRRRY^^R7	      N]! R^^RoRRRYRRk7      N]! RRRRoRRRmRRk7      N]! R^^RoRRRmRRk7      N]! RRRRoRRRmRRk7      N]! Ry^RzR{RRRY^. EROR|7	      N]! R^RRRRRm^Rk7      N]! R^^RoER ER Rm^ERER.R|7	      N]! RRRRoERERRm^Rk7      N]! R^ ^ RoERERRm^Rk7      N]! R^^RoERERRYRRk7      N]! RRRRoERERRmRRk7      N]! R^^RoERERRmRRk7      NtER t]! Rn^ ^ Ro^ ^ RY]P>                  P@                  Rk7      ]! R^ RR^^Rm]P>                  P@                  Rk7      ]! R RRRo^^Rm]P>                  P@                  Rk7      .t ! ER ER]4      t ! ER	 ER
]4      t ! ER ER]]h4      t ! ER ER]4      t ! ER ER]P                  4      t ! ER ER]h4      t ! ER ER]4      tER$ER lt ! ER ER]P                  4      t]'ER8X  d   ]EP4                  ! 4        R# R# (%      N)captured_stdoutrequires_debug_rangesrequires_specializationcpython_only	os_helperimport_helper
reset_code)BytecodeTestCaseCACHEc                  Z    R  p V ! 4       pVP                   '       d   VP                   pK   V# )c                  d     ^^ ,           X#   \          d   p T P                  p Rp ? T# Rp ? ii ; i   N)	Exception__traceback__)etbs     $/usr/lib/python3.14/test/test_dis.py_errorget_tb.<locals>._error   s5    	!E 	  	!B		!s   	 /*/)tb_next)r   r   s     r   get_tbr      s'     
B
***ZZI    c                   F   a  ] tR t^'t o R t]R 4       t]R 4       tRt	V t
R# )_Cc                    V^8H  V n         R# r   x)selfr   s   &&r   __init___C.__init__(   s    ar   c                    V ^8H  p R# r    r   s   &r   sm_C.sm+   s    Fr   c                    V^8H  V n         R# r   r   )clsr   s   &&r   cm_C.cm/   s    Qr   r   N)__name__
__module____qualname____firstlineno__r    staticmethodr$   classmethodr(   __static_attributes____classdictcell____classdict__s   @r   r   r   '   s2         r   r   aV  %3d           RESUME                   0

%3d           LOAD_FAST_BORROW         1 (x)
              LOAD_SMALL_INT           1
              COMPARE_OP              72 (==)
              LOAD_FAST_BORROW         0 (self)
              STORE_ATTR               0 (x)
              LOAD_CONST               1 (None)
              RETURN_VALUE
a            RESUME                   0
          LOAD_FAST_BORROW         1
          LOAD_SMALL_INT           1
          COMPARE_OP              72 (==)
          LOAD_FAST_BORROW         0
          STORE_ATTR               0
          LOAD_CONST               1
          RETURN_VALUE
aU  %3d           RESUME                   0

%3d           LOAD_FAST_BORROW         1 (x)
              LOAD_SMALL_INT           1
              COMPARE_OP              72 (==)
              LOAD_FAST_BORROW         0 (cls)
              STORE_ATTR               0 (x)
              LOAD_CONST               1 (None)
              RETURN_VALUE
a&  %3d           RESUME                   0

%3d           LOAD_FAST_BORROW         0 (x)
              LOAD_SMALL_INT           1
              COMPARE_OP              72 (==)
              STORE_FAST               0 (x)
              LOAD_CONST               1 (None)
              RETURN_VALUE
zDisassembly of z:
z
Disassembly of 
c                     \        V 4       ^# r   print)as   &r   _fr:   m   s    	!Hr   a  %3d           RESUME                   0

%3d           LOAD_GLOBAL              1 (print + NULL)
              LOAD_FAST_BORROW         0 (a)
              CALL                     1
              POP_TOP

%3d           LOAD_SMALL_INT           1
              RETURN_VALUE
aD  %3d          0       RESUME                   0

%3d          2       LOAD_GLOBAL              1 (print + NULL)
            12       LOAD_FAST_BORROW         0 (a)
            14       CALL                     1
            22       POP_TOP

%3d         24       LOAD_SMALL_INT           1
            26       RETURN_VALUE
a!  %-14s           RESUME                   0

%-14s           LOAD_GLOBAL              1 (print + NULL)
%-14s           LOAD_FAST_BORROW         0 (a)
%-14s           CALL                     1
%-14s           POP_TOP

%-14s           LOAD_SMALL_INT           1
%-14s           RETURN_VALUE
z          RESUME                   0
          LOAD_GLOBAL              1
          LOAD_FAST_BORROW         0
          CALL                     1
          POP_TOP
          LOAD_SMALL_INT           1
          RETURN_VALUE
c                  ,    \        ^^
4       F  p K  	  R# r   )range)ress    r   	bug708901r>      s    Qr   a  %3d           RESUME                   0

%3d           LOAD_GLOBAL              1 (range + NULL)
              LOAD_SMALL_INT           1

%3d           LOAD_SMALL_INT          10

%3d           CALL                     2
              GET_ITER
      L1:     FOR_ITER                 3 (to L2)
              STORE_FAST               0 (res)

%3d           JUMP_BACKWARD            5 (to L1)

%3d   L2:     END_FOR
              POP_ITER
              LOAD_CONST               1 (None)
              RETURN_VALUE
c                     R # Nr#   r   s   &r   
bug1333982rA      s     	r   a  %3d           RESUME                   0

%3d           LOAD_COMMON_CONSTANT     0 (AssertionError)
              LOAD_CONST               1 (<code object <genexpr> at 0x..., file "%s", line %d>)
              MAKE_FUNCTION
              LOAD_FAST_BORROW         0 (x)
              GET_ITER
              CALL                     0

%3d           LOAD_SMALL_INT           1

%3d           BINARY_OP                0 (+)
              CALL                     0
              RAISE_VARARGS            1
c                      R # r@   r#   r#   r   r   bug42562rC          r      co_linetablezh          RESUME                   0
          LOAD_CONST               0 (None)
          RETURN_VALUE
EXTENDED_ARGNOP
LOAD_CONSTRETURN_VALUEz          EXTENDED_ARG             1
          NOP
          EXTENDED_ARG             1
          LOAD_CONST             297
          RETURN_VALUE
JUMP_FORWARDz  L1:     EXTENDED_ARG           255
          EXTENDED_ARG         65535
          EXTENDED_ARG         16777215
          JUMP_FORWARD            -4 (to L1)
c                     R # r@   r#   )r9   bcs   &&,r   func_w_kwargsrP     rD   r   c                  "    \        ^^^R7       R# )r   rO   N)rP   r#   r   r   wrap_func_w_kwargsrS     s    !Q!r   a  %3d           RESUME                   0

%3d           LOAD_GLOBAL              1 (func_w_kwargs + NULL)
              LOAD_SMALL_INT           1
              LOAD_SMALL_INT           2
              LOAD_SMALL_INT           5
              LOAD_CONST               1 (('c',))
              CALL_KW                  3
              POP_TOP
              LOAD_CONST               2 (None)
              RETURN_VALUE
aW    0           RESUME                   0

  1           LOAD_SMALL_INT           0
              LOAD_CONST               1 (('*',))
              IMPORT_NAME              0 (math)
              CALL_INTRINSIC_1         2 (INTRINSIC_IMPORT_STAR)
              POP_TOP
              LOAD_CONST               2 (None)
              RETURN_VALUE
z  0           RESUME                   0

  1           LOAD_NAME                0 (a)
              CALL_INTRINSIC_1         5 (INTRINSIC_UNARY_POSITIVE)
              RETURN_VALUE
a    0           RESUME                   0

  1           BUILD_LIST               0
              LOAD_NAME                0 (a)
              LIST_EXTEND              1
              CALL_INTRINSIC_1         6 (INTRINSIC_LIST_TO_TUPLE)
              RETURN_VALUE
z  1           RESUME                   0

%3d           LOAD_GLOBAL              0 (spam)
              POP_TOP
              LOAD_CONST               0 (None)
              RETURN_VALUE
z   1           RESUME                   0

%4d           LOAD_GLOBAL              0 (spam)
               POP_TOP
               LOAD_CONST               0 (None)
               RETURN_VALUE
a  Disassembly of f:
  4           RESUME                   0
              LOAD_CONST               0 (None)
              RETURN_VALUE

Disassembly of g:
  5           RESUME                   0
              LOAD_CONST               0 (None)
              RETURN_VALUE

zx + 1z  0           RESUME                   0

  1           LOAD_NAME                0 (x)
              LOAD_SMALL_INT           1
              BINARY_OP                0 (+)
              RETURN_VALUE
z	x = x + 1a%    0           RESUME                   0

  1           LOAD_NAME                0 (x)
              LOAD_SMALL_INT           1
              BINARY_OP                0 (+)
              STORE_NAME               0 (x)
              LOAD_CONST               1 (None)
              RETURN_VALUE
z+
x: int = 1
y: fun(1)
lst[fun(0)]: int = 1
a    --           MAKE_CELL                0 (__conditional_annotations__)

   0           RESUME                   0

   2           LOAD_CONST               1 (<code object __annotate__ at 0x..., file "<dis>", line 2>)
               MAKE_FUNCTION
               STORE_NAME               4 (__annotate__)
               BUILD_SET                0
               STORE_NAME               0 (__conditional_annotations__)
               LOAD_SMALL_INT           1
               STORE_NAME               1 (x)
               LOAD_NAME                0 (__conditional_annotations__)
               LOAD_SMALL_INT           0
               SET_ADD                  1
               POP_TOP

   3           LOAD_NAME                0 (__conditional_annotations__)
               LOAD_SMALL_INT           1
               SET_ADD                  1
               POP_TOP

   4           LOAD_SMALL_INT           1
               LOAD_NAME                2 (lst)
               LOAD_NAME                3 (fun)
               PUSH_NULL
               LOAD_SMALL_INT           0
               CALL                     1
               STORE_SUBSCR
               LOAD_CONST               2 (None)
               RETURN_VALUE
z2
def foo(a: int, b: str) -> str:
    return a * b
a    0           RESUME                   0

  2           LOAD_CONST               0 (<code object __annotate__ at 0x..., file "<dis>", line 2>)
              MAKE_FUNCTION
              LOAD_CONST               1 (<code object foo at 0x..., file "<dis>", line 2>)
              MAKE_FUNCTION
              SET_FUNCTION_ATTRIBUTE  16 (annotate)
              STORE_NAME               0 (foo)
              LOAD_CONST               2 (None)
              RETURN_VALUE
zx = 0
while 1:
    x += 1av    0           RESUME                   0

  1           LOAD_SMALL_INT           0
              STORE_NAME               0 (x)

  2   L1:     NOP

  3           LOAD_NAME                0 (x)
              LOAD_SMALL_INT           1
              BINARY_OP               13 (+=)
              STORE_NAME               0 (x)
              JUMP_BACKWARD           12 (to L1)
a\  %4d           RESUME                   0

%4d           NOP

%4d   L1:     LOAD_SMALL_INT           1
               LOAD_SMALL_INT           0
           --> BINARY_OP               11 (/)
               POP_TOP

%4d   L2:     LOAD_FAST_CHECK          1 (tb)
               RETURN_VALUE

  --   L3:     PUSH_EXC_INFO

%4d           LOAD_GLOBAL              0 (Exception)
               CHECK_EXC_MATCH
               POP_JUMP_IF_FALSE       24 (to L7)
               NOT_TAKEN
               STORE_FAST               0 (e)

%4d   L4:     LOAD_FAST                0 (e)
               LOAD_ATTR                2 (__traceback__)
               STORE_FAST               1 (tb)
       L5:     POP_EXCEPT
               LOAD_CONST               1 (None)
               STORE_FAST               0 (e)
               DELETE_FAST              0 (e)

%4d           LOAD_FAST                1 (tb)
               RETURN_VALUE

  --   L6:     LOAD_CONST               1 (None)
               STORE_FAST               0 (e)
               DELETE_FAST              0 (e)
               RERAISE                  1

%4d   L7:     RERAISE                  0

  --   L8:     COPY                     3
               POP_EXCEPT
               RERAISE                  1
ExceptionTable:
  L1 to L2 -> L3 [0]
  L3 to L4 -> L8 [1] lasti
  L4 to L5 -> L6 [1] lasti
  L6 to L8 -> L8 [1] lasti
c                 $    V  R VR R V: R V:R 2# ) 4r#   r9   rN   rO   ds   &&&&r   _fstringrY      s%    S!AauAaW!W%%r   a  %3d           RESUME                   0

%3d           LOAD_FAST_BORROW         0 (a)
              FORMAT_SIMPLE
              LOAD_CONST               0 (' ')
              LOAD_FAST_BORROW         1 (b)
              LOAD_CONST               1 ('4')
              FORMAT_WITH_SPEC
              LOAD_CONST               0 (' ')
              LOAD_FAST_BORROW         2 (c)
              CONVERT_VALUE            2 (repr)
              FORMAT_SIMPLE
              LOAD_CONST               0 (' ')
              LOAD_FAST_BORROW         3 (d)
              CONVERT_VALUE            2 (repr)
              LOAD_CONST               1 ('4')
              FORMAT_WITH_SPEC
              BUILD_STRING             7
              RETURN_VALUE
c                 `    V ;_uu_ 4        ^pRRR4       ^pR#   + '       g   i     ^pR# ; ir   r#   rO   r   ys   &  r   _withr]     s#    	
 
	A 
	As   -	a  %4d           RESUME                   0

%4d           LOAD_FAST_BORROW         0 (c)
               COPY                     1
               LOAD_SPECIAL             1 (__exit__)
               SWAP                     2
               SWAP                     3
               LOAD_SPECIAL             0 (__enter__)
               CALL                     0
       L1:     POP_TOP

%4d           LOAD_SMALL_INT           1
               STORE_FAST               1 (x)

%4d   L2:     LOAD_CONST               1 (None)
               LOAD_CONST               1 (None)
               LOAD_CONST               1 (None)
               CALL                     3
               POP_TOP

%4d           LOAD_SMALL_INT           2
               STORE_FAST               2 (y)
               LOAD_CONST               1 (None)
               RETURN_VALUE

%4d   L3:     PUSH_EXC_INFO
               WITH_EXCEPT_START
               TO_BOOL
               POP_JUMP_IF_TRUE         2 (to L4)
               NOT_TAKEN
               RERAISE                  2
       L4:     POP_TOP
       L5:     POP_EXCEPT
               POP_TOP
               POP_TOP
               POP_TOP

%4d           LOAD_SMALL_INT           2
               STORE_FAST               2 (y)
               LOAD_CONST               1 (None)
               RETURN_VALUE

  --   L6:     COPY                     3
               POP_EXCEPT
               RERAISE                  1
ExceptionTable:
  L1 to L2 -> L3 [2] lasti
  L3 to L5 -> L6 [4] lasti
c                    "   T ;_uu_4       GR j  xL
  ^pR R R 4      GR j  xL
  ^pR #  L L
  + GR j  xL 
 '       g   i     ^pR # ; i5ir@   r#   r[   s   &  r   
_asyncwithr_   X  s-     qq q	A qqq	As?   A,A0A.	AAA	9
A	A	Aa]  %4d            RETURN_GENERATOR
                POP_TOP
        L1:     RESUME                   0

%4d            LOAD_FAST                0 (c)
                COPY                     1
                LOAD_SPECIAL             3 (__aexit__)
                SWAP                     2
                SWAP                     3
                LOAD_SPECIAL             2 (__aenter__)
                CALL                     0
                GET_AWAITABLE            1
                LOAD_CONST               0 (None)
        L2:     SEND                     3 (to L5)
        L3:     YIELD_VALUE              1
        L4:     RESUME                   3
                JUMP_BACKWARD_NO_INTERRUPT 5 (to L2)
        L5:     END_SEND
        L6:     POP_TOP

%4d            LOAD_SMALL_INT           1
                STORE_FAST               1 (x)

%4d    L7:     LOAD_CONST               0 (None)
                LOAD_CONST               0 (None)
                LOAD_CONST               0 (None)
                CALL                     3
                GET_AWAITABLE            2
                LOAD_CONST               0 (None)
        L8:     SEND                     3 (to L11)
        L9:     YIELD_VALUE              1
       L10:     RESUME                   3
                JUMP_BACKWARD_NO_INTERRUPT 5 (to L8)
       L11:     END_SEND
                POP_TOP

%4d            LOAD_SMALL_INT           2
                STORE_FAST               2 (y)
                LOAD_CONST               0 (None)
                RETURN_VALUE

%4d   L12:     CLEANUP_THROW
       L13:     JUMP_BACKWARD_NO_INTERRUPT 26 (to L5)
       L14:     CLEANUP_THROW
       L15:     JUMP_BACKWARD_NO_INTERRUPT 10 (to L11)
       L16:     PUSH_EXC_INFO
                WITH_EXCEPT_START
                GET_AWAITABLE            2
                LOAD_CONST               0 (None)
       L17:     SEND                     4 (to L21)
       L18:     YIELD_VALUE              1
       L19:     RESUME                   3
                JUMP_BACKWARD_NO_INTERRUPT 5 (to L17)
       L20:     CLEANUP_THROW
       L21:     END_SEND
                TO_BOOL
                POP_JUMP_IF_TRUE         2 (to L24)
       L22:     NOT_TAKEN
       L23:     RERAISE                  2
       L24:     POP_TOP
       L25:     POP_EXCEPT
                POP_TOP
                POP_TOP
                POP_TOP

%4d            LOAD_SMALL_INT           2
                STORE_FAST               2 (y)
                LOAD_CONST               0 (None)
                RETURN_VALUE

  --   L26:     COPY                     3
                POP_EXCEPT
                RERAISE                  1
       L27:     CALL_INTRINSIC_1         3 (INTRINSIC_STOPITERATION_ERROR)
                RERAISE                  1
ExceptionTable:
  L1 to L3 -> L27 [0] lasti
  L3 to L4 -> L12 [4]
  L4 to L6 -> L27 [0] lasti
  L6 to L7 -> L16 [2] lasti
  L7 to L9 -> L27 [0] lasti
  L9 to L10 -> L14 [2]
  L10 to L13 -> L27 [0] lasti
  L14 to L15 -> L27 [0] lasti
  L16 to L18 -> L26 [4] lasti
  L18 to L19 -> L20 [7]
  L19 to L22 -> L26 [4] lasti
  L23 to L25 -> L26 [4] lasti
  L25 to L27 -> L27 [0] lasti
c                 .     V V! 4        #   T! 4        i ; ir@   r#   r9   rN   s   &&r   _tryfinallyrb     s    	s    	c                 0      V ! 4        ^#   T ! 4        i ; ir6   r#   )rN   s   &r   _tryfinallyconstrd     s    	s   	a  %4d           RESUME                   0

%4d           NOP

%4d   L1:     LOAD_FAST_BORROW         0 (a)

%4d   L2:     LOAD_FAST_BORROW         1 (b)
               PUSH_NULL
               CALL                     0
               POP_TOP
               RETURN_VALUE

  --   L3:     PUSH_EXC_INFO

%4d           LOAD_FAST                1 (b)
               PUSH_NULL
               CALL                     0
               POP_TOP
               RERAISE                  0

  --   L4:     COPY                     3
               POP_EXCEPT
               RERAISE                  1
ExceptionTable:
  L1 to L2 -> L3 [0]
  L3 to L4 -> L4 [1] lasti
a  %4d           RESUME                   0

%4d           NOP

%4d           NOP

%4d           LOAD_FAST_BORROW         0 (b)
               PUSH_NULL
               CALL                     0
               POP_TOP
               LOAD_SMALL_INT           1
               RETURN_VALUE

  --   L1:     PUSH_EXC_INFO

%4d           LOAD_FAST                0 (b)
               PUSH_NULL
               CALL                     0
               POP_TOP
               RERAISE                  0

  --   L2:     COPY                     3
               POP_EXCEPT
               RERAISE                  1
ExceptionTable:
  L1 to L2 -> L2 [1] lasti
c              #      "   V x  R # 5ir@   r#   r   s   &r   _grf     s
     
Gs   	c                   "   V 5x  R # 5ir@   r#   r   s   &r   _agrh     s
     
Gs   
c                 B   "   \        V 4        R j  xL
  pK   LDR # 5ir@   )rh   )r   items   & r   _cork     s"     !f  dfs   c                    a  V 3R  lpV# )c                0   <a  \        V 3R lS 4       4      # )funcdocc              3   6   <"   T F  pSV,           x  K  	  R # 5ir@   r#   ).0zr   s   & r   	<genexpr>"_h.<locals>.foo.<locals>.<genexpr>  s     %1aAEE1s   )listr   r\   s   fr   foo_h.<locals>.foo  s    %1%%%r   r#   )r\   rv   s   f r   _hrx     s    & Jr   a    --           MAKE_CELL                0 (y)

%4d           RESUME                   0

%4d           LOAD_FAST_BORROW         0 (y)
               BUILD_TUPLE              1
               LOAD_CONST               0 (<code object foo at 0x..., file "%s", line %d>)
               MAKE_FUNCTION
               SET_FUNCTION_ATTRIBUTE   8 (closure)
               STORE_FAST               1 (foo)

%4d           LOAD_FAST_BORROW         1 (foo)
               RETURN_VALUE
a  %s
Disassembly of <code object foo at 0x..., file "%s", line %d>:
  --           COPY_FREE_VARS           1
               MAKE_CELL                0 (x)

%4d           RESUME                   0

%4d           LOAD_GLOBAL              1 (list + NULL)
               LOAD_FAST_BORROW         0 (x)
               BUILD_TUPLE              1
               LOAD_CONST               1 (<code object <genexpr> at 0x..., file "%s", line %d>)
               MAKE_FUNCTION
               SET_FUNCTION_ATTRIBUTE   8 (closure)
               LOAD_DEREF               1 (y)
               GET_ITER
               CALL                     0
               CALL                     1
               RETURN_VALUE
a  %s
Disassembly of <code object <genexpr> at 0x..., file "%s", line %d>:
  --           COPY_FREE_VARS           1

%4d           RETURN_GENERATOR
               POP_TOP
       L1:     RESUME                   0
               LOAD_FAST                0 (.0)
       L2:     FOR_ITER                14 (to L3)
               STORE_FAST               1 (z)
               LOAD_DEREF               2 (x)
               LOAD_FAST_BORROW         1 (z)
               BINARY_OP                0 (+)
               YIELD_VALUE              0
               RESUME                   5
               POP_TOP
               JUMP_BACKWARD           16 (to L2)
       L3:     END_FOR
               POP_ITER
               LOAD_CONST               0 (None)
               RETURN_VALUE

  --   L4:     CALL_INTRINSIC_1         3 (INTRINSIC_STOPITERATION_ERROR)
               RERAISE                  1
ExceptionTable:
  L1 to L4 -> L4 [0] lasti
c                     Yr2W#3# r@   r#   )r   r\   r9   rN   s   &&  r   	load_testrz   q  s    q4Kr   a	  %3d           RESUME_CHECK             0

%3d           LOAD_FAST_LOAD_FAST      1 (x, y)
              STORE_FAST_STORE_FAST   50 (b, a)

%3d           LOAD_FAST_BORROW_LOAD_FAST_BORROW 35 (a, b)
              BUILD_TUPLE              2
              RETURN_VALUE
c                  @    . RO^,           F  p \        V 4       K  	  R# )r   N)r         rz   )is    r   	loop_testr     s    ]]! r   a  %3d           RESUME_CHECK             0

%3d           BUILD_LIST               0
              LOAD_CONST_MORTAL        2 ((1, 2, 3))
              LIST_EXTEND              1
              LOAD_SMALL_INT           3
              BINARY_OP                5 (*)
              GET_ITER
      L1:     FOR_ITER_LIST           14 (to L2)
              STORE_FAST               0 (i)

%3d           LOAD_GLOBAL_MODULE       1 (load_test + NULL)
              LOAD_FAST_BORROW         0 (i)
              CALL_PY_GENERAL          1
              POP_TOP
              JUMP_BACKWARD_{: <6}    16 (to L1)

%3d   L2:     END_FOR
              POP_ITER
              LOAD_CONST_IMMORTAL      1 (None)
              RETURN_VALUE
c                      R Ev  p R# ).Nr#   )_s    r   extended_arg_quickr     s    EQr   a>  %3d           RESUME                   0

%3d           LOAD_CONST               0 (Ellipsis)
              EXTENDED_ARG             1
              UNPACK_EX              256
              POP_TOP
              STORE_FAST               0 (_)
              LOAD_CONST               1 (None)
              RETURN_VALUE
c                   6   a  ] tR tRt o RtR tR tR tRtV t	R# )DisTestBasei  z2Common utilities for DisTests and TestDisTracebackc                2    \         P                  ! R RV4      # )z\b0x[0-9A-Fa-f]+\bz0x...)resub)r   texts   &&r   strip_addressesDisTestBase.strip_addresses  s    vv+Wd;;r   c                
   RRr2^ pV Fr  p\         P                  ! RV4      pVP                  4        Uu. uF  p\        V4      NK  	  upw  rV P	                  W4       V P	                  W4       Yr2V^,          pKt  	  V# u upi )r   z"  L(\d+) to L(\d+) -> L\d+ \[\d+\])r   matchgroupsintassertGreaterEqual)
r   lines
prev_startprev_endcountlinemgstartends
   &&        r   !assert_exception_table_increasing-DisTestBase.assert_exception_table_increasing  s    !2HD>EA*+((*5*Q#a&*5JE##C/##E4#(QJE   6s   B c                V    W8w  d   V P                  V4      pV P                  W4       R # r@   )r   assertEqual)r   gotexpecteds   &&&r   do_disassembly_compare"DisTestBase.do_disassembly_compare  s%    ?&&s+C'r   r#   N)
r*   r+   r,   r-   __doc__r   r   r   r0   r1   r2   s   @r   r   r     s     8<
( (r   r   c                   ,  a  ] tR tRt o RtR8R ltR9R ltR tR tR t	R t
R	 tR
 tR t]! 4       R 4       t]! 4       R 4       t]! 4       R 4       tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR t R t!R t"R  t#R! t$R" t%R# t&R$ t'R% t(R& t)R' t*R( t+R) t,R* t-R+ t.R, t/]0R- 4       t1]2]3R. 4       4       t4]2]3R/ 4       4       t5]2]3R0 4       4       t6]2]3R1 4       4       t7]2]3R2 4       4       t8]2R3 4       t9R4 t:]2R5 4       t;]2R6 4       t<R7t=V t>R# ):DisTestsi  Nc                L   \         P                  ! 4       p\        P                  ! V4      ;_uu_ 4        V'       d   \        P                  ! V3/ VB  M\        P
                  ! W3/ VB  R R R 4       VP                  4       #   + '       g   i     TP                  4       # ; ir@   )ioStringIO
contextlibredirect_stdoutdisdisassemblegetvaluer   funclastiwrapperkwargsoutputs   &&&&, r   get_disassemblyDisTests.get_disassembly  so    ''//''6v6	 0
    0/
   s   8BB#	c                &    V P                  WR 4      # F)r   )r   r   r   s   &&&r   get_disassemble_as_string"DisTests.get_disassemble_as_string  s    ##D77r   c                   R V n         V P                  ! V3R^ /VB pV P                  WB4       \        VR4      '       d   \        P
                  ! 4       p\        P                  ! V4      ;_uu_ 4        \        P                  ! VP                  3/ VB  R R R 4       V P                  VP                  4       V4       R # R #   + '       g   i     L4; i)Ndepth__code__)maxDiffr   r   hasattrr   r   r   r   r   discor   r   )r   r   r   r   r   	got_discos   &&&,  r   do_disassembly_testDisTests.do_disassembly_test  s    ""4;q;F;##C24$$I++I66		$--262 7''	(:(:(<hG	 %66s   3"CC	c                (   V P                  \        P                  R ,          ^ 4       V P                  \        P                  R,          \        P                  4       V P                  \        P                  R,          \        P
                  4       R# )r   rJ   
STORE_NAMEN)r   r   opmapassertInhasconsthasnamer   s   &r   
test_opmapDisTests.test_opmap  sQ    7+Q/cii-s||<cii-s{{;r   c                ~    V P                  \        P                  \        P                  R ,          ,          R 4       R# )	LOAD_FASTN)r   r   opnamer   r   s   &r   test_opnameDisTests.test_opname  s$    CIIk$:;[Ir   c                p    V P                  \        P                  R ,          \        P                  4       R# )rH   N)r   r   r   rH   r   s   &r   test_boundariesDisTests.test_boundaries  s!    >2C4D4DEr   c                   \        . RO4      p\        \        P                  4       F  w  r#W19   g   VP	                  R4      '       d   K$  V\
        P                  9   d   K;  V P                  VR7      ;_uu_ 4        \        P                  pV\        P                  9   d   V^\        P                  ,           ,          pV P                  \        V4      V4       RRR4       K  	  R#   + '       g   i     K  ; i)JUMP_BACKWARD_NO_INTERRUPTINSTRUMENTED)r   N)r   !LOAD_FAST_BORROW_LOAD_FAST_BORROWINSTRUMENTED_CALL_FUNCTION_EXANNOTATIONS_PLACEHOLDER)set	enumerater   r   
startswithopcode_specialized_opmapsubTest_OPNAME_WIDTHhasarg_OPARG_WIDTHassertLessEquallen)r   long_opcodesopr   widths   &    r   test_widthsDisTests.test_widths  s     7 8 $CJJ/JB%):):>)J)J222V,,))#Q!1!111E$$S[%8	 -, 0
 -,,s   <AC))C:c                :    V P                  \        \        4       R # r@   )r   r:   dis_fr   s   &r   test_disDisTests.test_dis         U+r   c                >    V P                  \        \        R R7       R# )T)show_offsetsN)r   r:   dis_f_with_offsetsr   s   &r   test_dis_with_offsetsDisTests.test_dis_with_offsets  s      %7d Kr   c           	        R  p\        \        P                  ! \        4      4      pV F}  pV P	                  VR7      ;_uu_ 4        T P                  \        ;QJ d&    R VP                   4       F  '       d   K   RM	  RM! R VP                   4       4      4       RRR4       K  	  \        \        W4      4      p\        V,          pV P                  \        VRR7       R#   + '       g   i     K  ; i)c                     \         ;QJ d    . R  V P                   4       F  NK  	  5M! R  V P                   4       4      pV^ ,          : RV^,          : RV^,          : RV^,          : 2# )c              3   0   "   T F  qf   RMTx  K  	  R # 5i)N?r#   rp   ps   & r   rr   WDisTests.test_dis_with_all_positions.<locals>.format_instr_positions.<locals>.<genexpr>	  s     LOq)32Os   :-)tuple	positions)instrvaluess   & r   format_instr_positionsDDisTests.test_dis_with_all_positions.<locals>.format_instr_positions  sM    ULEOOLUULEOOLLF$*1IIvayy&))VAYOOr   )r   c              3   (   "   T F  qR Jx  K
  	  R # 5ir@   r#   r   s   & r   rr   7DisTests.test_dis_with_all_positions.<locals>.<genexpr>  s     #K?aTM?s   FTNshow_positions)rt   r   get_instructionsr:   r   
assertTrueallr   r   mapdis_f_with_positions_formatr   )r   r  instrsr   r   r   s   &     r   test_dis_with_all_positions$DisTests.test_dis_with_all_positions  s    	P c**2./EE**#K5??#K#K5??#K KL +*  #4=>	.:  Xd C	 +**s   2C%;#C%%C6c                    R p\        \        P                  ! V4      RR4      P                  ^ ,          pRP	                  . RO4      pV P                  W#RR7       R# )z%def f():
   try: pass
   finally:passr   execr4   Tr  N)z/1:0-1:0              RESUME                   0 z2:3-3:15             NOPr  z63:11-3:15            LOAD_CONST               0 (None)z!3:11-3:15            RETURN_VALUEr  z"  --         L1:     PUSH_EXC_INFOr  z/3:11-3:15            RERAISE                  0r  z/  --         L2:     COPY                     3z  --                 POP_EXCEPTz/  --                 RERAISE                  1zExceptionTable:z  L1 to L2 -> L2 [1] lastir  )compileastparse	co_constsjoinr   )r   codefexpects   &   r   test_dis_with_some_positions%DisTests.test_dis_with_some_positions  sT    " CIIdOS&1;;A> 
 & 	  4 @r   c                H   R p\         P                  ! V4      pVP                  ^ ,          pVP                  ^ ,          P                  ^ ,          pR;Vn        Vn        \        VRR4      P                  ^ ,          pRP                  . RO4      pV P                  WVRR7       R# )	zdef f():
	x = 1r   r  r4   Tr  Nr   )z-1:0-1:0            RESUME                   0r  z-2:5-2:6            LOAD_SMALL_INT           1z12:?-2:?            STORE_FAST               0 (x)z42:?-2:?            LOAD_CONST               1 (None)z2:?-2:?            RETURN_VALUEr  )
r  r  bodytargets
col_offsetend_col_offsetr  r  r  r   )r   r  treer   ass_xr  r  s   &      r   $test_dis_with_linenos_but_no_columns-DisTests.test_dis_with_linenos_but_no_columns0  s    "yyyy|		!$$Q'2445/D#v&003 
  	  4 @r   c                    R  pVP                   P                  RR7      Vn         RP                  . RO4      pV P                  WRR7       R# )c                      R # r@   r#   r#   r   r   r  .DisTests.test_dis_with_no_positions.<locals>.fF      r   r   rF   r4   Tr  N)z$          RESUME                   0z+          LOAD_CONST               0 (None)z          RETURN_VALUEr  )r   replacer  r   )r   r  r  s   &  r   test_dis_with_no_positions#DisTests.test_dis_with_no_positionsE  sJ    	 ZZ''S'9
 
  	  4 @r   c                :    V P                  \        \        4       R # r@   )r   r>   dis_bug708901r   s   &r   test_bug_708901DisTests.test_bug_708901R  s      M:r   c                ^     V P                  R4       V P                  \        \        4       R# )Fzneed asserts, run without -ON)skipTestr   rA   dis_bug1333982r   s   &r   test_bug_1333982DisTests.test_bug_1333982U  s$     MM89  ^<r   c                :    V P                  \        \        4       R # r@   )r   rC   dis_bug42562r   s   &r   test_bug_42562DisTests.test_bug_42562]  s      <8r   c                :    V P                  \        \        4       R # r@   )r   code_bug_45757dis_bug_45757r   s   &r   test_bug_45757DisTests.test_bug_45757`  s      ?r   c                :    V P                  \        \        4       R # r@   )r   bug46724dis_bug46724r   s   &r   test_bug_46724DisTests.test_bug_46724d  s      <8r   c                :    V P                  \        \        4       R # r@   )r   rS   dis_kw_namesr   s   &r   test_kw_namesDisTests.test_kw_namesh  s      !3\Br   c                    V P                  R \        4       V P                  R\        4       V P                  R\        4       R# )zfrom math import *z+az(*a,)N)r   dis_intrinsic_1_2dis_intrinsic_1_5dis_intrinsic_1_6r   s   &r   test_intrinsic_1DisTests.test_intrinsic_1l  s6      !57HI  '89  *;<r   c                H    V P                  R V P                  R4      4       R# )z8CALL_INTRINSIC_2         1 (INTRINSIC_PREP_RERAISE_STAR)ztry: pass
except* Exception: xN)r   r   r   s   &r   test_intrinsic_2DisTests.test_intrinsic_2r  s!    P**+LM	Or   c                   R  p\        ^R4       F/  p\        V^,           ,          pV P                  V! V4      V4       K1  	  \        RR^
4       F/  p\        V^,           ,          pV P                  V! V4      V4       K1  	  \        RR^
4       F/  p\        V^,           ,          pV P                  V! V4      V4       K1  	  ^ RIHp V P                  V\        4       R# )c                 ~    / pR RP                  R.V ,          R.,           4      ,           p\        W!4       VR,          # )zdef foo():
 r  z
 zspam
rv   )r  r  )r   	namespacer   s   &  r   r   'DisTests.test_big_linenos.<locals>.funcw  s:    I"RWWeWu_z-I%JJD!U##r   ,    i  )
dis_moduleN)r<   _BIG_LINENO_FORMATr   _BIG_LINENO_FORMAT2testrV  dis_module_expected_results)r   r   r   r   rV  s   &    r   test_big_linenosDisTests.test_big_linenosv  s    	$ q#A)QU3H$$T!Wh7 
 sD"%A)QU3H$$T!Wh7 & tT2&A*a!e4H$$T!Wh7 ' 	$  -HIr   c                
   V P                  \        \        4       V P                  \        \        4       V P                  \
        \        4       V P                  \        \        4       V P                  \        \        4       R # r@   )r   expr_strdis_expr_strsimple_stmt_strdis_simple_stmt_strannot_stmt_strdis_annot_stmt_strfn_with_annotate_strdis_fn_with_annotate_strcompound_stmt_strdis_compound_stmt_strr   s   &r   test_disassemble_strDisTests.test_disassemble_str  sX      <8  2EF  1CD  !57OP  !24IJr   c                b    V P                  \        P                  P                  \        4       R # r@   )r   r:   r   co_codedis_f_co_coder   s   &r   test_disassemble_bytesDisTests.test_disassemble_bytes  s      !4!4mDr   c                :    V P                  \        \        4       R # r@   )r   r   dis_cr   s   &r   test_disassemble_classDisTests.test_disassemble_class  r   r   c                X    V P                  \        ^4      P                  \        4       R# r   )r   r   r    dis_c_instance_methodr   s   &r    test_disassemble_instance_method)DisTests.test_disassemble_instance_method  s      A1FGr   c                    \        ^4      P                  P                  P                  pV P	                  V\
        4       R# r   )r   r    r   rk  r   dis_c_instance_method_bytes)r   method_bytecodes   & r   &test_disassemble_instance_method_bytes/DisTests.test_disassemble_instance_method_bytes  s,    Q%..1199  2MNr   c                N    V P                  \        P                  \        4       R # r@   )r   r   r$   dis_c_static_methodr   s   &r   test_disassemble_static_method'DisTests.test_disassemble_static_method  s      (;<r   c                N    V P                  \        P                  \        4       R # r@   )r   r   r(   dis_c_class_methodr   s   &r   test_disassemble_class_method&DisTests.test_disassemble_class_method  s      (:;r   c                    V P                  \        4      pV P                  \        ^4      4      pV P                  W!4       R# r   )r   rf   r   )r   gen_func_disas	gen_disass   &  r   test_disassemble_generator#DisTests.test_disassemble_generator  s4    --b1((A/	3r   c                    V P                  \        4      pV P                  \        ^4      4      pV P                  W!4       R# r   )r   rh   r   )r   agen_func_disas
agen_disass   &  r    test_disassemble_async_generator)DisTests.test_disassemble_async_generator  s4    ..s3))#a&1
5r   c                    V P                  \        4      p\        ^4      pVP                  4        V P                  V4      pV P                  W14       R# r   )r   rk   closer   )r   coro_func_disascoro
coro_disass   &   r   test_disassemble_coroutine#DisTests.test_disassemble_coroutine  sB    ..s31v

))$/
5r   c                :    V P                  \        \        4       R # r@   )r   rY   dis_fstringr   s   &r   test_disassemble_fstring!DisTests.test_disassemble_fstring  s      ;7r   c                :    V P                  \        \        4       R # r@   )r   r]   dis_withr   s   &r   test_disassemble_withDisTests.test_disassemble_with  s      1r   c                :    V P                  \        \        4       R # r@   )r   r_   dis_asyncwithr   s   &r   test_disassemble_asyncwith#DisTests.test_disassemble_asyncwith  s      ];r   c                n    V P                  \        \        4       V P                  \        \        4       R # r@   )r   rb   dis_tryfinallyrd   dis_tryfinallyconstr   s   &r   test_disassemble_try_finally%DisTests.test_disassemble_try_finally  s$      n=  !13FGr   c                     \         = \         =V P	                  \
        \        P                  R 4       R #   \         d     L;i ; i  \         d     LEi ; ir@   )syslast_excAttributeErrorlast_tracebackassertRaisesRuntimeErrorr   r   s   &r   test_dis_noneDisTests.test_dis_none  sV    		" 	,6  		  		s    6 A AAAAc                :   R V n          \        = ^^ ,           V P                  XP                  P                  VP                  4      pV P                  R V4       R #   \         d     L[i ; i  \         d"   pTP
                  pT\        n         R p?L|R p?ii ; ir@   )r   r  r  r  r   r   r  r   tb_framef_codetb_lastir   )r   r   r   tb_diss   &   r   test_dis_tracebackDisTests.test_dis_traceback  s    	"	aC
 //0B0BBKKP  v.  		
  	BCLL	s(   A 	A. A+*A+.B9BBc                `    V P                  \        \        P                  \        4       4       R # r@   )r  	TypeErrorr   objectr   s   &r   test_dis_objectDisTests.test_dis_object  s    )SWWfh7r   c                   a  V 3R  lpV! \         ^ R7       V! \        ^R7       V! \        ^R7       V! \        ^R7       V! \        RR7       V! \        4       R# )c                 z   < SP                   ! \        3/ VB pSP                  V4      pSP                  W 4       R # r@   )r   rx   r   r   )r   r   r   r   s   &, r   check2DisTests.test_disassemble_recursive.<locals>.check  s6    &&r4V4C&&s+CS+r   )r   N)dis_nested_0dis_nested_1dis_nested_2)r   r  s   f r   test_disassemble_recursive#DisTests.test_disassemble_recursive  sD    	,
 	l!$l!$l!$l!$l$'lr   c                     \         P                  ! R R4       R#   \         d'   pT P                  TP                  4        Rp?R# Rp?ii ; i))r  N)r   _try_compiler   assertIsNone__context__)r   r   s   & r   )test__try_compile_no_context_exc_on_error2DisTests.test__try_compile_no_context_exc_on_error  s<    	-S"% 	-amm,,	-s    AAAc                    R  pV P                  V4      pVP                  R4       F  pRV9   g   K   M	  V P                  R4       V P                  RX4       V P	                  RV4       R# )c                  P   "   \           R j  xL
  p \         K   LD\         R # 5ir@   )async_iter1l2l3)letters    r   afunc3DisTests.test_async_for_presentation.<locals>.afunc  s!      +  fs   &
&	&r4   END_ASYNC_FORz,No END_ASYNC_FOR in disassembly of async fortofromN)r   splitfailassertNotInr   )r   r  disassemblyr   s   &   r   test_async_for_presentation$DisTests.test_async_for_presentation  sf    	
 ++E2%%d+D$& , IIDEt$fd#r   c                x    \         P                  ! R 4      p\        VP                  4       F
  pV ! 4        K  	  R# )_testinternalcapiN)r   import_moduler<   SPECIALIZATION_THRESHOLD)r  r  r   s   &  r   code_quickenDisTests.code_quicken	  s0    )778KL(AABAC Cr   c                    V P                  R  4       V P                  \        RR7      pV P                  V\        4       R# )c                      \        ^ ^ 4      # r   r~   r#   r   r   <lambda>2DisTests.test_super_instructions.<locals>.<lambda>  s
    )Aq/r   TadaptiveN)r  r   rz   r   dis_load_test_quickened_coder   r   s   & r   test_super_instructions DisTests.test_super_instructions  s9     	12""9t"<##C)EFr   c                   a R p\        RRR4      oV P                  V3R l4       V P                  SRR7      pV P                  W!4       R# )z  0           RESUME_CHECK             0

  1           LOAD_CONST_IMMORTAL      0 ('a')
              LOAD_ATTR_SLOT           0 (__class__)
              RETURN_VALUE
z'a'.__class__r  evalc                     < \        S / / 4      # r@   r  cos   r   r  4DisTests.test_load_attr_specialize.<locals>.<lambda>!      $r2r"2r   Tr  Nr  r  r   r   )r   load_attr_quickenr   r  s   &  @r   test_load_attr_specialize"DisTests.test_load_attr_specialize  sM     _b&123""2"5##C;r   c                   a R p\        RRR4      oV P                  V3R l4       V P                  SRR7      pV P                  W!4       R# )z  0           RESUME_CHECK             0

  1           LOAD_NAME                0 (str)
              PUSH_NULL
              LOAD_SMALL_INT           1
              CALL_STR_1               1
              RETURN_VALUE
zstr(1)r  r  c                     < \        S / / 4      # r@   r  r  s   r   r  /DisTests.test_call_specialize.<locals>.<lambda>2  r  r   Tr  Nr  )r   call_quickenr   r  s   &  @r   test_call_specializeDisTests.test_call_specialize%  sL     Xr6*23""2"5##C6r   c                    V P                  \        4       V P                  \        R R7      p\        P                  P                  4       p\        P                  V'       d   RMR4      pV P                  W4       R# )Tr  JITNO_JITN)	r  r   r   r  _jit
is_enableddis_loop_test_quickened_codeformatr   )r   r   jitr   s   &   r   test_loop_quickenDisTests.test_loop_quicken6  s[     	)$""9t"<hh!!#/66uR##C2r   c                X  a \         P                  ! R 4      oV3R lpV! R4       V P                  RV P                  VRR7      4       V3R lpV! R4       V P                  RV P                  VRR7      4       V3R lpV! 4        V P                  RV P                  VRR7      4       R	# )
r  c                 T   < \        SP                  4       F  pV '       g   K  K  	  R # r@   r<   r  r   r   r  s   & r   for_loop_trueNDisTests.test_loop_with_conditional_at_end_is_quickened.<locals>.for_loop_trueD  "    ,EEF1 Gr   TFOR_ITER_RANGEr  c                 T   < \        SP                  4       F  pV '       g   K  K  	  R # r@   r  r  s   & r   for_loop_falseODisTests.test_loop_with_conditional_at_end_is_quickened.<locals>.for_loop_falseM  r  r   Fc                  D   < ^ p V SP                   8  d   V ^,          p K  R# )r   N)r  )r   r  s    r   
while_loopKDisTests.test_loop_with_conditional_at_end_is_quickened.<locals>.while_loopV  s&    A'@@@Q Ar   COMPARE_OP_INTN)r   r  r   r   )r   r  r  r  r  s   &   @r   .test_loop_with_conditional_at_end_is_quickened7DisTests.test_loop_with_conditional_at_end_is_quickened@  s     *778KL	
 	d&**=4*H	J	
 	u&**>D*I	K	
 	&**:*E	Gr   c                \    V P                  \        4      pV P                  V\        4       R # r@   )r   r   r   dis_extended_arg_quick_coder  s   & r   test_extended_arg_quick DisTests.test_extended_arg_quick_  s$    ""#56##C)DEr   c              #     "   R  pV'       d   V P                  V4       M\        V4       \        \        P                  ! VRVR7      RR7       F$  pVP
                  R8X  g   K  VP                  x  K&  	  R# 5i)c                  P    . p \        ^*4       F  pV P                  V4       K  	  R# )*   N)r<   append)lr   s     r   r  %DisTests.get_cached_values.<locals>.fe  s     A2Y r   T)show_cachesr  r$  r   N)r  r	   _unroll_caches_as_Instructionsr   r  r   argrepr)r   	quickenedr  r  instructions   &&&  r   get_cached_valuesDisTests.get_cached_valuesd  sh     	 a  qM9#:N:N4(;
K !!W,!)))	s   AA9%A9c           
        R F  pR F  pV P                  RV: RV: 24      ;_uu_ 4        V'       d   RpMRp\        V P                  W4      4      pV F  pV P                  WS4       K  	  ^p^pV P	                  VP                  R4      V4       V P	                  \        V4      V4       RRR4       K  	  K  	  R#   + '       g   i     K  ; i)Fz
quickened=z, adaptive=z^(\w+: \d+)?$z^(\w+: 0)?$r  NFT)r   rt   r*  assertRegexr   r   r   )r   r(  r  patterncachescachetotal_cachesempty_cachess   &       r   test_show_cachesDisTests.test_show_cachest  s    &I)\\ZYL8+">??"2"0!$"8"8"MNF!'((8 "(#%L#$L$$V\\"%5|D$$S[,? @? * '???s   BC 	 Cc                   R p\        \        P                  ! VRR7      RR7       FA  pVP                  R8X  d"   VP                  ^,
          pVP                  p M!VP                  pKC  	  V P                  R4       V P                  VP                  XRR7      pV P                  VP                  XRR7      pV P                  VRX 24       V P                  Wg4       R	# )
zX
Make sure that with lasti pointing to CACHE, it still shows the current
line correctly
c                  $    \        \        4       R # r@   )r8   r9   r#   r   r   r  2DisTests.test_show_currinstr_with_cache.<locals>.f  s	    !Hr   Tr%  r   z@Can't find a CACHE entry in the function provided to do the testF)r   r   z--> N)
r&  r   r  r   offsetr  r   r   r.  r   )r   r  inst	op_offsetcache_offsetr   assem_opassem_caches   &       r   test_show_currinstr_with_cache'DisTests.test_show_currinstr_with_cache  s    	 3$$QD9tMD{{g% KK!O	#{{M IIXY''

)U'S**1::\SX*Y 	d6(#34/r   r   r   T)r   )?r*   r+   r,   r-   r   r   r   r   r   r   r   r   r   r   r   r  r  r#  r*  r.  r3  r7  r<  rA  rE  rK  rN  r[  rh  rm  rq  ru  rz  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?  r0   r1   r2   s   @r   r   r     s    G!8	H<
JF9 ,L D D A A6 A A(A;=9@9C=OJ0KE,HO=<4
6
682<H	7/ 8-$"  
 G  G
 <  < 7  7 3  3 G  G: F F*  @ @  0 0r   r   c                   *   a  ] tR tRt o RR ltRtV tR# )DisWithFileTestsi  c                    \         P                  ! 4       pV'       d*   \        P                  ! V3R V/VB  VP	                  4       # \        P                  ! W3R V/VB  VP	                  4       # file)r   r   r   r   r   r   s   &&&&, r   r    DisWithFileTests.get_disassembly  sZ    GGD0v00    OOD?f??  r   r#   NrB  r*   r+   r,   r-   r   r0   r1   r2   s   @r   rD  rD    s     ! !r   rD  z0: Nonez60: 'Formatted details of methods, functions, or code.'zName:              code_info
Filename:          (.*)
Argument count:    1
Positional-only arguments: 0
Kw-only arguments: 0
Number of locals:  1
Stack size:        \d+
Flags:             OPTIMIZED, NEWLOCALS, HAS_DOCSTRING
Constants:
   zN
Names:
   0: _format_code_info
   1: _get_code_object
Variable names:
   0: xTr   c         	   /   X   a aaaaaaa
"   V3V VVVV
VVV3R  llo
S SSSSVSSS
3	x  R# 5i)c                 .   < \        SSSSSV SSS4	       R # r@   r7   )	rO   r9   rN   rX   r   r  r   r\   rq   s	   &r   r  tricky.<locals>.f  s    aAq!Q1a(r   Nr#   )r9   rN   r   r\   rq   rO   rX   r   argskwdsr  s   bbfff$dd*,@r   trickyrO    s,      ) )
Q1aAq!
##s    *a8  Name:              tricky
Filename:          (.*)
Argument count:    5
Positional-only arguments: 2
Kw-only arguments: 3
Number of locals:  10
Stack size:        \d+
Flags:             OPTIMIZED, NEWLOCALS, VARARGS, VARKEYWORDS, GENERATOR
Constants:
   0: <code object f at (.*), file "(.*)", line (.*)>
   1: None
Variable names:
   0: a
   1: b
   2: x
   3: y
   4: z
   5: c
   6: d
   7: e
   8: args
   9: kwds
Cell variables:
   0: [abedfxyz]
   1: [abedfxyz]
   2: [abedfxyz]
   3: [abedfxyz]
   4: [abedfxyz]
   5: [abedfxyz]
   6: [abedfxyz]
   7: [abedfxyz]aq  Filename:          (.*)
Argument count:    1
Positional-only arguments: 0
Kw-only arguments: 0
Number of locals:  1
Stack size:        \d+
Flags:             OPTIMIZED, NEWLOCALS, NESTED
Constants:
   0: None
Names:
   0: print
Variable names:
   0: c
Free variables:
   0: [abedfxyz]
   1: [abedfxyz]
   2: [abedfxyz]
   3: [abedfxyz]
   4: [abedfxyz]
   5: [abedfxyz]zName:              <module>
Filename:          <disassembly>
Argument count:    0
Positional-only arguments: 0
Kw-only arguments: 0
Number of locals:  0
Stack size:        \d+
Flags:             0x0
Constants:
   0: 1
Names:
   0: xzName:              <module>
Filename:          <disassembly>
Argument count:    0
Positional-only arguments: 0
Kw-only arguments: 0
Number of locals:  0
Stack size:        \d+
Flags:             0x0
Constants:
   0: 1
   1: None
Names:
   0: xzName:              <module>
Filename:          <disassembly>
Argument count:    0
Positional-only arguments: 0
Kw-only arguments: 0
Number of locals:  0
Stack size:        \d+
Flags:             0x0
Constants:
   0: 0
Names:
   0: xc                     "   ^G Rj  xL
  \           Rj  xL
  p K   L L	D
\        ;_uu_4       GRj  xL 
 pRRR4      GRj  xL 
  R#   + GRj  xL 
 '       g   i     R# ; i5ir   )rN   rO   )r9   rX   s     r   	async_defrQ  4  s8     
GGad 1qqAqqqqqqse   A,
A,#!#A,#A,9A,AA,A
A,A)	A
A)	!A)	#	A,a/  Name:              async_def
Filename:          (.*)
Argument count:    0
Positional-only arguments: 0
Kw-only arguments: 0
Number of locals:  2
Stack size:        \d+
Flags:             OPTIMIZED, NEWLOCALS, COROUTINE
Constants:
   0: 1
   1: None
Names:
   0: b
   1: c
Variable names:
   0: a
   1: dc                   z   a  ] tR tRt o ]P
                  ]3]]3]	]
3]]3]]3]]3]]3.tR tR tR tR tRtV tR# )CodeInfoTestsiL  c                    R V n         V P                   F+  w  rV P                  \        P                  ! V4      V4       K-  	  R# rU  N)r   
test_pairsr.  r   	code_info)r   r   r   s   &  r   test_code_infoCodeInfoTests.test_code_infoW  s2    ??KAS]]1-x8 +r   c                   R V n         V P                   F  w  r\        4       ;_uu_ 4       p\        P                  ! V4       RRR4       V P                  XP                  4       VR,           4       \        P                  ! 4       p\        P                  ! WR7       V P                  VP                  4       V4       K  	  R#   + '       g   i     L; i)rU  Nr4   rF  )	r   rV  r   r   	show_coder.  r   r   r   )r   r   r   r   s   &   r   test_show_codeCodeInfoTests.test_show_code\  s    ??KA ""fa  #V__.>[[]FMM!)V__.9 +""s   CCc                `    V P                  \        \        P                  \	        4       4       R # r@   )r  r  r   rW  r  r   s   &r   test_code_info_object#CodeInfoTests.test_code_info_objectf  s    )S]]FH=r   c                R    V P                  \        P                  ! ^ 4      R4       R# )r   0x0N)r   r   pretty_flagsr   s   &r   test_pretty_flags_no_flags(CodeInfoTests.test_pretty_flags_no_flagsi  s    ))!,e4r   rA  N)r*   r+   r,   r-   r   rW  code_info_code_inforO  code_info_trickyco_tricky_nested_fcode_info_tricky_nested_fr^  code_info_expr_strr`  code_info_simple_stmt_strrf  code_info_compound_stmt_strrQ  code_info_async_defrV  rX  r\  r_  rd  r0   r1   r2   s   @r   rS  rS  L  sh     
}})* 45#$1256%&J9
:>5 5r   rS  c           	      >   a a RV V3R llp\        S SR^. / R4       V# )r}   c                 >   <a a RVVV V3R llp\        SSS S4       V# )   c                 &   < \        SSSSW4       R # r@   r7   )r   r  r9   rN   rO   rX   s   &&r   innerouter.<locals>.f.<locals>.innerq  s    !Q1a#r   rp     r7   )rO   rX   rr  r9   rN   s   ff r   r  outer.<locals>.fp  s     	$ 	$aAqr   r  Hello world!r}      r7   )r9   rN   r  s   ff r   outerrz  o  s(     
 
!QAr2~.Hr   c                     \        ^
4       F   p \        V 4       V ^8  d   K  V ^8  g   K    M	  \        R4       X '       d(   \        V 4       V ^,          p V ^8  d   K%  V ^8  g   K.  M\        R4        ^^ ,           V ;_uu_ 4       p\        R4       RRR4       \        R4       R#   + '       g   i     L; i  \         d    \        R4        L8i ; i  \        R4       i ; i)
   I can haz else clause?%Who let lolcatz into this test suite?Never reach thisN%Here we go, here we go, here we go...OK, now we're done)r<   r8   ZeroDivisionError)r   dodgys     r   jumpyr  x  s    2Yaq5q5  	&'
a	Qq5q556$	A Q%$%  	"# Q  7567 	"#sB   6	B= ?
C 	B*C *B:	5C =CC CC C&c                    R V P                   : RV P                  : RV P                  : R2RV P                  : RV P                   RV P
                   R2,           RV P                  : RV P                   2,           pV P                  e   VR	V P                  : 2,          pV P                  '       d   VR
V P                  : 2,          pVR,           # )z  make_inst(opname=z, arg=z	, argval=z, zargrepr=z	, offset=z, start_offset=zstarts_line=z, line_number=z, label=z, cache_info=z),
r   argargvalr'  r9  start_offsetstarts_lineline_numberlabel
cache_info)r   bases   & r   _stringify_instructionr    s     ell-VEII=	%,,IYY[\
5==#9U\\N/%J\J\I]]_`	a
u((+>%:K:K9LM	N 	
 {{(5;;/**- 0 0344$;r   c                     \         P                  ! 4       p \        P                  ! V 4      ;_uu_ 4        \	        4       pV! 4       pR R R 4       \
        P                  ! \        \        R7      p\
        P                  ! X\        R7      p\
        P                  ! X\        R7      p\
        P                  ! \        \        R7      pRP                  R.\        \        V4      ORNRNRN\        \        V4      ORNRNRN\        \        V4      ORNRNRN\        \        V4      ORN4      pVP                  \!        \!        \"        4      4      R	4      pVP                  \!        \"        4      R
4      pVP                  \!        \!        \$        4      4      R4      pVP                  \!        \$        4      R4      p\'        V4       R #   + '       g   i     EL; i)N
first_liner4   zexpected_opinfo_outer = []r  zexpected_opinfo_f = [zexpected_opinfo_inner = [zexpected_opinfo_jumpy = [zrepr(code_object_f)code_object_fzrepr(code_object_inner)code_object_inner)r   r   r   r   rz  r   r  expected_outer_lineexpected_f_lineexpected_inner_liner  expected_jumpy_liner  r
  r  r)  reprr  r  r8   )ignorer  rr  _instructions_outer_instructions_f_instructions_inner_instructions_jumpyresults           r   _prepare_test_casesr    s   [[]F		#	#F	+	+G 
, ..uATU**1IO..uATU..uATUYY'	
')<=	
 	
 		

 $	
 '9	
 	
 	
 (	
 ')<=	
 	
 	
 (	
 ')<=	
 	
F& ^^Dm!457LMF^^D/AF^^D&7!89;TUF^^D!235HIF	&M= 
,	+	+s   GG		MAKE_CELLr9   )r   r  r  r'  r9  r  r  r  rN   FRESUMEr  z(3, 4)LOAD_FAST_BORROWBUILD_TUPLEMAKE_FUNCTIONSET_FUNCTION_ATTRIBUTEclosuredefaults
STORE_FASTr  LOAD_GLOBALr8   zprint + NULL)	r   r  r  r'  r9  r  r  r  r  
LOAD_DEREFz''LOAD_SMALL_INT
BUILD_LIST	BUILD_MAPrw  z'Hello world!'CALLPOP_TOPCOPY_FREE_VARSrO   rX   z(5, 6)rr  r   ze, fNoner<   zrange + NULLGET_ITERFOR_ITERto L4r  r   
COMPARE_OP<zbool(<)POP_JUMP_IF_FALSEzto L2	NOT_TAKENJUMP_BACKWARDto L1)	r   r  r  r'  r9  r  r  r  r  >zbool(>)POP_JUMP_IF_TRUEzto L3zto L5END_FORPOP_ITERr}  z'I can haz else clause?'LOAD_FAST_CHECKTO_BOOLzto L8	BINARY_OPz-=to L6zto L7zto L9r~  z''Who let lolcatz into this test suite?'/COPY   LOAD_SPECIAL__exit__i  SWAPi  i  	__enter__i  i
  r  i  i  r  z'Never reach this'i  i   i(  i*  rT  i.  i0  i8  i:  r  z"OK, now we're done"iD  iF  iN  iP  iR  PUSH_EXC_INFOiT  WITH_EXCEPT_STARTiV  iX  ih  zto L11i`  id  RERAISEif  
POP_EXCEPTij  il  in  ip  r   zto L10ir  it  iv  ix  iz  r  i|  CHECK_EXC_MATCHi  i  zto L12i  i  i  i  r  z''Here we go, here we go, here we go...'i  i  i  i  i  i  i  i  i  i  i  i  i  i  i  i  i  c                      R # r@   r#   r#   r   r   simpler    s    dr   c                   &   a  ] tR tRt o R tRtV tR# )InstructionTestCasei  c                   V Uu. uF  q3P                  R R R7      NK  	  ppV Uu. uF  qDP                  R R R7      NK  	  ppV P                  W4       R # u upi u upi )N)r   r  )_replacer   )r   instrs_1instrs_2instr_1instr_2s   """  r   assertInstructionsEqual+InstructionTestCase.assertInstructionsEqual  sa    U]^U]'$$t$EU]^U]^U]'$$t$EU]^, _^s
   AAr#   N)r*   r+   r,   r-   r  r0   r1   r2   s   @r   r  r    s     - -r   r  c                      a a ] tR tRt oV 3R ltR tR tR tR tR t	R t
R	 t]! 4       R
 4       t]! 4       R 4       t]! 4       R 4       tR tR tR tR tR tR tR tR tR tR tR tRtVtV ;t# )InstructionTestsi  c                2   < \         SV `  ! V!   R V n        R # r@   )superr    r   )r   rM  	__class__s   &*r   r    InstructionTests.__init__  s    $r   c                b    \         P                  ! \        4      pV F  p\        V4       K  	  R # r@   )r   r  r  str)r   r  r   s   &  r   test_instruction_str%InstructionTests.test_instruction_str  s#    %%f-EJ r   c                x    \         P                  ! \        4      pV P                  \	        V4      \
        4       R # r@   r   r  r  r  rt   expected_opinfo_simpler   actuals   & r   test_default_first_line(InstructionTests.test_default_first_line  s'    %%f-$$T&\3IJr   c                |    \         P                  ! \        R R7      pV P                  \	        V4      \
        4       R # Nr  r  r  s   & r   test_first_line_set_to_None,InstructionTests.test_first_line_set_to_None  s)    %%f>$$T&\3IJr   c                    \         P                  ! \        \        R 7      pV P	                  \        V4      \        4       R# r  N)r   r  rz  r  r  rt   expected_opinfo_outerr  s   & r   
test_outerInstructionTests.test_outer  *    %%e8KL$$T&\3HIr   c                    \        4       ;_uu_ 4        \        4       pR R R 4       \        P                  ! X\        R7      pV P                  \        V4      \        4       R #   + '       g   i     LM; ir  )r   rz  r   r  r  r  rt   expected_opinfo_f)r   r  r  s   &  r   test_nestedInstructionTests.test_nested  sG    A %%aOD$$T&\3DE s   A##A3	c                    \        4       ;_uu_ 4        \        4       ! 4       pR R R 4       \        P                  ! X\        R7      pV P                  \        V4      \        4       R #   + '       g   i     LM; ir  )r   rz  r   r  r  r  rt   expected_opinfo_inner)r   rr  r  s   &  r   test_doubly_nested#InstructionTests.test_doubly_nested  sJ    GIE %%e8KL$$T&\3HI s   A((A8	c                    \         P                  ! \        \        R 7      pV P	                  \        V4      \        4       R# r  )r   r  r  r  r  rt   expected_opinfo_jumpyr  s   & r   
test_jumpyInstructionTests.test_jumpy  r  r   c                X   \        R RR4      p\        P                  ! V4       Uu. uF  pVP                  NK  	  pp. ROpV P	                  W44       V Uu. uF1  pVP
                  VP                  VP                  VP                  3NK3  	  ppV P	                  Wd4       R# u upi u upi )zf(
  x, y, z
)<test>r  N)
)r   r   r   r   r   r   r   r   r  )r|   r|   r|   r}   )r|   r|   rp  ru  )r|   r|      	   r   r}   r   r   r	  r	  r	  )	r  r   r  r   r   lineno
end_linenor  r   )r   r  r   r   r   posnamed_positionss   &      r   test_co_positions"InstructionTests.test_co_positions  s    )8V< --d3
3 OO3 	 

 	- !
  ZZ9K9KL  	 
 	3-
$
s   B"7B'c                N   \        R RR4      pVP                  RR7      p\        P                  ! V4      pV F  pV P	                  VR7      ;_uu_ 4        VP
                  pV P                  \        V4      ^4       VP                  R8X  d    RRR4       Ka  V P                  VP                  4       V P                  VP                  4       V P                  VP                  4       V P                  VP                  4       RRR4       K  	  R#   + '       g   i     K  ; i)zx, y, zr  r  r   rF   )r)  r  N)r  r)  r   r  r   r   r   r   r   r  r
  r  r  r   )r   r  code_without_location_tabler  r)  r   s   &     r   test_co_positions_missing_info/InstructionTests.test_co_positions_missing_info  s    y(F3&*lll&D#%%&AB!K+66'11	  Y3%%1	 76
 !!)"2"23!!)"6"67!!)"6"67!!)":":; 76 "666s   :DA,DD$c                T  a R  pVP                   pVP                  R,          p\        P                  R,          o\	        V3R lV 4       4      p\        V4      V,
          pR EF  pR EF  pV P                  RV: RV: 24      ;_uu_ 4        \        W2P                  4       RR7       UU	u. uF  w  rV'       g
   VS8w  g   K  V	NK  	  p
pp	\        \        P                  ! W'VR7      VR	7       Uu. uFi  pVP                  f   R
MUVP                  P                  VP                  P                  VP                  P                  VP                  P                   3NKk  	  ppV P#                  W4       R
R
R
4       EK  	  EK"  	  R
# u up	pi u upi   + '       g   i     EK=  ; i)c              3     "   V^,          ^V ,          V,          ,
          pV) \         P                  V4      ,
          ^V ,          ,          x  V'       d0   V) \         P                  V4      ,           ^V ,          ,          x  R# R# 5i)r|   N)cmathsqrtrW   s   &&& r   rootsEInstructionTests.test_co_positions_with_lots_of_caches.<locals>.roots  s_     1q1uqy A2

1%!a%00rEJJqM)a!e44 s   BB:NNr|   r   c              3   ,   <"   T F	  qS8H  x  K  	  R # 5ir@   r#   )rp   r   cache_opcodes   & r   rr   IInstructionTests.test_co_positions_with_lots_of_caches.<locals>.<genexpr>  s     6#B<'#s   Tz	adaptive=z, show_caches=)strict)r  r$  r%  Nr-  )r   rk  r   r   sumr   r   zipco_positionsr&  r   r  r   r
  r  r  r   r   )r   r  r  opsr0  
non_cachesr$  r  r   r   r   r)  dis_positionsr  s   &            @r   %test_co_positions_with_lots_of_caches6InstructionTests.test_co_positions_with_lots_of_caches  s   	5
 ~~ll3||G,6#66X&
 )K)\\YXK+"@AA .16G6G6IRV-W$-WMB&"*< "	-W ! $ ,J#J^J^ K'2,4
%,4K !, 5 5 ='1188'11<<'11<<'11@@	D ,4 " 
% $$\A# BA * )$

% BAAs1   F	.F
F
(F	4A/F#F	
F	F'c                |    \        R RRR^
^
R^RRR7
      pV P                  VP                  VP                  4       R# )rI   Nr  T
r   r  r  r'  r9  r  r  r  r  r   )	make_instr   r  oparg)r   r)  s   & r   test_oparg_alias!InstructionTests.test_oparg_alias$  sA    u$t*,RbVZhiqu,02 	+*;*;<r   c                    R  p\         P                  ! 4       p\        P                  ! VP                  VRR7       V P	                  RVP                  4       4       R# )c                 "    V '       d   TpV# TpV# r@   r#   )r   r\   rq   r=   s   &&& r   r  7InstructionTests.test_show_caches_with_label.<locals>.f+  s     J Jr   TrG  r$  zL1:N)r   r   r   r   r   r   )r   r  r   s   &  r   test_show_caches_with_label,InstructionTests.test_show_caches_with_label*  s=    	 

T:eV__./r   c                >   \         P                  ! 4       p\        P                  ! R VRR7       V P                  RVP	                  4       4       \         P                  ! 4       p\        P                  ! RVRR7       V P                  RVP	                  4       4       R# )za is bTr/  zIS_OP                    0 (is)z
a is not bz#IS_OP                    1 (is not)Nr   r   r   r   r   r   r   s   & r   test_is_op_format"InstructionTests.test_is_op_format6  d    v4879JK6t<;V__=NOr   c                >   \         P                  ! 4       p\        P                  ! R VRR7       V P                  RVP	                  4       4       \         P                  ! 4       p\        P                  ! RVRR7       V P                  RVP	                  4       4       R# )za in bTr/  zCONTAINS_OP              0 (in)z
a not in bz#CONTAINS_OP              1 (not in)Nr3  r4  s   & r   test_contains_op_format(InstructionTests.test_contains_op_format?  r7  r   c                P   \         P                   F  p\        VR R R^ ^ R^R R R7
      pVP                  pVP                  pV P                  V4       V P                  V4       V P                  W4       V P                  VP                  V4       K  	  \        P                   F~  p\        VR R R^ ^ R^R R R7
      pVP                  pVP                  pV P                  V\        P                  V,          4       V P                  \        P                  V,          V4       K  	  R # )Nr  Tr'  )r   r   r(  
baseopname
baseopcodeassertIsNotNoner   r   r   r   _specializations)r   namer)  r<  r=  s   &    r   test_baseopname_and_baseopcode/InstructionTests.test_baseopname_and_baseopcodeH  s	   IID#4T$PR[\12RS[_koqK$//J$//J  ,  ,T.[//<  --D#4T$PR+,1$\]eiuy{K$//J$//JMM$ 7 7
 CDV\\*5zB .r   c                   \        R RRR^
^
R^RRR7
      pV P                  VP                  4       ^dp\        RW"R^
^
R^RRR7
      pV P                  ^VP                  4       \        RW"R^^R^RRR7
      pV P                  ^VP                  4       \        RW"R^
^
R^RRR7
      pV P                  ^VP                  4       R# )rI   Nr  Tr'  rL   r  SEND)r(  r  jump_targetr   )r   r)  deltas   &  r   test_jump_target!InstructionTests.test_jump_target]  s    u$t*,RbVZhiqu,02 	+112~5*,RbVZhiqu,02 	)@)@A  E*,SsX\jksw,02 	.0G0GH  v5*,RbVZhiqu,02 	-{/F/FGr   c                @  a R  p^*pRp^R^R/oV3R lp^^/pW#SWE3pV P                  V! \        P                  R,          R.VO5!  R4       V P                  V! \        P                  R,          ^.VO5!  R4       V P                  V! \        P                  R,          ^.VO5!  R4       V P                  V! \        P                  R,          ^.VO5!  R4       V P                  V! \        P                  R	,          ^.VO5!  R4       V P                  V! \        P                  R
,          ^.VO5!  R4       V P                  V! \        P                  R,          ^.VO5!  R4       V P                  V! \        P                  R,          ^.VO5!  R4       R# )c                 N    \         P                  ! V!  pVP                  WV4      # r@   )r   ArgResolverget_argval_argrepr)r   r)  r9  	init_argsarg_resolvers   &&&* r   r  /InstructionTests.test_argval_argrepr.<locals>.fw  s#    ??I6L226&IIr   r9   rN   c                    < SV ,          # r@   r#   )r   namess   &r   r  6InstructionTests.test_argval_argrepr.<locals>.<lambda>~  s	    ar   r  NrJ   r  r  r  r  r  CALL_INTRINSIC_1)r   r   r|   r}   )Nr  )r   1)r9   r9   )   r  )r  r  )r|   
kwdefaults)r}   z<<)r|   INTRINSIC_IMPORT_STAR)r   r   r   )r   r  r9  r  varname_from_oparg
labels_maprM  rQ  s   &      @r   test_argval_argrepr$InstructionTests.test_argval_argreprv  sk   	J  	CC 0!W
5*<I6<<	2D@4@*M6<<5q@4@(K6<<6ADA:N6<<8"DtDmT6<<5q@4@*M6<<(@A1LtLN_`6<<4a?$?K6<<(:;QFFHder   c                  a  ! R  R\         P                  4      oV3R lp^*pV P                  V! \        P                  R,          ^V4      R4       V P                  V! \        P                  R,          ^V4      R4       R# )c                   ,   a  ] tR tRt o R tR tRtV tR# )@InstructionTests.test_custom_arg_resolver.<locals>.MyArgResolveri  c                    V^,           # r6   r#   )r   r   r  r9  s   &&&&r   offset_from_jump_argUInstructionTests.test_custom_arg_resolver.<locals>.MyArgResolver.offset_from_jump_arg  s    Qwr   c                    ^V,          # )r|   r#   )r   r9  s   &&r   get_label_for_offsetUInstructionTests.test_custom_arg_resolver.<locals>.MyArgResolver.get_label_for_offset  s    6z!r   r#   N)r*   r+   r,   r-   r`  rc  r0   r1   r2   s   @r   MyArgResolverr^    s     " "r   re  c                 4   < S! V!  pVP                  WV4      # r@   )rL  )r   r)  r9  rM  rN  re  s   &&&* r   r  4InstructionTests.test_custom_arg_resolver.<locals>.f  s     ()4L226&IIr   r  SETUP_FINALLYN)r|   r  )r}   r  )r   rK  r   r   r   )r   r  r9  re  s   &  @r   test_custom_arg_resolver)InstructionTests.test_custom_arg_resolver  sd    	"COO 	"	J 6<<8!VDlS6<<8!VDlSr   c                .    \         P                  ! V4      # r@   )r   _get_instructions_bytesr   r  s   &&r   r  !InstructionTests.get_instructions  s    **400r   c                   \        \        P                  ! \        4      4      pV F)  pV P	                  VP
                  VP                  4       K+  	  R  p\        \        P                  R,          ^ \        P                  R,          ^\        P                  R,          ^.4      p\        P                  ! V4      pV! V P                  V4      4      pV P	                  ^VP
                  4       V P	                  ^VP                  4       \        \        P                  R,          ^ \        P                  R,          ^\        P                  R,          ^\        P                  R,          ^\        P                  R,          ^\        P                  R,          ^ .4      pV! V P                  V4      4      pV P	                  ^VP
                  4       V P	                  ^VP                  4       \        \        P                  R,          ^ \        P                  R,          ^\        P                  R,          ^\        P                  R,          ^ \        P                  R,          ^\        P                  R,          ^\        P                  R,          ^\        P                  R,          ^\        P                  R,          ^ .4      p\        V P                  V4      4      pV P	                  ^V^,          P
                  4       V P	                  ^V^,          P                  4       V P	                  ^V^,          P
                  4       V P	                  ^V^,          P                  4       R# )c                 2    \         P                  ! R  V 4      # )c                     V# r@   r#   ra   s   &&r   r  GInstructionTests.test_start_offset.<locals>.last_item.<locals>.<lambda>  s    !r   )	functoolsreduce)iterables   &r   	last_item5InstructionTests.test_start_offset.<locals>.last_item  s    ##OX>>r   r   rH   r  r   N)rt   r   Bytecoder:   r   r9  r  bytesr   r   _make_labels_mapr  )r   instructionsr)  rv  r  rY  jumps   &      r   test_start_offset"InstructionTests.test_start_offset  s    CLL,-'K[//1I1IJ (	? LL%tLL($LL+,d
 
 ))$/
..t45DKK(D--.LL%tLL($LL($LL($LL+,dLL!4
  ..t45DKK(D--.LL%tLL($LL+,dLL!4LL($LL($LL($LL+,dLL!4

 
 D11$78LO223LO889\!_334LO889r   c                   \        \        P                  R ,          ^\        P                  R,          ^ \        P                  R,          ^ \        P                  R,          ^ \        P                  R,          ^ \        P                  R,          ^ \        P                  R,          ^\        P                  R,          ^ \        P                  R,          ^ \        P                  R,          ^ .4      p\        V P	                  V4      4      pV P                  ^V^ ,          P                  4       V P                  ^
V^ ,          P                  4       V P                  ^V^,          P                  4       V P                  ^V^,          P                  4       V P                  ^V^,          P                  4       V P                  ^V^,          P                  4       \        \        P                  ! V P                  4      4      p\        W"R,          4       F+  w  r4V P                  VP                  VP                  4       K-  	  R# )r  r   r   r  r   NNN)ry  r   r   rt   r  r   r<  
end_offsetr   rx   test_cache_offset_and_end_offsetr  r  )r   r  r{  prevcurrs   &    r   r  1InstructionTests.test_cache_offset_and_end_offset  s   LL'LL!4LL!4LL!4LL!4LL%tLL $LL!4LL!4LL!4
  D11$78LO889\!_778\!_99:\!_778\!_99:\!_778 CLL)N)NOPl,<=JDT__d.?.?@ >r   rA  )r*   r+   r,   r-   r    r  r  r  r  r  r  r  r   r  r  r$  r*  r0  r5  r9  rA  rG  rZ  ri  r  r}  r  r0   r1   __classcell__r  r3   s   @@r   r  r    s     KKJFJJ 4 44 < <  B  BD=
0PPC*H2f(T 12:hA Ar   r  c                   j   a  ] tR tRt o R tR tR tR tR tR t	R t
R	 t]! 4       R
 4       tRtV tR# )BytecodeTestsi  c                   \         \        ^4      P                  R\         P                  3 Ff  pV P	                  VR7      ;_uu_ 4        \
        P                  ! V4      pV P                  VP                  \        P                  4       RRR4       Kh  	  V P                  \        \
        P                  \        4       4       R#   + '       g   i     K  ; ir   a=1)objN)r:   r   r    r   r   r   rx  assertIsInstancecodeobjtypesCodeTyper  r  r  )r   r  rN   s   &  r   test_instantiation BytecodeTests.test_instantiation  s    1r{{;C#&&LL%%%aii@ '& <
 	)S\\68<	 '&&s   	ACCc                v   \         \        ^4      P                  R\         P                  3 Fu  pV P	                  VR7      ;_uu_ 4        \        \        P                  ! V4      4      p\        \        P                  ! V4      4      pV P                  W#4       RRR4       Kw  	  R#   + '       g   i     K  ; ir  )
r:   r   r    r   r   rt   r   rx  r  r  )r   r  
via_objectvia_generators   &   r   test_iterationBytecodeTests.test_iteration  sz    1r{{;C#&&!#,,s"34
 $S%9%9#%> ?,,ZG '& <&&&s   	AB''B8c                    \         P                  ! \        \        R 7      pV P	                  \        V4      \        4       R# r  )r   rx  rz  r  r  rt   r  r  s   & r   test_explicit_first_line&BytecodeTests.test_explicit_first_line	  s(    e0CD$$T&\3HIr   c                   \         P                  ! \        4      P                  4       pVP                  4       P	                  R 4      ^ ,          p\        \        P                  P                  4      pV P                  W4       \         P                  ! \        RR7      P                  4       pVP                  4       P	                  R 4      ^ ,          pV P                  VR4       R# )rU   i^  r  350N)	r   rx  r  strip	partitionr  r   co_firstlinenor   )r   r  r   s   &  r   test_source_line_in_disassembly-BytecodeTests.test_source_line_in_disassembly	  s    f%))+))#.q1v556*f599;))#.q1'r   c                    R V n         \        P                   F;  w  r\        P                  ! V4      pV P                  VP                  4       V4       K=  	  R# rU  )r   rS  rV  r   rx  r.  info)r   r   r   rN   s   &   r   	test_infoBytecodeTests.test_info	  s>    (33KAQAQVVXx0 4r   c                    \         P                  ! \        4      P                  4       pV P                  V\        4       R # r@   )r   rx  r:   r   r   r  s   & r   test_disassembledBytecodeTests.test_disassembled	  s)    b!%%'##FE2r   c                    \        4       p\        P                  P                  V4      pVP                  '       d   VP                  pK   V P                  VP                  VP                  4       R # r@   )r   r   rx  from_tracebackr   r   current_offsetr  r   r   rN   s   &  r   test_from_traceback!BytecodeTests.test_from_traceback	  sH    XLL''+jjjrzz"))2;;7r   c                    R V n         \        4       p\        P                  P	                  V4      pV P                  VP                  4       \        4       R # r@   )r   r   r   rx  r  r   dis_tracebackr  s   &  r   test_from_traceback_dis%BytecodeTests.test_from_traceback_dis!	  s:    XLL''+-0r   c                    \         P                  ! R 4      p\        WP                  P	                  4       4       F  w  r#K  	  R# )r  N)r   rx  r  r  r   )r   bytecoder   r   s   &   r   test_bytecode_co_positions(BytecodeTests.test_bytecode_co_positions'	  s1    <<& #H.>.>.K.K.M NE9 Nr   rA  N)r*   r+   r,   r-   r  r  r  r  r  r  r  r  r   r  r0   r1   r2   s   @r   r  r    sF     =HJ	(1381 0 0r   r  c                   2   a  ] tR tRt o R tR tR tRtV tR# )TestBytecodeTestCasei-	  c                    \        R RR4      pV P                  VR^4       V P                  VR4       V P                  VRR4       R# )a = 1<string>r  r  	LOAD_NAMEr9   Nr  assertInBytecodeassertNotInBytecoderm  s   & r   *test_assert_not_in_with_op_not_in_bytecode?TestBytecodeTestCase.test_assert_not_in_with_op_not_in_bytecode.	  sE    w
F3d$4a8  {3  {C8r   c                    \        R RR4      pV P                  VR4       V P                  VR^4       V P                  VR^4       R# )r  r  r  r  rJ   Nr  rm  s   & r   +test_assert_not_in_with_arg_not_in_bytecode@TestBytecodeTestCase.test_assert_not_in_with_arg_not_in_bytecode4	  sF    w
F3d$45d$4a8  |Q7r   c                    \        R RR4      pV P                  \        4      ;_uu_ 4        V P                  VR^4       RRR4       R#   + '       g   i     R# ; i)r  r  r  r  N)r  r  AssertionErrorr  rm  s   & r   'test_assert_not_in_with_arg_in_bytecode<TestBytecodeTestCase.test_assert_not_in_with_arg_in_bytecode:	  sC    w
F3~..$$T+;Q? /...s   A		A	r#   N)	r*   r+   r,   r-   r  r  r  r0   r1   r2   s   @r   r  r  -	  s     98@ @r   r  c                   8   a  ] tR tRt o R tR tR tR tRtV t	R# )TestFinderMethodsi?	  c                R   . ROpV F  w  r#V P                  VR7      ;_uu_ 4        \        VRR4      p\        \        P                  ! V4      4      pV P                  \        V4      ^4       V P                  V^ ,          V4       RRR4       K  	  R#   + '       g   i     K  ; i)import a.b.cNsrcr  r  ))r  )za.b.cr   N)zfrom a.b import ca.br   rR   )zfrom a.b import c as dr  )zfrom a.b import *)r  r   *)zfrom ...a.b import c as d)r  r}   rR   )z from ..a.b import c as d, e as f)r  r|   )rO   r   )zfrom ..a.b import *)r  r|   r  )r   r  r   r   _find_importsr   r   r   casesr  r   r  r=   s   &     r   test__find_imports$TestFinderMethods.test__find_imports@	  s    
 #MC#&&sJ7C--d34  S1-  Q2	 '& #&&&s   A!BB&c                   . ROpV Fe  w  r#V P                  VR7      ;_uu_ 4        \        VRR4      p\        \        P                  ! V4      4      pV P                  WS4       RRR4       Kg  	  R#   + '       g   i     K|  ; i)x+yr  r  r  N))r  r#   )zx=y=1ru   )zx+=yr   )zglobal x
x=y=1ru   )zglobal x
z=x)rq   )r   r  r   r   _find_store_namesr   r  s   &     r   test__find_store_names(TestFinderMethods.test__find_store_namesQ	  sk    
 #MC#&&sJ7C11$78  / '& #&&&s   >A22Bc                   \         P                  ! \        P                  P                  4      p\
         Uu. uF#  pVP                  '       g   K  VP                  NK%  	  ppV P                  \        V4      \        V4      4       R # u upi r@   )
r   
findlabelsr  r   rk  r  is_jump_targetr9  r   sorted)r   labelsr   jumpss   &   r   test_findlabels!TestFinderMethods.test_findlabels_	  sj     6 67 /
.## ELL. 	 
 	7
s   BBc                    R  pVP                   p\        P                  ! V4       Uu. uF  q3^ ,          NK  	  ppV P                  V^ ^.4       R# u upi )c                      R # r@   r#   r#   r   r   r   3TestFinderMethods.test_findlinestarts.<locals>.funcj	  r(  r   N)r   r   findlinestartsr   )r   r   r  	linestartoffsetss   &    r   test_findlinestarts%TestFinderMethods.test_findlinestartsi	  sQ    	 }}141C1CD1IJ1IIQ<<1IJ1a&) Ks   Ar#   N)
r*   r+   r,   r-   r  r  r  r  r0   r1   r2   s   @r   r  r  ?	  s     3"08* *r   r  c                   V   a a ] tR tRt oV3R lV 3R lltR tR tR tR tRt	Vt
V ;t# )	TestDisTracebackir	  c                   < V ^8  d   QhRR/# )r|   returnNr#   )r  r3   s   "r   __annotate__TestDisTraceback.__annotate__s	  s     	 	t 	r   c                   <  \         = \         =\        SV `  4       #   \         d     L"i ; i  \         d     L,i ; ir@   )r  r  r  r  r  setUp)r   r  s   &r   r  TestDisTraceback.setUps	  sM    		" w}  		  		s    / ,,==c                
   \         P                  ! 4       p\        P                  ! V4      ;_uu_ 4        \        P
                  ! V4       R R R 4       VP                  4       #   + '       g   i     TP                  4       # ; ir@   r   r   r   r   r   distbr   r   r   r   s   && r   r    TestDisTraceback.get_disassembly~	  sQ    ''//IIbM 0   0/  s   A##B	c                    V P                  \        4      ;_uu_ 4        \        P                  ! 4        R R R 4       R #   + '       g   i     R # ; ir@   )r  r  r   r  r   s   &r   test_distb_empty!TestDisTraceback.test_distb_empty	  s+    |,,IIK -,,,s	   >A	c                    R V n         \        4       pV\        n        V P	                  V P                  R 4      \        4       R # r@   )r   r   r  r  r   r   r  r   r   s   & r   test_distb_last_traceback*TestDisTraceback.test_distb_last_traceback	  s3    X##D$8$8$>Nr   c                r    R V n         \        4       pV P                  V P                  V4      \        4       R # r@   )r   r   r   r   r  r   s   & r   test_distb_explicit_arg(TestDisTraceback.test_distb_explicit_arg	  s+    X##D$8$8$<mLr   rA  )r*   r+   r,   r-   r  r   r  r  r  r0   r1   r  r  s   @@r   r  r  r	  s+     	 	!OM Mr   r  c                   &   a  ] tR tRt o R tRtV tR# )TestDisTracebackWithFilei	  c                   \         P                  ! 4       p\        P                  ! V4      ;_uu_ 4        \        P
                  ! WR 7       RRR4       VP                  4       #   + '       g   i     TP                  4       # ; i)rF  Nr  r  s   && r   r   (TestDisTracebackWithFile.get_disassembly	  sR    ''//IIb& 0   0/  s   A$$B	r#   NrI  r2   s   @r   r  r  	  s     ! !r   r  c              #   n  "   V  F  pVx  V'       g   K  VP                   pVP                  ;'       g    R Fs  w  rEp\        V4       F^  pV^,          pV^ 8X  d+   V R\        P	                  V\
        P                  4       2pMRp\        R^ RWVRRRVP                  4
      x  K`  	  Ku  	  K  	  R# 5i)r|   z: r  r   NFr#   )	r9  r  r<   r   
from_bytesr  	byteorderr(  r   )	r  r$  r   r9  r@  sizedatar   r'  s	   &&       r   r&  r&  	  s      !&!1!1!7!7R!7D4[! 6!%bcmm)L(MNG GD'6 %tT5??D D ! "8 s   2B5B B5c                   f   a  ] tR tRt o R t]R 4       tR tR tR t	R t
R tR	 tR
 tR tRtV tR# )
TestDisCLIi	  c                    \         P                  ! 4       V n        V P                  \        P
                  V P                  4       R # r@   )tempfilemktempfilename
addCleanupr   unlinkr   s   &r   r  TestDisCLI.setUp	  s(     )	(($--8r   c                J    \         P                  ! V 4      P                  4       # )zDedent *string* and strip it from its surrounding whitespaces.

This method is used by the other utility functions so that any
string to write or to match against can be freely indented.
)textwrapdedentr  )strings   &r   text_normalizeTestDisCLI.text_normalize	  s     v&,,..r   c                    \        V P                  R 4      ;_uu_ 4       pVP                  V P                  V4      4       RRR4       R#   + '       g   i     R# ; i)wN)openr  writer  )r   contentfps   && r   
set_sourceTestDisCLI.set_source	  s;    $--%%HHT((12 &%%%s   !A

A	c                (   \         P                  ! 4       p\        P                  ! V4      ;_uu_ 4        \        P
                  ! . VOV P                  NR 7       RRR4       V P                  VP                  4       4      #   + '       g   i     L/; i)rM  N)	r   r   r   r   r   mainr  r  r   )r   flagsr   s   &* r   
invoke_disTestDisCLI.invoke_dis	  s_    ''//HH1E14==12 0""6??#455 0/s   &BB	c                4   V P                  WR 7      ;_uu_ 4        V P                  V4       V P                  ! V!  pV P                  V4      pV P	                  VP                  4       VP                  4       4       RRR4       R#   + '       g   i     R# ; i))sourcer)  N)r   r$  r*  r  assertListEqual
splitlines)r   r-  r  r)  r=   s   &&&* r   check_outputTestDisCLI.check_output	  sl    \\\55OOF#//5)C((0F  !163D3D3FG	 6555s   A!BB	c           
        . ROpV P                  R4       \        ^\        V4      ^,           4       Fv  p\        P                  ! WR7       FX  p\        P
                  ! V!   F=  pV P                  VR,          R7      ;_uu_ 4        V P                  ! V!  pRRR4       K?  	  KZ  	  Kx  	  V P                  \        4      ;_uu_ 4        \        P                  ! \        P                  ! 4       4      ;_uu_ 4        V P                  R4      pRRR4       RRR4       R#   + '       g   i     K  ; i  + '       g   i     L.; i  + '       g   i     R# ; i)-CzS
            def f():
                print(x)
                return None
        )rr  r'  Nz	--unknown)r3  z--show-cachesz-Oz--show-offsetsz-Pz--show-positionsz-Sz--specialized)r$  r<   r   	itertoolscombinationsproductr   r*  r  
SystemExitr   redirect_stderrr   r   )r   
base_flagsr4  choicesrM  r   s   &     r   test_invocationTestDisCLI.test_invocation	  s    

 	  	 q#j/A-.A$11*B%--w7D4844 OOT2 54 8 C / z**++BKKM::OOK0 ; +* 544
 ;: +**s0   D	2E;D3	ED03E>EE	c                D    R pRpR F  pV P                  WV4       K  	  R# )zprint()a  
            0           RESUME                   0

            1           LOAD_NAME                0 (print)
                        PUSH_NULL
                        CALL                     0
                        CACHE                    0 (counter: 0)
                        CACHE                    0 (func_version: 0)
                        CACHE                    0
                        POP_TOP
                        LOAD_CONST               0 (None)
                        RETURN_VALUE
        Nr5  r0  r   r-  r  flags   &   r   test_show_cacheTestDisCLI.test_show_cache	  s*     ,Dfd3 ,r   c                D    R pRpR F  pV P                  WV4       K  	  R# )passz
            0          0       RESUME                   0

            1          2       LOAD_CONST               0 (None)
                       4       RETURN_VALUE
        Nr6  rC  rD  s   &   r   test_show_offsetsTestDisCLI.test_show_offsets
  s*     -Dfd3 -r   c                D    R pRpR F  pV P                  WV4       K  	  R# )rI  z
            0:0-1:0            RESUME                   0

            1:0-1:4            LOAD_CONST               0 (None)
            1:0-1:4            RETURN_VALUE
        Nr7  rC  rD  s   &   r   test_show_positionsTestDisCLI.test_show_positions
  s*     /Dfd3 /r   c                D    R pRpR F  pV P                  WV4       K  	  R# )rI  z
            0           RESUME                   0

            1           LOAD_CONST               0 (None)
                        RETURN_VALUE
        Nr8  rC  rD  s   &   r   test_specialized_code TestDisCLI.test_specialized_code
  s*     ,Dfd3 ,r   )r  N)r*   r+   r,   r-   r  r.   r  r$  r*  r0  r@  rF  rJ  rM  rP  r0   r1   r2   s   @r   r  r  	  sL     9 / /36H144&
4
4
4 
4r   r  __main__r  )T)r   r|   rx  counterr        )rS  )indexr   rU  )module_keys_versionr   rU  )builtin_keys_versionr   rU  )func_versionr|          rt  )r   r  )versionr|   rZ  )descrry  s           r   )r  r   r   rs  r   r9  r   r   r  r  r  r  unittesttest.supportr   r   r   r   r   r   r	   test.support.bytecode_helperr
   r   r   r   r  r  TRACEBACK_CODEr   r    r   r  rt  rx  r(   r  r$   r}  r*   rp  r:   r   r   r  rl  r>   r-  rA   __file__r2  rC   r)  r6  ry  r:  r;  rH   r?  r@  rP   rS   rD  rH  rI  rJ  rW  rX  rZ  r^  r_  r`  ra  rb  rc  rd  re  rf  rg  r  rY   r  r]   r  r_   r  rb   rd   r  r  rf   rh   rk   rx   r  r  r  rz   r  r   r  r   r  TestCaser   r   rD  rW  r   code_info_constsrf  r.   rO  rg  __func__r  rh  ri  rj  rk  rl  rQ  rm  rS  rz  r  r  _line_offsetr  r  r  r  r  r  r  Instructionmaker(  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r&  r  r(  r#   r   r   <module>rh     s*     
  	   	 
    @ @ @ : 			' ""))
 

 
{{**BKK,@,@,O,ORS,SU
V 	 
 
uu~~$$beenn&C&Ca&GI
J 	 
uu~~$$beenn&C&Ca&GI	J & 
{{2	uu~~)	uu~~*		,
	 
{{!!	{{!!A%	{{!!A%'	'
 
{{!!	{{!!A%	{{!!A%'' 
# 
& ((((1,((1,((1,((1,((1,.'.6  	
 ))))A-))A-))A-))A-//.	
 %%--7-C  ^$dUd^$d\"d^$d  



LL #	 	 ""11""11A577
        	  B 
   /^ $$$$q($$q($$q($$q($$q($$q($$q(*_6*p&( ''):):)I)IA)MN)O,

1b ~~$$~~$$q(~~$$q(~~$$q(~~$$q(~~$$q(~~$$q(	c8	t

Zt ))))A-))A-))A-))A-))A-))A-	ua	H6 ****Q.**Q.**Q.**Q.		7 	D6   //  //!3  //!3  //!3  //!3		7 	 D 
{{!!	{{!!A%	{{!!A%	{{!!A%	*$ 	{{!!A%	{{!!A%	{{!!A%	{{!!A%%64 	{{!!A%	{{!!A%5@	  ((((1,((1,. .  , ((((1,((1,((1,/- / 6
 !!00!!001477 ((## (0Y0{ Y0x	!x 	! ==  O
   $ $ $ $
 D __--77:  ,   
 &5H%% 5F$<  ~~,,q0((+..=!++A. '66E   H OO  	 ;Ac3qWXfjx|};Ac3qWXfky}~81bQR`drst<QvxPQ`aos  BC  D%1S#a^_mr  AB  C%1S#b_aot  CD  E=a2bWYglz{|<Q}d=FYbdsu  DI  WX  Y?T2b_aot  CD  E+1iXZiky~  MN  O+1jY[jlz  NO  P<QsCY[in|}~=aXZiky}  LM  Ze  f<QsCY[in|}~<QsCY[in|}~<Qr4Y[in|}~#1bZ\jo}~<Qq"RVXfkyz{;AaBUWejxyz<Q~GW`bqs  BG  UV  W6qBrPR`est  C^  `H  BI  J9$tRY[in|}~%1S#b_aos  BC  D>tD"R^`ns  BC  D1 8 #1bYZhlz~;Ac3qWXfky}~;Ac3qWXfky}~81bQR`drst<QvxPQ`aos  BC  D%1S#b_aot  CD  E%1S#b_aot  CD  E%1S#b_aot  CD  E%1S#b_aot  CD  E=a2bWYglz{|<Q/@$O`Jajl{}  LQ  _`  a?T2b_aot  CD  E+1iXZiky~  MN  O+1jY[jlz  NO  P<QwPRacqv  EF  G=aXZiky}  LM  Ze  f<QsCY[in|}~<QsCY[in|}~<QsCY[in|}~<QsCY[in|}~6qBrPR`est  C^  `H  BI  J9$tRY[in|}~%1WgVXgiw{  JK  L>tD"R^`ns  BC  D1 8 #1bYZhlz~81bQR`drst=aXYhiw{  JK  Xc  d<QsCY[in|}~<QsCY[in|}~<QsCY[in|}~<QsCY[in|}~6AjZ`ikz|  KP  ^_  `6qBrPR`est  C^  `H  BI  J9$tRY[in|}~<QtVB]_mr  AB  C>tD"R^`ns  BC  D A81bQR`drstA=aXYhiw{  JK  Xc  dA #B2\^lq  @A  BA 6qBrPR`est  C^  `H  BI  J	A
 :4bZ\jo}~A :2b'"[]kp~  HI  Wr  Vs  tA <QsCY[in|}~A =aXZiky}  LM  Ze  fA %1S#b_aot  CD  EA 6qBrPR`est  C^  `H  BI  JA 9$tRY[in|}~A %1S#b_aos  BC  DA #1bZ\jo}~A <RYr`bpu  DE  Sn  Ro  pA &Ab'RTcesx  GH  Vq  Ur  sA  ;Dr"[]kp~  A!A" ?2wr`bpt  CD  Rm  Qn  o#A$ %1S#b_aos  BC  KL  M%A& #1bZ\jo}~'A( <SiPRacqv  EF  To  Sp  q)A* %1RQSbdrw  FG  Up  Tq  r+A, ;Dr"[]kp~  A-A. ?2wr`bpu  DE  Sn  Ro  p/A0 9$tRY[im{|  EF  G1A2 >r#wr`bpu  DE  F3A4 9$tRY[im{|  EF  G5A6 :4bZ\jo}~7A8 =aXZiky}  LN  [f  g9A: <Q/GQktw  GJ  X]  km  n;A< 6qBsQTbguw  Fa  cK  EL  M=A> 9$tRZ]kp  A  B?A@ $!CS_bpt  CE  MN  OAAB 9$tRZ]kp  A  Oj  lO  NP  QCAD &BsGTWfiw|  KM  [v  Zw  xEAF ;Dr#\_mr  AC  DGAH =aX[jm{  NP  ]h  iIAJ %1S#c`cqv  EG  HKAL 6qBsQTbguw  Fa  cK  EL  MMAN 9$tRZ]kp  A  BOAP %1S#c`cqu  DF  GQAR #1b[^lq  @B  CSAT ;Br4Z]kp  A  Oj  l]  N^  _UAV <QsCZ]kp  A  BWAX %1S#c`cqu  DF  GYAZ #1b[^lq  @B  C[A\ <SiPSbesx  GI  Wr  Vs  t]A^ &Ac7SVehv{  JL  Zu  Yv  w_A` ;Dr#\_mr  AC  DaAb ?3PSbesw  FH  Vq  Ur  scAd %1S#c`cqu  DF  NO  PeAf #1b[^lq  @B  CgAh <RYsadrw  FH  Vq  Ur  siAj %1S'RUdguz  IK  Yt  Xu  vkAl ;Dr#\_mr  AC  DmAn ?3PSbesx  GI  Wr  Vs  toAp >r#wsadrv  EG  OP  QqAr =aX[jm{  NP  XY  fq  rsAt <Q/V  aJ  SV  eh  v{  IK  LuAv 6qBsQTbguw  Fa  cK  EL  MwAx 9$tRZ]kp  A  ByAz 5d4CVYgky{  DE  F{A| #1b[^lp  A  B}A~ #1b[^lq  @B  CA@ ;Br3sY\jo}  Ni  k\  M]  ^AAB 9$tRZ]kp  A  BCAD %1S#c`cqu  DF  GEAF 6qBsQTbguwxGAH >qJsadrw  FH  IIAJ 6qBsQTbguwxKAL 6qBsQTbguwxMAN >qKPSbesx  GI  JOAP 6qBsQTbguw  Fa  cK  EL  MQAR <QwPSbesx  GI  JSAT =aX[jm{  NP  ]h  iUAV <Q/AK_hkz}  LQ  _a  bWAX 6qBsQTbguw  Fa  cK  EL  MYAZ 9$tRZ]kp  A  B[A\ <QtVC^aos  BD  E]A^ <QtVC^aot  CE  F_A` <QtVC^aot  CE  FaAb 6qBsQTbguw  Fa  cK  EL  McAd 9$tRZ]kp  A  BeAf =aX[jm{  NP  XZ  gr  sgAh <Q/CMdmp  @C  QV  df  giAj 6qBsQTbguw  Fa  cK  EL  MkAl 9$tRZ]kp  A  BmAn <QtVC^aot  CE  FoAp >tD"S_bpu  DF  GqAr ?T2c`cqu  DF  GsAt &DrRUdguz  IK  LuAv 9$tRZ]kp  A  Oj  lO  NP  QwAx %1S(SVehv{  JL  Zu  Yv  wyAz ;Dr#\_mr  AC  D{A| 9!Ar#TWejxz{}A~ 9$tRZ]kp  A  IK  LA@ <T$3]`ns  BD  EAAB 9$tRZ]kp  A  BCAD 9$tRZ]kp  A  BEAF 9$tRZ]kp  A  BGAH /RX^aps  BG  UW  XIAJ 6qBsQTbftxyKAL <T$3]`ns  BF  GMAN 9!Ar#TWejx|}OAP ?T2c`cqv  EI  JQAR =a0CM`il{~  MQ  _a  ny  zSAT $$tRPSbesx  GI  JUAV &BsHUXgjx}  LN  \w  [x  yWAX ;Dr#\_mr  AC  DYAZ 9$tRZ]kp  A  B[A\ =aX[jm{  NP  ]h  i]A^ <Q/V  aJ  SV  eh  v{  IK  L_A` 6qBsQTbguw  Fa  cK  EL  MaAb 9$tRZ]kp  A  BcAd <T$3]`ns  BD  EeAf /RX^aps  BG  UW  XgAh 9!Ar#TWeiwy  BD  EiAj 6qBsQTbftxykAl <T$3]`ns  BF  GmAn 9!Ar#TWejx|}oAp ?T2c`cqv  EI  JqAr =aX[jm{  NP  ]h  isAt <Q/CMdmp  @C  QV  df  guAv 6qBsQTbguw  Fa  cK  EL  MwAx 9$tRZ]kp  A  ByAz 9!Ar#TWejxz{{A| 6qBsQTbftxy}A~ <T$3]`ns  BF  GA@ 9!Ar#TWejx|}AA H 81bQR`drx  sB  sB  sQ  sQ  R<QtVA\]kp  E  N  N  ]  ]  ^>tD"Q]^lq  @F  @O  @O  @^  @^  _ -* -|A* |AB
<0' <0|@+ @$0*)) 0*f"M{ "MJ!/ !D4o4"" o4d zMMO r   