def check_memory_writes(self):
    "\n        :return void: Increases gadget's score if the gadget has an instruction that writes to memory.\n        "
    for i in range((len(self.instructions) - 1)):
        cur_instr = self.instructions[i]
        if (not cur_instr.creates_value()):
            continue
        if (('xchg' in cur_instr.opcode) and (('[' in cur_instr.op1) or ('[' in cur_instr.op2))):
            self.score += 1.0
        elif ((cur_instr.op1 is not None) and ('[' in cur_instr.op1)):
            self.score += 1.0
:return void: Increases gadget's score if the gadget has an instruction that writes to memory.
def check_memory_writes(self):
    "\n        \n        "
    for i in range((len(self.instructions) - 1)):
        cur_instr = self.instructions[i]
        if (not cur_instr.creates_value()):
            continue
        if (('xchg' in cur_instr.opcode) and (('[' in cur_instr.op1) or ('[' in cur_instr.op2))):
            self.score += 1.0
        elif ((cur_instr.op1 is not None) and ('[' in cur_instr.op1)):
            self.score += 1.0