```\n    function findOrderHintId(\n        mapping(address => mapping(uint16 => STypes.Order)) storage orders,\n        address asset,\n        MTypes.OrderHint[] memory orderHintArray\n    ) internal returns (uint16 hintId) {\n\n          // more code\n\n          // @audit if a reused order's prevOrderType is matched, returns HEAD\n\n          if (hintOrderType == O.Cancelled || hintOrderType == O.Matched) {\n                emit Events.FindOrderHintId(0);\n                continue;\n            } else if (\n                orders[asset][orderHint.hintId].creationTime == orderHint.creationTime\n            ) {\n                emit Events.FindOrderHintId(1);\n                return orderHint.hintId;\n            } else if (orders[asset][orderHint.hintId].prevOrderType == O.Matched) {\n                //@dev If hint was prev matched, it means that the hint was close to HEAD and therefore is reasonable to use HEAD\n                emit Events.FindOrderHintId(2);\n                return Constants.HEAD;\n            }\n```\n