Repository: mishoo/UglifyJS (JavaScript)

Issue:
ufuzz failure
```js
// original code
// (beautified)
var _calls_ = 10, a = 100, b = 10, c = 0;

switch ((c = c + 1) + !(38..toString() % 0 + ("c" - "b") != NaN % -3 <= (([ , 0 ].length === 2) <= 24..toString()))) {
  case ++a:
    if (typeof f0 == "function" && --_calls_ >= 0 && f0(null, ...[ /[abc4]/.test((a && a[(c = c + 1) + (b /= a)] || b || 5).toString()), 1 === 1 ? a : b ])) {
        var brake3 = 5;
        while ((c = c + 1) + (typeof f0 == "function" && --_calls_ >= 0 && f0(typeof f0 == "function" && --_calls_ >= 0 && f0())) && --brake3 > 0) {
            var expr4 = --b + {
                then: a,
                next() {
                    for (var brake5 = 5; [ (c = 1 + c, (38..toString() ^ "function") << (a && (a[c = 1 + c, 
                    (a && (a[c = 1 + c, (c = c + 1, [ , 0 ][1]) / (null > ([ , 0 ].length === 2)) | "" >>> 22 & (true && "undefined")] += -5 < -5), 
                    4 / 4) / (a = -5 << 4 > "a" % "object")] += (25, 38..toString()))) < ((/[a2][^e]+$/ || /[a2][^e]+$/) != -1 - 22)) ][typeof f0 == "function" && --_calls_ >= 0 && f0((c = 1 + c, 
                    ((38..toString() || 23..toString()) ^ (this ^ "c")) + ((-5 || 23..toString()) < [ , 0 ][1] % 0)), (c = 1 + c, 
                    ((a && (a[c = 1 + c, a && (a.then += (3 * Infinity & 23..toString() >= "foo") != ((-5, 
                    this) ^ 2 < 23..toString()))] >>>= 0 == 2)) == 1 * "a") << (a && (a[a++ + (1 === 1 ? a : b)] = [ , 0 ][1] >>> null || "c" >= -1))))] && brake5 > 0; --brake5) {
                        L21223: for (var brake6 = 5; a++ + ~((a && (a[c = 1 + c, (c = c + 1, 24..toString()) === null << 25 != (true >= false || (4, 
                        22))] = [] != 3) && [ , 0 ][1] ^ "bar") << (true < -1 == "b" / 25)) && brake6 > 0; --brake6) {
                            var brake7 = 5;
                            while ((c = 1 + c, (1 !== -5) % ~"a" + ("c" >>> "c" >> (c = c + 1, true))) && --brake7 > 0) {
                                c = 1 + c, Infinity === "object" === (-4 != true) ^ (5 & true) == undefined * -1;
                            }
                        }
                    }
                },
                "": typeof f1 == "function" && --_calls_ >= 0 && f1()
            }[+(("object" || 22) <= (null ^ 5) >= void ([] == undefined))];
            for (let key4 in expr4) {
                c = 1 + c;
                var arguments = expr4[key4];
                for (var brake10 = 5; a++ + 4 && brake10 > 0; --brake10) {
                    var brake11 = 5;
                    while (typeof f1 == "function" && --_calls_ >= 0 && f1() && --brake11 > 0) {
                        (c = c + 1) + delete ((arguments && (arguments.foo = ("bar" <= "foo") / ("undefined" & "b"))) >>> (([ , 0 ].length === 2) - [] === (arguments && (arguments.c = 38..toString() | "number"))));
                    }
                }
            }
        }
    }
    break;

  default:
    ;
    {
        var a = async function arguments() {
            try {
                return await +function() {}();
            } finally {
                (c = c + 1) + (0 === 1 ? a : b);
                c = c + 1;
            }
            {
                return "object";
            }
        }();
    }

  case +((22 == [ , 0 ][1] ^ "c" * "foo") == (a && ({
        "\t": a[a++ + (b + 1 - .1 - .1 - .1)]
    } = {
        "\t": 22 * 1 ^ (-4 ^ 3)
    }))):
    try {
        ({
            [typeof a == "object" ? --b + (b = a) : 1 === 1 ? a : b]: a++ + (a && a[(c = c + 1) + ~(-4 <= 23..toString() > (NaN, 
            "number") ^ ("object" < "function" ^ ("" ^ {})))]),
            1.5(yield) {
                {
                    var expr22 = a++ + ((b = a) ? (c = c + 1) + (b &= a) : b += a);
                    for (var key22 in expr22) {
                        c = 1 + c;
                        var c_2 = expr22[key22];
                        switch ((c = c + 1) + --b) {
                          case --b + [].static:
                            c = c + 1;
                            break;

                          case []:
                            {
                            }
                            try {
                                c = 1 + c, (c_2 += ("function" >> 5) + [] * 22) << (-3 <= [] && (a && (a[c = 1 + c, 
                                (5 || null) - (-3 !== "foo"), NaN == this == (3 || 2)] = "function" >>> 22)));
                            } catch (yield) {
                            }
                            break;

                          case --_calls_ >= 0 && c_2():
                            {
                                var expr28 = (c = 1 + c, 2 * -2 % (-2 >= "undefined") >>> (24..toString() * ([ , 0 ].length === 2) << ("" >>> "object")));
                                for (var a in expr28) {
                                    c = 1 + c;
                                    var c_2 = expr28[a];
                                    c = 1 + c, (key22 && (key22[c = 1 + c, ([] ^ "bar") > +"" <= (NaN <= -2) - ("number" === -1)] <<= "number" * {}) || a && (a[c = 1 + c, 
                                    (a && (a[c = 1 + c, (([ , 0 ].length === 2 || 5) & 4 === -2) >>> ((24..toString() & "number") << /[a2][^e]+$/ % 3)] &= -5 ^ -3)) <= ("object" <= -2) > ("object" / "function" == "number" * null)] = "number" ^ "bar")) <= (("object" === "c") < (24..toString() != "object"));
                                }
                            }
                            {
                            }
                            break;

                          case (c = 1 + c, (-2 % -1 || 38..toString() % 0) >= ((-0 && "") === (c = c + 1, "object"))) ? a++ + a++ : --b + (b += a):
                            {
                                var expr31 = [ (c = 1 + c, (0 << -1 ^ 0 * "object") + (c_2 && (c_2.b += delete 24..toString() | delete "function"))) ];
                                for (let key31 of expr31) {
                                    c = 1 + c, (-5 >>> NaN) / (24..toString() == "c") || (Infinity, null) >= ("b" || "undefined");
                                }
                            }
                            break;
                        }
                    }
                }
                new function b_1() {
                    this[(c = c + 1) + ++a] <<= (a && (a[typeof (c = 1 + c, (1 ^ 5) / (yield && (yield.__proto__ = 24..toString() >= {})) <= (4 >> "a") % !"c")] += [] / ([ , 0 ].length === 2) | (-5 || null))) / ((a = 23..toString() + 2) || Infinity >>> "object");
                    this.c ^= (b_1 && (b_1.var = 22 < "object") && 4 & -5) + (c = c + 1, -2 > -0);
                    this.then = (c = c + 1, "c" << [ , 0 ][1]) == (23..toString() === 23..toString() ^ 38..toString() * -5);
                    {
                        var expr34 = (c = 1 + c, +(4 >> -1) * ((-4 ^ null) / (NaN + 0)));
                        for (var key34 in expr34) {
                            c = 1 + c, (4 == 1, -4 >= "b") | (0 != 3) + ([ , 0 ][1] >> 2);
                        }
                    }
                    for (var brake36 = 5; (c = 1 + c, (-3 >> 0) / (false + 4) | 5 >> 0 ^ null - this) && brake36 > 0; --brake36) {
                        c = 1 + c, (!"bar" - (null >>> 25)) * (([ , 0 ].length === 2) + "object" | "c" + 1);
                    }
                }(~a);
            },
            c: typeof a != "boolean",
            b: {
                ...a,
                3: ([].c || a || 3).toString(),
                "-2": (c = c + 1) + ([ , 0 ][1] in [ b /= a, , (c = 1 + c, 3 == 23..toString() != ~22 !== ((24..toString() || /[a2][^e]+$/) === (Infinity & {}))) ? (c = 1 + c, 
                (3 | "number") << (a += "number" >> "undefined") << (+"a" <= (25 & -1))) : (c = 1 + c, 
                (this ^ -2 | "" >> ([ , 0 ].length === 2)) >= ("undefined" ^ -1) / ("object" >> 1)), null, (c = c + 1) + [ (c = 1 + c, 
                a && (a[typeof await_1] >>>= (("a" | 3) >>> ("c" ^ "a"), (a = "object" < 25) << (-3 != null)))), (c = 1 + c, 
                ([ , 0 ][1] < "c") >>> ("foo", 25) >= (("" || "") != "number" * ([ , 0 ].length === 2))), (c = 1 + c, 
                (a = {} - -1 + (this + -4)) << ((3 && -2) != (true | -2))), (c = 1 + c, delete ({} !== 0, 
                ([ , 0 ].length === 2) - "")) ][c = 1 + c, 1 * 5 - (a && (a[c = 1 + c, ([] != 22 === (Infinity ^ "foo")) > (a && ({
                    "\t": a.null
                } = {
                    "\t": "a" - false
                })) << ("function" >> -0)] >>>= -0 < -4)) != (this >> "c") % (23..toString() == NaN)] ]),
                0: (c = c + 1) + (a++ + {
                    set: (c = 1 + c, false - "object" + (38..toString() === "foo") < ("foo" != -3 ^ (a && ([ a[c = 1 + c, 
                    ("undefined" && -5) | 38..toString() == ([ , 0 ].length === 2) || ({} & -2) / (-1 <= /[a2][^e]+$/)] ] = [ 25 <= 2 ])))),
                    in: (c = 1 + c, (25 + 1 || true === "b") % ("b" / 5 - (this != 2)))
                }.length),
                b: --b + a
            }
        });
    } catch (arguments_1) {
        var bar = --b, Infinity_1 = /[abc4]/g.exec(((Infinity_1 %= typeof f1 == "function" && --_calls_ >= 0 && f1("number", a++ + ~a, "number")) || b || 5).toString());
        {
            var expr39 = {
                get: a++
            };
            for (var key39 in expr39) {
                for (var brake40 = 5; a && a[a && typeof a.async == "function" && --_calls_ >= 0 && a.async(--b + 0, "undefined")] && brake40 > 0; --brake40) {
                    c = c + 1;
                }
            }
        }
    } finally {
        {
            try {
                (c = c + 1) + (typeof b == "boolean");
            } catch (a) {
                for (var brake45 = 5; typeof a && brake45 > 0; --brake45) {
                    var bar_1 = a++ + !((undefined === "function") < 5 - "bar" <= (3 != -4) >>> (-1 < false)), a_2 = (c = c + 1) + (0 === 1 ? a : b);
                }
                var await;
            } finally {
                var a_2;
                --b + a_2;
            }
            1 === 1 ? a : b;
        }
        L21224: {
            switch (a && typeof a.c == "function" && --_calls_ >= 0 && a.c(a++ + (1 in []), 38..toString(), -3 in {
                undefined: (c = 1 + c, "b" * "undefined" / ([ , 0 ][1] >= "b") >= ~-5 << 22 % [])
            })) {
              case [ , 0 ].length === 2:
                {
                    var expr53 = !b;
                    for (const key53 in expr53) {
                        c = 1 + c;
                        var foo = expr53[key53];
                        try {
                        } catch (undefined_1) {
                            c = 1 + c, ([ , 0 ][1] & this) << (true ^ 0) != ("a" ^ 3) / (-4 >= -5);
                            c = 1 + c, !((-5 <= 22) * (1 > this));
                        } finally {
                            c = 1 + c, (null, 23..toString()) != ("a" ^ 23..toString()) | ("bar" >= "b") % (23..toString() + null);
                            c = 1 + c, (c = c + 1, "function") - ("number" >= "a") <= ("bar" / "bar" >= (38..toString() <= -1));
                        }
                    }
                }
                c = c + 1;
                break;

              case a--:
                switch ((c = c + 1) + (typeof f0 == "function" && --_calls_ >= 0 && f0((c = 1 + c, 
                null >> true > -0 % true <= (0 ^ true) >> (-4 !== "undefined"))))) {
                  case --b + (a && a.done):
                    break;
                    c = 1 + c, ("bar" % -3 >= 24..toString() - "object") % ((-5 & []) >>> (38..toString() >> undefined));
                    break;

                  case --b + (--b + (b = a) || 7).toString()[a++ + (b = a)]:
                    break;

                  case typeof a == "function" && --_calls_ >= 0 && a("b"):
                    {
                    }

                  default:
                    try {
                        c = 1 + c, ("function" - -3 ^ "undefined" == 3) <= ("number" >> ([ , 0 ].length === 2) !== (2 != 24..toString()));
                    } finally {
                    }
                }
                break;

              case a && typeof a.then == "function" && --_calls_ >= 0 && a.then():
                ;
                break;

              case --b + (1 === 1 ? a : b):
                {
                    var brake68 = 5;
                    L21225: while (--b + --b && --brake68 > 0) {
                        switch (--b + [ (c = 1 + c, a && (a.var = ([ , 0 ][1] << -5 << (22 & 5)) * ((a += {} / []) >>> (5 | 23..toString())))), (c = 1 + c, 
                        (!22 ^ "foo" >= "function") + (c = c + 1, [ , 0 ][1] * true)), (c = 1 + c, ((c = c + 1, 
                        Infinity) >>> (-3 >> -5)) * (a && ([ a.set ] = [ (this == "object") / (Infinity <= []) ]))), (c = 1 + c, 
                        a &= ((a = "foo" % 24..toString()) && "number" === 38..toString()) >= (NaN !== "function") % (/[a2][^e]+$/ << [ , 0 ][1])) ]) {
                          case [ (c = 1 + c, a && (a.done += (/[a2][^e]+$/ ^ "c") == -0 / -1 ^ (c = c + 1, 25) + (22 | -1))), (c = 1 + c, 
                            -3 != "b" != "bar" % [] || "number" >> -2 > (true > -2)), (c = 1 + c, (a && (a.foo ^= (a && (a.value += 4 !== "function")) ^ 24..toString() * 23..toString())) - (([ , 0 ].length === 2) % ([ , 0 ].length === 2) > -5 + "foo")), (c = 1 + c, 
                            a && (a[[ (c = 1 + c, delete (a = "a" % [] > ([ , 0 ][1] != /[a2][^e]+$/))), (c = 1 + c, 
                            (38..toString() ^ 4) != (a && (a[c = 1 + c, ([ , 0 ].length === 2) % {} * (a && (a[c = 1 + c, 
                            +((false === /[a2][^e]+$/) < (1 > 23..toString()))] = "number" * "object")) != ("foo" == "function" & (-1, 
                            "a"))] += "b" & "c")) ^ delete -3 != "a" >> "bar") ]] = ([ , 0 ].length === 2) >> 24..toString() < ([ , 0 ][1] | false) !== ((c = c + 1, 
                            1) == "b" >>> 4))), (c = 1 + c, ("number" << "number" >= (false | 4)) - ((c = c + 1, 
                            "function") >= (24..toString() <= -5))) ].undefined:
                            break;

                          case (c = c + 1) + (a && a.NaN):
                            break;

                          default:
                          case (-3 || -1) * (true + 0) >> (this >= 1 && 25 | -5):
                            c = 1 + c, ({} != 23..toString()) * (c = c + 1, 24..toString()) || (0 || -0) !== "c" << Infinity;
                            c = 1 + c, !({} % "b" >>> (-2 | [ , 0 ][1]));
                            break;
                        }
                    }
                }
                break;
            }
            c = c + 1;
        }
    }
    L21226: {
        {
            var expr74 = /[a2][^e]+$/  in [ a++ + {
                c: (c = c + 1) + [ (c = 1 + c, ("bar" - -4 < (a && (a[c = 1 + c, ((2, "foo") === "object" <= /[a2][^e]+$/) % ((4 !== undefined) >= ("" ^ []))] = -0 % -5))) + ((1, 
                25) == (c = c + 1, 25))) ],
                "\t": a++ + ((23..toString() >> -2 != ("object" === null)) <= (~[ , 0 ][1] === (a = -5 & "b")))
            }[--b + (1 === 1 ? a : b)], void (undefined >> ([ , 0 ].length === 2) != 2 < -3 || (c = c + 1, 
            {}, "a" / 24..toString())), --b + false, (c = c + 1) + (typeof f0 == "function" && --_calls_ >= 0 && f0()) ];
            for (var key74 in expr74) {
                c = 1 + c;
                var bar_1 = expr74[key74];
                {
                    var expr75 = --b + {
                        get: a++ + (typeof f0 == "function" && --_calls_ >= 0 && f0(22)),
                        next: --b + (a = a && a[((c = 1 + c, (!/[a2][^e]+$/ == 23..toString() << 22) - (-"a" === ([ , 0 ].length === 2 === "foo"))) || 1).toString()[c = 1 + c, 
                        /[a2][^e]+$/ * [ , 0 ][1] && (Infinity && NaN), (-1 !== "undefined") >> (undefined < 25)]]),
                        b: a++ + (key74 && typeof key74.static == "function" && --_calls_ >= 0 && key74.static("b", ..."" + key74, (c = 1 + c, 
                        (delete 22 === -4 + "undefined") >= (2 < "" === ("a" !== "number")))) || a || 3).toString(),
                        next: --b + 4
                    }.undefined;
                    L21227: for (var key75 in expr75) {
                        c = 1 + c;
                        var await = expr75[key75];
                        try {
                            {
                                {
                                    var expr78 = --b + (key75 += (c = 1 + c, ((Infinity >> 1) + (22 >>> undefined)) * ((NaN >>> 1) / (/[a2][^e]+$/ || 24..toString()))));
                                    L21228: for (var key78 in expr78) {
                                        try {
                                            c = 1 + c, delete ("number" >> -4) >> ("c" ^ "object") - ("a" && 2);
                                        } catch (c_1) {
                                        } finally {
                                        }
                                    }
                                }
                                {
                                    var brake81 = 5;
                                    while (a && typeof a.set == "function" && --_calls_ >= 0 && a.set(-2) && --brake81 > 0) {
                                        L21229: for (var brake82 = 5; (c = 1 + c, await = (("b", true) === 22 * 1) < ("c" * "b", 
                                        await && (await[c = 1 + c, bar_1 && (bar_1.Infinity -= (key75.then += 23..toString() % 24..toString() >>> (-3 !== "")) - (3 == 38..toString() == (undefined !== "foo")))] = 25 !== NaN))) && brake82 > 0; --brake82) {
                                            c = 1 + c, (await && (await.static += null || "object")) >= (false < {}) || ~3 >= [] * 24..toString();
                                        }
                                    }
                                }
                                {
                                    var brake84 = 5;
                                    do {
                                        {
                                            var brake85 = 5;
                                            L21230: while ((c = 1 + c, (5 == 22 || -"function") | ([ , 0 ][1] ^ [ , 0 ][1]) >= (key74 && (key74.async += "b" != "bar"))) && --brake85 > 0) {
                                                c = 1 + c, (5 && 24..toString()) * (23..toString() | 4) ^ ~"foo" - (25 - [ , 0 ][1]);
                                            }
                                        }
                                    } while ((0 === 1 ? a : b) && --brake84 > 0);
                                }
                            }
                        } catch (await_2) {
                            c = c + 1;
                        }
                    }
                }
            }
        }
        c = c + 1;
        break;
    }

  case [ (c = c + 1) + --a, ..."" + a, (c = c + 1) + 0, (c = c + 1) + (a && a[a++ + (a && a.value)]) ][a && typeof a.length == "function" && --_calls_ >= 0 && a.length(a && a.then)]:
    for (var brake91 = 5; (c = c + 1) + (0 === 1 ? a : b) && brake91 > 0; --brake91) {
        continue;
    }
    {
        var brake93 = 5;
        do {
            for (var brake94 = 5; a && a.next && brake94 > 0; --brake94) {
                var brake95 = 5;
                do {
                    try {
                        {
                            var brake97 = 5;
                            do {
                                {
                                    var brake98 = 5;
                                    while (--b + void ("object" * true / ("object" << -1) & (a = 24..toString() % /[a2][^e]+$/ !== 38..toString() % this)) && --brake98 > 0) {
                                        var brake99 = 5;
                                        while (+function() {
                                            c = 1 + c, -0 !== [] ^ void -0 ^ ("number" ^ -4) !== (false === 24..toString());
                                            c = 1 + c, (c = c + 1, a && (a[c = 1 + c, a && (a.get <<= (("bar" ^ true) == "" / undefined) * delete (false > 23..toString()))] |= 0 + NaN)) <= (-4 % 25 < (-1 | 38..toString()));
                                            c = 1 + c, (c = c + 1, true) + (a && (a[c = 1 + c, ~"number" % ("bar" > "b"), (24..toString() ^ this) >> ("bar" ^ [ , 0 ].length === 2)] += "bar" >= Infinity)) | "" ^ [] ^ (c = c + 1, 
                                            -2);
                                        }() && --brake99 > 0) {
                                            a++ + +b;
                                        }
                                    }
                                }
                            } while (+b && --brake97 > 0);
                        }
                    } catch (yield_2) {
                        try {
                            c = c + 1;
                        } catch (bar) {
                            c = c + 1;
                            for (var brake107 = 5; b-- && brake107 > 0; --brake107) {
                                c = 1 + c, (a = ("undefined" + 5) * (/[a2][^e]+$/ | -0)) > ((c = c + 1, /[a2][^e]+$/) < (a = null === 5));
                            }
                        } finally {
                            c = c + 1;
                            for (var brake110 = 5; --b + yield_2 && brake110 > 0; --brake110) {
                                L21231: {
                                }
                            }
                        }
                        switch (a++ + (typeof a == "function" && --_calls_ >= 0 && a())) {
                          default:
                            for (var brake113 = 5; a++ + a-- && brake113 > 0; --brake113) {
                            }

                          case (c = c + 1) + b++:
                            break;

                          case a && a.Infinity:
                            {
                                var brake115 = 5;
                                do {
                                } while (a++ + ++a && --brake115 > 0);
                            }
                            c = c + 1;
                            break;

                          case a++ + (typeof yield_2 == "function" && --_calls_ >= 0 && yield_2((c = c + 1) + (b += a))):
                            {
                                var brake118 = 5;
                                while (!(void (c = c + 1, Infinity) == ("c" & 4 || -4 != "")) && --brake118 > 0) {
                                    var brake119 = 5;
                                    L21232: while ((c = 1 + c, (a >>>= [ , 0 ].length === 2 === true) / (true << 38..toString()) | 23..toString() % "" % ("c" | "object")) && --brake119 > 0) {
                                        c = 1 + c, ("foo" * 23..toString() && false != this) + ("object" ^ {} | false ^ -3);
                                    }
                                }
                            }
                            {
                                var c_2 = function bar() {
                                }((c = 1 + c, (yield_2 && (yield_2.then += 5 << Infinity << (c = c + 1, 25))) / ([] >> 23..toString() == 4 * -0)), (c = 1 + c, 
                                (yield_2 += (24..toString() | "undefined") + Infinity % false) >> (c = c + 1, Infinity << /[a2][^e]+$/)), "function");
                            }
                            break;
                        }
                    }
                } while ((b >>>= a) && --brake95 > 0);
            }
        } while (a++ + (b -= a) && --brake93 > 0);
    }
    break;
}

c = c + 1;

console.log(null, a, b, c, Infinity, NaN, undefined);
```
```js
// uglified code
// (beautified)
var _calls_ = 10, a = 100, b = 10, c = 0;

switch ((c += 1) + !(38..toString() % 0 + NaN != NaN <= ((2 === [ , 0 ].length) <= 24..toString()))) {
  case ++a:
    if ("function" == typeof f0 && 0 <= --_calls_ && f0(null, /[abc4]/.test((a && a[(c += 1) + (b /= a)] || b || 5).toString()), a)) {
        for (var brake3 = 5; (c += 1) + ("function" == typeof f0 && 0 <= --_calls_ && f0("function" == typeof f0 && 0 <= --_calls_ && f0())) && 0 < --brake3; ) {
            var expr4 = --b + {
                then: a,
                next() {
                    for (var brake5 = 5; [ (c = 1 + c, ("function" ^ 38..toString()) << (a && (a[c = 1 + c, 
                    a && (a[c = 1 + c, 0 | (c += 1, 0 / ((2 === [ , 0 ].length) < null))] += !1), 1 / (a = !1)] += 38..toString())) < !0) ]["function" == typeof f0 && 0 <= --_calls_ && f0((c = 1 + c, 
                    ("c" ^ (38..toString() || 23..toString()) ^ this) + !1), (c = 1 + c, (NaN == (a && (a[c = 1 + c, 
                    a && (a.then += (1 / 0 & "foo" <= 23..toString()) != (this ^ 2 < 23..toString()))] >>>= !1))) << (a && (a[a++ + a] = !1))))] && 0 < brake5; --brake5) {
                        for (var brake6 = 5; a++ + ~((a && (a[c = 1 + c, 0 === (c += 1, 24..toString()) != !0] = 3 != []) && 0) << !1) && 0 < brake6; --brake6) {
                            c = 1 + c, 0 >> (c += 1, !0);
                        }
                    }
                },
                "": "function" == typeof f1 && 0 <= --_calls_ && f1()
            }[0];
            for (let key4 in expr4) {
                for (var c = 1 + c, arguments = expr4[key4], brake10 = 5; 4 + a++ && 0 < brake10; --brake10) {
                    for (var brake11 = 5; "function" == typeof f1 && 0 <= --_calls_ && f1() && 0 < --brake11; ) {
                        c += 1, arguments && (arguments.foo = 1 / 0), arguments && (arguments.c = "number" | 38..toString());
                    }
                }
            }
        }
    }
    break;

  default:
    a = async function() {
        try {
            return NaN;
        } finally {
            c += 1, c += 1;
        }
        return "object";
    }();

  case +(0 == (a && ({
        "\t": a[a++ + (b + 1 - .1 - .1 - .1)]
    } = {
        "\t": -23
    }))):
    try {
        "object" == typeof a && (--b, b = a), ++a && a[(c += 1) + ~("number" < (-4 <= 23..toString()) ^ "" ^ {} ^ !1)], 
        {
            ...a
        }, ([].c || a || 3).toString(), b /= a, c = 1 + (c += 1), 3 == 23..toString() != -23 != ((24..toString() || /[a2][^e]+$/) === (1 / 0 & {})) ? (c = 1 + c, 
        a += 0) : c = 1 + c, c = 1 + (c += 1), a && (a[typeof await_1] >>>= (a = !1) << !0), 
        c = 1 + (c = 1 + (c = 1 + (c = 1 + c))), (a = {} - -1 + (this + -4)) && (a[c = 1 + c, 
        (22 != [] === 0) > (a && ({
            "\t": a.null
        } = {
            "\t": NaN
        })) << 0] >>>= !1), 23..toString(), a++, c = 1 + (c += 1), 38..toString(), a && ([ a[c = 1 + c, 
        -5 | 38..toString() == (2 === [ , 0 ].length) || (-2 & {}) / !1] ] = [ !1 ]), c = 1 + c, 
        --b;
    } catch (arguments_1) {
        var key39, bar = --b, Infinity_1 = /[abc4]/g.exec(((Infinity_1 %= "function" == typeof f1 && 0 <= --_calls_ && f1("number", a++ + ~a, "number")) || b || 5).toString()), expr39 = {
            get: a++
        };
        for (key39 in expr39) {
            for (var brake40 = 5; a && a[a && "function" == typeof a.async && 0 <= --_calls_ && a.async(--b, "undefined")] && 0 < brake40; --brake40) {
                c += 1;
            }
        }
    } finally {
        try {
            c += 1;
        } catch (a) {
            for (var brake45 = 5; 0 < brake45; --brake45) {
                var bar_1 = a++ + !1, a_2 = (c += 1) + b;
            }
        } finally {
            --b;
        }
        switch (a && "function" == typeof a.c && 0 <= --_calls_ && a.c(a++ + (1 in []), 38..toString(), -3 in {
            undefined: (c = 1 + c, 4 << 22 % [] <= NaN)
        })) {
          case 2 === [ , 0 ].length:
            var expr53 = !b;
            for (const key53 in expr53) {
                c = 1 + c;
                var foo = expr53[key53];
                c = 1 + c, 23..toString(), 23..toString(), 23..toString(), c = 1 + c, c += 1, 38..toString();
            }
            c += 1;
            break;

          case a--:
            switch ((c += 1) + ("function" == typeof f0 && 0 <= --_calls_ && f0((c = 1 + c, 
            !0)))) {
              case --b + (a && a.done):
              case --b + (--b + (b = a) || 7).toString()[a++ + (b = a)]:
                break;

              case "function" == typeof a && 0 <= --_calls_ && a("b"):
              default:
                c = 1 + c, 24..toString();
            }
            break;

          case a && "function" == typeof a.then && 0 <= --_calls_ && a.then():
            break;

          case --b + a:
            for (var brake68 = 5; --b + --b && 0 < --brake68; ) {
                switch (--b + [ (c = 1 + c, a && (a.var = 0 * ((a += {} / []) >>> (5 | 23..toString())))), (c = 1 + c, 
                c += 1, 0), (c = 1 + c, c += 1, 0 * (a && ([ a.set ] = [ ("object" == this) / (1 / 0 <= []) ]))), (c = 1 + c, 
                a &= NaN <= ((a = "foo" % 24..toString()) && "number" === 38..toString())) ]) {
                  case [ (c = 1 + c, a && (a.done += !0 ^ (c += 1, 24))), (c = 1 + c, 1 != "bar" % [] || !1), (c = 1 + c, 
                    (a && (a.foo ^= (a && (a.value += !0)) ^ 24..toString() * 23..toString())) - ("-5foo" < (2 === [ , 0 ].length) % (2 === [ , 0 ].length))), (c = 1 + c, 
                    a && (a[[ (c = 1 + c, a = !0 < "a" % [], !0), (c = 1 + c, (4 ^ 38..toString()) != (a && (a[c = 1 + c, 
                    (2 === [ , 0 ].length) % {} * (a && (a[c = 1 + c, +(!1 < (23..toString() < 1))] = NaN)) != 0] += 0)) ^ !0) ]] = (2 === [ , 0 ].length) >> 24..toString() < 0 != (0 == (c += 1, 
                    1)))), (c = 1 + c, !1 - (c += 1, 24..toString() <= -5 <= "function")) ].undefined:
                  case (c += 1) + (a && a.NaN):
                    break;

                  default:
                    c = 1 + c, 23..toString(), c += 1, 24..toString(), c = 1 + c;
                }
            }
        }
        c += 1;
    }
    var key74, expr74 = /[a2][^e]+$/  in [ a++ + {
        c: (c += 1) + [ (c = 1 + c, (NaN < (a && (a[c = 1 + c, !1 % (("" ^ []) <= !0)] = -0))) + (25 == (c += 1, 
        25))) ],
        "\t": a++ + ((23..toString() >> -2 != 0) <= (-1 == (a = 0)))
    }[--b + a], void (void 0 >> (2 === [ , 0 ].length) != 0 || (c += 1, 24..toString())), --b + !1, (c += 1) + ("function" == typeof f0 && 0 <= --_calls_ && f0()) ];
    for (key74 in expr74) {
        c = 1 + c;
        var key75, bar_1 = expr74[key74], expr75 = --b + {
            get: a++ + ("function" == typeof f0 && 0 <= --_calls_ && f0(22)),
            next: --b + (a = a && a[c = 1 + c, ((0 == 23..toString() << 22) - (NaN === (2 === [ , 0 ].length === "foo")) || 1).toString()[c = 1 + c, 
            1]]),
            b: a++ + (key74 && "function" == typeof key74.static && 0 <= --_calls_ && key74.static("b", ..."" + key74, (c = 1 + c, 
            !0)) || a || 3).toString(),
            next: 4 + --b
        }.undefined;
        for (key75 in expr75) {
            c = 1 + c;
            var await = expr75[key75];
            try {
                var key78, expr78 = --b + (key75 += (c = 1 + c, NaN));
                for (key78 in expr78) {
                    try {
                        c = 1 + c;
                    } catch (c_1) {}
                }
                for (var brake81 = 5; a && "function" == typeof a.set && 0 <= --_calls_ && a.set(-2) && 0 < --brake81; ) {
                    for (var brake82 = 5; c = 1 + c, (await = !1 < (await && (await[c = 1 + c, bar_1 && (bar_1.Infinity -= (key75.then += 23..toString() % 24..toString() >>> !0) - (3 == 38..toString() == 1))] = !0))) && 0 < brake82; --brake82) {
                        c = 1 + c, (await && (await.static += "object")) >= (!1 < {}) || 24..toString();
                    }
                }
                var brake84 = 5;
                do {
                    for (var brake85 = 5; c = 1 + c, NaN | (key74 && (key74.async += !0)) <= 0 && 0 < --brake85; ) {
                        c = 1 + c, 24..toString(), 23..toString();
                    }
                } while (b && 0 < --brake84);
            } catch (await_2) {
                c += 1;
            }
        }
    }
    c += 1;
    break;

  case [ (c += 1) + --a, ..."" + a, (c += 1) + 0, (c += 1) + (a && a[a++ + (a && a.value)]) ][a && "function" == typeof a.length && 0 <= --_calls_ && a.length(a && a.then)]:
    for (var brake91 = 5; (c += 1) + b && 0 < brake91; --brake91) {
        continue;
    }
    var brake93 = 5;
    do {
        for (var brake94 = 5; a && a.next && 0 < brake94; --brake94) {
            var brake95 = 5;
            do {
                try {
                    var brake97 = 5;
                    do {
                        for (var brake98 = 5; --b + void (a = 24..toString() % /[a2][^e]+$/ != 38..toString() % this) && 0 < --brake98; ) {
                            var brake99 = 5;
                            +function() {
                                c = 1 + c, 24..toString(), c = 1 + c, c += 1, a && (a[c = 1 + c, a && (a.get <<= !1 * (23..toString(), 
                                !0))] |= NaN), 38..toString(), c = 1 + c, c += 1, a && (a[c = 1 + c, (24..toString() ^ this) >> ("bar" ^ 2 === [ , 0 ].length)] += !1), 
                                c += 1;
                            }();
                        }
                    } while (+b && 0 < --brake97);
                } catch (yield_2) {
                    try {
                        c += 1;
                    } catch (bar) {
                        c += 1;
                        for (var brake107 = 5; b-- && 0 < brake107; --brake107) {
                            c = 1 + c, a = NaN, c += 1, a = !1;
                        }
                    } finally {
                        c += 1;
                        for (var brake110 = 5; --b + yield_2 && 0 < brake110; --brake110) {}
                    }
                    switch (a++ + ("function" == typeof a && 0 <= --_calls_ && a())) {
                      default:
                        for (var brake113 = 5; a++ + a-- && 0 < brake113; --brake113) {}

                      case (c += 1) + b++:
                        break;

                      case a && a.Infinity:
                        for (var brake115 = 5; a++ + ++a && 0 < --brake115; ) {}
                        c += 1;
                        break;

                      case a++ + ("function" == typeof yield_2 && 0 <= --_calls_ && yield_2((c += 1) + (b += a))):
                        for (var brake118 = 5; c += 1, 0 < --brake118; ) {
                            for (var brake119 = 5; c = 1 + c, (a >>>= 2 === [ , 0 ].length == !0) / (!0 << 38..toString()) | 23..toString() % "" % 0 && 0 < --brake119; ) {
                                c = 1 + c, 23..toString();
                            }
                        }
                        var c_2 = (c = 1 + c, yield_2 && (yield_2.then += 5 << (c += 1, 25)), 23..toString(), 
                        c = 1 + c, yield_2 += ("undefined" | 24..toString()) + NaN, void (c += 1));
                    }
                }
            } while ((b >>>= a) && 0 < --brake95);
        }
    } while (a++ + (b -= a) && 0 < --brake93);
}

c += 1, console.log(null, a, b, c, 1 / 0, NaN, void 0);
```
```
original result:
null 0 NaN 26 Infinity NaN undefined

uglified result:
null 0 NaN 28 Infinity NaN undefined
```
```js
// reduced test case (output will differ)

// (beautified)
(async function arguments() {
    try {
        return await 0;
    } finally {
        console.log();
    }
})();

console.log(undefined);
// output: undefined
// 
// 
// minify: 
// undefined
// 
// options: {
//   "mangle": false,
//   "output": {
//     "v8": true
//   },
//   "validate": true
// }
```
```
minify(options):
{
  "mangle": false,
  "output": {
    "v8": true
  }
}

Suspicious compress options:
  awaits
  side_effects
```


Discussion:

Patch:
diff --git a/lib/compress.js b/lib/compress.js
index b07e85ad047..a0ab9acda12 100644
--- a/lib/compress.js
+++ b/lib/compress.js
@@ -9885,7 +9885,16 @@ merge(Compressor.prototype, {
                 if (is_arrow(parent)) {
                     if (parent.value === node) return exp.optimize(compressor);
                 } else if (parent instanceof AST_Return) {
-                    return exp.optimize(compressor);
+                    var drop = true;
+                    do {
+                        node = parent;
+                        parent = compressor.parent(level++);
+                        if (parent instanceof AST_Try && parent.bfinally && parent.bfinally !== node) {
+                            drop = false;
+                            break;
+                        }
+                    } while (parent && !(parent instanceof AST_Scope));
+                    if (drop) return exp.optimize(compressor);
                 } else if (parent instanceof AST_Sequence) {
                     if (parent.tail_node() === node) continue;
                 }


Test patch:
diff --git a/test/compress/awaits.js b/test/compress/awaits.js
index f794e9cfa63..9c3335a3f30 100644
--- a/test/compress/awaits.js
+++ b/test/compress/awaits.js
@@ -1529,3 +1529,111 @@ issue_4764_3: {
     expect_stdout: "PASS"
     node_version: ">=8"
 }
+
+issue_4972_1: {
+    options = {
+        awaits: true,
+        side_effects: true,
+    }
+    input: {
+        console.log("foo");
+        (async function() {
+            try {
+                return await "bar";
+            } finally {
+                console.log("baz");
+            }
+        })().then(console.log);
+        console.log("moo");
+    }
+    expect: {
+        console.log("foo");
+        (async function() {
+            try {
+                return await "bar";
+            } finally {
+                console.log("baz");
+            }
+        })().then(console.log);
+        console.log("moo");
+    }
+    expect_stdout: [
+        "foo",
+        "moo",
+        "baz",
+        "bar",
+    ]
+    node_version: ">=8"
+}
+
+issue_4972_2: {
+    options = {
+        awaits: true,
+        side_effects: true,
+    }
+    input: {
+        console.log("foo");
+        (async function() {
+            try {
+                console.log("bar");
+            } finally {
+                return await "baz";
+            }
+        })().then(console.log);
+        console.log("moo");
+    }
+    expect: {
+        console.log("foo");
+        (async function() {
+            try {
+                console.log("bar");
+            } finally {
+                return "baz";
+            }
+        })().then(console.log);
+        console.log("moo");
+    }
+    expect_stdout: [
+        "foo",
+        "bar",
+        "moo",
+        "baz",
+    ]
+    node_version: ">=8"
+}
+
+issue_4972_3: {
+    options = {
+        awaits: true,
+        side_effects: true,
+    }
+    input: {
+        console.log("foo");
+        try {
+            (async function() {
+                return await "bar";
+            })().then(console.log);
+        } finally {
+            console.log("baz");
+        }
+        console.log("moo");
+    }
+    expect: {
+        console.log("foo");
+        try {
+            (async function() {
+                return "bar";
+            })().then(console.log);
+        } finally {
+            console.log("baz");
+        }
+        console.log("moo");
+    }
+    expect_stdout: [
+        "foo",
+        "baz",
+        "moo",
+        "bar",
+    ]
+    node_version: ">=8"
+}