All study participants wiere provided a written informed consent before enrollment. 80 patients in the American Society of Anesthesiologists (ASA) physical status class II-III, 18-65 years of age, with a BMI of \>35 kg/m2 who were planning to undergo an elective LSG were enrolled in the study. Patients with preexisting cerebrovascular diseases, overt neurological signs, alcohol or psychoactive drug addiction, uncontrolled diabetes or hypertension, advanced organ failure, preoperative peripheral oxygen saturation (SpO2) \<96%, or a hemoglobin˂9g/dL were excluded.

Randomization for the investigation, the patients were randomly assigned using opaque sealed envelopes to two groups; Group (I) (n = 40): The Opioid based anesthesia: Pre-induction of general anesthesia a bolus of 2ug/kg/ IV Fentanyl (sunny pharmaceutical Egypt Company under License of Hameln pharmaceutical Germany) was administered then infusion of 1 ug/kg/h was given intraoperatively to maintain the change in hemodynamics within 20 % of the baseline , and Group (II) (n = 40): Opioid free anesthesia: Pre-induction of general anesthesia 1000 mg paracetamol (Pharco B international pharmaceutical-Egypt) and dexamethasone 0.1 mg/kg. Lidocaine 1 mg/kg (Alexandria co. for pharmaceutical and chemical industries-Egypt), ketamine 0.5 mg/kg were given I V bolus dose. Then continuous infusion with lidocaine 2 mg/kg/hr and magnesium sulfate (Manufactured by E.I.P.I.CO-. Egypt).1.5 g/hr was started. Local infiltration of skin incision with 0.25% bupivacaine at the end of the operation (Sunny pharmaceutical -Egypt) (n = 30). Randomization was performed according to a computer-generated randomization code, and a statement showing the patients' group was placed in a sealed, numbered envelope according to the results. Each patient drew an envelope and was enrolled in the study depending on the group written in the envelope. Randomization was performed by a physician who was not involved in the monitoring of the patients. The anesthesiologist caring for the patient was aware of the group assignments. The patients were blinded to the group assignments.

Anesthesia protocol all patients was administered 300 mg of oral ranitidine the night before the surgery and 10 mg IV metoclopramide in combination with 150 mg ranitidine 1 h before arrival to the operating room. Upon the arrival to the operating room, an electrocardiogram, noninvasive blood pressure, SpO2, rSO2 (Masimo oximeter), and neuromuscular monitoring (TOF-Watch SX; Organon, Dublin, Ireland) were performed on the patients. Afterward, preoxygenation was performed with 4 L/min oxygen (80%) for 3 min by using facemasks, and anesthesia was induced with an IV propofol injection (1.5-2.5 mg/kg of ideal body weight) and an IV bolus administration of remifentanil (1 lg/kg of lean body weight \[LBW\]) for 30-60 s, and then switched to infusion at 0.25 lg/kg of LBW/min. After the eyelid reflex disappeared, a neuromuscular blockade was performed using rocuronium (1.2 mg/kg of LBW) and tracheal intubation was done. Volume-controlled mechanical ventilation was applied. Breathing gases (oxygen, carbon dioxide and sevoflurane), the tidal volume were set as 7-8 mL/kg of LBW, inspiratory:expiratory ratio as 1:2, positive end-expiratory pressure as 5-8 cmH2O, and the respiratory rate was determined to obtain an end-tidal carbon dioxide partial pressure (PETCO2) of 32-37 mmHg. These ventilator settings were not changed throughout the operation. Oxygen/air (fraction of inspired oxygen \[FiO2\] of 0.40), inspiratory fresh gas flow of 2 L/min), sevoflurane (1 minimum alveolar concentration \[MAC\]), and remifentanil IV infusion (0.1-0.25 lg/kg of LBW/min) were used in the for the maintenance of anesthesia. Neuromuscular blockade was performed during the operation by rocuronium infusion (0.3- 0.7 mg/kg of LBW/h). IV normal saline or lactated Ringer's solution at 5-7 mL/kg of LBW was also used for perioperative fluid maintenance. Nasopharyngeal temperature was monitored throughout the surgery, and the patient temperature (36-37C) was ensured by using a forced-air warming system for the maintenance of intraoperative normothermia during the procedure. After anesthesia induction, a neutral head position of the patients was preserved to prevent alteration of cerebral venous drainage. Carbon dioxide insufflation was performed with an electronic laparoflator using a closed Veress needle technique, and intra-abdominal pressure was automatically kept at the desired level (14-16 mmHg) during the surgery. After the insufflation of carbon dioxide, the patients were positioned in a 30 reverse-Trendelenburg and at a 10 right lateral position. At the end of the surgery, the blockade was reversed by administering 4 mg/kg of adjusted body weight sugammadexwith a PTC of 1-2. All patients were extubated when fully awake. The patients were referred to the recovery unit and monitored for 50 min for complications. In cases where no complications was apparent, the recovery was evaluated using the modified Aldrete scoring system. Once the score was ≥9, the patients were taken to the unit. For postoperative nausea and vomiting, 4-5 mg dexamethasone was used (except for diabetic patients on insulin) 90 min before anesthesia induction and 4-8 mg IV ondansetron 20-30 min before the end of the operation. For postoperative pain management, 1 g IV acetaminophen was administered 20 min after induction and 30 mg IV ketorolac 20 min before onset. Then, 1 g IV acetaminophen was administered every 6 h + 50 mg IV dexketoprofen every 8 h for the first 48 h. In addition, morphine was administered using a patient-controlled analgesia delivery system (demand dose, 20 lg/kg of ideal body weight; lockout time, 6-10 min; 4 h limit, 80% of the total calculated dosage) for 48 h postoperatively.

Intraoperative measurements, physiological variables including heart rate (HR), MAP, SpO2, and PETCO2 were recorded preoperatively, 1 min after the induction, and every 5 min until the patient was referred to the recovery unit. The MAP and HR values were allowed to fluctuate up to 20% of the preoperative values of the patients. For this purpose, the infusion rate of remifentanil was accordingly increased and decreased. When hypotension (MAP ˂60 mmHg) or bradycardia (HR˂45beats/min) continued for longer than 3 min, they were treated with 5 mg ephedrine and 0.5 mg atropine, respectively. Patients who received ephedrine or atropine more than twice were excluded from the study.

Cerebral oxygen saturation. The rSO2 values of the patients were recorded preoperatively, 1 min after the induction, and every 5 min until the patient was referred to the recovery unit. Measurements in the last 30 s of preoxygenation, performed for 3 min with 4 L/min oxygen (80%) preinduction was accepted as preoperative values. To assess rSO2, cerebral oximetry sensors were placed at least 2 cm above the left and right eyebrows and 3 cm from the midline (to prevent the sagittal sinus from influencing the results) before the induction in accordance with the manufacturer's instructions. Before applying the sensor pads, the forehead of the patient was cleaned with acetone alcohol and bandaged to protect the sensors from ambient light and to keep them stable. Cerebral oxygen desaturation was defined as a \>25% decrease in the rSO2 value compared with the preoperative value (decrease should be more than 20% if the preoperative value was˂50) and maintenance of this situation for≥15s. In this case, the following algorithm was used. First of all, normotension of the patient was ensured (administration of vasopressors such as ephedrine, and/or infusion of isotonic fluids) and the patient's neck were checked. Operating times. anesthesia, surgery, pneumoperitoneum, and recovery times were recorded. Recovery time was defined as the time from discontinuation of sevoflurane or propofol and remifentanil at the end of the surgery to the restoration of spontaneous breathing, opening of the eyes upon a verbal command, squeezing of the hand of the observer and extubation. Additionally, the complications (including nausea and vomiting) developed by the patients were also recorded.