function M(x: int, b: bool): int decreases !b { if b then x else M(x + 25, true) } function N(x: int, y: int, b: bool): int decreases x, b { if x <= 0 || y <= 0 then x + y else if b then N(x, y + 3, !b) else N(x - 1, y, true) }