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

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

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

_ZN8PipelineC2EPKcPS_:
    9|    262|{
   10|    262|}
_ZN8Pipeline7getNextEb:
   14|    991|{
   15|    991|    if ((this->next == nullptr) && (!allow_null)) {
  ------------------
  |  Branch (15:9): [True: 0, False: 991]
  |  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|    991|    return this->next;
   20|    991|}

_ZN18Pl_ASCIIHexDecoderC2EPKcP8Pipeline:
   11|    131|{
   12|    131|    this->inbuf[0] = '0';
   13|    131|    this->inbuf[1] = '0';
   14|    131|    this->inbuf[2] = '\0';
   15|    131|}
_ZN18Pl_ASCIIHexDecoder5writeEPKhm:
   19|    131|{
   20|    131|    if (this->eod) {
  ------------------
  |  Branch (20:9): [True: 0, False: 131]
  ------------------
   21|      0|        return;
   22|      0|    }
   23|  3.28k|    for (size_t i = 0; i < len; ++i) {
  ------------------
  |  Branch (23:24): [True: 3.19k, False: 91]
  ------------------
   24|  3.19k|        char ch = static_cast<char>(toupper(buf[i]));
   25|  3.19k|        switch (ch) {
   26|    196|        case ' ':
  ------------------
  |  Branch (26:9): [True: 196, False: 2.99k]
  ------------------
   27|    518|        case '\f':
  ------------------
  |  Branch (27:9): [True: 322, False: 2.87k]
  ------------------
   28|    721|        case '\v':
  ------------------
  |  Branch (28:9): [True: 203, False: 2.99k]
  ------------------
   29|    931|        case '\t':
  ------------------
  |  Branch (29:9): [True: 210, False: 2.98k]
  ------------------
   30|  1.16k|        case '\r':
  ------------------
  |  Branch (30:9): [True: 234, False: 2.95k]
  ------------------
   31|  1.39k|        case '\n':
  ------------------
  |  Branch (31:9): [True: 226, False: 2.96k]
  ------------------
   32|  1.39k|            QTC::TC("libtests", "Pl_ASCIIHexDecoder ignore space");
   33|       |            // ignore whitespace
   34|  1.39k|            break;
   35|       |
   36|      7|        case '>':
  ------------------
  |  Branch (36:9): [True: 7, False: 3.18k]
  ------------------
   37|      7|            this->eod = true;
   38|      7|            flush();
   39|      7|            break;
   40|       |
   41|  1.79k|        default:
  ------------------
  |  Branch (41:9): [True: 1.79k, False: 1.39k]
  ------------------
   42|  1.79k|            if (((ch >= '0') && (ch <= '9')) || ((ch >= 'A') && (ch <= 'F'))) {
  ------------------
  |  Branch (42:18): [True: 1.77k, False: 19]
  |  Branch (42:33): [True: 578, False: 1.19k]
  |  Branch (42:50): [True: 1.19k, False: 25]
  |  Branch (42:65): [True: 1.18k, False: 8]
  ------------------
   43|  1.76k|                this->inbuf[this->pos++] = ch;
   44|  1.76k|                if (this->pos == 2) {
  ------------------
  |  Branch (44:21): [True: 867, False: 895]
  ------------------
   45|    867|                    flush();
   46|    867|                }
   47|  1.76k|            } else {
   48|     33|                char t[2];
   49|     33|                t[0] = ch;
   50|     33|                t[1] = 0;
   51|     33|                throw std::runtime_error(
   52|     33|                    std::string("character out of range"
   53|     33|                                " during base Hex decode: ") +
   54|     33|                    t);
   55|     33|            }
   56|  1.76k|            break;
   57|  3.19k|        }
   58|  3.16k|        if (this->eod) {
  ------------------
  |  Branch (58:13): [True: 7, False: 3.15k]
  ------------------
   59|      7|            break;
   60|      7|        }
   61|  3.16k|    }
   62|    131|}
_ZN18Pl_ASCIIHexDecoder5flushEv:
   66|    972|{
   67|    972|    if (this->pos == 0) {
  ------------------
  |  Branch (67:9): [True: 79, False: 893]
  ------------------
   68|     79|        QTC::TC("libtests", "Pl_ASCIIHexDecoder no-op flush");
   69|     79|        return;
   70|     79|    }
   71|    893|    int b[2];
   72|  2.67k|    for (int i = 0; i < 2; ++i) {
  ------------------
  |  Branch (72:21): [True: 1.78k, False: 893]
  ------------------
   73|  1.78k|        if (this->inbuf[i] >= 'A') {
  ------------------
  |  Branch (73:13): [True: 1.18k, False: 604]
  ------------------
   74|  1.18k|            b[i] = this->inbuf[i] - 'A' + 10;
   75|  1.18k|        } else {
   76|    604|            b[i] = this->inbuf[i] - '0';
   77|    604|        }
   78|  1.78k|    }
   79|    893|    auto ch = static_cast<unsigned char>((b[0] << 4) + b[1]);
   80|       |
   81|    893|    QTC::TC("libtests", "Pl_ASCIIHexDecoder partial flush", (this->pos == 2) ? 0 : 1);
  ------------------
  |  Branch (81:61): [True: 867, False: 26]
  ------------------
   82|       |    // Reset before calling getNext()->write in case that throws an exception.
   83|    893|    this->pos = 0;
   84|    893|    this->inbuf[0] = '0';
   85|    893|    this->inbuf[1] = '0';
   86|    893|    this->inbuf[2] = '\0';
   87|       |
   88|    893|    getNext()->write(&ch, 1);
   89|    893|}
_ZN18Pl_ASCIIHexDecoder6finishEv:
   93|     98|{
   94|     98|    flush();
   95|     98|    getNext()->finish();
   96|     98|}

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

