You can make it a lot simpler and end up with less code if you just unroll it manually. Besides, you won't need `gen_func_io_helper_args` either.