(* TEST readonly_files = "main.c"; arguments = "-DINT_FLOAT -DFUN=is_even main.c"; asmgen; *) ("format_odd": string "odd %d\n\000") ("format_even": string "even %d\n\000") (function "force_spill" (a:int) 0) (function "force_spill_float" (f:float) 0.0) (function "is_even" (b:int) (catch (exit even b 0.0) with (odd v:val f:float) (if (== v 0) f (seq (extcall "printf_int" "format_odd" v unit) (let v2 (- v 1) (app "force_spill" 0 int) (app "force_spill_float" 0.0 float) (exit even v2 (+f 1.0 f))))) and (even v:val f:float) (if (== v 0) f (seq (extcall "printf_int" "format_even" v unit) (exit odd (- v 1) (+f 1.0 f))))))