angr.analyses.decompiler.peephole_optimizations.utils

angr.analyses.decompiler.peephole_optimizations.utils.get_expr_shift_left_amount(expr)

Get the shift amount of a shift-left or multiplication operation if the shift amount is a constant.

Parameters:

expr (BinaryOp) – The shift-left or multiplication expression (must be a BinaryOp).

Return type:

int | None

Returns:

The shift amount if it is a constant, or None if it is not.