decompile_py_rref.py 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410
  1. from evaluator import *
  2. DESCRIPTION = "Test if a model can decompile a long (300 line) python bytecode function back to python."
  3. TAGS = ['code', 'python']
  4. question = """
  5. Disassemble the following python into a function called foo:
  6. 2 0 LOAD_CONST 1 (16)
  7. 2 STORE_FAST 2 (PH)
  8. 4 4 LOAD_CONST 2 (0)
  9. 6 STORE_FAST 3 (extra)
  10. 5 8 LOAD_CONST 2 (0)
  11. 10 STORE_FAST 4 (col)
  12. 6 12 BUILD_LIST 0
  13. 14 STORE_FAST 5 (pivots)
  14. 8 16 LOAD_CONST 3 (<code object <listcomp> at 0x101093660, file "/private/tmp/a.py", line 8>)
  15. 18 LOAD_CONST 4 ('rref.<locals>.<listcomp>')
  16. 20 MAKE_FUNCTION 0
  17. 22 LOAD_GLOBAL 0 (range)
  18. 24 LOAD_FAST 0 (matrix)
  19. 26 LOAD_ATTR 1 (shape)
  20. 28 LOAD_CONST 2 (0)
  21. 30 BINARY_SUBSCR
  22. 32 CALL_FUNCTION 1
  23. 34 GET_ITER
  24. 36 CALL_FUNCTION 1
  25. 38 STORE_FAST 6 (used_for_row)
  26. 10 40 LOAD_FAST 0 (matrix)
  27. 42 LOAD_FAST 2 (PH)
  28. 44 BINARY_MODULO
  29. 46 STORE_FAST 0 (matrix)
  30. 11 >> 48 LOAD_FAST 4 (col)
  31. 50 LOAD_FAST 3 (extra)
  32. 52 BINARY_ADD
  33. 54 LOAD_FAST 0 (matrix)
  34. 56 LOAD_ATTR 1 (shape)
  35. 58 LOAD_CONST 5 (1)
  36. 60 BINARY_SUBSCR
  37. 62 LOAD_CONST 5 (1)
  38. 64 BINARY_SUBTRACT
  39. 66 COMPARE_OP 0 (<)
  40. 68 EXTENDED_ARG 2
  41. 70 POP_JUMP_IF_FALSE 628
  42. 72 LOAD_FAST 4 (col)
  43. 74 LOAD_FAST 0 (matrix)
  44. 76 LOAD_ATTR 1 (shape)
  45. 78 LOAD_CONST 2 (0)
  46. 80 BINARY_SUBSCR
  47. 82 COMPARE_OP 0 (<)
  48. 84 EXTENDED_ARG 2
  49. 86 POP_JUMP_IF_FALSE 628
  50. 13 88 LOAD_FAST 0 (matrix)
  51. 90 LOAD_FAST 4 (col)
  52. 92 LOAD_FAST 4 (col)
  53. 94 LOAD_FAST 3 (extra)
  54. 96 BINARY_ADD
  55. 98 BUILD_TUPLE 2
  56. 100 BINARY_SUBSCR
  57. 102 LOAD_CONST 2 (0)
  58. 104 COMPARE_OP 2 (==)
  59. 106 EXTENDED_ARG 1
  60. 108 POP_JUMP_IF_FALSE 262
  61. 14 110 LOAD_GLOBAL 2 (np)
  62. 112 LOAD_METHOD 3 (all)
  63. 114 LOAD_FAST 0 (matrix)
  64. 116 LOAD_CONST 0 (None)
  65. 118 LOAD_CONST 0 (None)
  66. 120 BUILD_SLICE 2
  67. 122 LOAD_FAST 4 (col)
  68. 124 BUILD_TUPLE 2
  69. 126 BINARY_SUBSCR
  70. 128 LOAD_CONST 2 (0)
  71. 130 COMPARE_OP 2 (==)
  72. 132 CALL_METHOD 1
  73. 134 POP_JUMP_IF_FALSE 146
  74. 15 136 LOAD_FAST 3 (extra)
  75. 138 LOAD_CONST 5 (1)
  76. 140 INPLACE_ADD
  77. 142 STORE_FAST 3 (extra)
  78. 16 144 JUMP_ABSOLUTE 48
  79. 17 >> 146 LOAD_GLOBAL 2 (np)
  80. 148 LOAD_METHOD 4 (argwhere)
  81. 150 LOAD_FAST 0 (matrix)
  82. 152 LOAD_CONST 0 (None)
  83. 154 LOAD_CONST 0 (None)
  84. 156 BUILD_SLICE 2
  85. 158 LOAD_FAST 4 (col)
  86. 160 LOAD_FAST 3 (extra)
  87. 162 BINARY_ADD
  88. 164 BUILD_TUPLE 2
  89. 166 BINARY_SUBSCR
  90. 168 LOAD_CONST 2 (0)
  91. 170 COMPARE_OP 3 (!=)
  92. 172 CALL_METHOD 1
  93. 174 LOAD_METHOD 5 (flatten)
  94. 176 CALL_METHOD 0
  95. 178 LOAD_CONST 6 (-1)
  96. 180 BINARY_SUBSCR
  97. 182 STORE_FAST 7 (other)
  98. 18 184 LOAD_FAST 7 (other)
  99. 186 LOAD_FAST 4 (col)
  100. 188 COMPARE_OP 0 (<)
  101. 190 POP_JUMP_IF_FALSE 202
  102. 19 192 LOAD_FAST 3 (extra)
  103. 194 LOAD_CONST 5 (1)
  104. 196 INPLACE_ADD
  105. 198 STORE_FAST 3 (extra)
  106. 20 200 JUMP_ABSOLUTE 48
  107. 22 >> 202 LOAD_GLOBAL 6 (list)
  108. 204 LOAD_FAST 0 (matrix)
  109. 206 LOAD_FAST 7 (other)
  110. 208 BINARY_SUBSCR
  111. 210 CALL_FUNCTION 1
  112. 212 LOAD_GLOBAL 6 (list)
  113. 214 LOAD_FAST 0 (matrix)
  114. 216 LOAD_FAST 4 (col)
  115. 218 BINARY_SUBSCR
  116. 220 CALL_FUNCTION 1
  117. 222 ROT_TWO
  118. 224 LOAD_FAST 0 (matrix)
  119. 226 LOAD_FAST 4 (col)
  120. 228 STORE_SUBSCR
  121. 230 LOAD_FAST 0 (matrix)
  122. 232 LOAD_FAST 7 (other)
  123. 234 STORE_SUBSCR
  124. 23 236 LOAD_FAST 6 (used_for_row)
  125. 238 LOAD_FAST 7 (other)
  126. 240 BINARY_SUBSCR
  127. 242 LOAD_FAST 6 (used_for_row)
  128. 244 LOAD_FAST 4 (col)
  129. 246 BINARY_SUBSCR
  130. 248 ROT_TWO
  131. 250 LOAD_FAST 6 (used_for_row)
  132. 252 LOAD_FAST 4 (col)
  133. 254 STORE_SUBSCR
  134. 256 LOAD_FAST 6 (used_for_row)
  135. 258 LOAD_FAST 7 (other)
  136. 260 STORE_SUBSCR
  137. 25 >> 262 LOAD_FAST 5 (pivots)
  138. 264 LOAD_METHOD 7 (append)
  139. 266 LOAD_FAST 4 (col)
  140. 268 LOAD_FAST 3 (extra)
  141. 270 BINARY_ADD
  142. 272 CALL_METHOD 1
  143. 274 POP_TOP
  144. 26 276 LOAD_FAST 0 (matrix)
  145. 278 LOAD_FAST 4 (col)
  146. 280 LOAD_FAST 4 (col)
  147. 282 LOAD_FAST 3 (extra)
  148. 284 BINARY_ADD
  149. 286 BUILD_TUPLE 2
  150. 288 BINARY_SUBSCR
  151. 290 STORE_FAST 8 (pivot)
  152. 27 292 LOAD_FAST 4 (col)
  153. 294 LOAD_FAST 3 (extra)
  154. 296 BINARY_ADD
  155. 298 LOAD_FAST 1 (graphlen)
  156. 300 COMPARE_OP 0 (<)
  157. 302 EXTENDED_ARG 1
  158. 304 POP_JUMP_IF_FALSE 348
  159. 28 306 LOAD_GLOBAL 2 (np)
  160. 308 LOAD_METHOD 8 (abs)
  161. 310 LOAD_FAST 8 (pivot)
  162. 312 CALL_METHOD 1
  163. 314 LOAD_CONST 5 (1)
  164. 316 COMPARE_OP 2 (==)
  165. 318 EXTENDED_ARG 1
  166. 320 POP_JUMP_IF_TRUE 396
  167. 322 LOAD_GLOBAL 2 (np)
  168. 324 LOAD_METHOD 8 (abs)
  169. 326 LOAD_FAST 8 (pivot)
  170. 328 CALL_METHOD 1
  171. 330 LOAD_FAST 2 (PH)
  172. 332 LOAD_CONST 5 (1)
  173. 334 BINARY_SUBTRACT
  174. 336 COMPARE_OP 2 (==)
  175. 338 EXTENDED_ARG 1
  176. 340 POP_JUMP_IF_TRUE 396
  177. 342 LOAD_ASSERTION_ERROR
  178. 344 RAISE_VARARGS 1
  179. 346 JUMP_FORWARD 48 (to 396)
  180. 30 >> 348 LOAD_GLOBAL 2 (np)
  181. 350 LOAD_METHOD 8 (abs)
  182. 352 LOAD_FAST 8 (pivot)
  183. 354 CALL_METHOD 1
  184. 356 LOAD_CONST 7 (2)
  185. 358 COMPARE_OP 2 (==)
  186. 360 EXTENDED_ARG 1
  187. 362 POP_JUMP_IF_TRUE 388
  188. 364 LOAD_GLOBAL 2 (np)
  189. 366 LOAD_METHOD 8 (abs)
  190. 368 LOAD_FAST 8 (pivot)
  191. 370 CALL_METHOD 1
  192. 372 LOAD_FAST 2 (PH)
  193. 374 LOAD_CONST 7 (2)
  194. 376 BINARY_SUBTRACT
  195. 378 COMPARE_OP 2 (==)
  196. 380 EXTENDED_ARG 1
  197. 382 POP_JUMP_IF_TRUE 388
  198. 384 LOAD_ASSERTION_ERROR
  199. 386 RAISE_VARARGS 1
  200. 31 >> 388 LOAD_FAST 8 (pivot)
  201. 390 LOAD_CONST 7 (2)
  202. 392 INPLACE_FLOOR_DIVIDE
  203. 394 STORE_FAST 8 (pivot)
  204. 32 >> 396 LOAD_FAST 0 (matrix)
  205. 398 LOAD_FAST 4 (col)
  206. 400 DUP_TOP_TWO
  207. 402 BINARY_SUBSCR
  208. 404 LOAD_FAST 8 (pivot)
  209. 406 INPLACE_MULTIPLY
  210. 408 ROT_THREE
  211. 410 STORE_SUBSCR
  212. 33 412 LOAD_FAST 0 (matrix)
  213. 414 LOAD_FAST 4 (col)
  214. 416 DUP_TOP_TWO
  215. 418 BINARY_SUBSCR
  216. 420 LOAD_FAST 2 (PH)
  217. 422 INPLACE_MODULO
  218. 424 ROT_THREE
  219. 426 STORE_SUBSCR
  220. 35 428 LOAD_GLOBAL 2 (np)
  221. 430 LOAD_METHOD 4 (argwhere)
  222. 432 LOAD_FAST 0 (matrix)
  223. 434 LOAD_CONST 0 (None)
  224. 436 LOAD_CONST 0 (None)
  225. 438 BUILD_SLICE 2
  226. 440 LOAD_FAST 4 (col)
  227. 442 LOAD_FAST 3 (extra)
  228. 444 BINARY_ADD
  229. 446 BUILD_TUPLE 2
  230. 448 BINARY_SUBSCR
  231. 450 CALL_METHOD 1
  232. 452 LOAD_METHOD 5 (flatten)
  233. 454 CALL_METHOD 0
  234. 456 STORE_FAST 9 (others)
  235. 37 458 LOAD_FAST 9 (others)
  236. 460 GET_ITER
  237. >> 462 FOR_ITER 154 (to 618)
  238. 464 STORE_FAST 10 (i)
  239. 38 466 LOAD_FAST 10 (i)
  240. 468 LOAD_FAST 4 (col)
  241. 470 COMPARE_OP 2 (==)
  242. 472 EXTENDED_ARG 1
  243. 474 POP_JUMP_IF_FALSE 480
  244. 476 EXTENDED_ARG 1
  245. 478 JUMP_ABSOLUTE 462
  246. 39 >> 480 LOAD_FAST 6 (used_for_row)
  247. 482 LOAD_FAST 10 (i)
  248. 484 DUP_TOP_TWO
  249. 486 BINARY_SUBSCR
  250. 488 LOAD_FAST 6 (used_for_row)
  251. 490 LOAD_FAST 4 (col)
  252. 492 BINARY_SUBSCR
  253. 494 INPLACE_OR
  254. 496 ROT_THREE
  255. 498 STORE_SUBSCR
  256. 40 500 LOAD_FAST 4 (col)
  257. 502 LOAD_FAST 1 (graphlen)
  258. 504 COMPARE_OP 0 (<)
  259. 506 EXTENDED_ARG 2
  260. 508 POP_JUMP_IF_FALSE 548
  261. 41 510 LOAD_FAST 0 (matrix)
  262. 512 LOAD_FAST 10 (i)
  263. 514 DUP_TOP_TWO
  264. 516 BINARY_SUBSCR
  265. 518 LOAD_FAST 0 (matrix)
  266. 520 LOAD_FAST 4 (col)
  267. 522 BINARY_SUBSCR
  268. 524 LOAD_FAST 0 (matrix)
  269. 526 LOAD_FAST 10 (i)
  270. 528 LOAD_FAST 4 (col)
  271. 530 LOAD_FAST 3 (extra)
  272. 532 BINARY_ADD
  273. 534 BUILD_TUPLE 2
  274. 536 BINARY_SUBSCR
  275. 538 BINARY_MULTIPLY
  276. 540 INPLACE_SUBTRACT
  277. 542 ROT_THREE
  278. 544 STORE_SUBSCR
  279. 546 JUMP_FORWARD 50 (to 598)
  280. 43 >> 548 LOAD_FAST 0 (matrix)
  281. 550 LOAD_FAST 10 (i)
  282. 552 LOAD_FAST 4 (col)
  283. 554 LOAD_FAST 3 (extra)
  284. 556 BINARY_ADD
  285. 558 BUILD_TUPLE 2
  286. 560 BINARY_SUBSCR
  287. 562 LOAD_CONST 2 (0)
  288. 564 COMPARE_OP 3 (!=)
  289. 566 EXTENDED_ARG 2
  290. 568 POP_JUMP_IF_FALSE 598
  291. 44 570 LOAD_FAST 0 (matrix)
  292. 572 LOAD_FAST 10 (i)
  293. 574 BINARY_SUBSCR
  294. 576 LOAD_FAST 0 (matrix)
  295. 578 LOAD_FAST 4 (col)
  296. 580 BINARY_SUBSCR
  297. 582 BINARY_SUBTRACT
  298. 584 LOAD_FAST 2 (PH)
  299. 586 BINARY_MODULO
  300. 588 LOAD_FAST 0 (matrix)
  301. 590 LOAD_FAST 10 (i)
  302. 592 STORE_SUBSCR
  303. 594 EXTENDED_ARG 2
  304. 596 JUMP_ABSOLUTE 548
  305. 45 >> 598 LOAD_FAST 0 (matrix)
  306. 600 LOAD_FAST 10 (i)
  307. 602 DUP_TOP_TWO
  308. 604 BINARY_SUBSCR
  309. 606 LOAD_FAST 2 (PH)
  310. 608 INPLACE_MODULO
  311. 610 ROT_THREE
  312. 612 STORE_SUBSCR
  313. 614 EXTENDED_ARG 1
  314. 616 JUMP_ABSOLUTE 462
  315. 47 >> 618 LOAD_FAST 4 (col)
  316. 620 LOAD_CONST 5 (1)
  317. 622 INPLACE_ADD
  318. 624 STORE_FAST 4 (col)
  319. 626 JUMP_ABSOLUTE 48
  320. 49 >> 628 LOAD_GLOBAL 2 (np)
  321. 630 LOAD_METHOD 9 (array)
  322. 632 LOAD_FAST 0 (matrix)
  323. 634 CALL_METHOD 1
  324. 636 LOAD_FAST 2 (PH)
  325. 638 BINARY_MODULO
  326. 640 STORE_FAST 0 (matrix)
  327. 50 642 LOAD_CONST 8 (<code object <listcomp> at 0x101093b30, file "/private/tmp/a.py", line 50>)
  328. 644 LOAD_CONST 4 ('rref.<locals>.<listcomp>')
  329. 646 MAKE_FUNCTION 0
  330. 648 LOAD_FAST 6 (used_for_row)
  331. 650 GET_ITER
  332. 652 CALL_FUNCTION 1
  333. 654 RETURN_VALUE
  334. Disassembly of <code object <listcomp> at 0x101093660, file "/private/tmp/a.py", line 8>:
  335. 8 0 BUILD_LIST 0
  336. 2 LOAD_FAST 0 (.0)
  337. >> 4 FOR_ITER 14 (to 20)
  338. 6 STORE_FAST 1 (i)
  339. 8 LOAD_GLOBAL 0 (set)
  340. 10 LOAD_FAST 1 (i)
  341. 12 BUILD_LIST 1
  342. 14 CALL_FUNCTION 1
  343. 16 LIST_APPEND 2
  344. 18 JUMP_ABSOLUTE 4
  345. >> 20 RETURN_VALUE
  346. Disassembly of <code object <listcomp> at 0x101093b30, file "/private/tmp/a.py", line 50>:
  347. 50 0 BUILD_LIST 0
  348. 2 LOAD_FAST 0 (.0)
  349. >> 4 FOR_ITER 12 (to 18)
  350. 6 STORE_FAST 1 (x)
  351. 8 LOAD_GLOBAL 0 (sorted)
  352. 10 LOAD_FAST 1 (x)
  353. 12 CALL_FUNCTION 1
  354. 14 LIST_APPEND 2
  355. 16 JUMP_ABSOLUTE 4
  356. >> 18 RETURN_VALUE
  357. """
  358. test_case, answer = make_python_test([("foo(arr, 37)", "[[0, 38], [0, 38], [0, 6, 28, 35, 38], [0, 6, 18, 21, 28, 35, 38], [0, 6, 28, 35, 38], [0, 6, 21, 28, 35, 38], [0, 5, 10, 23, 38], [0, 5, 10, 23, 38], [0, 5, 10, 23, 38], [0, 5, 9, 10, 23, 38], [0, 5, 9, 10, 13, 17, 23, 30, 38], [0, 5, 9, 10, 11, 23, 27, 38], [0, 5, 9, 10, 11, 23, 27, 38], [0, 5, 9, 10, 11, 23, 25, 27, 38], [0, 1, 5, 7, 8, 9, 10, 11, 12, 15, 16, 19, 23, 25, 26, 27, 34, 38], [0, 1, 5, 7, 8, 9, 10, 11, 12, 15, 16, 19, 23, 25, 26, 27, 34, 38], [0, 1, 5, 7, 8, 9, 10, 11, 12, 15, 16, 19, 23, 25, 26, 27, 34, 38], [0, 1, 5, 7, 8, 9, 10, 11, 12, 15, 16, 19, 23, 25, 26, 27, 34, 38], [0, 1, 5, 7, 8, 9, 10, 11, 12, 15, 16, 19, 23, 25, 26, 27, 34, 38], [0, 1, 5, 7, 8, 9, 10, 11, 12, 15, 16, 19, 23, 25, 26, 27, 34, 38], [0, 1, 5, 7, 8, 9, 10, 11, 12, 15, 16, 19, 23, 24, 25, 26, 27, 34, 38], [0, 1, 5, 7, 8, 9, 10, 11, 12, 15, 16, 19, 23, 25, 26, 27, 34, 38], [0, 1, 5, 7, 8, 9, 10, 11, 12, 15, 16, 19, 23, 25, 26, 27, 34, 38], [0, 1, 5, 7, 8, 9, 10, 11, 12, 15, 16, 19, 23, 25, 26, 27, 34, 38], [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 15, 16, 19, 20, 21, 23, 25, 26, 27, 28, 31, 34, 35, 36, 37, 38], [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 15, 16, 19, 20, 21, 23, 25, 26, 27, 28, 31, 34, 35, 36, 37, 38], [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 15, 16, 19, 20, 21, 23, 25, 26, 27, 28, 31, 34, 35, 36, 37, 38], [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 15, 16, 19, 20, 21, 23, 25, 26, 27, 28, 31, 34, 35, 36, 37, 38], [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 15, 16, 19, 20, 21, 23, 25, 26, 27, 28, 31, 34, 35, 36, 37, 38], [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 15, 16, 19, 20, 21, 23, 25, 26, 27, 28, 31, 34, 35, 36, 37, 38], [0, 5, 9, 10, 13, 17, 23, 30, 38], [0, 5, 9, 10, 13, 17, 23, 30, 38], [0, 5, 9, 10, 13, 17, 23, 30, 32, 38], [0, 5, 9, 10, 13, 17, 23, 30, 32, 33, 38], [0, 22, 29, 38], [0, 22, 29, 38], [0, 6, 28, 35, 38], [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 15, 16, 19, 20, 21, 23, 25, 26, 27, 28, 31, 34, 35, 36, 37, 38], [14, 18, 21, 28, 35]]")], header="arr = np.array([[1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -10], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -20], [0, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, -2, 0, 0, 0, 0, 0, 0, 0, 0, 0, -20], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, -2, 0, 0, -10], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -13], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -11], [0, 0, 1, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -9], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -2, 0, -20], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -2, -40], [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]])")
  359. TestDisasRref = question >> LLMRun() >> ExtractCode() >> PythonRun(test_case) >> SubstringEvaluator(answer)
  360. if __name__ == "__main__":
  361. print(run_test(TestDisasRref))