((a)) ** .—** After entry of judgment in a general or special court-martial, under procedures prescribed by the Secretary concerned, the accused may waive the right to appellate review in each case subject to such review under (article 66). Such a waiver shall be—
((1)) signed by the accused and by defense counsel; and
((2)) attached to the record of trial.
((b)) ** .—** In a general or special court-martial, the accused may withdraw an appeal at any time.
((c)) ** .—** Notwithstanding subsections (a) and (b), an accused may not waive the right to appeal or withdraw an appeal with respect to a judgment that includes a sentence of death.
((d)) ** .—** Except as provided by (article 69(c)(2)), a waiver or withdrawal under this section bars review under (article 66).