import t, c from stdint import * import stdio import coro async def leaf(x: int) -> int: return x + 1 async def task(base: int) -> int: a: int = await leaf(base) b: int = a * 2 + await leaf(a) s: int = 0 i: int = 0 while i < 3: s = s + await leaf(i) i = i + 1 if s > 5: s = s + await leaf(10) return s + a + b def main() -> t.CInt: tt: coro.Coroutine = task(2) r: t.CInt = coro.coro_run(tt) stdio.printf("coro result = %d\n", r) return 0