def is_COP_initializer(self):
    '\n        :return boolean: Returns True if the gadget is a COP initializer. Defined as a gadget that begins with a\n                         "pop all" opcode, does not use register bx/cx/dx/di as the call target, and does not clobber\n                         bx/cx/dx or the call target in an intermediate instruction\n        '
    first_instr = self.instructions[0]
    last_instr = self.instructions[(len(self.instructions) - 1)]
    call_target = Instruction.get_operand_register_family(last_instr.op1)
    if (first_instr.opcode.startswith('popa') and (call_target not in [1, 2, 3, 5])):
        protected_families = [1, 2, 3, call_target]
        protected_registers = []
        for family in protected_families:
            for register in Instruction.register_families[family]:
                protected_registers.append(register)
        for i in range(1, (len(self.instructions) - 1)):
            cur_instr = self.instructions[i]
            if (not cur_instr.creates_value()):
                continue
            if (cur_instr.op1 in protected_registers):
                if (((cur_instr.op2 is None) and (cur_instr.opcode not in ['inc', 'dec', 'neg', 'not'])) or ((cur_instr.op2 is not None) and (not Instruction.is_constant(cur_instr.op2)))):
                    return False
        return True
    return False
:return boolean: Returns True if the gadget is a COP initializer. Defined as a gadget that begins with a
                 "pop all" opcode, does not use register bx/cx/dx/di as the call target, and does not clobber
                 bx/cx/dx or the call target in an intermediate instruction
def is_COP_initializer(self):
    '\n        :return boolean: Returns True if the gadget is a COP initializer. Defined as a gadget that begins with a\n                         "pop all" opcode, does not use register bx/cx/dx/di as the call target, and does not clobber\n                         bx/cx/dx or the call target in an intermediate instruction\n        '
    first_instr = self.instructions[0]
    last_instr = self.instructions[(len(self.instructions) - 1)]
    call_target = Instruction.get_operand_register_family(last_instr.op1)
    if (first_instr.opcode.startswith('popa') and (call_target not in [1, 2, 3, 5])):
        protected_families = [1, 2, 3, call_target]
        protected_registers = []
        for family in protected_families:
            for register in Instruction.register_families[family]:
                protected_registers.append(register)
        for i in range(1, (len(self.instructions) - 1)):
            cur_instr = self.instructions[i]
            if (not cur_instr.creates_value()):
                continue
            if (cur_instr.op1 in protected_registers):
                if (((cur_instr.op2 is None) and (cur_instr.opcode not in ['inc', 'dec', 'neg', 'not'])) or ((cur_instr.op2 is not None) and (not Instruction.is_constant(cur_instr.op2)))):
                    return False
        return True
    return False