Extract match decode into a function

Signed-off-by: chatgris <jboyer@af83.com>
Merge branch 'master' into test_transistor