EFKQM5UNVCK623Y6L2OBSBD4W3E6DHMDPMXORFLCSJGOXHKPAFHQC
defp globaltype(binary) do
{vt, rest} = valtype(binary)
{m, rest} = mut(rest)
{{vt, m}, rest}
end
defp mut(<<0x00, rest::binary>>) do
{:const, rest}
end
defp mut(<<0x01, rest::binary>>) do
{:var, rest}
end
defp expr(binary) do
expr(binary, [])
end
defp expr(<<0x0B, rest::binary>>, acc) do
{acc |> Enum.reverse(), rest}
end
defp expr(<<0x41, rest::binary>>, acc) do
{val, rest} = i32(rest)
expr(rest, [{:"i32.const", val} | acc])
end