angr 9.2.129__py3-none-win_amd64.whl → 9.2.131__py3-none-win_amd64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of angr might be problematic. Click here for more details.

Files changed (41) hide show
  1. angr/__init__.py +1 -1
  2. angr/analyses/decompiler/ail_simplifier.py +1 -1
  3. angr/analyses/decompiler/clinic.py +283 -4
  4. angr/analyses/decompiler/optimization_passes/__init__.py +0 -3
  5. angr/analyses/decompiler/peephole_optimizations/__init__.py +5 -1
  6. angr/analyses/decompiler/peephole_optimizations/a_mul_const_sub_a.py +34 -0
  7. angr/analyses/decompiler/peephole_optimizations/a_shl_const_sub_a.py +3 -1
  8. angr/analyses/decompiler/peephole_optimizations/bswap.py +10 -6
  9. angr/analyses/decompiler/peephole_optimizations/eager_eval.py +100 -19
  10. angr/analyses/decompiler/peephole_optimizations/remove_noop_conversions.py +15 -0
  11. angr/analyses/decompiler/peephole_optimizations/remove_redundant_conversions.py +42 -3
  12. angr/analyses/decompiler/peephole_optimizations/remove_redundant_shifts.py +4 -2
  13. angr/analyses/decompiler/peephole_optimizations/rol_ror.py +37 -10
  14. angr/analyses/decompiler/peephole_optimizations/shl_to_mul.py +25 -0
  15. angr/analyses/decompiler/peephole_optimizations/utils.py +18 -0
  16. angr/analyses/decompiler/presets/fast.py +0 -2
  17. angr/analyses/decompiler/presets/full.py +0 -2
  18. angr/analyses/decompiler/region_identifier.py +6 -1
  19. angr/analyses/decompiler/ssailification/rewriting_engine.py +7 -5
  20. angr/analyses/decompiler/ssailification/traversal_engine.py +2 -0
  21. angr/analyses/decompiler/structured_codegen/c.py +74 -13
  22. angr/analyses/decompiler/structuring/phoenix.py +17 -7
  23. angr/analyses/decompiler/utils.py +27 -0
  24. angr/analyses/s_propagator.py +20 -2
  25. angr/analyses/typehoon/simple_solver.py +9 -2
  26. angr/analyses/typehoon/typehoon.py +4 -1
  27. angr/analyses/variable_recovery/engine_ail.py +15 -15
  28. angr/analyses/variable_recovery/engine_base.py +3 -0
  29. angr/analyses/variable_recovery/engine_vex.py +17 -2
  30. angr/engines/light/engine.py +15 -13
  31. angr/engines/vex/claripy/irop.py +13 -2
  32. angr/lib/angr_native.dll +0 -0
  33. angr/utils/bits.py +5 -0
  34. angr/utils/formatting.py +4 -1
  35. {angr-9.2.129.dist-info → angr-9.2.131.dist-info}/METADATA +6 -6
  36. {angr-9.2.129.dist-info → angr-9.2.131.dist-info}/RECORD +40 -38
  37. {angr-9.2.129.dist-info → angr-9.2.131.dist-info}/WHEEL +1 -1
  38. angr/analyses/decompiler/optimization_passes/multi_simplifier.py +0 -223
  39. {angr-9.2.129.dist-info → angr-9.2.131.dist-info}/LICENSE +0 -0
  40. {angr-9.2.129.dist-info → angr-9.2.131.dist-info}/entry_points.txt +0 -0
  41. {angr-9.2.129.dist-info → angr-9.2.131.dist-info}/top_level.txt +0 -0
@@ -1,4 +1,4 @@
1
- angr/__init__.py,sha256=H7vjKb7cGcs7fXtPwftz3xSELPNZUzWL7xFWRC4tvvg,9153
1
+ angr/__init__.py,sha256=TdUYHjLWxyZNZnOF3HqJloE_RRvfXvpmfBdp5aqh0N8,9153
2
2
  angr/__main__.py,sha256=XeawhF6Cco9eWcfMTDWzYYggLB3qjnQ87IIeFOplaHM,2873
3
3
  angr/annocfg.py,sha256=5fiS9TPt5r1_8g_qSfD2XkETlBdm5MTClBIQKqhm040,10624
4
4
  angr/blade.py,sha256=GpbEumxMsb_6qD7TbtfZuW2CMzV7W1iwqYzQWYlXnxM,15394
@@ -55,7 +55,7 @@ angr/analyses/pathfinder.py,sha256=_prNqmRUSuSt2ZCP8qbvNN7pw7mtM8pWr9IL0AO6XL8,1
55
55
  angr/analyses/proximity_graph.py,sha256=-g7pNpbP2HQhKW3w1Eff23K8vAsgWWYoe3wVxRh3Lhk,16066
56
56
  angr/analyses/reassembler.py,sha256=y41XIGWqCVvwFlE3uACEMFLR-vByKkOazC405UPCOpM,98524
57
57
  angr/analyses/s_liveness.py,sha256=TQ_Er-6nQXZZU-tp_LNUXPbZeVCyR_QtVofpPLo8DU4,5239
58
- angr/analyses/s_propagator.py,sha256=7iyYX_MW6ljpd5BPjALIYcFmcjHzOW_BcmZLaO4YPQQ,14634
58
+ angr/analyses/s_propagator.py,sha256=lHtH3bt3CDf2xQCFxAd1_kVu9ukJgr-2zwrih7NwbVo,15608
59
59
  angr/analyses/smc.py,sha256=0fvLPUpjlg6GCjYnfSqanXkGYlthmPwqMYR-ZYBHsbo,5075
60
60
  angr/analyses/soot_class_hierarchy.py,sha256=AtvXMAlz6CVvfbtkPY4ghouH_1mNnPg9s9jFhZwWvEw,8741
61
61
  angr/analyses/stack_pointer_tracker.py,sha256=5NZf4muUFIJX-F605n5LMw8ihA648-FA4Bm5mAcsHBE,31379
@@ -96,13 +96,13 @@ angr/analyses/data_dep/data_dependency_analysis.py,sha256=QN_m2yDyOWnRHg1l4n6dKD
96
96
  angr/analyses/data_dep/dep_nodes.py,sha256=LcNcxeuKXMMc0GkmvKqqFwNlAk3GhzBR8ixM4CD305k,4640
97
97
  angr/analyses/data_dep/sim_act_location.py,sha256=EXmfFF3lV9XogcB2gFRMUoJCbjpDYiSKNyfafkBfiY8,1564
98
98
  angr/analyses/decompiler/__init__.py,sha256=JAHy5toHIzNxlRnht8geYexKueYhhCGHs7GM4E11AN4,1162
99
- angr/analyses/decompiler/ail_simplifier.py,sha256=dFoUJPeJF6cx03cdNG6NMGFvNfZJrCXAsDY1ncppiCI,71855
99
+ angr/analyses/decompiler/ail_simplifier.py,sha256=AI2GwIISIyNWCNRvUbTcpqqle4lD-uZpZq6YN8DBq1E,71876
100
100
  angr/analyses/decompiler/ailgraph_walker.py,sha256=m71HCthOr9J8PZoMxJzCPskay8yfCZ2j8esWT4Ka3KI,1630
101
101
  angr/analyses/decompiler/block_io_finder.py,sha256=xMwG8Bi69OGNYVs0U0F4yxM8kEsnyrsMrf0gEr8dOEw,10923
102
102
  angr/analyses/decompiler/block_similarity.py,sha256=ISMoOm-TGJ_1wD2i_4m8IYTletgnP66gReQESJnfvS0,6873
103
103
  angr/analyses/decompiler/block_simplifier.py,sha256=_WYyfFW8bJ_-RkrudJIlDdHh9fc6_aHkuwzW9gylY-k,13922
104
104
  angr/analyses/decompiler/callsite_maker.py,sha256=Gs_FmlmIs5jM-XccL9OMCaj_-L83NlYzkzxsy2HmcfQ,18749
105
- angr/analyses/decompiler/clinic.py,sha256=Psy7ljBDFOqYx_Al8xvDPe3naJi8YsdMryXo8wVlrhM,106999
105
+ angr/analyses/decompiler/clinic.py,sha256=n97E63-kHriPwvSbUBjjBFWjBTGnliLvRRhNzOxwEYg,119900
106
106
  angr/analyses/decompiler/condition_processor.py,sha256=MbpbSk6zXHmMLWjLAHxpYjcLCVL1TuL08KmTBTNpm_4,52839
107
107
  angr/analyses/decompiler/decompilation_cache.py,sha256=ELz1DDVYvrs6IeUX4_L0OZDZICUifSBdJkdJXWrFZAY,1375
108
108
  angr/analyses/decompiler/decompilation_options.py,sha256=QWUGnfQ0FUekGs_I6X-ZKvAvL39VX2hFRcZrlXd72fY,7957
@@ -115,12 +115,12 @@ angr/analyses/decompiler/jump_target_collector.py,sha256=qR11VsIp6H1N-19xCdXMRs1
115
115
  angr/analyses/decompiler/jumptable_entry_condition_rewriter.py,sha256=f_JyNiSZfoudElfl2kIzONoYCiosR4xYFOe8Q5SkvLg,2176
116
116
  angr/analyses/decompiler/label_collector.py,sha256=JLaGuSZu-DdJMBTYOPt4QpWJ6UigOpsC5bgNANrSao4,798
117
117
  angr/analyses/decompiler/redundant_label_remover.py,sha256=J9hpP3C_P08v84FjVU0q5Rmj5M1N9q3HKWSWsA2u7Yg,5879
118
- angr/analyses/decompiler/region_identifier.py,sha256=DGxaIc3cy-NYxKeZgMO_BuybQvI86XXxNX88Ya6elAw,47396
118
+ angr/analyses/decompiler/region_identifier.py,sha256=x3O9lvmJbO3rydE1Aw8eRMOFNXUkAGaJZv5dYz4a0X0,47622
119
119
  angr/analyses/decompiler/region_walker.py,sha256=u0hR0bEX1hSwkv-vejIM1gS-hcX2F2DLsDqpKhQ5_pQ,752
120
120
  angr/analyses/decompiler/return_maker.py,sha256=pKn9_y5VXqTeJnD5uzLLd9sH_Dp_9wkPcWPiJPTV-7A,2550
121
121
  angr/analyses/decompiler/seq_to_blocks.py,sha256=bB-1m8oBO59AlAp6izAROks3BBxFW8zigLlrIMt6Yfs,564
122
122
  angr/analyses/decompiler/sequence_walker.py,sha256=ODDPnChZ3Li0JyIXDR41JW9zvCsfPF5JvGYDL52wAYI,9375
123
- angr/analyses/decompiler/utils.py,sha256=ldej1mpMKsWYgENa5qG4VTeoCrID-9JudTaaFLTQEco,30456
123
+ angr/analyses/decompiler/utils.py,sha256=ylsc9wMtoNo5uL2qm1egYH-3DqU-cpBCFu0Hh3Du9DQ,31460
124
124
  angr/analyses/decompiler/ccall_rewriters/__init__.py,sha256=pTCBcuro4f8bnK7N6D48Y7Dh-2QwyzgVY33LlUBHcZE,137
125
125
  angr/analyses/decompiler/ccall_rewriters/amd64_ccalls.py,sha256=5yFpxu2U9ySRGx0F5NOOgHKpYlZ57Bswe-uIOTc-du4,23422
126
126
  angr/analyses/decompiler/ccall_rewriters/rewriter_base.py,sha256=8UyvC5BfQmYWJ_WPn7Vrt3c6YlEr0PdSzd8sPOvwlds,496
@@ -136,7 +136,7 @@ angr/analyses/decompiler/dephication/graph_rewriting.py,sha256=R0rlwYL0Cnt1UPjdE
136
136
  angr/analyses/decompiler/dephication/graph_vvar_mapping.py,sha256=nsMwppwMXrGC8_RF-neehpaz-7kmEORVhpAbjOdVFWM,13703
137
137
  angr/analyses/decompiler/dephication/rewriting_engine.py,sha256=3KUIxwUmfTZj2Jm1mB98J5vMkHqy4LLPYTrLzZfLbBA,10442
138
138
  angr/analyses/decompiler/dephication/seqnode_dephication.py,sha256=q29kS8lOs_-mxgJMtQvoZdw6l3q2lUDeXcTcGienIrY,4343
139
- angr/analyses/decompiler/optimization_passes/__init__.py,sha256=7CvrHdbjvebdxzXYIvLqzKNv41bc19tecWZJBnEwEyo,4965
139
+ angr/analyses/decompiler/optimization_passes/__init__.py,sha256=69qs4rG8evQvtc_T5pCikZl_6Hvqy26Vx9eLvh1JZIY,4875
140
140
  angr/analyses/decompiler/optimization_passes/base_ptr_save_simplifier.py,sha256=uUzQWVkeKL2C9Lq8NZ7UkkZBAXydxOd0F1jxr0Zi__Q,5514
141
141
  angr/analyses/decompiler/optimization_passes/call_stmt_rewriter.py,sha256=G1CEWo62dAMrm-3V4DfEDxT6kwXxuks10bcTtW9C_tA,1320
142
142
  angr/analyses/decompiler/optimization_passes/code_motion.py,sha256=7o6lf-qahXv5H8jLqEASVXHaz-_PGo3r6l7qH5PbDtU,15343
@@ -153,7 +153,6 @@ angr/analyses/decompiler/optimization_passes/ite_expr_converter.py,sha256=eeKEko
153
153
  angr/analyses/decompiler/optimization_passes/ite_region_converter.py,sha256=zTplo_VsSfY6WR_F4SIwHFvAySUo3USDntnniD23i-A,13201
154
154
  angr/analyses/decompiler/optimization_passes/lowered_switch_simplifier.py,sha256=1Yto_EBmmB5FkwZzaAO7S0MEvbQNEknFbbq-nUU0Eao,38818
155
155
  angr/analyses/decompiler/optimization_passes/mod_simplifier.py,sha256=papR480h-t_wEWMEdu6UTmc33lPSy_MOmiMgidPGnxc,3115
156
- angr/analyses/decompiler/optimization_passes/multi_simplifier.py,sha256=sIp2YISvafpyFzn8sgGMfohJsARiS3JFX_Y3IUXD_vo,10119
157
156
  angr/analyses/decompiler/optimization_passes/optimization_pass.py,sha256=ZCGlsTK_3pF2uKdUkLoI2zkQTVvR3w1zt0ZLhy0_BcA,21530
158
157
  angr/analyses/decompiler/optimization_passes/register_save_area_simplifier.py,sha256=tc4FruEl0sFpm1DUu9g8gWlueRm0t9rhfHsdUrVplBo,7932
159
158
  angr/analyses/decompiler/optimization_passes/ret_addr_save_simplifier.py,sha256=GIFiYM_C_ChHrD2D1JGRFlE--PU3FOxTqzOX-lXmJLY,6404
@@ -173,10 +172,11 @@ angr/analyses/decompiler/optimization_passes/duplication_reverter/duplication_re
173
172
  angr/analyses/decompiler/optimization_passes/duplication_reverter/errors.py,sha256=dJq1F3jbGBFWi0zIUmDu8bwUAKPt-JyAh5iegY9rYuU,527
174
173
  angr/analyses/decompiler/optimization_passes/duplication_reverter/similarity.py,sha256=V5NDaCYuzoJl-i74JKKV4t9FihXsnmNbki7_4SxJfwo,4406
175
174
  angr/analyses/decompiler/optimization_passes/duplication_reverter/utils.py,sha256=zpqQgJTtg4VyBMonldrcevjzLoVD48jbemMygE-VuhY,5175
176
- angr/analyses/decompiler/peephole_optimizations/__init__.py,sha256=wSxhpjnNTXIHCVDH6vU7Vxkz568H0MS5T_p7_Q5iATg,4343
175
+ angr/analyses/decompiler/peephole_optimizations/__init__.py,sha256=408dqFhq9U6cf-lS0VIUQGjmVaSJiDPxBSaNDowVS9Q,4454
177
176
  angr/analyses/decompiler/peephole_optimizations/a_div_const_add_a_mul_n_div_const.py,sha256=4iCV9lkADp8lvcPk9vjTwyAG8j5HTBVO9NgBuB7bYhA,1636
178
177
  angr/analyses/decompiler/peephole_optimizations/a_mul_const_div_shr_const.py,sha256=I_AznhlOZG_RDBOJrGsOamH2piOX7XgqxMSt5zX8HqQ,1374
179
- angr/analyses/decompiler/peephole_optimizations/a_shl_const_sub_a.py,sha256=Io8dMevnbaEE6MYOll9fJ-iCmgM9hhuALb3HNt2B9mo,1023
178
+ angr/analyses/decompiler/peephole_optimizations/a_mul_const_sub_a.py,sha256=noCM779o2T8spHyQn27Wxc0B6efexlwqsNcH8aqls6c,1153
179
+ angr/analyses/decompiler/peephole_optimizations/a_shl_const_sub_a.py,sha256=UbgDxAjFiKjn7CHcKXmXWVe8VvmtqpWYL8Vc-T8GOxc,1137
180
180
  angr/analyses/decompiler/peephole_optimizations/a_sub_a_div.py,sha256=MifsnlpogQgWKvshbsuXzQxYv95wBLYCflMddf-Rysc,958
181
181
  angr/analyses/decompiler/peephole_optimizations/a_sub_a_div_const_mul_const.py,sha256=q4qOmRuInwXqT3T3tyybVhWAE1dkS4xGVVkl2b0TGgk,2085
182
182
  angr/analyses/decompiler/peephole_optimizations/a_sub_a_sub_n.py,sha256=ZQhLw89LjX-O4Gev5AgWMcdn-QR_wVFLzBO4RI6podY,662
@@ -186,7 +186,7 @@ angr/analyses/decompiler/peephole_optimizations/basepointeroffset_add_n.py,sha25
186
186
  angr/analyses/decompiler/peephole_optimizations/basepointeroffset_and_mask.py,sha256=Wl1ULOi_zBbIzhlp_C-peqr2cazl1pezzubz50RV74k,1100
187
187
  angr/analyses/decompiler/peephole_optimizations/bitwise_or_to_logical_or.py,sha256=bozJ8fGjwYHjz4wS4P5S8y_I_h9WMvp1y9VSraWrBFM,1301
188
188
  angr/analyses/decompiler/peephole_optimizations/bool_expr_xor_1.py,sha256=zyitj8lWSd1rfuVe4GDlr-HnqNAqi_uflvbM0J7WpAA,990
189
- angr/analyses/decompiler/peephole_optimizations/bswap.py,sha256=UTkF5sYZcC45tXt94BzEvphXein40UF3ft1uqYKRNoE,6138
189
+ angr/analyses/decompiler/peephole_optimizations/bswap.py,sha256=70XLV0WLbWFgrYFcSReR6bVgJNoacejSlzR-uzJNEqY,6410
190
190
  angr/analyses/decompiler/peephole_optimizations/cmpord_rewriter.py,sha256=4ERanmpCQq06B6RE-AO_-jgPloyP9Jg5wcUja9iA_gI,2652
191
191
  angr/analyses/decompiler/peephole_optimizations/coalesce_adjacent_shrs.py,sha256=xZ129l0U5hoPXtczxZFUfZL59V7d0u2amQTO4phIpQU,1409
192
192
  angr/analyses/decompiler/peephole_optimizations/coalesce_same_cascading_ifs.py,sha256=h3m9FIxsMpElPE3ecFfa0vnzuxwG5oJLNEqvLuMpMgI,1062
@@ -194,7 +194,7 @@ angr/analyses/decompiler/peephole_optimizations/const_mull_a_shift.py,sha256=3KT
194
194
  angr/analyses/decompiler/peephole_optimizations/constant_derefs.py,sha256=5ThmIgu38Un_N5AltnQtcTnoEnOT45HRu6NehB3rG5M,1713
195
195
  angr/analyses/decompiler/peephole_optimizations/conv_a_sub0_shr_and.py,sha256=6WooyVqwdlMLixGFR8QE0n6GDEC2AluVo4dIr7vwmqY,2379
196
196
  angr/analyses/decompiler/peephole_optimizations/conv_shl_shr.py,sha256=5LtXTzPwO_Dtru3UYbr6l8YYylxKrAVZ9q6Gjk1C8sI,2105
197
- angr/analyses/decompiler/peephole_optimizations/eager_eval.py,sha256=T2dA5fhkNj-Y4NSVwz4N54jyVolMK6X963eESKqX0Ow,10594
197
+ angr/analyses/decompiler/peephole_optimizations/eager_eval.py,sha256=mQFIR5isnYp2uNZeY1R6QmAOdHzCer_-5orQXuNg0JA,15174
198
198
  angr/analyses/decompiler/peephole_optimizations/extended_byte_and_mask.py,sha256=r39kiAST4tC-iInTuFgnek0KOljBS3AxS2wPvEpEB58,2044
199
199
  angr/analyses/decompiler/peephole_optimizations/inlined_strcpy.py,sha256=40RcqWIMALxfA-LG-DN2N_yK5uW2HWF_x4AquCTMbNU,6245
200
200
  angr/analyses/decompiler/peephole_optimizations/inlined_strcpy_consolidation.py,sha256=wKj38t6sTd6wpbVpbPG7Nxiz9vU5K_TvL4sws04TsDk,4681
@@ -203,27 +203,29 @@ angr/analyses/decompiler/peephole_optimizations/invert_negated_logical_conjuctio
203
203
  angr/analyses/decompiler/peephole_optimizations/one_sub_bool.py,sha256=7R_rVBIbk-tFUYU8LMJI2RCtLJuvUMOhUL1jqE9D4u8,1135
204
204
  angr/analyses/decompiler/peephole_optimizations/remove_cascading_conversions.py,sha256=ut3wAJxwWTW4i4uglNEXrONG5PzNUniBGtUUZ9vmWe4,1815
205
205
  angr/analyses/decompiler/peephole_optimizations/remove_empty_if_body.py,sha256=kWgm8IkSU0Puya7uRFaNbUOOTYkXA5V9UD8S3ai_xZc,1602
206
- angr/analyses/decompiler/peephole_optimizations/remove_noop_conversions.py,sha256=ex6S-SaoIsHum5gTKFqvdx2f2Q46K_LJV-HSDR33-p4,1026
206
+ angr/analyses/decompiler/peephole_optimizations/remove_noop_conversions.py,sha256=ZmcFKbZ7_9j0-7SdfOgZxeGKyZPSg-dUQv4RYXtTHQI,1569
207
207
  angr/analyses/decompiler/peephole_optimizations/remove_redundant_bitmasks.py,sha256=MsoNtMoaMOtKUKkrBEQSOKlhCy4J9l06BlqpuJchT9Y,1670
208
- angr/analyses/decompiler/peephole_optimizations/remove_redundant_conversions.py,sha256=S3rXoVDDPQb1DeH9Qx5SQI0SKQuKFrKwJKtNB8sw3LE,6514
208
+ angr/analyses/decompiler/peephole_optimizations/remove_redundant_conversions.py,sha256=_TOXqaPu4SXkjFLsDjjeOd7SGz8nQXgRXofFvOswqIk,7766
209
209
  angr/analyses/decompiler/peephole_optimizations/remove_redundant_ite_branch.py,sha256=I3BdEwYNCz7vt0BreBhB-m0OD6g0-SxqNFCw5fpE_EM,1128
210
210
  angr/analyses/decompiler/peephole_optimizations/remove_redundant_ite_comparisons.py,sha256=o5KX_HnE8e_bJCSX2mOomheXRk3EUU0mPbja7w0w8Ns,1878
211
211
  angr/analyses/decompiler/peephole_optimizations/remove_redundant_nots.py,sha256=JOsJeo77vGGaEFFXSk2pHub6gleQmWsnvNdZEqv_uBg,538
212
212
  angr/analyses/decompiler/peephole_optimizations/remove_redundant_reinterprets.py,sha256=DqGdwso3CuulthzNNjUseNF2eb8VMQhhritjWSwCViE,1425
213
- angr/analyses/decompiler/peephole_optimizations/remove_redundant_shifts.py,sha256=TXCJ2e6F1kL-H6DN80rfd_yTbyQRyNnmuijCDQBLkZA,1658
213
+ angr/analyses/decompiler/peephole_optimizations/remove_redundant_shifts.py,sha256=XBE4jziVAhwUDxb3un5yMhngPc-MBGVcwtdm0EczQy4,1776
214
214
  angr/analyses/decompiler/peephole_optimizations/remove_redundant_shifts_around_comparators.py,sha256=MHkgIgOMWaAVqe5q4X-yzIxkPzd2KyTngvhxtXorOi4,1605
215
215
  angr/analyses/decompiler/peephole_optimizations/rewrite_bit_extractions.py,sha256=GRVXdwmu9OeTacxWRX0rGw5N5BUbN0xZxZRqtiL31iQ,3295
216
216
  angr/analyses/decompiler/peephole_optimizations/rewrite_mips_gp_loads.py,sha256=-bENfNstVil2AW-AUsQHr6GTt6TyhISw2jaNpHkheuU,1904
217
- angr/analyses/decompiler/peephole_optimizations/rol_ror.py,sha256=pbKk8NSOgU1pBFLV1_qZNxaEbNpA_TpV92AZhgVfVrg,4229
217
+ angr/analyses/decompiler/peephole_optimizations/rol_ror.py,sha256=b1OTZH0mFSPGtlV-a_Gdila38YaVNm1AJX9qtPuyzBA,5134
218
218
  angr/analyses/decompiler/peephole_optimizations/sar_to_signed_div.py,sha256=yZ_di2u55BiyjTfZatW5pQoqA5g3dbOXaLQv9CxkXhg,5180
219
+ angr/analyses/decompiler/peephole_optimizations/shl_to_mul.py,sha256=ooZ1wDPl5HsiaIpPQ57wgbtSwHfmTHDJ8xey8P6_3-Y,783
219
220
  angr/analyses/decompiler/peephole_optimizations/simplify_pc_relative_loads.py,sha256=9vj8fE4XpuFrnre0ucd138Zqb0P85IMuueW3h4SKhAQ,1449
220
221
  angr/analyses/decompiler/peephole_optimizations/single_bit_cond_to_boolexpr.py,sha256=1BdUs9d9Ma2PqMYy5VgIvsc30im5ni-By88RWkWbpSY,1872
221
222
  angr/analyses/decompiler/peephole_optimizations/single_bit_xor.py,sha256=tnjWYeKWL63rvLVcicVSD1NbVQJfHtLT85E_PNeYt6s,979
222
223
  angr/analyses/decompiler/peephole_optimizations/tidy_stack_addr.py,sha256=RRzuc2iGzQPvYaZAmpLKim0pJ_yR3-muGnJQxvpcN8w,4786
224
+ angr/analyses/decompiler/peephole_optimizations/utils.py,sha256=AjnndY2RIRg9R2vzVnEleq_IJgbtBPK3NlfK5vM0UYw,719
223
225
  angr/analyses/decompiler/presets/__init__.py,sha256=FfnTqgY3oINacW7JFPIxx3r9dwpgI0Pu8yygBCN9d68,375
224
226
  angr/analyses/decompiler/presets/basic.py,sha256=KDHlMq_XWonN2-JIYYVIhbI6FbfzXttmkgXFrwi5MiA,803
225
- angr/analyses/decompiler/presets/fast.py,sha256=7C6-7Enha_ZRP-z_1tD3y3tG-FFqFPdp97rCTro0I6o,1535
226
- angr/analyses/decompiler/presets/full.py,sha256=OJU5vmih0QPzoHWfy4Umwek7RHh6TV7fuUTi5VolDTo,1708
227
+ angr/analyses/decompiler/presets/fast.py,sha256=n_XZ676QrNjVjLv8I_E5rB0xXIfGIcvLNOQ3ZjFoZ1Q,1418
228
+ angr/analyses/decompiler/presets/full.py,sha256=N4lfDw2SxuMCizQ_3hBcfKvHsl4MGFXklDJkQjA1yC0,1662
227
229
  angr/analyses/decompiler/presets/preset.py,sha256=sTK5fJfx_Cdx0Gjn7y4bOrDp-2eFPeg1e1d5Eyc9uXk,1256
228
230
  angr/analyses/decompiler/region_simplifiers/__init__.py,sha256=BSD9osrReTEdapOMmyI1kFiN7AmE1EeJGLBV7i0u-Uc,117
229
231
  angr/analyses/decompiler/region_simplifiers/cascading_cond_transformer.py,sha256=qLs1LxEYHdPrh5c33IdkHJqtjBU7z4Sz6fxOK4Fn0Oc,3816
@@ -239,20 +241,20 @@ angr/analyses/decompiler/region_simplifiers/switch_cluster_simplifier.py,sha256=
239
241
  angr/analyses/decompiler/region_simplifiers/switch_expr_simplifier.py,sha256=CngQ_LSACeEVIjuU6kIW2Y0ZSMJWFBwpL95Yh_7w3O4,3335
240
242
  angr/analyses/decompiler/ssailification/__init__.py,sha256=zcHoI7e2El2RSU_bHTpQRd1XRLHOfFScG6f3cm5y_lQ,108
241
243
  angr/analyses/decompiler/ssailification/rewriting.py,sha256=-3jNGbtTH8-Yznoy0BguKlwoLTh9kqihT1tG0XfXX7E,12328
242
- angr/analyses/decompiler/ssailification/rewriting_engine.py,sha256=IUQOrEJDxvCZ0iKpPfj-0lod8ejnTke629JMw1dGG_Q,27204
244
+ angr/analyses/decompiler/ssailification/rewriting_engine.py,sha256=wqPu6ZPbxxh4D2YX4G6JzYIQv2KMnfg_sjig03gNaUc,27387
243
245
  angr/analyses/decompiler/ssailification/rewriting_state.py,sha256=L7apDXQLPiItuLdQFoQdut5RMUE8MRV1zRc3CsnuH6E,1883
244
246
  angr/analyses/decompiler/ssailification/ssailification.py,sha256=bTMTwS4auYQCnY9cNwqbgdYksFym0Iro5e7qRIDmlME,8711
245
247
  angr/analyses/decompiler/ssailification/traversal.py,sha256=75QzMIAC5RY_RcxMmqUTNeoEgGJwuTnR2KXIc8hnaMI,2981
246
- angr/analyses/decompiler/ssailification/traversal_engine.py,sha256=qVkx9fevkqxXy6PO1Yu2esPholvoaUOzqB1zmLKW9Os,5877
248
+ angr/analyses/decompiler/ssailification/traversal_engine.py,sha256=eSC6wnsLTvXXI0CGOLufV7L9yc8lpc8hJooALrC2mto,5947
247
249
  angr/analyses/decompiler/ssailification/traversal_state.py,sha256=_AsCnLiI2HFdM6WrPyAudhc0X4aU_PziznbOgmzpDzQ,1313
248
250
  angr/analyses/decompiler/structured_codegen/__init__.py,sha256=unzkTPhZbpjf5J3GWg1iAFkW17aHFHzuByZCMKE4onQ,633
249
251
  angr/analyses/decompiler/structured_codegen/base.py,sha256=9Zfp2d8Oqp6TAgLJyu7v214YDBtdy3Qx8rs801wIsv0,3796
250
- angr/analyses/decompiler/structured_codegen/c.py,sha256=zkS0NwthFXiILkdlRuniPXRKyeKlI6QMHPjaERG8ysQ,138987
252
+ angr/analyses/decompiler/structured_codegen/c.py,sha256=yibIm8YEUha7ZKdpAE_FiS1ogEfmlLViDzLTOKY6738,141013
251
253
  angr/analyses/decompiler/structured_codegen/dummy.py,sha256=JZLeovXE-8C-unp2hbejxCG30l-yCx4sWFh7JMF_iRM,570
252
254
  angr/analyses/decompiler/structured_codegen/dwarf_import.py,sha256=J6V40RuIyKXN7r6ESftIYfoREgmgFavnUL5m3lyTzlM,7072
253
255
  angr/analyses/decompiler/structuring/__init__.py,sha256=u2SGBezMdqQF_2ixo8wr66vCMedAMY-cSjQyq2m-nR8,711
254
256
  angr/analyses/decompiler/structuring/dream.py,sha256=mPNNsNvNb-LoDcoU_HjUejRytIFY_ZyCAbK4tNq_5lM,48254
255
- angr/analyses/decompiler/structuring/phoenix.py,sha256=-DkejyxETWXqGGdDw2-HBqlMgNUkVpApyyMpPforhSA,125114
257
+ angr/analyses/decompiler/structuring/phoenix.py,sha256=Bfv6xkv5uYt6QnF1mTrhRcA2c1Ur8HXiyCCQi_m34LQ,125499
256
258
  angr/analyses/decompiler/structuring/recursive_structurer.py,sha256=wxMiixVpmao1Rpuo3wN-gxkPh2YrgTTW4usgtdjdY9E,7150
257
259
  angr/analyses/decompiler/structuring/sailr.py,sha256=6lM9cK3iU1kQ_eki7v1Z2VxTiX5OwQzIRF_BbEsw67Q,5721
258
260
  angr/analyses/decompiler/structuring/structurer_base.py,sha256=b2fGaDOYy_XdgbOHsKIalJWVTXEt4zDK7w3IO-ZgIjI,43276
@@ -337,10 +339,10 @@ angr/analyses/s_reaching_definitions/s_reaching_definitions.py,sha256=GSt-yp59h4
337
339
  angr/analyses/typehoon/__init__.py,sha256=KjKBUZadAd3grXUy48_qO0L4Me-riSqPGteVDcTL59M,92
338
340
  angr/analyses/typehoon/dfa.py,sha256=E0dNlKxy6A9uniqRJn3Rcwa6c6_NT_VVjtHM8b-j2LE,3503
339
341
  angr/analyses/typehoon/lifter.py,sha256=iLl9F7RZtyth3qEeTvJGyvrKxrmaLn8LxS9DUbkoz4k,2823
340
- angr/analyses/typehoon/simple_solver.py,sha256=MYZwt06msIhQnOhyiHpbZ0fABrWAlKRGFpo13JFzumU,49088
342
+ angr/analyses/typehoon/simple_solver.py,sha256=W8Lkr71H7nWUqKlMfecyHTh1LNVq4vVd_KK7flVuPsI,49503
341
343
  angr/analyses/typehoon/translator.py,sha256=_P_fyR219Tjyen7ccrAesNQgkLMXRtbZyzsW9bi8F3w,9200
342
344
  angr/analyses/typehoon/typeconsts.py,sha256=LLXbaYIdU03GgA8xYsW4eguV6qlIoHhSesqWiAVl5xk,7146
343
- angr/analyses/typehoon/typehoon.py,sha256=YzrzK6iTMCO08l2pk2ov3WAtRZuHB6AYxlFpdtDI5HY,9333
345
+ angr/analyses/typehoon/typehoon.py,sha256=X7K9OT02yzTueXFPaFFoXGSsJOcPwtG1Jwz9mwIiF3w,9423
344
346
  angr/analyses/typehoon/typevars.py,sha256=F7CBFVplF_xy1gsUkUXnxEhBVeceXb-VvnYwntJ6ivU,16198
345
347
  angr/analyses/typehoon/variance.py,sha256=3wYw3of8uoar-MQ7gD6arALiwlJRW990t0BUqMarXIY,193
346
348
  angr/analyses/unpacker/__init__.py,sha256=uwWYeRUgAs_F_ZtIUkzCyca_5nTpc5HwqW0JeRtPN8o,190
@@ -348,9 +350,9 @@ angr/analyses/unpacker/obfuscation_detector.py,sha256=VWMHOO2UbyiGzRYzAq9yrU3WwZ
348
350
  angr/analyses/unpacker/packing_detector.py,sha256=SO6aXR1gZkQ7w17AAv3C1-U2KAc0yL9OIQqjNOtVnuo,5331
349
351
  angr/analyses/variable_recovery/__init__.py,sha256=eA1SHzfSx8aPufUdkvgMmBnbI6VDYKKMJklcOoCO7Ao,208
350
352
  angr/analyses/variable_recovery/annotations.py,sha256=2va7cXnRHYqVqXeVt00QanxfAo3zanL4BkAcC0-Bk20,1438
351
- angr/analyses/variable_recovery/engine_ail.py,sha256=oOlvhYyU9FkAcWcpRE9G_simBdDMrsCEyZRasr9TzlI,28546
352
- angr/analyses/variable_recovery/engine_base.py,sha256=PKPz2OOmEYUNKiiXHZIS1LA3jBG03d-TwfdGaHfKu3Q,50374
353
- angr/analyses/variable_recovery/engine_vex.py,sha256=iC9FB_wYLxJAdTsOQ8QBtIN_SXKnIDrW8eNGZgv-0-Q,18835
353
+ angr/analyses/variable_recovery/engine_ail.py,sha256=dYnTQ8fy1bEXMIUSdUYkXIZtFNid0fhtYgw_fFhVIcg,28676
354
+ angr/analyses/variable_recovery/engine_base.py,sha256=Y5Lc2wMKqoUcj_gbmIZ1lapCuy0x7MtjVEIKTe32vWM,50569
355
+ angr/analyses/variable_recovery/engine_vex.py,sha256=LmUzvlKIyW0NawOfGoKvOq-AoiTtvREOmNdxL8y1cp4,19600
354
356
  angr/analyses/variable_recovery/irsb_scanner.py,sha256=HlH_Hd6z5i3MTBHRoWq1k4tGudz8PewiM76hYv8d3ZQ,4913
355
357
  angr/analyses/variable_recovery/variable_recovery.py,sha256=pBXY1fb3jR2pDpLMtOjL8rH_tkjyvatObW12gYb-r1g,21742
356
358
  angr/analyses/variable_recovery/variable_recovery_base.py,sha256=_WX6Qa6HIFUJkZnMIj_wdE9UZo0otYk-oKNEZCA-OvI,15025
@@ -398,7 +400,7 @@ angr/engines/syscall.py,sha256=HPAygXTIb8e4_j2DBS4LCCaAz9DNyji5mucfoYck_Dc,2162
398
400
  angr/engines/unicorn.py,sha256=8ggDUXdEQl1EMiY-Tp4CnyzzMK0zZrkGObLvBwPU9uU,24496
399
401
  angr/engines/light/__init__.py,sha256=3arK8vMsnu6TRxa1_sVWBfD7fRDHFL5kBbl9q-ui9Zw,435
400
402
  angr/engines/light/data.py,sha256=W4g-RZcLyhqXMiyrQBhNYaf8a3NIemq4iQpbPsl_Cdg,21243
401
- angr/engines/light/engine.py,sha256=wJiS2i5TMN4cuHXZbJhJvT3MjcOlhGX8OHI1hEQuBiY,46031
403
+ angr/engines/light/engine.py,sha256=71V807opcHDi-wUsZQukvZaN676tKujVsYWwjginFNI,46281
402
404
  angr/engines/pcode/__init__.py,sha256=aoEeroPopUOmSplbB9XMz9ke9LXO6jtFMmI_e8X4i28,195
403
405
  angr/engines/pcode/behavior.py,sha256=UZHWTPyRnWN28i8I6o6YgnsIa4CaN_yP36fyNu45heg,29406
404
406
  angr/engines/pcode/cc.py,sha256=vPT7FA2tmlPUVA2ptHDNVqhAZEuZZaJYajBEIctXH54,3180
@@ -455,7 +457,7 @@ angr/engines/vex/lifter.py,sha256=ZW37S1McKXzOkhP8JRfMwYT7iMxv3wOLhbQOdTW6cp8,16
455
457
  angr/engines/vex/claripy/__init__.py,sha256=4B8H1VOHrrKJMjAXZkZ0r_02issFP_bxDJJMw50yVe4,109
456
458
  angr/engines/vex/claripy/ccall.py,sha256=82w7I1OIIFmnarngCOn39iBwmYv3Xp46Xcz1ATqjn80,81765
457
459
  angr/engines/vex/claripy/datalayer.py,sha256=62OwjpOPxpXBmxkRLde5RYLfI_oCIfdj23GVYP25VUQ,4973
458
- angr/engines/vex/claripy/irop.py,sha256=meEiCdsUhAiAydBl8D6Zp9SrTrIOiGVVUlgu3NNRj7w,45753
460
+ angr/engines/vex/claripy/irop.py,sha256=rCrVpwwZnXzgTYgsXDLahcONCv3UvHnM1yr9jQgaIek,46228
459
461
  angr/engines/vex/heavy/__init__.py,sha256=VLvDao7Drp2stJnRfznKM04IFYi7rjfdRWVJ09nl7Ow,376
460
462
  angr/engines/vex/heavy/actions.py,sha256=n8LDymfj6qHAd6evzoyZmHkSN8MlVjZHfgREATC-bek,8663
461
463
  angr/engines/vex/heavy/concretizers.py,sha256=2xQYLXmugpJWIUjUrMnall2ewX05kTdOYLWjediaf6Q,14433
@@ -546,7 +548,7 @@ angr/knowledge_plugins/xrefs/__init__.py,sha256=5PhqVOtTZ27lCjJ9wp7akUeJydqILbyC
546
548
  angr/knowledge_plugins/xrefs/xref.py,sha256=ROo_kAEKwB51whVYcGtTV0QRtYmQZV8nEoEtbQWyC9U,4883
547
549
  angr/knowledge_plugins/xrefs/xref_manager.py,sha256=Yb88z3L8Y26TfGeRHdsGWQlT9f6oWntjEg6s-kcVtUQ,4040
548
550
  angr/knowledge_plugins/xrefs/xref_types.py,sha256=LcQ9pD4E4XlC51Us49xiqAoGAFGpnCrpYO4mOzILiKI,308
549
- angr/lib/angr_native.dll,sha256=VUGmqh3iYeLnylRcoGsfJL-irhMdL1E6-PRBBhVGT4c,19319808
551
+ angr/lib/angr_native.dll,sha256=-OsfitQ3QOZpM8J1S4bqcXqezaCSyro6i7fRcZSFdfI,19319808
550
552
  angr/misc/__init__.py,sha256=ZPHXbrIdsfe_qdmq8CnXuS_bBWOy4MDT2NjwUnPgHZc,355
551
553
  angr/misc/ansi.py,sha256=nPJHC0SKfqasMQZ0LxdmmIYojjmk4nr5jI6FrzoTwS0,811
552
554
  angr/misc/autoimport.py,sha256=iZagpuPwZWczUTYIqs-JkDMQjftMqc_cchcm7OBFiEg,3450
@@ -1332,14 +1334,14 @@ angr/storage/memory_mixins/regioned_memory/static_find_mixin.py,sha256=tWyiNrMxm
1332
1334
  angr/utils/__init__.py,sha256=knkVHIwNqvlu-QgvPorAscSpyPWogzfZwP5OnYmLbmk,1159
1333
1335
  angr/utils/ail.py,sha256=8_FloZ6cP89D2Nfc_2wCPcuVv7ny-aP-OKS3syCSMLk,1054
1334
1336
  angr/utils/algo.py,sha256=4TaEFE4tU-59KyRVFASqXeoiwH01ZMj5fZd_JVcpdOY,1038
1335
- angr/utils/bits.py,sha256=ut-9JR2Ks3fiC9aGae_UfYZBKHCADuhPHmPwPYPDwwg,357
1337
+ angr/utils/bits.py,sha256=0x3sl_CYlYDWw0vBFJPXIf-SQiedQErhpN-hi_kZLBo,494
1336
1338
  angr/utils/constants.py,sha256=ZnK6Ed-1U_8yaw-7ZaCLSM0-z7bSuKPg715bBrquxKE,257
1337
1339
  angr/utils/cowdict.py,sha256=qx2iO1rrCDTQUGX9dqi9ZAly2Dgm6bCEgdSAQw9MxRM,2159
1338
1340
  angr/utils/dynamic_dictlist.py,sha256=n-HlT1H8yk4KowLTJ6II5ioJr5qn66DW3t4hhesx1Vs,3048
1339
1341
  angr/utils/endness.py,sha256=wBcek3rwRQCYdMVFOV5h5q16Ahgjn2x_zZdPeZQEui0,501
1340
1342
  angr/utils/enums_conv.py,sha256=dQqZwspTq8tR5auBEnbpigk9CLkYqduAFgfBsOXqPms,2129
1341
1343
  angr/utils/env.py,sha256=aO4N2h7DUsUQtTgnC5J_oPHvMxJRur20m5UFSkmy4XU,398
1342
- angr/utils/formatting.py,sha256=6szFjm3RtlD3G_csDmRgEB8JFNGC3GfZC8YdGYa1ZHg,4242
1344
+ angr/utils/formatting.py,sha256=OWzSfAlKcL09cEtcqxszYWHsRO9tih7hvXD2K9kUZc8,4343
1343
1345
  angr/utils/funcid.py,sha256=dSGbKUWpTzy48374lJqHyRefJ6K7B7jRVhYHmpGmD3I,5256
1344
1346
  angr/utils/graph.py,sha256=Sjm1rV1OWInzHVGcyecerNhHRn3eqqQhEjcEhrFLK8M,30489
1345
1347
  angr/utils/lazy_import.py,sha256=7Mx-y-aZFsXX9jNxvEcXT-rO8tL8rknb6D6RbSFOI1M,343
@@ -1353,9 +1355,9 @@ angr/utils/timing.py,sha256=ELuRPzdRSHzOATgtAzTFByMlVr021ypMrsvtpopreLg,1481
1353
1355
  angr/utils/ssa/__init__.py,sha256=Sz9zQVnvtmCbJJYeTG_k2JxcZtgxvIxap-KqzvRnIFQ,8015
1354
1356
  angr/utils/ssa/tmp_uses_collector.py,sha256=rSpvMxBHzg-tmvhsfjn3iLyPEKzaZN-xpQrdslMq3J4,793
1355
1357
  angr/utils/ssa/vvar_uses_collector.py,sha256=8gfAWdRMz73Deh-ZshDM3GPAot9Lf-rHzCiaCil0hlE,1342
1356
- angr-9.2.129.dist-info/LICENSE,sha256=cgL_ho5B1NH8UxwtBuqThRWdjear8b7hktycaS1sz6g,1327
1357
- angr-9.2.129.dist-info/METADATA,sha256=zR_L9QvEsp2x9IcK9OqTYMS5NjOu3_xGvpvQ2NfsXxU,4882
1358
- angr-9.2.129.dist-info/WHEEL,sha256=mCAnnC0-_a8jQ1aV0yaOm4cRTtgPkoUQt43Nw8YWazc,97
1359
- angr-9.2.129.dist-info/entry_points.txt,sha256=Vjh1C8PMyr5dZFMnik5WkEP01Uwr2T73I3a6N32sgQU,44
1360
- angr-9.2.129.dist-info/top_level.txt,sha256=dKw0KWTbwLXytFvv15oAAG4sUs3ey47tt6DorJG9-hw,5
1361
- angr-9.2.129.dist-info/RECORD,,
1358
+ angr-9.2.131.dist-info/LICENSE,sha256=cgL_ho5B1NH8UxwtBuqThRWdjear8b7hktycaS1sz6g,1327
1359
+ angr-9.2.131.dist-info/METADATA,sha256=bS6zkaBPDpq6vaZrchZEIR32_4NqTuaHbsfKPypmNv4,4882
1360
+ angr-9.2.131.dist-info/WHEEL,sha256=z8gukVdnGwjcwo0VnsfJMrhPu5QJT68VcMWmAgvAufw,97
1361
+ angr-9.2.131.dist-info/entry_points.txt,sha256=Vjh1C8PMyr5dZFMnik5WkEP01Uwr2T73I3a6N32sgQU,44
1362
+ angr-9.2.131.dist-info/top_level.txt,sha256=dKw0KWTbwLXytFvv15oAAG4sUs3ey47tt6DorJG9-hw,5
1363
+ angr-9.2.131.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (75.5.0)
2
+ Generator: setuptools (75.6.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-win_amd64
5
5
 
@@ -1,223 +0,0 @@
1
- from __future__ import annotations
2
- import logging
3
-
4
- from ailment import Expr
5
- from unique_log_filter import UniqueLogFilter
6
-
7
- from .engine_base import SimplifierAILEngine, SimplifierAILState
8
- from .optimization_pass import OptimizationPass, OptimizationPassStage
9
-
10
- _l = logging.getLogger(name=__name__)
11
- _l.addFilter(UniqueLogFilter())
12
-
13
-
14
- class MultiSimplifierAILEngine(SimplifierAILEngine):
15
- """
16
- An AIL pass for the multi simplifier
17
- """
18
-
19
- def _ail_handle_Add(self, expr):
20
- operand_0 = self._expr(expr.operands[0])
21
- operand_1 = self._expr(expr.operands[1])
22
-
23
- # x + x = 2*x
24
- if (
25
- type(operand_0) in [Expr.Convert, Expr.VirtualVariable]
26
- and isinstance(operand_1, (Expr.Convert, Expr.VirtualVariable))
27
- and operand_0 == operand_1
28
- ):
29
- count = Expr.Const(expr.idx, None, 2, operand_1.bits)
30
- return Expr.BinaryOp(expr.idx, "Mul", [operand_1, count], expr.signed, **expr.tags)
31
- # 2*x + x = 3*x
32
- if Expr.BinaryOp in [type(operand_0), type(operand_1)]:
33
- if (
34
- isinstance(operand_1, Expr.BinaryOp)
35
- and operand_1.op == "Mul"
36
- and (
37
- not isinstance(operand_0, Expr.BinaryOp)
38
- or (isinstance(operand_0, Expr.BinaryOp) and operand_0.op != "Mul")
39
- )
40
- ):
41
- x0 = operand_0
42
- x1_index = 0 if isinstance(operand_1.operands[1], Expr.Const) else 1
43
- x1 = operand_1.operands[x1_index]
44
- const_x1 = operand_1.operands[1 - x1_index]
45
- if x0 == x1:
46
- new_const = Expr.Const(const_x1.idx, None, const_x1.value + 1, const_x1.bits)
47
- return Expr.BinaryOp(expr.idx, "Mul", [x0, new_const], expr.signed, **expr.tags)
48
- elif (
49
- isinstance(operand_0, Expr.BinaryOp)
50
- and operand_0.op == "Mul"
51
- and (
52
- not isinstance(operand_1, Expr.BinaryOp)
53
- or (isinstance(operand_1, Expr.BinaryOp) and operand_1.op != "Mul")
54
- )
55
- ):
56
- x1 = operand_1
57
- x0_index = 0 if isinstance(operand_0.operands[1], Expr.Const) else 1
58
- x0 = operand_0.operands[x0_index]
59
- const_x0 = operand_0.operands[1 - x0_index]
60
- if x0 == x1:
61
- new_const = Expr.Const(const_x0.idx, None, const_x0.value + 1, const_x0.bits)
62
- return Expr.BinaryOp(expr.idx, "Mul", [x1, new_const], expr.signed, **expr.tags)
63
- # 2*x + 3*x = 5*x
64
- elif (
65
- isinstance(operand_0, Expr.BinaryOp)
66
- and isinstance(operand_1, Expr.BinaryOp)
67
- and operand_0.op == "Mul"
68
- and operand_1.op == "Mul"
69
- ):
70
- if Expr.Const in [type(operand_0.operands[0]), type(operand_0.operands[1])] and Expr.Const in [
71
- type(operand_1.operands[0]),
72
- type(operand_1.operands[1]),
73
- ]:
74
- x0_index = 0 if isinstance(operand_0.operands[1], Expr.Const) else 1
75
- x0 = operand_0.operands[x0_index]
76
- const_x0 = operand_0.operands[1 - x0_index]
77
-
78
- x1_index = 0 if isinstance(operand_1.operands[1], Expr.Const) else 1
79
- x1 = operand_1.operands[x1_index]
80
- const_x1 = operand_1.operands[1 - x1_index]
81
- if x0 == x1:
82
- new_const = Expr.Const(const_x1.idx, None, const_x1.value + const_x0.value, const_x1.bits)
83
- return Expr.BinaryOp(expr.idx, "Mul", [x0, new_const], expr.signed, **expr.tags)
84
-
85
- if (operand_0, operand_1) != (expr.operands[0], expr.operands[1]):
86
- return Expr.BinaryOp(expr.idx, "Add", [operand_0, operand_1], expr.signed, **expr.tags)
87
- return expr
88
-
89
- def _ail_handle_Sub(self, expr):
90
- operand_0 = self._expr(expr.operands[0])
91
- operand_1 = self._expr(expr.operands[1])
92
-
93
- # x + x = 2*x
94
- if (
95
- type(operand_0) in [Expr.Convert, Expr.VirtualVariable]
96
- and isinstance(operand_1, (Expr.Convert, Expr.VirtualVariable))
97
- and operand_0 == operand_1
98
- ):
99
- count = Expr.Const(expr.idx, None, 0, 8)
100
- return Expr.BinaryOp(expr.idx, "Mul", [operand_1, count], expr.signed, **expr.tags)
101
-
102
- # 2*x - x = x
103
- if Expr.BinaryOp in [type(operand_0), type(operand_1)]:
104
- if (
105
- isinstance(operand_1, Expr.BinaryOp)
106
- and operand_1.op == "Mul"
107
- and (
108
- not isinstance(operand_0, Expr.BinaryOp)
109
- or (isinstance(operand_0, Expr.BinaryOp) and operand_0.op != "Mul")
110
- )
111
- ):
112
- x0 = operand_0
113
- x1_index = 0 if isinstance(operand_1.operands[1], Expr.Const) else 1
114
- x1 = operand_1.operands[x1_index]
115
- const_x1 = operand_1.operands[1 - x1_index]
116
- if x0 == x1:
117
- new_const = Expr.Const(const_x1.idx, None, const_x1.value - 1, const_x1.bits)
118
- return Expr.BinaryOp(expr.idx, "Mul", [x0, new_const], expr.signed, **expr.tags)
119
- elif (
120
- isinstance(operand_0, Expr.BinaryOp)
121
- and operand_0.op == "Mul"
122
- and (
123
- not isinstance(operand_1, Expr.BinaryOp)
124
- or (isinstance(operand_1, Expr.BinaryOp) and operand_1.op != "Mul")
125
- )
126
- ):
127
- x1 = operand_1
128
- x0_index = 0 if isinstance(operand_0.operands[1], Expr.Const) else 1
129
- x0 = operand_0.operands[x0_index]
130
- const_x0 = operand_0.operands[1 - x0_index]
131
- if x0 == x1:
132
- new_const = Expr.Const(const_x0.idx, None, const_x0.value - 1, const_x0.bits)
133
- return Expr.BinaryOp(expr.idx, "Mul", [x1, new_const], expr.signed, **expr.tags)
134
- # 3*x - 2*x = x
135
- elif (
136
- isinstance(operand_0, Expr.BinaryOp)
137
- and isinstance(operand_1, Expr.BinaryOp)
138
- and operand_0.op == "Mul"
139
- and operand_1.op == "Mul"
140
- ):
141
- if Expr.Const in [type(operand_0.operands[0]), type(operand_0.operands[1])] and Expr.Const in [
142
- type(operand_1.operands[0]),
143
- type(operand_1.operands[1]),
144
- ]:
145
- x0_index = 0 if isinstance(operand_0.operands[1], Expr.Const) else 1
146
- x0 = operand_0.operands[x0_index]
147
- const_x0 = operand_0.operands[1 - x0_index]
148
-
149
- x1_index = 0 if isinstance(operand_1.operands[1], Expr.Const) else 1
150
- x1 = operand_1.operands[x1_index]
151
- const_x1 = operand_1.operands[1 - x1_index]
152
- if x0 == x1:
153
- new_const = Expr.Const(const_x1.idx, None, const_x0.value - const_x1.value, const_x1.bits)
154
- return Expr.BinaryOp(expr.idx, "Mul", [x0, new_const], expr.signed, **expr.tags)
155
-
156
- if (operand_0, operand_1) != (expr.operands[0], expr.operands[1]):
157
- return Expr.BinaryOp(expr.idx, "Sub", [operand_0, operand_1], expr.signed, **expr.tags)
158
- return expr
159
-
160
- def _ail_handle_Shl(self, expr):
161
- operand_0 = self._expr(expr.operands[0])
162
- operand_1 = self._expr(expr.operands[1])
163
-
164
- if isinstance(operand_1, Expr.Const):
165
- new_operand = Expr.Const(operand_1.idx, None, 2**operand_1.value, operand_0.bits)
166
- return Expr.BinaryOp(expr.idx, "Mul", [operand_0, new_operand], expr.signed, **expr.tags)
167
-
168
- if (operand_0, operand_1) != (expr.operands[0], expr.operands[1]):
169
- return Expr.BinaryOp(expr.idx, "Shl", [operand_0, operand_1], expr.signed, **expr.tags)
170
- return expr
171
-
172
- def _ail_handle_Mul(self, expr):
173
- operand_0 = self._expr(expr.operands[0])
174
- operand_1 = self._expr(expr.operands[1])
175
-
176
- if Expr.Const in [type(operand_0), type(operand_1)] and Expr.BinaryOp in [type(operand_0), type(operand_1)]:
177
- const_, x0 = (operand_0, operand_1) if isinstance(operand_0, Expr.Const) else (operand_1, operand_0)
178
- if x0.op == "Mul" and Expr.Const in [type(x0.operands[0]), type(x0.operands[1])]:
179
- if isinstance(x0.operands[0], Expr.Const):
180
- const_x0, x = x0.operands[0], x0.operands[1]
181
- else:
182
- const_x0, x = x0.operands[1], x0.operands[0]
183
- new_const = Expr.Const(const_.idx, None, const_.value * const_x0.value, const_.bits)
184
- return Expr.BinaryOp(expr.idx, "Mul", [x, new_const], expr.signed, **expr.tags)
185
-
186
- if (operand_0, operand_1) != (expr.operands[0], expr.operands[1]):
187
- return Expr.BinaryOp(expr.idx, "Mul", [operand_0, operand_1], expr.signed, **expr.tags)
188
- return expr
189
-
190
-
191
- class MultiSimplifier(OptimizationPass):
192
- """
193
- Implements several different arithmetic optimizations.
194
- """
195
-
196
- ARCHES = ["X86", "AMD64"]
197
- PLATFORMS = ["linux", "windows"]
198
- STAGE = OptimizationPassStage.AFTER_GLOBAL_SIMPLIFICATION
199
- NAME = "Simplify various arithmetic expressions"
200
- DESCRIPTION = __doc__.strip()
201
-
202
- def __init__(self, func, **kwargs):
203
- super().__init__(func, **kwargs)
204
-
205
- self.state = SimplifierAILState(self.project.arch)
206
- self.engine = MultiSimplifierAILEngine()
207
-
208
- self.analyze()
209
-
210
- def _check(self):
211
- return True, None
212
-
213
- def _analyze(self, cache=None):
214
- for block in list(self._graph.nodes()):
215
- new_block = block
216
- old_block = None
217
-
218
- while new_block != old_block:
219
- old_block = new_block
220
- new_block = self.engine.process(state=self.state.copy(), block=old_block.copy())
221
- _l.debug("new block: %s", new_block.statements)
222
-
223
- self._update_block(block, new_block)