ccode: generating do while