code: def _get_constrs_arithmetic(self, gadget):
          
          # *dst* register has to have the value of *src1 op src2* for all
          # possibles assignments of *src1* and *src2*.
  
          dst = self.analyzer.get_register_expr(gadget.destination[0].name, mode="post")
          src1 = self.analyzer.get_register_expr(gadget.sources[0].name, mode="pre")
          src2 = self.analyzer.get_register_expr(gadget.sources[1].name, mode="pre")
          op = self._arithmetic_ops[gadget.operation]
  
          # Check all non-modified registers don't change.
          constrs_mod = []
  
          for name in self._arch_info.registers_gp_base:
              if name not in [r.name for r in gadget.modified_registers]:
                  var_initial = self.analyzer.get_register_expr(name, mode="pre")
                  var_final = self.analyzer.get_register_expr(name, mode="post")
  
                  constrs_mod += [var_initial != var_final]
  
          if constrs_mod:
              constrs_mod = [reduce(lambda c, acc: acc | c, constrs_mod[1:], constrs_mod[0])]
  
          return [dst != op(src1, src2)] + constrs_mod
docs: Generate constraints for the BinaryOperation gadgets:
              dst <- src1 OP src2