inline optimize for getting operands and flags function