; (ii) in the matter preceding subclause (I), as so redesignated, by striking An immigration officer and inserting the following: (i) In general An immigration officer ; and (iii) by adding at the end the following: (ii) Children unable to make decisions with respect to withdrawal of applications for admission If at the time of initial apprehension, an immigration officer determines, in the sole and unreviewable discretion of the immigration officer, that an unaccompanied alien child is not able to make an independent decision with respect to the withdrawal of his or her application for admission to the United States, the immigration officer shall refer the unaccompanied alien child for removal proceedings under section 240 of the Immigration and Nationality Act ( 8 U.S.C. 1229a ). (iii) Children able to make decisions with respect to withdrawal of applications for admission (I) In general Except as described in subclause (III)(aa), notwithstanding any other provision of law that requires removal proceedings under section 240 of the Immigration and Nationality Act ( 8 U.S.C. 1229a ), including subparagraph (D) and section 235 of the Immigration and Nationality Act ( 8 U.S.C. 1225 ), in the case of an unaccompanied alien child who is able to make an independent decision with respect to the withdrawal of his or her application for admission to the United States, as determined by an immigration officer at the time of initial apprehension, and does not wish to withdraw such application, the immigration officer shall— (aa) make a record of any finding of inadmissibility or deportability, which shall be the basis of a repatriation order, which shall be carried out and the child shall be returned to his or her country of nationality or last habitual residence, unless the child is referred— (AA) for removal proceedings pursuant to subclause (III)(aa); or (BB) to an immigration judge for a determination pursuant to subclause (III)(bb)