Repository: mishoo/UglifyJS (JavaScript)

Issue:
ufuzz failure
```js
// original code
// (beautified)
var _calls_ = 10, a = 100, b = 10, c = 0;

{
    var bar = function a_2(arguments, bar, async_1) {
        function f0(bar_2, b_1) {
            {
                var expr2 = b + 1 - .1 - .1 - .1;
                for (var key2 in expr2) {
                    c = 1 + c;
                    var async_1 = expr2[key2];
                    (c = c + 1) + ((async_1 && (async_1.foo >>= "object" >>> "b" != /[a2][^e]+$/ * [])) === ("undefined" | "c") >> "foo" % 38..toString());
                }
            }
            L47210: {
                switch (/[abc4]/g.exec(((c = 1 + c, (b_1 = 25 << "function") <= (arguments && (arguments[c = 1 + c, 
                -5 != false != 22 > {} | "object" & this & (0, [ , 0 ][1])] = "b" - "c")) >= (-3 ^ 3) + ("c" ^ "")) || b || 5).toString())) {
                  case (c = c + 1) + ((22 == -0) > (-0 ^ undefined) !== ("" % "number" !== (-3 != "bar"))):
                    c = 1 + c, (c = c + 1, {} <= 2) * ((b_1 && (b_1.undefined &= [] != [ , 0 ][1])) != null + "foo");
                    c = 1 + c, undefined - -0 ^ (23..toString() ^ 22) ^ (3 << 4 ^ (/[a2][^e]+$/ || "undefined"));
                    break;

                  case --b + (arguments && typeof arguments.a == "function" && --_calls_ >= 0 && arguments.a((c = 1 + c, 
                    bar_2 && (bar_2.Infinity >>>= (c = c + 1, true !== "b") << ((1 || 0) << (-0 != 3)))), "number", (c = 1 + c, 
                    c = c + 1, c = c + 1, void "foo"))):
                    break;

                  case a++ + 1:
                    break;

                  case --b + /[abc4]/g.exec(((c = 1 + c, c = c + 1, (4 & /[a2][^e]+$/) / void false) || b || 5).toString()):
                    c = 1 + c, (24..toString() * "undefined" | -4 - 2) % ((25 || -1) / (24..toString() === 38..toString()));
                    c = 1 + c, ~(bar_2 = -0 !== -1 === "foo" > ([ , 0 ].length === 2));
                    break;
                }
                switch (a++ + !(c = c + 1, (bar_2 *= -2 < -1) && null != {})) {
                  case (38..toString() >> -2 ^ 23..toString() % "undefined") > (b_1 && (b_1[c = 1 + c, 
                    ([ , 0 ].length === 2 & 2) !== (Infinity & "b") & (c = c + 1, 0) == (bar += this != false)] += "" % /[a2][^e]+$/)) >> ("function" | "object"):
                    c = 1 + c, undefined >> 2 << /[a2][^e]+$/ - NaN >>> (-1 | "c") - (0 ^ -0);
                    break;

                  case b++:
                    c = 1 + c, (null / [ , 0 ][1] == "a" + 38..toString()) * (/[a2][^e]+$/ >>> 22 <= (true === ([ , 0 ].length === 2)));
                    break;

                  case a++ + --b:
                    c = 1 + c, {} + this << ("" | 23..toString()) <= !(undefined << -5);
                    c = 1 + c, ("b" < "foo" | "a" % true) != ("foo" !== ([ , 0 ].length === 2)) * (null ^ undefined);
                    break;

                  case typeof f0 == "function" && --_calls_ >= 0 && f0([ , 0 ][1]):
                    c = 1 + c, ((-1 < -2) >> 23..toString() * true) % (bar && (bar.Infinity = "a" == "foo"), 
                    -1 - "number");
                    c = 1 + c, c = c + 1, (5 + []) % (c = c + 1, "bar");
                    break;
                }
                if (typeof c_2) {
                    var a_1 = (c = 1 + c, (3 + 24..toString() && -4 === {}) * (25 != NaN !== [] % "foo")), undefined = (c = 1 + c, 
                    ((this || /[a2][^e]+$/) & "function" == "b") != (1 == 5 !== 2 >> null));
                }
            }
        }
        var Math = f0("foo", (c = c + 1) + ("bar" % Infinity * (bar += "undefined" + []) && (arguments -= (bar = 23..toString() <= -0) === ("a" | 1))));
        function f1(bar, bar_2) {
            {
                var async_1 = function a_2(foo_2, arguments_1, foo) {
                    {
                        var brake20 = 5;
                        while ((c = 1 + c, (([ , 0 ][1], 38..toString()) ^ 4 / -0) + (("" != 4) - (null == 25))) && --brake20 > 0) {
                            c = 1 + c, bar_2 && (bar_2[false in [ (c = 1 + c, bar && (bar.NaN = !("function" >>> "a") < ((-3 && 3) != ([ , 0 ][1] == -1)))), (c = 1 + c, 
                            ("number" ^ false) / ("number" - "undefined") !== "number" >= true < Infinity >> 3), (c = 1 + c, 
                            (c = c + 1, 22) + (5 + this) >>> (4 * -1 >>> (38..toString() | "a"))) ]] %= (38..toString() - "number" || 4 === -2) === (1 >>> "function") + (this >>> "b"));
                        }
                    }
                    {
                        var expr22 = (c = 1 + c, async_1 &= ((Math = 5 && 22) || ([ , 0 ].length === 2) << [ , 0 ][1]) !== (undefined / this & "bar" * /[a2][^e]+$/));
                        for (var key22 in expr22) {
                            c = 1 + c;
                            var arguments_2 = expr22[key22];
                            c = 1 + c, ("bar" !== -2) <= /[a2][^e]+$/ << NaN, - -1 + (Math >>>= -3 & 1);
                        }
                    }
                }("c", "a", --b + typeof Infinity_2);
            }
        }
        var undefined = f1("c");
        function f2(a_1, b_1) {
            return;
            try {
                for (var brake27 = 5; --b + ("function" in [ (c = 1 + c, 23..toString() << "bar" !== false > 4 !== (arguments && (arguments[c = 1 + c, 
                ("object" && 24..toString()) === (24..toString() === Infinity) & "c" >>> 0 < (25 > Infinity)] >>= "c" ^ "number")) <= ("foo", 
                "foo")) ]) && brake27 > 0; --brake27) {
                    --b + (b = a);
                }
            } finally {
                {
                    var brake29 = 5;
                    L47211: while (--b + NaN && --brake29 > 0) {
                        c = c + 1;
                    }
                }
                if ("") {} else {
                    L47212: {
                    }
                }
            }
        }
        var arguments_2 = f2("object");
        function f3(NaN_2, await) {
            {
                var bar_2 = function f4(foo_1, foo_1_1) {
                    {
                        var brake35 = 5;
                        while ((c = 1 + c, (foo_1 && (foo_1.null >>>= "a" ^ {})) < (3 | -1) !== true > 0 > 0 / 25) && --brake35 > 0) {
                            c = 1 + c, (([ , 0 ].length === 2 & false) !== -0 > "b") >>> ("number", "undefined") * (this >> []);
                        }
                    }
                    {
                        var expr37 = (c = 1 + c, ((undefined >>>= -1 > null) & -2 << {}) > "function" / ([ , 0 ].length === 2) << ("object" ^ this));
                        for (var key37 in expr37) {
                            c = 1 + c;
                            var NaN_1 = expr37[key37];
                            c = 1 + c, (0 - Infinity && 25 % 3) <= (0 * {} == ("undefined" !== "c"));
                        }
                    }
                }((c = c + 1) + (arguments_2 && arguments_2.null), ..."" + undefined);
            }
            if ((c = c + 1) + {
                in: (c = c + 1) + a--,
                undefined: typeof f1 == "function" && --_calls_ >= 0 && f1(),
                foo: --b + (b = a),
                0: --b + (22 in [ (c = 1 + c, ("b" & Infinity) * ([ , 0 ][1] > "number") != (NaN | false) % ("" || "c")), (c = 1 + c, 
                bar_2 = (-5 >> 1 & (NaN_2 = 38..toString() | -4)) >>> (undefined >>= ("b" >= undefined) - (await = 23..toString() / null))) ])
            }.Infinity) {
                var brake40 = 5;
                while (typeof NaN_2 == "function" && --_calls_ >= 0 && NaN_2(/[a2][^e]+$/) && --brake40 > 0) {
                    c = c + 1;
                }
            } else {
                c = c + 1;
            }
        }
        var arguments_2 = f3((c = c + 1) + (typeof bar_2 != "string"));
        function f5() {
            switch ((c = c + 1) + [ b = a, a++ + ((c = 1 + c, arguments && (arguments.Infinity = -3 << /[a2][^e]+$/ >> "a" % 0 != (-2 ^ 23..toString() ^ "number" * undefined))) || 0).toString()[c = 1 + c, 
            bar && (bar.Infinity = ("bar" == Infinity ^ ("function" | 38..toString())) >= 23..toString() / "object" + ([] > "object"))] ]) {
              case +function undefined() {
                    if (c = 1 + c, (Math && (Math[[ (c = 1 + c, !(1 >>> 23..toString()) / (void "bar" / ("undefined" << -5))), (c = 1 + c, 
                    (Math ^= "function" << -5 | ([ , 0 ].length === 2 && -5)) || (true != "number", 
                    0 < -3)), (c = 1 + c, (1 ^ 25) <= ([ , 0 ].length === 2 | undefined) == (c = c + 1, 
                    3 >> "function")), (c = 1 + c, 24..toString() == 0 | null & -1 && ("b" != NaN) <= (undefined += this === -3)), (c = 1 + c, 
                    bar += (-5 != "object" | (async_1 && ({
                        [(c = 1 + c, !22 / (c = c + 1, -4) != ("a" + 4) / (-1 && /[a2][^e]+$/))]: async_1.Infinity
                    } = {
                        null: 2 === 5
                    })), (2 && false) + (null >= []))) ][c = 1 + c, (c = c + 1, "bar", 2 >= "a") !== (c = c + 1, 
                    -0 && -2)]] = void ([ , 0 ].length === 2) / (arguments && (arguments.in = /[a2][^e]+$/ + [])))) >= (-3 >>> this && (Infinity && "number"))) {
                        c = 1 + c, "" & -5 | "c" ^ "b", 25 || true, -3 % "c";
                    }
                    var undefined_2 = (c = 1 + c, undefined_2 = (3 >> "c" <= 5 - ([ , 0 ].length === 2)) - ((1 ^ this) >= (c = c + 1, 
                    4)));
                    c = c + 1;
                    {
                        return c = 1 + c, (1 % false ^ ("a" && 4)) !== {} <= "number" < (async_1 && ([ async_1.Infinity ] = [ -4 << 25 ]));
                    }
                }():
                {
                    var brake49 = 5;
                    while ((c = c + 1) + (async_1 && typeof async_1.NaN == "function" && --_calls_ >= 0 && async_1.NaN()) && --brake49 > 0) {}
                }
                L47213: {
                    c = 1 + c, (-1 * "function" == -3 > -4) >>> (NaN <= Infinity <= 1 >>> /[a2][^e]+$/);
                    c = 1 + c, delete ("" ^ /[a2][^e]+$/) * ((5 == "") / (true ^ 1));
                }
                break;

              default:
                switch (+b) {
                  case (c = c + 1) + (1 === 1 ? a : b):
                    break;

                  case (c = c + 1) + new function(arguments_1, bar_1) {
                        this.null = -5 ^ this;
                        this.a = 5 & 5;
                    }((c = 1 + c, arguments_2 && (arguments_2[{}] += (22 || null) << (-2 ^ [ , 0 ][1]) && 4 << 3 ^ "a" == 3)), ..."" + async_1):
                    c = 1 + c, (c = c + 1, "number") !== (-1 || null) || [] + 2 > ([] === "a");

                  case 0 === 1 ? a : b:
                    c = 1 + c, ((Math += 38..toString() && [ , 0 ][1]) | 24..toString() == -2) > delete ("object" >= Infinity);
                    c = 1 + c, - -2 / ("bar" & -1) - ((/[a2][^e]+$/ ^ this) > (/[a2][^e]+$/ === 23..toString()));
                    break;

                  case async_1 && async_1.null:
                    c = 1 + c, arguments_2 && ({
                        a: arguments_2[delete ("object" || "c") & -2 != 5 == Infinity - 22]
                    } = {
                        a: "" <= -4 | (0, 3) || (async_1 += {} <= "undefined") === "function" * [ , 0 ][1]
                    });
                    c = 1 + c, -23..toString() << (-3 & "undefined") <= ((NaN ^ "object") != (this ^ true));
                    break;
                }

              case (typeof [][c = 1 + c, (!0 ^ null - 0) + ("undefined", 22) * (arguments && (arguments[c = 1 + c, 
                "function" % 22 / (undefined && (undefined.a >>= "c" << "bar")) == ("b" << /[a2][^e]+$/ === -3 % [])] >>= "number" ^ "function"))] || 2).toString()[1 === 1 ? a : b]:
                {
                    var expr60 = !function() {
                    }();
                    for (var key60 in expr60) {
                        if (c = 1 + c, (-1 << -2 !== -4 < false) <= (0 < "b" !== (-2 ^ -3))) {
                            c = 1 + c, ([ , 0 ][1] << 4 < (undefined && ({
                                NaN: undefined[c = 1 + c, (async_1 && (async_1[c = 1 + c, delete ((true, "function") | -1 ^ 24..toString())] ^= null || null)) != (c = c + 1, 
                                "c") === (void NaN === -1 < false)]
                            } = {
                                NaN: 2 & "b"
                            }))) << (-3 - -4 << ([ , 0 ].length === 2 || 2));
                        }
                    }
                }
                switch ((c = c + 1) + {
                    0: (c = 1 + c, -5 << 38..toString() <= (-3 === -2) && (NaN <= /[a2][^e]+$/) / (3 << undefined)),
                    b: (c = 1 + c, ("foo" & 3) + (async_1 && (async_1.foo = "b" <= this)) >> ((c = c + 1, 
                    -3) >> (null ^ 23..toString()))),
                    null: (c = 1 + c, "" * 4 < NaN << -3 ^ delete ("", "function")),
                    ...async_1,
                    0: (c = 1 + c, (arguments && (arguments.undefined += NaN >>> /[a2][^e]+$/)) - (undefined ^ Infinity) - ~(NaN * NaN))
                }.length) {
                  case "function" in []:
                    c = 1 + c, null > [ , 0 ][1] | (undefined | 24..toString()) | (5 == "bar" || -3 * 22);
                    break;

                  case /[abc4]/.test(((c = 1 + c, (-2 === -4) % (-3 & 25) !== (3, 5) + (5, -4)) || b || 5).toString()):
                    break;

                  default:
                  case --b + a++:
                    break;
                }
                break;

              case b--:
                a++ + (arguments_2 && typeof arguments_2.a == "function" && --_calls_ >= 0 && arguments_2.a());
                var a_2;
                break;
            }
            switch (+function() {
                switch (c = 1 + c, -(async_1 && (async_1[(c = c + 1) + (c = 1 + c, ((2 || "a") | ("function" | NaN)) ^ (arguments_2 && (arguments_2.NaN *= "object" / -3 >> true % "a")))] = -5 % -0 < (5, 
                "number")))) {
                  case c = 1 + c, bar && (bar[async_1 && typeof async_1.foo == "function" && --_calls_ >= 0 && async_1.foo(-5, (c = 1 + c, 
                    1 > Infinity == 2 * true !== (undefined && (undefined[a_2 && typeof a_2.foo == "function" && --_calls_ >= 0 && a_2.foo("foo", [ , 0 ].length === 2, (c = 1 + c, 
                    (38..toString() ^ "bar") >= ("undefined" >= Infinity) || ([ , 0 ][1] == ([ , 0 ].length === 2)) % (0 / null)))] = (undefined && (undefined.var = null | -1)) - -4 % -0))))] = (!1 ^ /[a2][^e]+$/ !== ([ , 0 ].length === 2)) !== "number" >> -4 >> (undefined != 1)):
                    ;
                    break;

                  default:
                    ;

                  case c = 1 + c, (1 == "number" ^ 4 >>> 23..toString()) + (undefined << -2 > (1 | "foo")):
                    ;
                    break;

                  case c = 1 + c, -3 * 38..toString() == 22 >= "" ^ ("foo" < 0) / (arguments_2 && ({
                        null: arguments_2.in
                    } = {
                        null: "number" << []
                    })):
                    ;
                    break;
                }
                for (var brake69 = 5; (c = 1 + c, bar && (bar[typeof arguments_1 != "object"] &= 5 != 0 === (4, 
                22) !== "bar" > 4 >= (this == -3))) && brake69 > 0; --brake69) {
                    c = 1 + c, (null >> 23..toString() > ([ , 0 ][1] === "function")) >>> ("number" << 24..toString()) - (async_1 = Infinity >= "undefined");
                }
                {
                    var brake71 = 5;
                    do {
                        c = 1 + c, arguments_2 = ((Infinity, Infinity) | (Math && (Math[c = 1 + c, ("foo" | {} | (undefined && (undefined.undefined = 38..toString() & 23..toString()))) + (arguments && (arguments.NaN = (arguments = 3 !== -2) * (0 ^ -0)))] = false ^ 23..toString()))) ^ (c = c + 1, 
                        -0) * ([] >= false);
                    } while ((c = 1 + c, (c = c + 1, null) % (-4 ^ "undefined") > ("bar" > "object") + ([] - "a")) && --brake71 > 0);
                }
                c = c + 1;
            }()) {
              case --b + (b + 1 - .1 - .1 - .1):
                break;

              case (c = c + 1) + (23..toString() in [ --b + (typeof f7 == "function" && --_calls_ >= 0 && f7("b", 38..toString(), [ , 0 ][1])), (c = c + 1) + /[abc4]/g.exec(((c = 1 + c, 
                -0 >>> ([ , 0 ].length === 2) <= (true === -2) >= (("" | -5) <= (bar *= "foo" === 3))) || b || 5).toString()), typeof undefined == "function" && --_calls_ >= 0 && undefined(), typeof arguments == "function" && --_calls_ >= 0 && arguments((c = 1 + c, 
                (2 << -2) / (undefined && (undefined.NaN = this == "a")) / (22 >= "function" <= 5 * -2))), --b + /[abc4]/g.exec(((c = 1 + c, 
                {} >> "object" || (NaN || "undefined"), (false && 25) >>> ([] >>> "foo")) || b || 5).toString()) ]):
                break;

              case --b + (-4 >> Infinity != NaN / [] == (a_2 = false >>> "object") < (Math && (Math.Infinity = "number" << -5))):
                --b + (Math && Math[c = 1 + c, a_2 && (a_2[undefined && undefined[23..toString() in {}]] /= (23..toString() >> 2 === delete true) * ((4, 
                38..toString()) == (-3 ^ 25)))]);
                break;

              case delete ((Infinity == "" || -5 && 2) >> (arguments_2 && (arguments_2[(arguments_2 += [ , 0 ][1] * true) >= 2 << [] !== (-3 / "number" || "bar" + -4)] = 1 >> false | 0 * "function"))):
                {
                    var brake75 = 5;
                    L47214: do {
                        {
                            var brake76 = 5;
                            L47215: do {
                                c = 1 + c, ((a_2 && (a_2.var = "function" % "a")) == "" >>> 38..toString()) >= (25 > NaN !== "function" / 3);
                            } while ((c = 1 + c, (38..toString() ^ 23..toString()) > (22 || 24..toString()) ^ (a_2 && (a_2.foo <<= 24..toString() << "")) % (-1 | "function")) && --brake76 > 0);
                        }
                    } while (arguments && arguments.NaN && --brake75 > 0);
                }
                break;
            }
        }
        var bar = f5(a++ + (b %= a));
    }(-2);
}

L47216: {
    c = c + 1;
    {
        var brake80 = 5;
        while (b-- && --brake80 > 0) {
            var brake81 = 5;
            while (--b + (22 !== "" | 4 ^ "number" | (bar && (bar[/[abc4]/g.exec(((c = 1 + c, 
            +((25 !== [ , 0 ][1]) >= (bar = "number" & 1))) || b || 5).toString())] = -5 / 4 === 5 * -1))) && --brake81 > 0) {
                if (void b) {
                    var brake83 = 5;
                    do {
                        {
                            var brake84 = 5;
                            while ((c = c + 1) + (a++ + {
                                3: --b + ~(c = c + 1, c = c + 1, -2 / 2),
                                bar: bar,
                                Infinity: --b + void (24..toString() << /[a2][^e]+$/ >>> ("bar" ^ "a") >>> (c = c + 1, 
                                !-5)),
                                bar: bar,
                                Infinity: a++ + ((c = 1 + c, +delete 5 || {} % -5 + ("b" != undefined)) ? (c = 1 + c, 
                                bar = true <= 25 <= "foo" >> NaN ^ (bar && (bar[void (c = c + 1, -(2 / -5))] += (false >>> 23..toString()) % ("bar" ^ true)))) : (c = 1 + c, 
                                ([] << "b" | NaN < "object") != (-3 != 24..toString()) - (2 ^ /[a2][^e]+$/)))
                            } || 9).toString()[0 === 1 ? a : b] && --brake84 > 0) {
                                try {
                                    if (24..toString()) {
                                        var brake87 = 5;
                                        while (delete ("foo" > ([ , 0 ].length === 2)) % (("c" == -5) < "object" / -0) && --brake87 > 0) {
                                            throw c = 1 + c, ("" >> [ , 0 ][1]) % ("bar" >>> "undefined") >>> (c = c + 1, "a" - "c");
                                        }
                                    } else if ((c = c + 1) + +((23..toString() > true === (-5 != 0)) > ("bar" & 3 || 3 % -5))) {
                                        c = 1 + c, ("a" - -2 + ([ , 0 ].length === 2 & 22)) * (bar && ({
                                            Infinity: bar.Infinity
                                        } = {
                                            Infinity: NaN >>> 1 ^ ([ , 0 ].length === 2) + [ , 0 ][1]
                                        }));
                                    } else {
                                        var b_1 = (c = 1 + c, (-5 && "") ^ "b" != 23..toString() && (c = c + 1, "c" >> this)), NaN = (c = 1 + c, 
                                        ("b" / null < (c = c + 1, "number")) + !(b_1 && (b_1.c += 0 % "")));
                                    }
                                } catch (bar) {
                                    try {
                                        var c_2 = (c = 1 + c, bar && (bar[--b + (typeof f0 == "function" && --_calls_ >= 0 && f0([ , 0 ][1], (c = 1 + c, 
                                        bar && (bar.undefined += (/[a2][^e]+$/ ^ -2) >> (true || -5) >= (1 % NaN >= (-5 != 2)))), ...[]))] += ((-5 != "undefined") > (3 ^ "function")) % ((-0 & /[a2][^e]+$/) << ("undefined" != -0))));
                                    } catch (bar) {
                                        c = 1 + c, !(-1 * 23..toString() > ("number" ^ Infinity));
                                        c = 1 + c, (2 == "number") % (-1 | 4) != (5 & {}) + ("b" >>> /[a2][^e]+$/);
                                    } finally {
                                        c = 1 + c, bar && (bar.NaN = ((23..toString() ^ false) === (bar = "function" >>> "")) >>> ((38..toString() && 23..toString()) > ("number" < 22)));
                                        c = 1 + c, ("c" << 2 == (c_2 && (c_2.Infinity += -3 != 5))) + ("foo" === 3) / ("bar" !== 2);
                                    }
                                } finally {
                                    (c = c + 1) + ((c = 1 + c, (false >>> undefined == Infinity - "a") * (([], "c") <= (NaN >>>= undefined && -2))) || 6).toString()[c = 1 + c, 
                                    (NaN && (NaN[a++ + (5 in {})] = 0 <= -3 < "number" << "number")) & undefined * 3 >>> ([] === [])];
                                    for (var brake100 = 5; a++ + NaN && brake100 > 0; --brake100) {
                                        if (c = 1 + c, (NaN && (NaN[/[abc4]/.test(((c = 1 + c, ("object" > [ , 0 ][1] != (c = c + 1, 
                                        -3)) % ((c = c + 1, {}) | (b_1 += "" < "b"))) || b || 5).toString())] *= "a" != -3 ^ "object" !== ([ , 0 ].length === 2))) ^ ((b_1 -= "foo" <= "number") && (bar = null && "object"))) {
                                            c = 1 + c, (null == NaN, 0 / "bar") == ((c = c + 1, "object") || -3 == "c");
                                        }
                                    }
                                }
                            }
                        }
                    } while (a++ + ((25 <= 2) - ("b" ^ 38..toString()) !== (0 - "undefined" === (-4 != []))) && --brake83 > 0);
                } else {
                    var async_2 = function f6() {
                        function f7() {
                            c = 1 + c, ((c = c + 1, {}) ^ 23..toString() == {}) >= (-5 >= /[a2][^e]+$/ ^ (bar && (bar[c = 1 + c, 
                            (b_1 && (b_1[a++ + (bar && bar.length)] = (1 > []) / (bar += "number" && -5))) >= 23..toString() % "undefined" >>> (true << 3)] += [ , 0 ][1] - "object")));
                            c = 1 + c, "c" << "object" >>> ("" ^ /[a2][^e]+$/) ^ (-1 >> 0 && (NaN && (NaN[c = 1 + c, 
                            (([ , 0 ].length === 2) << 1 == 0 >>> "undefined") << ({} + "undefined") % (true < /[a2][^e]+$/)] = "c" && "object")));
                        }
                        var foo_2 = f7({}, true, ..."" + foo_2);
                        function f8(arguments, foo_1, b_1_2) {
                            c = 1 + c, (c = c + 1, NaN) * ("object" * {}) << (("function" | "c") > (25 != 23..toString()));
                            c = 1 + c, (NaN < 5 & "foo" < "object") << ((undefined < 25) >> (bar += /[a2][^e]+$/ - ""));
                        }
                        var bar_1 = f8((c = 1 + c, ((2 > 24..toString()) + (NaN && (NaN.null = -5 - ""))) / ((bar && (bar[c = 1 + c, 
                        (bar_1 = false / true) == (true === 4) ^ (-4, "number") === (23..toString() != "function")] = "object" >= 0)) / (Infinity ^ 38..toString()))), (c = 1 + c, 
                        23..toString() / /[a2][^e]+$/ >> ("c" > "b") ^ (bar = (bar -= "object" * -2) ^ (null ^ 23..toString()))), (c = 1 + c, 
                        +((25 == /[a2][^e]+$/) <= null / -3)));
                        function f9() {
                            c = 1 + c, (NaN > 5 != 2 <= "foo") + ((false ^ 3) >= ("foo" || 3));
                            c = 1 + c, -5 / "bar" !== ("foo" ^ false) ^ (b_1 += NaN ^ -3 || ([ , 0 ].length === 2) / 38..toString());
                        }
                        var bar_1 = f9(undefined, 4);
                        function f10(undefined, a_1) {
                            c = 1 + c, delete (-5 !== /[a2][^e]+$/) / delete ("function" === 24..toString());
                            c = 1 + c, ("object" & "") <= (-1 >= NaN) === [] / -3 <= ("object" || "number");
                        }
                        var b_2 = f10();
                    }(undefined, (c = c + 1) + (typeof bar == "function" && --_calls_ >= 0 && bar(--b + (NaN && typeof NaN.length == "function" && --_calls_ >= 0 && NaN.length(/[a2][^e]+$/, (c = 1 + c, 
                    -1 / this > -4 >> 23..toString() && (NaN && (NaN[c = 1 + c, ("foo" <= 0 ^ "undefined" >>> 24..toString()) > ("foo" - -2 < (25 === true))] ^= -5 !== -5)) >>> (c = c + 1, 
                    "")), (c = 1 + c, "undefined" - "a" <= (24..toString() || "bar") | -3 - "function" - ([] & false)))))));
                }
            }
        }
    }
    c = c + 1;
    {}
}

console.log(null, a, b, c, Infinity, NaN, undefined);
```
```js
// uglified code
// (beautified)
var u = 10, N = 100, l = 10, h = 0, n = function(arguments, f, o) {
    var c = function n(a, e) {
        var i, t = l + 1 - .1 - .1 - .1;
        for (i in t) {
            h = 1 + h;
            var o = t[i];
            h += 1, o && (o.foo >>= !0);
        }
        switch (/[abc4]/g.exec((h = 1 + h, "" + (-2 <= ((e = 25) <= (arguments && (arguments[h = 1 + h, 
        !0 | 0 & this] = NaN))) || l || 5)))) {
          case (h += 1) + !0:
            h = 1 + ((h = 1 + h) + 1);
            break;

          case --l + (arguments && "function" == typeof arguments.a && 0 <= --u && arguments.a((h = 1 + h, 
            a && (a.Infinity >>>= (h += 1, 4))), "number", (h = 1 + h, h += 1, void (h += 1)))):
          case 1 + N++:
            break;

          case --l + /[abc4]/g.exec((h = 1 + h, h += 1, "" + (l || 5))):
            h = 1 + (1 + h), a = 1 == (2 === [ , 0 ].length) < "foo";
        }
        switch (N++ + !(a *= !0)) {
          case (25[h = 1 + (h + 1), 0 != (2 === [ , 0 ].length & 2) & (h += 1, 0 == (f += 0 != this))] += NaN) >> 0 < 0:
          case l++:
            h = 1 + h;
            break;

          case N++ + --l:
            h = 1 + (1 + h);
            break;

          case 0 <= --u && n(0):
            h = 1 + h, f && (f.Infinity = !1), h = 1 + h, h += 1, h += 1;
        }
        h = 1 + (1 + h);
    }("foo", (h += 1) + (NaN * (f += "undefined") && (arguments -= 1 === (f = !1))));
    function n(e, i) {
        var t = (function() {
            for (var n, a = 5; h = 1 + h, 0 < --a; ) {
                h = 1 + h, i && (i[!1 in [ (h = 1 + h, e && (e.NaN = !1)), !0, (h = 1 + (1 + h), 
                h += 1, 22 + (5 + this) >>> (-4 >>> 38)) ]] %= !1 === 1 + (this >>> "b"));
            }
            for (n in h = 1 + h, t &= (c = 22) != (r / this & NaN)) {
                h = 1 + (1 + h), c >>>= 1;
            }
        }(--l), 0);
    }
    var r = n("c"), s = void 0;
    h += 1, function(n) {
        for (var a, e = 5; h = 1 + h, (n && (n.null >>>= 0)) < -1 != 1 && 0 < --e; ) {
            h = 1 + h;
        }
        for (a in h = 1 + h, (-2 & (r >>>= !1)) > "function" / (2 === [ , 0 ].length) << ("object" ^ this)) {
            h = 1 + (1 + h);
        }
    }((h += 1) + (s && s.null), ..."" + r), s = void ((h += 1) + {
        in: (h += 1) + N--,
        undefined: 0 <= --u && n(),
        foo: --l + (l = N),
        0: --l + (22 in [ !0, (h = 1 + (1 + h), -4 >>> (r >>= (r <= "b") - 1 / 0)) ])
    }.Infinity || (h += 1)), f = function() {
        switch ((h += 1) + [ l = N, N++ + (h = 1 + h, ("" + (arguments && (arguments.Infinity = -3 != (-23 ^ "number" * r)) || 0))[h = 1 + h, 
        f && (f.Infinity = !1)]) ]) {
          case +function n() {
                return h = 1 + h, (c && (c[[ NaN, (c ^= 0 | (2 === [ , 0 ].length && -5)) || !1, 24 <= (2 === [ , 0 ].length | n) == 3, 0, (h = 1 + (1 + ((h = 1 + (1 + (1 + h))) + 1)), 
                f += (o && ({
                    [(h = 1 + h, !1 / (h += 1, -4) != NaN)]: o.Infinity
                } = {
                    null: !1
                }), 1)) ][h = 1 + h, h += 1, !1 !== (h += 1, -0)]] = void 0 / (arguments && (arguments.in = "/[a2][^e]+$/")))) >= (-3 >>> this && "number") && (h = 1 + h), 
                h = 1 + h, h = 1 + ((h += 1) + 1), 4 !== !0 < (o && ([ o.Infinity ] = [ -4 << 25 ]));
            }():
            for (var n = 5; (h += 1) + (o && "function" == typeof o.NaN && 0 <= --u && o.NaN()) && 0 < --n; ) {}
            h = 1 + (1 + h);
            break;

          default:
            switch (+l) {
              case (h += 1) + N:
                break;

              case (h += 1) + new function(n, a) {
                    this.null = -5 ^ this, this.a = 5;
                }((h = 1 + h, s && (s[{}] += 32)), ..."" + o):
                h = 1 + h, h += 1;

              case l:
                c += 0, h = 1 + (1 + h);
                break;

              case o && o.null:
                h = 1 + h, s && ({
                    a: s[0]
                } = {
                    a: 3
                }), h = 1 + h;
            }

          case ("" + (typeof [][h = 1 + h, 1 + 22 * (arguments && (arguments[h = 1 + h, NaN / (r && (r.a >>= 0)) == 0] >>= 0))] || 2))[N]:
            for (var a in !0) {
                h = 1 + (1 + h), r && ({
                    NaN: r[h = 1 + h, (o && (o[h = 1 + h, !0] ^= null)) != (h += 1, "c") == 0]
                } = {
                    NaN: 0
                });
            }
            switch ((h += 1) + {
                0: !1 / (3 << r),
                b: (h = 1 + (1 + h), 0 + (o && (o.foo = "b" <= this)) >> -1),
                null: (h = 1 + (h + 1), 1),
                ...o,
                0: (h = 1 + h, (arguments && (arguments.undefined += 0)) - (r ^ 1 / 0) + 1)
            }.length) {
              case "function" in []:
                h = 1 + h;
                break;

              case /[abc4]/.test((h = 1 + h, "" + !0)):
                break;

              default:
              case --l + N++:
            }
            break;

          case l--:
            var e;
            N++, s && "function" == typeof s.a && 0 <= --u && s.a();
        }
        switch (+function() {
            switch (h = 1 + h, -(o && (o[(h += 1) + (h = 1 + h, 2 ^ (s && (s.NaN *= 0)))] = !1))) {
              case h = 1 + h, f && (f[o && "function" == typeof o.foo && 0 <= --u && o.foo(-5, (h = 1 + h, 
                !1 !== (r && (r[e && "function" == typeof e.foo && 0 <= --u && e.foo("foo", 2 === [ , 0 ].length, (h = 1 + h, 
                !0))] = (r && (r.var = -1)) - NaN))))] = (!1 ^ /[a2][^e]+$/ !== (2 === [ , 0 ].length)) != 0 >> (1 != r)):
                break;

              default:
              case h = 1 + h, +(1 < r << -2):
              case h = 1 + h, !1 ^ !1 / (s && ({
                    null: s.in
                } = {
                    null: 0
                })):
            }
            for (var n = 5; h = 1 + h, f && (f["object" != typeof arguments_1] &= 0 != (-3 == this) <= !1) && 0 < n; --n) {
                h = 1 + h, o = !1;
            }
            h = 1 + h, s = -0 ^ (1 / 0 | (c && (c[h = 1 + h, (0 | (r && (r.undefined = 6))) + (arguments && (arguments.NaN = 0 * (arguments = !0)))] = 23))), 
            h = 1 + (h + 1), h += 1, h += 1;
        }()) {
          case --l + (l + 1 - .1 - .1 - .1):
          case (h += 1) + ("23" in [ --l + ("function" == typeof f7 && 0 <= --u && f7("b", "38", 0)), (h += 1) + /[abc4]/g.exec((h = 1 + h, 
            "" + (-0 >>> (2 === [ , 0 ].length) <= !1 >= (-5 <= (f *= !1)) || l || 5))), "function" == typeof r && 0 <= --u && r(), "function" == typeof arguments && 0 <= --u && arguments((h = 1 + h, 
            (2 << -2) / (r && (r.NaN = "a" == this)) / !1)), --l + /[abc4]/g.exec((h = 1 + h, 
            "" + (l || 5))) ]):
            break;

          case --l + (1 == (e = 0) < (c && (c.Infinity = 0))):
            --l, c && c[h = 1 + h, e && (e[r && r["23" in {}]] /= 0)];
            break;

          case s && (s[2 <= (s += 0) !== "bar-4"] = 1), !0:
            var i = 5;
            do {
                for (var t = 5; h = 1 + h, e && (e.var = NaN), h = 1 + h, !0 ^ (e && (e.foo <<= 24)) % -1 && 0 < --t; ) {}
            } while (arguments && arguments.NaN && 0 < --i);
        }
    }(N++ + (l %= N));
}(-2);

h += 1;

for (var a = 5; l-- && 0 < --a; ) {
    for (var e, i, t = 5; --l + (5 | (n && (n[/[abc4]/g.exec((h = 1 + h, "" + +((n = 0) <= !0)))] = !1))) && 0 < --t; ) {
        h += 1, "function" == typeof n && 0 <= --u && n(--l + i), function() {
            h = 1 + h, h += 1, n && (n[h = 1 + h, 0 <= (e && (e[N++ + (n && n.length)] = !0 / (n += -5)))] += NaN), 
            h = 1 + h;
        }({}, !0, ..."" + void 0), h = 1 + h, n && (n[h = 1 + h, 1] = !1), n = 23 ^ n - NaN, 
        n += NaN, e += -3, h = 1 + (1 + (1 + (1 + (1 + ((h = 1 + (1 + (1 + h))) + 1)))));
    }
}

console.log(null, N, l, h += 1, 1 / 0, i, void 0);
```
```
original result:
null 117 84 360 Infinity undefined undefined

uglified result:
null 117 84 362 Infinity undefined undefined
```
```js
// reduced test case (output will differ)

// (beautified)
function f0(bar_2, b_1) {
    (b_1 = 0) <= (arguments[1] = console.log());
    b_1[0];
}

f0("foo", 1);
// output: TypeError: Cannot read property '0' of undefined
// minify: 
// 
// options: {
//   "compress": {
//     "passes": 1000000,
//     "unsafe": true
//   },
//   "toplevel": true,
//   "output": {
//     "v8": true
//   },
//   "validate": true
// }
```
```
minify(options):
{
  "compress": {
    "passes": 1000000,
    "unsafe": true
  },
  "toplevel": true,
  "output": {
    "v8": true
  }
}

Suspicious compress options:
  evaluate
  passes
  reduce_vars
```


Discussion:

Patch:
diff --git a/lib/compress.js b/lib/compress.js
index d99310edbaf..7c1c3b42552 100644
--- a/lib/compress.js
+++ b/lib/compress.js
@@ -595,7 +595,14 @@ merge(Compressor.prototype, {
             var expr = node.expression;
             if (!(expr instanceof AST_SymbolRef)) return;
             var def = expr.definition();
-            if (is_arguments(def) && node.property instanceof AST_Number) def.reassigned = true;
+            if (!is_arguments(def)) return;
+            var key = node.property;
+            if (key.is_constant()) key = key.value;
+            if (!(key instanceof AST_Node) && !/^[1-9]*[0-9]$/.test(key)) return;
+            def.reassigned = true;
+            (key instanceof AST_Node ? def.scope.argnames : [ def.scope.argnames[key] ]).forEach(function(argname) {
+                if (argname instanceof AST_SymbolFunarg) argname.definition().fixed = false;
+            });
         }
 
         function scan_declaration(tw, lhs, fixed, visit) {


Test patch:
diff --git a/test/compress/evaluate.js b/test/compress/evaluate.js
index 8ef1a466958..7466d63b67d 100644
--- a/test/compress/evaluate.js
+++ b/test/compress/evaluate.js
@@ -3094,3 +3094,26 @@ issue_4393: {
     }
     expect_stdout: "PASS"
 }
+
+issue_4422: {
+    options = {
+        evaluate: true,
+        reduce_vars: true,
+        unused: true,
+    }
+    input: {
+        console.log(function f(a) {
+            a = "FAIL 1";
+            arguments[0] = "PASS";
+            return a;
+        }("FAIL 2"));
+    }
+    expect: {
+        console.log(function(a) {
+            a = "FAIL 1";
+            arguments[0] = "PASS";
+            return a;
+        }("FAIL 2"));
+    }
+    expect_stdout: "PASS"
+}