Repository: mishoo/UglifyJS (JavaScript)

Issue:
ufuzz failure
```js
// original code
// (beautified)
var _calls_ = 10, a = 100, b = 10, c = 0;

c = c + 1;

switch (a++ + (a && typeof a.undefined == "function" && --_calls_ >= 0 && a.undefined(-0, (-0 ^ [ 3n ][0] > 2) >>> (a = 25 + -3) >>> ("foo" < ([ , 0 ].length === 2) && -0 + !0o644n), 23..toString()))) {
  case (c = c + 1) + (typeof yield != "undefined"):
    (c = c + 1) + (typeof a == "function" && --_calls_ >= 0 && a(1));
    var a_2 = [ typeof b_2 == "function" && --_calls_ >= 0 && b_2(), b--, (c = c + 1) + a_2, typeof f0 == "function" && --_calls_ >= 0 && f0(~a, ""), --b + (typeof b_2 == "function" && --_calls_ >= 0 && b_2(..."" + b_2, "function", "a")) ], b_2 = 23..toString() in {
        [typeof f0 == "function" && --_calls_ >= 0 && f0(2)]: typeof b === "boolean"
    };
    break;

  case --b + {
        get then() {
            return --b + (typeof a_2 == "function" && --_calls_ >= 0 && a_2([ a++ + /[abc4]/g.exec(((c = c + 1) + (b_2 && b_2.null) || b || 5).toString()) ], [ , 0 ][1], a--));
        },
        ...-2,
        undefined: ("" && true) ^ (NaN ^ NaN) ^ ([] & 0) - delete 1,
        [a++ + /[abc4]/g.exec((--b + !b || b || 5).toString())]: /[abc4]/.test((--b + (typeof f1 == "function" && --_calls_ >= 0 && f1(-3, "bar", a++ + (--b + a-- ? (c = c + 1) + true : void a))) || b || 5).toString()),
        a: --b + /[abc4]/g.exec(((c = c + 1) + (b_2 >>= (c = c + 1) + --b) || b || 5).toString())
    }.NaN:
    L20652: for (var brake7 = 5; a++ + b-- && brake7 > 0; --brake7) {
        try {
            switch ((c = c + 1) + (b &= a)) {
              case (c = c + 1) + (typeof b_2 == "function" && --_calls_ >= 0 && b_2((c = c + 1) + ((c = c + 1) + [ --b + a--, --b + (b_2 = (c = 1 + c, 
                [ , 0 ][1] + "number" >> ("undefined" >= 1) === (-3 & "c") * (b_2 && (b_2[c = 1 + c, 
                delete ("number" ?? [ , 0 ][1]) | (22 || "a") ^ (c = c + 1, 4)] = 0 ^ Number(0xdeadn << 16n | 0xbeefn))))), ~(((b_2 = /[a2][^e]+$/ !== {}) == [ 3n ][0] > 2 < "c") > ((-42n).toString() < "a", 
                "bar" - 1)), a_2 && a_2[c = 1 + c, a_2 && (a_2.var = (c = c + 1, 38..toString()) >>> -1 + ([ , 0 ].length === 2) > ((5 || Infinity) != ({} || -3)))] ][b++] || 6).toString()[--b + [ (c = 1 + c, 
                ((-2 ?? this) !== (-2 & "a")) - (null != 5) % (undefined < -3)) ? (c = 1 + c, (25 != "undefined") < (25 & !0o644n) ^ (delete 22 ^ {} * -5)) : (c = 1 + c, 
                -4 / 24..toString() <= "b" >> -4 | ("number" < -1) * ("b" != 1)), [ (c = 1 + c, 
                c = c + 1, (b_2 && (b_2.value += undefined !== -0)) > Infinity + [ , 0 ][1]), (c = 1 + c, 
                ([] > "number") >> ("bar" ^ !0o644n) || true === "bar" === (2 && "object")) ][c = 1 + c, 
                (38..toString(), -4) > 3 % 1 > ("number" < "a" > 4 / "function")] ]], -2 in [ b + 1 - .1 - .1 - .1, (c = c + 1) + --b, (c = c + 1) + a--, --b + (24..toString() in [ (c = 1 + c, 
                ("undefined" !== -2) ** (c = c + 1, {}) + (-0 >= 23..toString() > (a_2 += "number" % -0))), (c = 1 + c, 
                b_2 && (b_2.NaN -= (4 << "bar" && 24..toString() >= "foo") / ((1 + ([ 3n ][0] > 2)) % ([] >= "a")))), (c = 1 + c, 
                b_2 -= (b_2 && (b_2[[][c = 1 + c, ((false !== true) >= Number(0xdeadn << 16n | 0xbeefn) + Number(0xdeadn << 16n | 0xbeefn)) / ((-5, 
                Infinity) + (a_2 = "bar" > -3))]] = (1 >> 3) - ("foo" || this))) != ((0 & !0o644n) !== (a_2 && (a_2[c = 1 + c, 
                (a_2 = (c = c + 1, -0) < ("function" || [ , 0 ].length === 2)) ^ (c = c + 1, -5 << "object")] |= 3 < 5)))), (c = 1 + c, 
                (a_2 && (a_2[c = 1 + c, b_2 && (b_2.b = ("undefined" >> 2, 5 <= false) < (22 & (-42n).toString(), 
                this && -0))] = 5 > "b")) < (c = c + 1, []) == ((b_2 && (b_2.value += !0o644n && 0)) ^ (b_2 = "object" - null))) ]), a++ + ~a ], 38..toString())):
                break;

              case typeof f0 == "function" && --_calls_ >= 0 && f0(typeof a, -1):
                switch ((function foo() {
                    c = c + 1;
                } || 1).toString()[typeof a_2]) {
                  default:
                  case ~((b_2 = (false > "") / (false > 22)) >>> (22 * 1 !== (a_2 && (a_2.foo |= "bar" >> "b")))):
                  case ~((2 + "a" || b_2 && (b_2[c = 1 + c, a_2 && (a_2[a++ + ++a] = (a_2 >>>= (a_2 && (a_2[c = 1 + c, 
                    (this, NaN) << (Number(0xdeadn << 16n | 0xbeefn) >>> 1) === (38..toString() !== -3) << NaN / "object"] ^= "object" && 1)) | "" ^ "undefined") >>> ![ , 0 ][1] * (5 || -3))] = "b" ^ 23..toString())) ^ -2 == [] != ((-42n).toString() & Number(0xdeadn << 16n | 0xbeefn))):
                    ;
                    if (--b + (b = a)) {
                        if ((5 - 22 != void 3) >= (5 << Infinity && (c = c + 1, Infinity))) {
                            try {
                                c = 1 + c, c = c + 1, 24..toString() < "c" & (b_2 && (b_2.NaN *= !0o644n | -1));
                            } catch (async_2) {
                            }
                        } else {
                            var brake17 = 5;
                            L20653: do {
                                c = 1 + c, b_2 && ({
                                    0: b_2.undefined
                                } = {
                                    0: (23..toString() >>> 38..toString() ^ "" / 3) + (-2 * 1 < ([ , 0 ].length === 2) >>> "undefined")
                                });
                            } while ((c = 1 + c, a_2 = (24..toString() || "foo") < (-2 !== "a") > ([] ?? 0) >> ("" != -1)) && --brake17 > 0);
                        }
                    }
                    break;

                  case null:
                    {
                        var b_1 = function f0(a_2, b_1) {
                            c = 1 + c, 0 ^ "number" && "bar" % /[a2][^e]+$/ || 3 * /[a2][^e]+$/ < (undefined && "object");
                            c = 1 + c, ({} - 25 ^ null >>> ([ , 0 ].length === 2)) - (5 >> "a" ?? 38..toString() >> "undefined");
                        }();
                    }
                    b_2 && b_2[(c = c + 1) + (typeof f0 == "function" && --_calls_ >= 0 && f0(1))];
                    break;
                }
                L20654: {
                    {
                        var brake24 = 5;
                        while (a++ + ([ b_2 ] = []) && --brake24 > 0) {
                            var expr25 = false in [ (c = 1 + c, (a_2 && (a_2[(c = c + 1) + ((c = 1 + c, a_2 && (a_2.null += (this === null) % (b_1 && (b_1.c <<= "c" != -2)) || (25 >> ([ , 0 ].length === 2)) + (b_1 = (null, 
                            0)))) || a || 3).toString()] += (([ 3n ][0] > 2) >>> /[a2][^e]+$/) * delete -0)) !== (([ 3n ][0] > 2 ^ "undefined") === (3 & "function"))), (c = 1 + c, 
                            (c = c + 1, false & "number") | ("a" + Infinity ?? ("" || -4))) ];
                            L20655: for (a_2 in expr25) {
                                c = 1 + c;
                                var NaN_1 = expr25[a_2];
                                try {
                                    c = 1 + c, (-0 + "b") % (false ^ -0) + (undefined & 1 ^ ([ 3n ][0] > 2) >> "c");
                                } catch (await) {
                                } finally {
                                }
                            }
                        }
                    }
                    {
                        if (c = 1 + c, NaN_1 && (NaN_1[(c = c + 1) + (b_1 && typeof b_1.b == "function" && --_calls_ >= 0 && b_1.b())] <<= (b_1 && (b_1.null += -2 || NaN) || -1 > this) > ((NaN || true) | ("undefined" || this)))) {
                            c = 1 + c, (NaN_1 && (NaN_1.value = Infinity === (-42n).toString())) == (NaN_1 ^= null >= ([ , 0 ].length === 2)) && 25 & -1 ^ 23..toString() * [ , 0 ][1];
                        }
                        for (var brake33 = 5; (c = 1 + c, (this <= [ , 0 ][1] & ([ , 0 ][1] | Number(0xdeadn << 16n | 0xbeefn))) >= ([ 3n ][0] > 2 ^ "a" ^ this * [])) && brake33 > 0; --brake33) {
                            c = 1 + c, ("foo" | this) - (38..toString() >> -5), 5 >= 0 | Infinity !== (-42n).toString();
                        }
                    }
                }
                break;

              case (c = c + 1) + (b_2 && typeof b_2.undefined == "function" && --_calls_ >= 0 && b_2.undefined(a++ + (a_2 && a_2.then || 5).toString()[typeof ([ 3n ][0] > 2 in {
                    in: (c = 1 + c, void ("c" - this) >> delete ([ , 0 ][1] ?? 23..toString()))
                })], -5) ? a++ + (b_2 && b_2[[].c]) : a++ + (b_1 && typeof b_1.done == "function" && --_calls_ >= 0 && b_1.done(1, (c = c + 1) + /[abc4]/.test(((--b + {
                    [(c = 1 + c, ([ 3n ][0] > 2 <= [ , 0 ][1]) >>> (-2 & "b") | (b_1 && (b_1.var = ("undefined" ^ null) > ("" <= []))))]: (c = 1 + c, 
                    (b_1 && (b_1.c /= !"object" || "function" <= !0o644n)) <= (c = c + 1, "" && "b")),
                    ...b_1,
                    b_2: b_2,
                    then: (c = 1 + c, ("bar" >= NaN) - (c = c + 1, null) >>> (a_2 && (a_2.foo ^= -1 << "c" === Number(0xdeadn << 16n | 0xbeefn) % null)))
                } || a || 3).toString() || b || 5).toString()), 4))):
                if ((c = c + 1) + ((c = c + 1) + void function() {
                    for (var brake36 = 5; (c = 1 + c, (b_1 && (b_1.b += true | Infinity)) + (c = c + 1, 
                    "c") != (c = c + 1, "object" >> ([ , 0 ].length === 2))) && brake36 > 0; --brake36) {
                        c = 1 + c, (0 >= -2 || 1 == "a") | (NaN != "bar") / ("b", NaN);
                    }
                    try {
                        c = 1 + c, (-2 ?? 25) >> (25 ^ "a") | (b_1 && (b_1[typeof f0 == "function" && --_calls_ >= 0 && f0()] += -0 <= [ , 0 ][1] | -0 * 22));
                    } catch (a_2) {
                    } finally {
                    }
                    {
                        var brake40 = 5;
                        do {
                            c = 1 + c, (("a" ?? 2) != 2 <= [ , 0 ][1]) >>> ((38..toString() | (-42n).toString()) !== (a_2 && (a_2.value *= -3 ^ 22)));
                        } while ((c = 1 + c, ([] > 24..toString() !== true / 1) < (-4 % [] != ("undefined" ^ -4))) && --brake40 > 0);
                    }
                }())) {
                    switch (b &= a) {
                      case b >>>= a:
                        switch (function() {
                        }) {
                          case --b + (typeof b_2 == "function" && --_calls_ >= 0 && b_2()):
                            c = 1 + c, a_2 && (a_2.NaN += (0 === 24..toString()) - - -2 >>> ("bar" >>> 3 || (undefined || 0)));
                            c = 1 + c, a_2 = ("c" !== Infinity ^ "b" * !0o644n) == void -1 - (25 + 3);
                            break;

                          case --b + (b = a):
                            c = 1 + c, (("b", true) < (false === 0)) >>> ((1 & 24..toString()) != [ , 0 ][1] >> ([ 3n ][0] > 2));
                            break;

                          case ++b:
                            break;

                          case --b + b++:
                            c = 1 + c, ((undefined | this) == 2 <= 4) >= void (3 % ([ , 0 ].length === 2));
                            c = 1 + c, ("" & 23..toString() | (Infinity, (-42n).toString())) < (b_1 && ([ b_1[a++] ] = [ (25 ^ "a") - ("number" + NaN) ]));
                            break;
                        }
                        break;

                      case b_1 *= --b + (b = a):
                        break;

                      case --b + "bar":
                        break;

                      case (c = c + 1) + (b_1 && typeof b_1.foo == "function" && --_calls_ >= 0 && b_1.foo(1 === 1 ? a : b)):
                        a++ + {
                            undefined: (c = 1 + c, delete (b_2 && (b_2[(c = c + 1) + {}] += "bar" <= Number(0xdeadn << 16n | 0xbeefn) !== (-3 & -1)))),
                            done: (c = 1 + c, delete (this << -3) !== (2 != -0 ^ ((-42n).toString() || null))),
                            [(c = 1 + c, (a_2 += ([ , 0 ].length === 2) - "a") % (!0o644n << -0) >> (this % true & (/[a2][^e]+$/ ?? 4)))]: (c = 1 + c, 
                            (22 ^ 23..toString()) === (Infinity || 38..toString()) | (b_2 && (b_2.b = (c = c + 1, 
                            1) | 4 << 25))),
                            undefined: (c = 1 + c, (1 != 4 && [] ^ 23..toString()) ^ ((c = c + 1, 2) ?? ([ 3n ][0] > 2) >> !0o644n))
                        }.var;
                        {
                            var a_1 = function f1(b, foo_1) {
                            }((c = 1 + c, (25 < false === (25 & "function")) << ("bar" >= true !== ((-42n).toString() != "a"))), (c = 1 + c, 
                            ((null && 2) | [] >> (-42n).toString()) != (-1 < (-42n).toString() ^ (22 ^ "undefined"))));
                        }
                    }
                } else {
                    "function" in {
                        "": (c = c + 1) + ((c = 1 + c, ([] === -5) + (38..toString() !== "undefined") | !-1 ^ null - -5) || 3).toString()[c = 1 + c, 
                        c = c + 1, (b_1 && (b_1.var = "c" & "c")) == null << ([ 3n ][0] > 2)],
                        3: (c = c + 1) + (NaN in {}),
                        foo: a++ + void function a_2() {
                        }(),
                        foo: b_2 && typeof b_2.done == "function" && --_calls_ >= 0 && b_2.done((c = 1 + c, 
                        ("bar" * 38..toString() ^ 5 < /[a2][^e]+$/) * ((a_1 && (a_1[c = 1 + c, -3 < Infinity, 
                        [ , 0 ].length === 2 != "bar", (a_2 = -1 != "object") < (-3 ^ "foo")] += "undefined" * 0)) * (24..toString() == "function"))), "function")
                    };
                }
                ;

              case --b + (typeof f3 == "function" && --_calls_ >= 0 && f3()):
                break;
            }
        } catch (b_1) {
            var b_2 = a++, foo_1 = (c = c + 1) + ("bar" in {
                null: 1 === 1 ? a : b
            });
        }
    }
    typeof f2 == "function" && --_calls_ >= 0 && f2([ 0 === 1 ? a : b, a++ + (typeof b_1_1 != "unknown"), ..."" + b_1, (typeof b_1 == "function" && --_calls_ >= 0 && b_1(3, a++ + a_1) || 1).toString()[(c = c + 1) + (typeof f2 == "function" && --_calls_ >= 0 && f2("undefined", "", "a"))], (typeof f0 == "function" && --_calls_ >= 0 && f0() || a || 3).toString() ]);
    break;

  default:
    {
        var expr56 = [];
        for (var key56 in expr56) {
            {
                var brake57 = 5;
                L20656: do {
                    {
                        if (--a) {
                            var foo = !(([ , 0 ].length === 2 == []) % (c = c + 1, {}) >>> ("undefined" * /[a2][^e]+$/ === (foo += 2 & -2)));
                        }
                        switch ((c = c + 1) + ((this - -3 | 2 === 5) - +("c" % 1))) {
                          case (false >> false > (NaN >= this)) % (("b" < "foo") >>> ("a" !== !0o644n)):
                            {
                                var brake62 = 5;
                                while ((c = c + 1) + (typeof f2 == "function" && --_calls_ >= 0 && f2(-1, -1)) && --brake62 > 0) {
                                    for (var brake63 = 5; [].b && brake63 > 0; --brake63) {
                                        var a_2 = (c = 1 + c, ((-42n).toString() % ([ , 0 ].length === 2) & 23..toString() * "object") >> !([ , 0 ][1] ^ -3)), a_2 = (c = 1 + c, 
                                        (3 >>> 2) * (24..toString() - "") & (38..toString() <= -0 | (a_2 && (a_2[c = 1 + c, 
                                        undefined << -1 >= (3 | NaN) <= ((-1 || [ 3n ][0] > 2) ^ "a" <= -5)] = -1 != 2))));
                                    }
                                }
                            }
                            {
                                var expr65 = typeof foo_2 === "string";
                                L20657: for (var key65 in expr65) {
                                    c = 1 + c;
                                    var foo = expr65[key65];
                                    b++;
                                }
                            }

                          case (c = c + 1) + ((-1 != false) >>> null * "b" != ({} < 22 != ([ , 0 ][1] ^ "number"))):
                            break;

                          case b = a:
                            break;

                          case [][delete ([ , 0 ][1] >>> ([ 3n ][0] > 2) == (this != 23..toString()) ^ delete "object" & -NaN)]:
                            switch (--b + (b_2 && typeof b_2.value == "function" && --_calls_ >= 0 && b_2.value("function", (c = 1 + c, 
                            (a_2 && (a_2[--b + (b_1 += (c = 1 + c, foo = (-4 * 5 ^ /[a2][^e]+$/ & 25) <= (false - !0o644n ?? 25 ^ -5)))] = (4 & this) / "c" ** 3)) > ((a_2 && (a_2.done = "object" * "undefined")) | (a_2 && (a_2.done %= 2 !== -4)))), "undefined"))) {
                              case a++ + (typeof f0 == "function" && --_calls_ >= 0 && f0([ 3n ][0] > 2, "number") || 1).toString()[--b + new function() {
                                    this[c = 1 + c, Number(0xdeadn << 16n | 0xbeefn) << -3 != ({} ?? "c") != (1 << "undefined" !== 4 / -4)] *= "undefined" ^ null;
                                }()]:
                                try {
                                    c = 1 + c, (0 === (-42n).toString()) < (38..toString() ?? "object") !== NaN - 22 < "number" / 2;
                                } finally {
                                }
                                break;

                              case typeof f2 == "function" && --_calls_ >= 0 && f2([], (c = 1 + c, (-2 / "object" === (25 != 0)) <= (this != Number(0xdeadn << 16n | 0xbeefn) ^ (23..toString() || "c")))):
                                c = 1 + c, ("" >= true && (foo && (foo.c = [ 3n ][0] > 2 > "undefined"))) >>> (foo && (foo[[]] += (0 ^ [ , 0 ].length === 2) != (/[a2][^e]+$/ != this)));
                                break;

                              case --b + (typeof foo == "function" && --_calls_ >= 0 && foo`${c = 1 + c, ("b" === -4 ?? (1 || -2)) >= (2 ^ -4) / ("" & [])}${c = 1 + c, 
                                c = c + 1, - -0 / (-3 || [ , 0 ][1])}${c = 1 + c, [ , 0 ].length === 2 ^ this | ([] || 22) ?? "a" * (-42n).toString() - ("c" - -2)}${c = 1 + c, 
                                (c = c + 1, "" ^ "object") >> (a_2 = /[a2][^e]+$/ < 0 <= (-0 !== "b"))}`):
                                switch (c = 1 + c, foo += (a_2 = -5 ^ /[a2][^e]+$/) + (0 <= 38..toString()) < (-5 == "undefined") + 24..toString() * "") {
                                  case c = 1 + c, ([] < -4 | -5 < 25) << (false || Infinity || (c = c + 1, this)):
                                    ;
                                    break;

                                  case c = 1 + c, (a_2 = "" ^ 0) - (foo && (foo[c = 1 + c, b_2 = ((25 & /[a2][^e]+$/) + (-5 != 2)) % (undefined >> undefined || this >> [])] += -3 | [])) + (38..toString() != false === (Infinity === (-42n).toString())):
                                    ;
                                    break;

                                  case c = 1 + c, void ("foo" >>> Infinity) | !0o644n + 3 >>> Number(0xdeadn << 16n | 0xbeefn) / -5:
                                    ;
                                    break;

                                  case c = 1 + c, (-1 | "undefined" || 2 * 24..toString()) / (foo = void undefined / (25 <= Infinity)):
                                    ;
                                    break;
                                }
                                break;

                              case foo && foo.Infinity:
                                switch (c = 1 + c, (!0o644n << 38..toString() || !0o644n < 22) >> (Infinity >> NaN << ("foo" && []))) {
                                  case c = 1 + c, (a_2 && (a_2[--b + {
                                        ...(c = 1 + c, (-3 % "object" >= (c = c + 1, true)) << ("number" !== 3) % (-5 === 4)),
                                        3: (c = 1 + c, "" / 22 * ("function" >= "") << (-1 >> 22) % (foo && (foo[c = 1 + c, 
                                        (5 || null) * ("b" << /[a2][^e]+$/) - ((Number(0xdeadn << 16n | 0xbeefn), [ , 0 ].length === 2) ^ ("c" ^ "foo"))] -= -0 | !0o644n))),
                                        b: (c = 1 + c, ("c" >> 23..toString() && "c" >> 4) >= !("undefined" >> [])),
                                        ...foo
                                    }[c = 1 + c, (23..toString() ^ 23..toString()) & (25 ^ [ 3n ][0] > 2) ^ void (1 < 5)]] += (c = c + 1, 
                                    -0) | "c" <= "function")) | (foo && (foo.in >>= (undefined ^ [ , 0 ].length === 2) >> (4 ^ "c"))):
                                    ;
                                    break;

                                  case c = 1 + c, !0o644n >= "" >= "undefined" >> false == (0 / undefined ^ 4 * 1):
                                    ;

                                  default:
                                    ;

                                  case c = 1 + c, (/[a2][^e]+$/ !== !0o644n) % (38..toString() | "a") > ((-1 | Infinity) ^ "bar" ** "function"):
                                    ;
                                    break;
                                }
                                break;
                            }
                            {
                                var expr73 = --b + 24..toString();
                                L20658: for (let key73 in expr73) {
                                    c = 1 + c;
                                    var Infinity_2 = expr73[key73];
                                    c = c + 1;
                                }
                            }
                        }
                    }
                } while ((b = a) && --brake57 > 0);
            }
        }
    }

  case typeof bar_2 != "string":
    var b_2 = a++ + +function Infinity_2() {
        {
            var brake76 = 5;
            L20659: while (typeof f2 == "function" && --_calls_ >= 0 && f2("") && --brake76 > 0) {
                typeof f2 == "function" && --_calls_ >= 0 && f2();
            }
        }
        c = c + 1;
        for (var brake79 = 5; b-- && brake79 > 0; --brake79) {
            c = c + 1;
            {
                for (var brake83 = 5; (c = 1 + c, (-4 << 24..toString() <= (23..toString() && 5)) >> ("foo" >>> undefined && -0 >= !0o644n)) && brake83 > 0; --brake83) {
                    c = 1 + c, (c = c + 1, -0, Infinity >>> -4) / ([ , 0 ][1] - "" != (38..toString() ^ "a"));
                }
                if (c = 1 + c, ((/[a2][^e]+$/ && undefined) ?? (a_1 && (a_1.b = [ , 0 ][1] % "a"))) === void (25 >>> [])) {
                    c = 1 + c, ((-5, null) || "object" !== true) >> ((/[a2][^e]+$/ != -4) >= ({} || (-42n).toString()));
                }
                {
                }
                var a = (c = 1 + c, "bar" != "bar" & false == 2 | 38..toString() <= 22 <= "a" * "b"), a = (c = 1 + c, 
                a_2 += (a ^= -1 * -4) == +1 ^ (-3 >= !0o644n) * (22 != false));
            }
            var bar = !function() {
                c = 1 + c, ("b" ^ "c" ^ ("" ?? -4)) >>> ((0 > 1) >> (Number(0xdeadn << 16n | 0xbeefn) | [ , 0 ][1]));
                c = 1 + c, ((true && 23..toString()) ^ ("function" ?? -4)) - ("a" - [ , 0 ][1] + 0 * -3);
                c = 1 + c, (+"b", null | [ , 0 ].length === 2) || (a_2 -= 5 < 38..toString() && 5 >> this);
                c = 1 + c, 1 % "bar" < (-2 || "a") != (([ 3n ][0] > 2 && -2) === -!0o644n);
            }();
            {
                return b += a;
            }
        }
        c = c + 1;
    }();
    break;
}

console.log(null, a, b, c, Infinity, NaN, undefined);
```
```js
// uglified code
// (beautified)
var o = 10, n = 100, f = 10, r = 0;

switch (r += 1, n++ + (n && "function" == typeof n.undefined && 0 <= --o && n.undefined(-0, (-0 ^ 2 < 3n) >>> (n = 22) >>> ("foo" < (2 === [ , 0 ].length) && -0 + !0o644n), 23..toString()))) {
  case (r += 1) + ("undefined" != typeof yield):
    r += 1, "function" == typeof n && 0 <= --o && n(1);
    var a = [ "function" == typeof t && 0 <= --o && t(), f--, (r += 1) + a, "function" == typeof f0 && 0 <= --o && f0(~n, ""), --f + ("function" == typeof t && 0 <= --o && t(..."" + t, "function", "a")) ], t = 23..toString() in {
        ["function" == typeof f0 && 0 <= --o && f0(2)]: "boolean" == typeof f
    };
    break;

  case --f + {
        get then() {
            return --f + ("function" == typeof a && 0 <= --o && a([ n++ + /[abc4]/g.exec(((r += 1) + (t && t["null"]) || f || 5).toString()) ], 0, n--));
        },
        ...-2,
        undefined: "" ^ (NaN ^ NaN) ^ (0 & []) - !0,
        [n++ + /[abc4]/g.exec((--f + !f || f || 5).toString())]: /[abc4]/.test((--f + ("function" == typeof f1 && 0 <= --o && f1(-3, "bar", n++ + (--f + n-- ? (r += 1) + !0 : void 0))) || f || 5).toString()),
        a: --f + /[abc4]/g.exec(((r += 1) + (t >>= (r += 1) + --f) || f || 5).toString())
    }.NaN:
    for (var e = 5; n++ + f-- && 0 < e; --e) {
        try {
            switch ((r += 1) + (f &= n)) {
              case (r += 1) + ("function" == typeof t && 0 <= --o && t((r += 1) + ((r += 1) + [ --f + n--, --f + (r = 1 + r, 
                t = 0 == 0 * (t && (t[r = 1 + r, !0 | 22 ^ (r += 1, 4)] = 0 ^ Number(0xdeadn << 16n | 0xbeefn)))), ~(((t = /[a2][^e]+$/ !== {}) == 2 < 3n < "c") > ((-42n).toString(), 
                NaN)), a && a[r = 1 + r, a && (a["var"] = (r += 1, 38..toString() >>> -1 + (2 === [ , 0 ].length) > (5 != {})))] ][f++] || 6).toString()[--f + [ (r = 1 + r, 
                !0 - !0 % (undefined < -3) ? (r = 1 + r, !0 < (25 & !0o644n) ^ !0 ^ -5 * {}) : (r = 1 + r, 
                -4 / 24..toString() <= 0 | 0)), [ (r = 1 + r, r += 1, (t && (t.value += -0 !== undefined)) > Infinity + 0), ("number" < []) >> ("bar" ^ !0o644n) || !1 ][r = 1 + (r = 1 + r), 
                38..toString(), !1] ]], -2 in [ f + 1 - .1 - .1 - .1, (r += 1) + --f, (r += 1) + n--, --f + (24..toString() in [ (r = 1 + r, 
                (!0) ** (r += 1, {}) + (23..toString() <= -0 > (a += NaN))), (r = 1 + r, t && (t.NaN -= ("foo" <= 24..toString()) / ((1 + (2 < 3n)) % ("a" <= [])))), (r = 1 + r, 
                t -= (t && (t[[][r = 1 + r, (Number(0xdeadn << 16n | 0xbeefn) + Number(0xdeadn << 16n | 0xbeefn) <= !0) / (Infinity + (a = !1))]] = NaN)) != ((0 & !0o644n) !== (a && (a[r = 1 + r, 
                r += 1, (a = !1) ^ (r += 1, -5)] |= !0)))), (r = 1 + r, (a && (a[r = 1 + r, t && (t.b = !1 < ((-42n).toString(), 
                this && -0))] = !1)) < (r += 1, []) == ((t && (t.value += !0o644n && 0)) ^ (t = NaN))) ]), n++ + ~n ], 38..toString())):
                break;

              case "function" == typeof f0 && 0 <= --o && f0(typeof n, -1):
                switch (function v() {
                    r += 1;
                }.toString()[typeof a]) {
                  default:
                  case ~((t = NaN) >>> (22 !== (a && (a.foo |= 0)))):
                  case ~("2a" ^ -2 == [] != ((-42n).toString() & Number(0xdeadn << 16n | 0xbeefn))):
                    if (--f + (f = n)) {
                        if ((5 << Infinity && (r += 1, Infinity)) <= !0) {
                            try {
                                r = 1 + r, r += 1, 24..toString(), t && (t.NaN *= !0o644n | -1);
                            } catch (k) {}
                        } else {
                            for (var i = 5; r = 1 + r, t && ({
                                0: t.undefined
                            } = {
                                0: (23..toString() >>> 38..toString() ^ 0) + (-2 < (2 === [ , 0 ].length) >>> "undefined")
                            }), r = 1 + r, (a = (24..toString() || "foo") < !0 > [] >> !0) && 0 < --i; ) {}
                        }
                    }
                    break;

                  case null:
                    var c = function f0(n, t) {
                        r = 1 + r, undefined, r = 1 + r;
                    }();
                    t && t[(r += 1) + ("function" == typeof f0 && 0 <= --o && f0(1))];
                }
                for (var u = 5; n++ + ([ t ] = []) && 0 < --u; ) {
                    var d = !1 in [ (r = 1 + r, (a && (a[(r += 1) + (r = 1 + r, (a && (a["null"] += (null === this) % (c && (c.c <<= !0)) || (25 >> (2 === [ , 0 ].length)) + (c = 0)) || n || 3).toString())] += !0 * ((2 < 3n) >>> /[a2][^e]+$/))) !== (0 == (2 < 3n ^ "undefined"))), (r = 1 + r, 
                    r += 1, 0 | ("a" + Infinity ?? -4)) ];
                    for (a in d) {
                        var r = 1 + r, g = d[a];
                        try {
                            r = 1 + r, undefined;
                        } catch (m) {}
                    }
                }
                r = 1 + r, g && (g[(r += 1) + (c && "function" == typeof c.b && 0 <= --o && c.b())] <<= (c && (c["null"] += -2) || this < -1) > ("undefined" | (NaN || !0))) && (r = 1 + r, 
                (g && (g.value = Infinity === (-42n).toString())) == (g ^= (2 === [ , 0 ].length) <= null) && 23..toString());
                for (var N = 5; r = 1 + r, (this <= 0 & (0 | Number(0xdeadn << 16n | 0xbeefn))) >= (2 < 3n ^ "a" ^ this * []) && 0 < N; --N) {
                    r = 1 + r, 38..toString(), Infinity, (-42n).toString();
                }
                break;

              case (r += 1) + (t && "function" == typeof t.undefined && 0 <= --o && t.undefined(n++ + (a && a.then || 5).toString()[typeof (2 < 3n in {
                    in: (r = 1 + r, 0)
                })], -5) ? n++ + (t && t[[].c]) : n++ + (c && "function" == typeof c.done && 0 <= --o && c.done(1, (r += 1) + /[abc4]/.test(((--f + {
                    [(r = 1 + r, (2 < 3n <= 0) >>> 0 | (c && (c["var"] = "" <= [] < 0)))]: (r = 1 + r, 
                    (c && (c.c /= "function" <= !0o644n)) <= (r += 1, "")),
                    ...c,
                    b_2: t,
                    then: (r = 1 + r, (NaN <= "bar") - (r += 1, null) >>> (a && (a.foo ^= -1 == Number(0xdeadn << 16n | 0xbeefn) % null)))
                } || n || 3).toString() || f || 5).toString()), 4))):
                if ((r += 1) + ((r += 1) + void function() {
                    for (var n = 5; r = 1 + r, (c && (c.b += !0 | Infinity)) + (r += 1, "c") != (r += 1, 
                    "object" >> (2 === [ , 0 ].length)) && 0 < n; --n) {
                        r = 1 + r, NaN, NaN;
                    }
                    try {
                        r = 1 + r, c && (c["function" == typeof f0 && 0 <= --o && f0()] += 1);
                    } catch (a) {}
                    for (var t = 5; r = 1 + r, 38..toString(), (-42n).toString(), a && (a.value *= -21), 
                    r = 1 + r, ([] > 24..toString() !== 1) < (-4 % [] != -4) && 0 < --t; ) {}
                }())) {
                    switch (f &= n) {
                      case f >>>= n:
                        switch (function() {}) {
                          case --f + ("function" == typeof t && 0 <= --o && t()):
                            r = 1 + r, a && (a.NaN += (0 === 24..toString()) - 2 >>> (undefined || 0)), r = 1 + r, 
                            a = NaN == ("c" !== Infinity ^ "b" * !0o644n);
                            break;

                          case --f + (f = n):
                            r = 1 + r, 24..toString();
                            break;

                          case ++f:
                            break;

                          case --f + f++:
                            r = 1 + r, undefined, r = 1 + r, 23..toString(), Infinity, (-42n).toString(), c && ([ c[n++] ] = [ 25 - ("number" + NaN) ]);
                        }
                        break;

                      case c *= --f + (f = n):
                      case --f + "bar":
                        break;

                      case (r += 1) + (c && "function" == typeof c.foo && 0 <= --o && c.foo(n)):
                        n++, r = 1 + r, t && (t[(r += 1) + {}] += "bar" <= Number(0xdeadn << 16n | 0xbeefn) !== -3), 
                        r = 1 + r, (-42n).toString(), a += (2 === [ , 0 ].length) - "a", r = 1 + (r = 1 + r), 
                        23..toString(), Infinity || 38..toString(), t && (t.b = (r += 1, 1 | 4 << 25)), 
                        r = 1 + r, 23..toString();
                        var S = function f1(n, t) {}((r = 1 + (r += 1), (-42n).toString()), (r = 1 + r, 
                        (-42n).toString(), (-42n).toString()));
                    }
                } else {
                    r = 1 + (r += 1), ((-5 === []) + ("undefined" !== 38..toString()) | 5 || 3).toString()[r = 1 + r, 
                    r += 1, (c && (c["var"] = 0)) == null << (2 < 3n)], r += 1, NaN, n++, function a() {}(), 
                    t && "function" == typeof t.done && 0 <= --o && t.done((r = 1 + r, ("bar" * 38..toString() ^ !1) * ((S && (S[r = 1 + r, 
                    Infinity, (a = !0) < -3] += NaN)) * ("function" == 24..toString()))), "function");
                }

              case --f + ("function" == typeof f3 && 0 <= --o && f3()):
            }
        } catch (c) {
            t = n++, r += 1;
        }
    }
    "function" == typeof f2 && 0 <= --o && f2([ f, n++ + ("unknown" != typeof b_1_1), ..."" + c, ("function" == typeof c && 0 <= --o && c(3, n++ + S) || 1).toString()[(r += 1) + ("function" == typeof f2 && 0 <= --o && f2("undefined", "", "a"))], ("function" == typeof f0 && 0 <= --o && f0() || n || 3).toString() ]);
    break;

  default:
    for (var b in []) {
        var s = 5;
        do {
            switch (--n && (v = !((2 === [ , 0 ].length == []) % (r += 1, {}) >>> (NaN === v + 2))), 
            (r += 1) + ((this - -3 | !1) - NaN)) {
              case (NaN >= this < 0) % (!0 >>> ("a" !== !0o644n)):
                for (var y = 5; (r += 1) + ("function" == typeof f2 && 0 <= --o && f2(-1, -1)) && 0 < --y; ) {
                    for (var l = 5; [].b && 0 < l; --l) {
                        a = (r = 1 + r, ((-42n).toString() % (2 === [ , 0 ].length) & "object" * 23..toString()) >> !1), 
                        a = (r = 1 + r, 0 * (24..toString() - "") & (38..toString() <= -0 | (a && (a[r = 1 + r, 
                        undefined << -1 >= (3 | NaN) <= -1] = !0))));
                    }
                }
                var h, p = "string" == typeof foo_2;
                for (h in p) {
                    r = 1 + r;
                    var v = p[h];
                    f++;
                }

              case (r += 1) + (1 != ({} < 22 != 0)):
              case f = n:
                break;

              case [][23..toString(), NaN, !0]:
                switch (--f + (t && "function" == typeof t.value && 0 <= --o && t.value("function", (r = 1 + r, 
                (a && (a[--f + (c += (r = 1 + r, v = -20 <= (!1 - !0o644n ?? -30)))] = (4 & this) / NaN)) > ((a && (a.done = NaN)) | (a && (a.done %= !0)))), "undefined"))) {
                  case n++ + ("function" == typeof f0 && 0 <= --o && f0(2 < 3n, "number") || 1).toString()[--f + new function() {
                        this[r = 1 + r, Number(0xdeadn << 16n | 0xbeefn) << -3 != {} != 1] *= 0;
                    }()]:
                    r = 1 + r, (-42n).toString(), 38..toString(), NaN;
                    break;

                  case "function" == typeof f2 && 0 <= --o && f2([], (r = 1 + r, !1 <= (this != Number(0xdeadn << 16n | 0xbeefn) ^ (23..toString() || "c")))):
                    r = 1 + r, v && (v[[]] += (0 ^ 2 === [ , 0 ].length) != (/[a2][^e]+$/ != this));
                    break;

                  case --f + ("function" == typeof v && 0 <= --o && v`${r = 1 + r, -2 / ("" & []) <= !1}${r = 1 + r, 
                    r += 1, -0}${r = 1 + r, 2 === [ , 0 ].length ^ this | [] ?? "a" * (-42n).toString() - NaN}${r = 1 + r, 
                    r += 1, 0 >> (a = !0)}`):
                    switch (r = 1 + r, v += (a = -5) + (0 <= 38..toString()) < !1 + "" * 24..toString()) {
                      case r = 1 + r, ([] < -4 | !0) << (Infinity || (r += 1, this)):
                      case r = 1 + r, (a = 0) - (v && (v[r = 1 + r, t = 1 % (undefined >> undefined || this >> [])] += -3 | [])) + (0 != 38..toString() == (Infinity === (-42n).toString())):
                      case r = 1 + r, void Infinity | 3 + !0o644n >>> Number(0xdeadn << 16n | 0xbeefn) / -5:
                      case r = 1 + r, -1 / (v = void undefined / (25 <= Infinity)):
                    }
                    break;

                  case v && v.Infinity:
                    switch (r = 1 + r, (!0o644n << 38..toString() || !0o644n < 22) >> (Infinity >> NaN << [])) {
                      case r = 1 + r, (a && (a[--f + {
                            ...(r = 1 + r, ((r += 1, !0) <= NaN) << NaN),
                            3: (r = 1 + r, 0 << -1 % (v && (v[r = 1 + r, 0 - (0 ^ (Number(0xdeadn << 16n | 0xbeefn), 
                            2 === [ , 0 ].length))] -= -0 | !0o644n))),
                            b: (r = 1 + r, ("c" >> 23..toString() && 0) >= !("undefined" >> [])),
                            ...v
                        }[r = 1 + r, (23..toString() ^ 23..toString()) & (25 ^ 2 < 3n) ^ void 0]] += !0 | (r += 1, 
                        -0))) | (v && (v["in"] >>= (undefined ^ 2 === [ , 0 ].length) >> 4)):
                        break;

                      case r = 1 + r, 0 <= ("" <= !0o644n) == (0 / undefined ^ 4):
                      default:
                      case r = 1 + r, (!0o644n !== /[a2][^e]+$/) % ("a" | 38..toString()) > (NaN ^ (-1 | Infinity)):
                    }
                }
                var x, I = --f + 24..toString();
                for (x in I) {
                    r = 1 + r;
                    r += 1;
                }
            }
        } while ((f = n) && 0 < --s);
    }

  case "string" != typeof bar_2:
    t = n++ + +function() {
        for (var n = 5; "function" == typeof f2 && 0 <= --o && f2("") && 0 < --n; ) {
            "function" == typeof f2 && 0 <= --o && f2();
        }
        r += 1;
        for (var t = 5; f-- && 0 < t; --t) {
            r += 1;
            for (var e = 5; r = 1 + r, (-4 << 24..toString() <= (23..toString() && 5)) >> ("foo" >>> undefined && !0o644n <= -0) && 0 < e; --e) {
                r = 1 + r, r += 1, Infinity, 38..toString();
            }
            r = 1 + r, undefined ?? (S && (S.b = NaN)), 0;
            var i = (r = 1 + r, 0 | 38..toString() <= 22 <= NaN), i = (r = 1 + r, a += 1 == (i ^= 4) ^ !0 * (!0o644n <= -3));
            (function() {
                r = 1 + r, Number(0xdeadn << 16n | 0xbeefn), r = 1 + r, 23..toString(), r = 1 + r, 
                null | 2 === [ , 0 ].length || (a -= 5 < 38..toString() && 5 >> this), r = 1 + r;
            })();
            return f += i;
        }
        r += 1;
    }();
}

console.log(null, n, f, r, Infinity, NaN, undefined);
```
```
original result:
null 103 NaN 30 Infinity NaN undefined

uglified result:
null 103 NaN 29 Infinity NaN undefined
```
```js
// reduced test case (output will differ)

// (beautified)
var b = 0;

switch (0) {
  case --b:
    var a_1 = 0;

  case 0:
    if ((undefined ?? a_1) === void 0) {
        0();
    }
}
// output: TypeError: 0 is not a function
// minify: 
// options: {
//   "ie8": true,
//   "toplevel": true,
//   "output": {
//     "v8": true
//   },
//   "validate": true
// }
```
```
minify(options):
{
  "ie8": true,
  "toplevel": true,
  "output": {
    "v8": true
  }
}

Suspicious compress options:
  comparisons
  side_effects

Suspicious options:
  ie8
```


Discussion:

Patch:
diff --git a/lib/compress.js b/lib/compress.js
index 7f9a8dd5408..93023e19586 100644
--- a/lib/compress.js
+++ b/lib/compress.js
@@ -3618,6 +3618,8 @@ merge(Compressor.prototype, {
                 return this.left.is_defined(compressor) && this.right.is_defined(compressor);
               case "||":
                 return this.left.is_truthy() || this.right.is_defined(compressor);
+              case "??":
+                return this.left.is_defined(compressor) || this.right.is_defined(compressor);
               default:
                 return true;
             }


Test patch:
diff --git a/test/compress/nullish.js b/test/compress/nullish.js
index e8f5ad6c132..a8526cacee1 100644
--- a/test/compress/nullish.js
+++ b/test/compress/nullish.js
@@ -109,3 +109,22 @@ conditional_assignment_4: {
     expect_stdout: "PASS"
     node_version: ">=14"
 }
+
+issue_4679: {
+    options = {
+        comparisons: true,
+        ie8: true,
+    }
+    input: {
+        var a;
+        if (void 0 === (undefined ?? a))
+            console.log("PASS");
+    }
+    expect: {
+        var a;
+        if (void 0 === (undefined ?? a))
+            console.log("PASS");
+    }
+    expect_stdout: "PASS"
+    node_version: ">=14"
+}