(a) Under such regulations as the Secretary concerned may prescribe, and subject to the recommendations of a board of officers or a selection board under section
576 of this title, a permanent regular warrant officer who is eligible for retirement under any provision of law shall be retired under that law if his records and reports establish his unfitness or unsatisfactory performance of duty. If he is not eligible for retirement under any provision of law, but since the date when he accepted his original permanent appointment as a regular warrant officer he has at least three years of active service that could be credited to him under section 511 of the Career Compensation Act of 1949, as amended (70 Stat. 114), he shall, if eligible therefor, be separated with separation pay under section
1174 of this title or severance pay under section
286a of title
14, as appropriate. However, instead of being paid separation pay or severance pay he may be enlisted under section
515 of this title. If he does not have three years of such service, he shall be separated under section
1165 of this title.