LLVMFuzzerTestOneInput:
   35|    140|{
   36|    140|    FuzzHelper f(data, size);
   37|    140|    f.run();
   38|    140|    return 0;
   39|    140|}
_ZN10FuzzHelperC2EPKhm:
   10|    140|        data(data),
   11|    140|        size(size)
   12|    140|    {
   13|    140|    }
_ZN10FuzzHelper3runEv:
   17|    140|    {
   18|    140|        Pl_Discard discard;
   19|    140|        Pl_ASCII85Decoder p("decode", &discard);
   20|    140|        try {
   21|    140|            p.write(data, size);
   22|    140|            p.finish();
   23|    140|        } catch (std::runtime_error const& e) {
   24|     41|            std::cerr << "runtime_error: " << e.what() << '\n';
   25|     41|        }
   26|    140|    }

_ZN8PipelineD2Ev:
   52|    280|    virtual ~Pipeline() = default;
_ZNK8Pipeline4nextEv:
  103|  1.04k|    {
  104|  1.04k|        return next_;
  105|  1.04k|    }

_ZN3QTC2TCEPKcS1_i:
   36|  3.70k|    {
   37|       |#ifndef QPDF_DISABLE_QTC
   38|       |        TC_real(scope, ccase, n);
   39|       |#endif // QPDF_DISABLE_QTC
   40|  3.70k|    }

_ZN8PipelineC2EPKcPS_:
   11|    280|    identifier(identifier),
   12|    280|    next_(next)
   13|    280|{
   14|    280|}

_ZN17Pl_ASCII85DecoderC2EPKcP8Pipeline:
   12|    140|    Pipeline(identifier, next)
   13|    140|{
   14|    140|    util::assertion(next, "Attempt to create Pl_ASCII85Decoder with nullptr as next");
   15|    140|}
_ZN17Pl_ASCII85Decoder5writeEPKhm:
   19|    140|{
   20|    140|    if (eod > 1) {
  ------------------
  |  Branch (20:9): [True: 0, False: 140]
  ------------------
   21|      0|        return;
   22|      0|    }
   23|  6.98k|    for (size_t i = 0; i < len; ++i) {
  ------------------
  |  Branch (23:24): [True: 6.87k, False: 110]
  ------------------
   24|  6.87k|        switch (buf[i]) {
  ------------------
  |  Branch (24:17): [True: 2.96k, False: 3.91k]
  ------------------
   25|    257|        case ' ':
  ------------------
  |  Branch (25:9): [True: 257, False: 6.61k]
  ------------------
   26|    530|        case '\f':
  ------------------
  |  Branch (26:9): [True: 273, False: 6.60k]
  ------------------
   27|    731|        case '\v':
  ------------------
  |  Branch (27:9): [True: 201, False: 6.67k]
  ------------------
   28|  1.03k|        case '\t':
  ------------------
  |  Branch (28:9): [True: 300, False: 6.57k]
  ------------------
   29|  2.44k|        case '\r':
  ------------------
  |  Branch (29:9): [True: 1.41k, False: 5.45k]
  ------------------
   30|  2.96k|        case '\n':
  ------------------
  |  Branch (30:9): [True: 515, False: 6.36k]
  ------------------
   31|  2.96k|            QTC::TC("libtests", "Pl_ASCII85Decoder ignore space");
   32|       |            // ignore whitespace
   33|  2.96k|            continue;
   34|  6.87k|        }
   35|  3.91k|        if (eod > 1) {
  ------------------
  |  Branch (35:13): [True: 1, False: 3.91k]
  ------------------
   36|      1|            break;
   37|  3.91k|        } else if (eod == 1) {
  ------------------
  |  Branch (37:20): [True: 17, False: 3.89k]
  ------------------
   38|     17|            util::no_ci_rt_error_if(buf[i] != '>', "broken end-of-data sequence in base 85 data");
   39|     17|            flush();
   40|     17|            eod = 2;
   41|  3.89k|        } else {
   42|  3.89k|            switch (buf[i]) {
   43|     18|            case '~':
  ------------------
  |  Branch (43:13): [True: 18, False: 3.87k]
  ------------------
   44|     18|                eod = 1;
   45|     18|                break;
   46|       |
   47|    212|            case 'z':
  ------------------
  |  Branch (47:13): [True: 212, False: 3.68k]
  ------------------
   48|    212|                if (pos != 0) {
  ------------------
  |  Branch (48:21): [True: 2, False: 210]
  ------------------
   49|      2|                    throw std::runtime_error("unexpected z during base 85 decode");
   50|      2|                }
   51|    210|                unsigned char zeroes[4];
   52|    210|                memset(zeroes, '\0', 4);
   53|    210|                next()->write(zeroes, 4);
   54|    210|                break;
   55|       |
   56|  3.66k|            default:
  ------------------
  |  Branch (56:13): [True: 3.66k, False: 230]
  ------------------
   57|  3.66k|                if (buf[i] < 33 || buf[i] > 117) {
  ------------------
  |  Branch (57:21): [True: 12, False: 3.65k]
  |  Branch (57:36): [True: 15, False: 3.63k]
  ------------------
   58|     27|                    error = true;
   59|     27|                    throw std::runtime_error("character out of range during base 85 decode");
   60|  3.63k|                } else {
   61|  3.63k|                    this->inbuf[this->pos++] = buf[i];
   62|  3.63k|                    if (pos == 5) {
  ------------------
  |  Branch (62:25): [True: 716, False: 2.92k]
  ------------------
   63|    716|                        flush();
   64|    716|                    }
   65|  3.63k|                }
   66|  3.63k|                break;
   67|  3.89k|            }
   68|  3.89k|        }
   69|  3.91k|    }
   70|    140|}
_ZN17Pl_ASCII85Decoder5flushEv:
   74|    820|{
   75|    820|    if (this->pos == 0) {
  ------------------
  |  Branch (75:9): [True: 82, False: 738]
  ------------------
   76|     82|        return;
   77|     82|    }
   78|    738|    unsigned long lval = 0;
   79|  4.42k|    for (int i = 0; i < 5; ++i) {
  ------------------
  |  Branch (79:21): [True: 3.69k, False: 738]
  ------------------
   80|  3.69k|        lval *= 85;
   81|  3.69k|        lval += (this->inbuf[i] - 33U);
   82|  3.69k|    }
   83|       |
   84|    738|    unsigned char outbuf[4];
   85|    738|    memset(outbuf, 0, 4);
   86|  3.69k|    for (int i = 3; i >= 0; --i) {
  ------------------
  |  Branch (86:21): [True: 2.95k, False: 738]
  ------------------
   87|  2.95k|        outbuf[i] = lval & 0xff;
   88|  2.95k|        lval >>= 8;
   89|  2.95k|    }
   90|       |
   91|    738|    QTC::TC("libtests", "Pl_ASCII85Decoder partial flush", (this->pos == 5) ? 0 : 1);
  ------------------
  |  Branch (91:60): [True: 716, False: 22]
  ------------------
   92|       |    // Reset before calling getNext()->write in case that throws an exception.
   93|    738|    auto t = this->pos - 1;
   94|    738|    this->pos = 0;
   95|    738|    memset(this->inbuf, 117, 5);
   96|       |
   97|    738|    next()->write(outbuf, t);
   98|    738|}
_ZN17Pl_ASCII85Decoder6finishEv:
  102|     99|{
  103|     99|    if (error) {
  ------------------
  |  Branch (103:9): [True: 0, False: 99]
  ------------------
  104|      0|        return;
  105|      0|    }
  106|     99|    flush();
  107|     99|    next()->finish();
  108|     99|}

_ZN10Pl_DiscardC2Ev:
    9|    140|    Pipeline("discard", nullptr)
   10|    140|{
   11|    140|}
_ZN10Pl_DiscardD2Ev:
   14|    140|Pl_Discard::~Pl_Discard() = default;
_ZN10Pl_Discard5writeEPKhm:
   18|    948|{
   19|    948|}
_ZN10Pl_Discard6finishEv:
   23|     99|{
   24|     99|}

_ZN4qpdf4util9assertionIRA57_KcEEvbOT_:
   27|    140|    {
   28|    140|        if (!cond) {
  ------------------
  |  Branch (28:13): [True: 0, False: 140]
  ------------------
   29|      0|            throw std::logic_error(std::forward<T>(msg));
   30|      0|        }
   31|    140|    }
_ZN4qpdf4util17no_ci_rt_error_ifIRA44_KcEEvbOT_:
   48|     17|    {
   49|     17|        if (cond) {
  ------------------
  |  Branch (49:13): [True: 12, False: 5]
  ------------------
   50|     12|            throw std::runtime_error(std::forward<T>(msg));
   51|     12|        }
   52|     17|    }

