def visit_BitVecAnd(self, expression, *operands):
left = expression.operands[<NUM_LIT:0>]<EOL>right = expression.operands[<NUM_LIT:1>]<EOL>if isinstance(right, BitVecConstant):<EOL><INDENT>if right.value == <NUM_LIT:0>:<EOL><INDENT>return right<EOL><DEDENT>elif right.value == right.mask:<EOL><INDENT>return left<EOL><DEDENT>elif isinstance(left, BitVecAnd):<EOL><INDENT>left_left = left.operands[<NUM_LIT:0>]<EOL>left_right = left.operands[<NUM_LIT:1>]<EOL>if isinstance(right, Constant):<EOL><INDENT>return BitVecAnd(left_left, left_right & right, taint=expression.taint)<EOL><DEDENT><DEDENT>elif isinstance(left, BitVecOr):<EOL><INDENT>left_left = left.operands[<NUM_LIT:0>]<EOL>left_right = left.operands[<NUM_LIT:1>]<EOL>return BitVecOr(right & left_left, right & left_right, taint=expression.taint)<EOL><DEDENT><DEDENT>elif isinstance(left, BitVecConstant):<EOL><INDENT>return BitVecAnd(right, left, taint=expression.taint)<EOL><DEDENT>
ct & x => x & ct                move constants to the right
            a & 0 => 0                      remove zero
            a & 0xffffffff => a             remove full mask
            (b & ct2) & ct => b & (ct&ct2)  associative property
            (a & (b | c) => a&b | a&c       distribute over |