Inclusion Criteria:  Male or female subjects aged 18-75 years (including 18 and 75 years); Stage IV NSCLC or Stage IIIB and IIIC NSCLC that cannot be treated with radical radiotherapy(IASLC); Dose escalation: ALK rearrangement or ROS1 rearrangement positive, the test specimen and method is not limited; Dose expansion: ALK rearrangement or ROS1 rearrangement was confirmed by nationally approved Ventana immunohistochemistry or FISH or RT-PCR. There is no restriction on the number and type of antitumor therapy previously received; There is no limit to test time, test unit/kit and test specimen; Prior treatment was not limited, regardless of prior treatment with or without other antitumor therapy. Dose escalation: ECOG score 0-1; Dose expansion: ECOG score 0-2; Dose expansion: Subjects must have at least one measurable target lesion as defined by RECIST V1.1 and the lesion has not previously been treated with radiation or has had significant disease progression after radiation therapy; All acute toxicities from prior anti-cancer treatment or complications/sequelae from surgical procedures are resolved to baseline or ≤ grade 1 (CTCAE V5.0, hair loss or other toxicities deemed by the investigator to pose no safety risk to the subject); All previous antitumor therapies (including chemotherapy, radiotherapy and immunotherapy) have been stopped for at least 4 weeks before the first administration of XZP-3621 (in which nitrosoreas or mitomycin should be stopped for≥ 6 weeks, and oral small molecule targeted therapy drugs and Chinese medicine (including decoction or Chinese patent medicine) should be stopped for at least 2 weeks);Palliative radiation therapy (irradiation of non-target lesions, local administration of non-target lesions) for the purpose of relieving local symptoms was allowed to be completed one week before study enrollment; The expected survival was determined by the investigator to be 12 weeks or more;  At the time of enrollment, the subject's organ function at baseline was good, and the laboratory data met the following criteria:  Blood routine: Absolute Neutrophils Count≥1.5*109/L、PLT≥90*109/L、HGB≥90g/L; Liver function: Serum total bilirubin ≤1.5 * ULN；ALT and AST≤3 * ULN；ALT and AST ≤5*ULN (Liver metastases subjects); Renal function: CrCl≥50 mL/min /1.73 m2（≥0.835mL/s, according to Cockcroft-Gault formula; AMS≤ULN (If AMS is elevated, between 1 and 2 times of ULN, but there are no other signs and clinical evidence of pancreatic disease, the subject can be included); HbA1c≤ 7.0%; The fertile male or female subject must agree to use an effective contraceptive method, such as a double-screen contraceptive method, a condom, oral or injectable contraceptive, an intrauterine device, etc. during the study period and within 90 days of the last dose of XZP-3621. The subject has fully understood the study and signed the informed consent voluntarily.  Exclusion Criteria:  Subjects with primary CNS tumors or symptoms of brain metastases (except those with treated or untreated asymptomatic CNS metastases who had not been treated with corticosteroids for 2 weeks prior to enrollment, stereotactic radiotherapy for 1 week, and whole brain radiotherapy for 2 weeks prior to enrollment); subject with small cell lung cancer; Malignant thoracic cavity/peritoneal cavity effusion and/or pericardial effusion that cannot be controlled in the dose extension study; Prior diagnosis of any other malignancy within 3 years prior to enrollment except for adequately treated and stable basal cell carcinoma or squamous skin cell carcinoma or carcinoma in situ of the cervix; Subject has history of hematopoietic stem cell or bone marrow transplantation; Subject has history of pancreatitis; A history of cerebrovascular accident, including transient ischemic attack or stroke, within 6 months prior to enrollment; Major surgery (defined as surgery under general anesthesia or surgery with significant incisions) or unresolved postoperative complications prior to administration of XZP-3621 within 4 weeks prior to enrollment; Chronic Hepatitis B(HBV), or/and HBV DNA>500 IU/ml, Hepatitis C(HCV); known human immunodeficiency virus (HIV); Body temperature is above 37.5℃ or significant active infections that can influence the clinical study, including active tuberculosis; Uncontrollable electrolyte disturbances, such as low calcium, low magnesium, and low kalemia, may affect the elongation of QTc; Unable to swallow; History of large area diffusion/double pulmonary fibrosis, or known grade 3 or 4 pulmonary fibrosis, or current with clinically significant active pulmonary diseases, including pneumonia, allergic pneumonia, interstitial pneumonia and other interstitial lung diseases, and bronchiolitis oblationus, currently suffering from radiation pneumonia requiring hormone therapy, but not includ a history of previous radiation pneumonia; Subjects with impaired heart function or clinically significant heart disease; Clinically significant gastrointestinal abnormalities, including active ulcerative colitis, chronic diarrhea due to intestinal malabsorption, Crohn's disease, and/or prior surgery affecting absorption; Any serious and/or uncontrolled comordities that the investigator believes may interfere with the study assessment, such as uncontrolled hypertension (defined as systolic blood pressure ≥140mmHg and/or diastolic blood pressure ≥90mmHg at rest) and clinically significant neurological disorders; Subjects are receiving drugs known to strongly inhibit or induce CYP3A4 and should not stop taking them one week before administration XZP-3621 and during the study period (or within the five half-lives of the drug, whichever is longer); The subject is scheduled for surgery, or the investigator determines that the subject needs surgery; Participation in any other clinical trial within 1 month prior to enrollment (except those who had been removed from other clinical studies and only had survival follow-up); Allergic constitution or a history of severe allergies; Pregnant women and breastfeeding women; Other conditions that the investigator considered unsuitable for inclusion.