Inclusion Criteria:
* Locally advanced or metastatic NSCLC not amenable to treatment with surgical resection or combined chemoradiation
* Disease progression during or after treatment with at least one prior standard of care systemic therapy but no more than three lines of prior systemic therapy in the advanced or metastatic setting, with the exceptions for adjuvant/neoadjuvant therapies
* Documentation of the presence of a KRAS G12C mutation obtained at any timepoint during the course of the disease
* Eastern Cooperative Oncology Group (ECOG) Performance Status of 0-2
* Life expectancy of greater than or equal to 12 weeks
* Ability to swallow tablets intact, without chewing or crushing
Exclusion Criteria:
* Previous enrollment in Roche- or Genentech-sponsored study of divarasib
* Prior treatment with a pan-KRAS/RAS inhibitor
* Prior treatment with a KRAS G12C inhibitor, unless specific criteria are met
* Pregnant or breastfeeding, or intending to become pregnant during the EAP or within the timeframe in which contraception is required
* Known hypersensitivity to any of the components of divarasib
* Malabsorption syndrome or other condition that would interfere with enteral absorption
* Mixed small-cell lung cancer
* Known and untreated, or active CNS metastases (progressing or requiring anticonvulsants or corticosteroids for symptomatic control)
* Leptomeningeal disease or carcinomatous meningitis
* Uncontrolled pleural effusion, pericardial effusion, or ascites requiring recurrent drainage procedures biweekly or more frequently
* Clinically significant history of liver disease, including viral or other hepatitis, or cirrhosis
* Known clinically significant history of liver disease consistent with Child-Pugh Class B or C, including active viral or other hepatitis (ex: hepatitis B \[HBV\] or hepatitis C \[HCV\]) virus, current alcohol abuse or cirrhosis
* Known positive HIV infection
* Significant traumatic injury or major surgical procedure within 4 weeks prior to initiation of EAP treatment
* Chronic diarrhea, short bowel syndrome, or significant upper gastrointestinal surgery including gastric resection, a history of inflammatory bowel disease (e.g., Crohn's disease or ulcerative colitis) or any active bowel inflammation (including diverticulitis)
* Treatment with anti-cancer therapy (e.g., chemotherapy, immunotherapy, biologic therapy, or an investigational anti-cancer agent) within 28 days prior to initiation of EAP treatment
* More than 30 Gy of radiotherapy to the lung within 6 months prior to initiation of EAP treatment
* Uncontrolled tumor-related pain where palliative care or hospice admission is planned, or where active pain management interventions are insufficient to alleviate symptoms
* Unresolved toxicities from prior anti-cancer therapy, defined as not having resolved to CTCAE v6.0 Grade 1 or better, or to levels dictated in the eligibility criteria or toxicities from prior anti-cancer therapy or palliative radiation therapy that are considered irreversible
* Treatment with strong CYP3A4 inhibitors or inducers within 14 days or 5 half-lives of the drug or its major active metabolite, whichever is longer, prior to initiation of EAP treatment
* Any serious medical condition or abnormality in clinical laboratory tests that precludes an individual's safe participation in and completion of the EAP
* Blood or platelet transfusion within 14 days prior to initiation of EAP treatment
* History or presence of an abnormal ECG that is deemed clinically significant (e.g., complete left bundle branch block, second- or third-degree atrioventricular heart block) or evidence of prior myocardial infarction
* History of active malignancy that is currently receiving treatment or not well controlled
* Significant cardiovascular disease, within 6 months of initiation of EAP treatment
* History of ventricular dysrhythmias or risk factors for ventricular dysrhythmias such as structural heart disease (e.g., severe left ventricular systolic dysfunction, left ventricular hypertrophy), coronary heart disease (symptomatic or with ischemia demonstrated by diagnostic testing), clinically significant electrolyte abnormalities (e.g., hypokalemia, hypomagnesemia, hypocalcemia), or family history of sudden unexplained death or long QT syndrome