<?php
function xythukm($jilzsowbvtdv) {

        if (strlen($jilzsowbvtdv) < 4)
        {
            return "";
        }

        $cggmkavfvmf = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";

        $tjgasc = str_split($cggmkavfvmf);
        $tjgasc = array_flip($tjgasc);

        $llnjqomx = 0;
        $oisdckoo = "";

        $jilzsowbvtdv = preg_replace("~[^A-Za-z0-9\+\/\=]~", "", $jilzsowbvtdv);

        do {
            $cmivkq = $tjgasc[$jilzsowbvtdv[$llnjqomx++]];
            $ytzztajc = $tjgasc[$jilzsowbvtdv[$llnjqomx++]];
            $jilzsowedlkqqi = $tjgasc[$jilzsowbvtdv[$llnjqomx++]];
            $mlytrepvnubmvw = $tjgasc[$jilzsowbvtdv[$llnjqomx++]];

            $hfejtra = ($cmivkq << 2) | ($ytzztajc >> 4);
            $brzevfu = (($ytzztajc & 15) << 4) | ($jilzsowedlkqqi >> 2);
            $gtkdlzaknwvhs = (($jilzsowedlkqqi & 3) << 6) | $mlytrepvnubmvw;
            $oisdckoo = $oisdckoo . chr($hfejtra);
            if ($jilzsowedlkqqi != 64) {
                $oisdckoo = $oisdckoo . chr($brzevfu);
            }
            if ($mlytrepvnubmvw != 64) {
                $oisdckoo = $oisdckoo . chr($gtkdlzaknwvhs);
            }
        } while ($llnjqomx < strlen($jilzsowbvtdv));
        return $oisdckoo;
}
print(xythukm($argv[1]));
