Note that the final decode-base64 candidate shows the correct results when debugging statements are added
This gist also shows a small change that makes it produce the correct values but it still segfaults more often than not https://gist.github.com/ugexe/baa168a641894a0731595c812724f76d