_ZN10FuzzHelperC2EPKhm:
   22|    135|{
   23|    135|}
_ZN10FuzzHelper8doChecksEv:
   27|    135|{
   28|    135|    Pl_Discard discard;
   29|    135|    Pl_ASCII85Decoder p("decode", &discard);
   30|    135|    p.write(const_cast<unsigned char*>(data), size);
   31|    135|    p.finish();
   32|    135|}
_ZN10FuzzHelper3runEv:
   36|    135|{
   37|    135|    try {
   38|    135|        doChecks();
   39|    135|    } catch (std::runtime_error const& e) {
   40|     39|        std::cerr << "runtime_error: " << e.what() << std::endl;
   41|     39|    }
   42|    135|}
LLVMFuzzerTestOneInput:
   46|    135|{
   47|    135|    FuzzHelper f(data, size);
   48|    135|    f.run();
   49|    135|    return 0;
   50|    135|}

_ZN8PipelineD2Ev:
   53|    270|    virtual ~Pipeline() = default;

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

_ZN8PipelineC2EPKcPS_:
    9|    270|{
   10|    270|}
_ZN8Pipeline7getNextEb:
   14|  1.33k|{
   15|  1.33k|    if ((this->next == nullptr) && (!allow_null)) {
  ------------------
  |  Branch (15:9): [True: 0, False: 1.33k]
  |  Branch (15:36): [True: 0, False: 0]
  ------------------
   16|      0|        throw std::logic_error(
   17|      0|            this->identifier + ": Pipeline::getNext() called on pipeline with no next");
   18|      0|    }
   19|  1.33k|    return this->next;
   20|  1.33k|}

_ZN17Pl_ASCII85DecoderC2EPKcP8Pipeline:
   11|    135|{
   12|    135|    memset(this->inbuf, 117, 5);
   13|    135|}
_ZN17Pl_ASCII85Decoder5writeEPKhm:
   17|    135|{
   18|    135|    if (eod > 1) {
  ------------------
  |  Branch (18:9): [True: 0, False: 135]
  ------------------
   19|      0|        return;
   20|      0|    }
   21|  8.09k|    for (size_t i = 0; i < len; ++i) {
  ------------------
  |  Branch (21:24): [True: 7.99k, False: 95]
  ------------------
   22|  7.99k|        switch (buf[i]) {
  ------------------
  |  Branch (22:17): [True: 4.70k, False: 3.29k]
  ------------------
   23|  2.07k|        case ' ':
  ------------------
  |  Branch (23:9): [True: 2.07k, False: 5.92k]
  ------------------
   24|  2.35k|        case '\f':
  ------------------
  |  Branch (24:9): [True: 286, False: 7.70k]
  ------------------
   25|  2.55k|        case '\v':
  ------------------
  |  Branch (25:9): [True: 195, False: 7.80k]
  ------------------
   26|  2.77k|        case '\t':
  ------------------
  |  Branch (26:9): [True: 224, False: 7.77k]
  ------------------
   27|  2.97k|        case '\r':
  ------------------
  |  Branch (27:9): [True: 194, False: 7.80k]
  ------------------
   28|  3.29k|        case '\n':
  ------------------
  |  Branch (28:9): [True: 323, False: 7.67k]
  ------------------
   29|  3.29k|            QTC::TC("libtests", "Pl_ASCII85Decoder ignore space");
   30|       |            // ignore whitespace
   31|  3.29k|            continue;
   32|  7.99k|        }
   33|  4.70k|        if (eod > 1) {
  ------------------
  |  Branch (33:13): [True: 1, False: 4.70k]
  ------------------
   34|      1|            break;
   35|  4.70k|        } else if (eod == 1) {
  ------------------
  |  Branch (35:20): [True: 14, False: 4.68k]
  ------------------
   36|     14|            if (buf[i] == '>') {
  ------------------
  |  Branch (36:17): [True: 4, False: 10]
  ------------------
   37|      4|                flush();
   38|      4|                eod = 2;
   39|     10|            } else {
   40|     10|                throw std::runtime_error("broken end-of-data sequence in base 85 data");
   41|     10|            }
   42|  4.68k|        } else {
   43|  4.68k|            switch (buf[i]) {
   44|     15|            case '~':
  ------------------
  |  Branch (44:13): [True: 15, False: 4.67k]
  ------------------
   45|     15|                eod = 1;
   46|     15|                break;
   47|       |
   48|    378|            case 'z':
  ------------------
  |  Branch (48:13): [True: 378, False: 4.30k]
  ------------------
   49|    378|                if (pos != 0) {
  ------------------
  |  Branch (49:21): [True: 3, False: 375]
  ------------------
   50|      3|                    throw std::runtime_error("unexpected z during base 85 decode");
   51|    375|                } else {
   52|    375|                    QTC::TC("libtests", "Pl_ASCII85Decoder read z");
   53|    375|                    unsigned char zeroes[4];
   54|    375|                    memset(zeroes, '\0', 4);
   55|    375|                    getNext()->write(zeroes, 4);
   56|    375|                }
   57|    375|                break;
   58|       |
   59|  4.29k|            default:
  ------------------
  |  Branch (59:13): [True: 4.29k, False: 393]
  ------------------
   60|  4.29k|                if ((buf[i] < 33) || (buf[i] > 117)) {
  ------------------
  |  Branch (60:21): [True: 9, False: 4.28k]
  |  Branch (60:38): [True: 17, False: 4.26k]
  ------------------
   61|     26|                    throw std::runtime_error("character out of range during base 85 decode");
   62|  4.26k|                } else {
   63|  4.26k|                    this->inbuf[this->pos++] = buf[i];
   64|  4.26k|                    if (pos == 5) {
  ------------------
  |  Branch (64:25): [True: 841, False: 3.42k]
  ------------------
   65|    841|                        flush();
   66|    841|                    }
   67|  4.26k|                }
   68|  4.26k|                break;
   69|  4.68k|            }
   70|  4.68k|        }
   71|  4.70k|    }
   72|    135|}
_ZN17Pl_ASCII85Decoder5flushEv:
   76|    941|{
   77|    941|    if (this->pos == 0) {
  ------------------
  |  Branch (77:9): [True: 81, False: 860]
  ------------------
   78|     81|        QTC::TC("libtests", "Pl_ASCII85Decoder no-op flush");
   79|     81|        return;
   80|     81|    }
   81|    860|    unsigned long lval = 0;
   82|  5.16k|    for (int i = 0; i < 5; ++i) {
  ------------------
  |  Branch (82:21): [True: 4.30k, False: 860]
  ------------------
   83|  4.30k|        lval *= 85;
   84|  4.30k|        lval += (this->inbuf[i] - 33U);
   85|  4.30k|    }
   86|       |
   87|    860|    unsigned char outbuf[4];
   88|    860|    memset(outbuf, 0, 4);
   89|  4.30k|    for (int i = 3; i >= 0; --i) {
  ------------------
  |  Branch (89:21): [True: 3.44k, False: 860]
  ------------------
   90|  3.44k|        outbuf[i] = lval & 0xff;
   91|  3.44k|        lval >>= 8;
   92|  3.44k|    }
   93|       |
   94|    860|    QTC::TC("libtests", "Pl_ASCII85Decoder partial flush", (this->pos == 5) ? 0 : 1);
  ------------------
  |  Branch (94:60): [True: 841, False: 19]
  ------------------
   95|       |    // Reset before calling getNext()->write in case that throws an exception.
   96|    860|    auto t = this->pos - 1;
   97|    860|    this->pos = 0;
   98|    860|    memset(this->inbuf, 117, 5);
   99|       |
  100|    860|    getNext()->write(outbuf, t);
  101|    860|}
_ZN17Pl_ASCII85Decoder6finishEv:
  105|     96|{
  106|     96|    flush();
  107|     96|    getNext()->finish();
  108|     96|}

_ZN10Pl_DiscardC2Ev:
    7|    135|{
    8|    135|}
_ZN10Pl_DiscardD2Ev:
   11|    135|{
   12|       |    // Must be explicit and not inline -- see QPDF_DLL_CLASS in README-maintainer
   13|    135|}
_ZN10Pl_Discard5writeEPKhm:
   17|  1.23k|{
   18|  1.23k|}
_ZN10Pl_Discard6finishEv:
   22|     96|{
   23|     96|}

