_ZNK8nlohmann10basic_jsonINSt3__13mapENS1_6vectorENS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEblmdS7_NS_14adl_serializerENS3_IhNS7_IhEEEEE4typeEv:
19973|   922k|    {
19974|   922k|        return m_type;
19975|   922k|    }
_ZNK8nlohmann10basic_jsonINSt3__13mapENS1_6vectorENS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEblmdS7_NS_14adl_serializerENS3_IhNS7_IhEEEEE9is_numberEv:
20105|  1.23M|    {
20106|  1.23M|        return is_number_integer() || is_number_float();
  ------------------
  |  Branch (20106:16): [True: 1.22M, False: 9.41k]
  |  Branch (20106:39): [True: 319, False: 9.09k]
  ------------------
20107|  1.23M|    }
_ZNK8nlohmann10basic_jsonINSt3__13mapENS1_6vectorENS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEblmdS7_NS_14adl_serializerENS3_IhNS7_IhEEEEE17is_number_integerEv:
20134|  1.24M|    {
20135|  1.24M|        return m_type == value_t::number_integer || m_type == value_t::number_unsigned;
  ------------------
  |  Branch (20135:16): [True: 3.90k, False: 1.23M]
  |  Branch (20135:53): [True: 1.22M, False: 9.41k]
  ------------------
20136|  1.24M|    }
_ZNK8nlohmann10basic_jsonINSt3__13mapENS1_6vectorENS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEblmdS7_NS_14adl_serializerENS3_IhNS7_IhEEEEE15is_number_floatEv:
20190|  9.84k|    {
20191|  9.84k|        return m_type == value_t::number_float;
20192|  9.84k|    }
_ZNK8nlohmann10basic_jsonINSt3__13mapENS1_6vectorENS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEblmdS7_NS_14adl_serializerENS3_IhNS7_IhEEEEE8is_arrayEv:
20234|  32.5M|    {
20235|  32.5M|        return m_type == value_t::array;
20236|  32.5M|    }
_ZNK8nlohmann10basic_jsonINSt3__13mapENS1_6vectorENS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEblmdS7_NS_14adl_serializerENS3_IhNS7_IhEEEEE9is_objectEv:
20212|  13.6M|    {
20213|  13.6M|        return m_type == value_t::object;
20214|  13.6M|    }
_ZN8nlohmann6detail9iter_implIKNS_10basic_jsonINSt3__13mapENS3_6vectorENS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEblmdS9_NS_14adl_serializerENS5_IhNS9_IhEEEEEEEC2Ev:
11663|  5.28M|    iter_impl() = default;
_ZN8nlohmann6detail9iter_implIKNS_10basic_jsonINSt3__13mapENS3_6vectorENS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEblmdS9_NS_14adl_serializerENS5_IhNS9_IhEEEEEEEppEi:
11941|   225k|    {
11942|   225k|        auto result = *this;
11943|   225k|        ++(*this);
11944|   225k|        return result;
11945|   225k|    }
_ZN8nlohmann6detail9iter_implIKNS_10basic_jsonINSt3__13mapENS3_6vectorENS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEblmdS9_NS_14adl_serializerENS5_IhNS9_IhEEEEEEEC2ERKSH_:
11726|   225k|    {}
_ZNK8nlohmann10basic_jsonINSt3__13mapENS1_6vectorENS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEblmdS7_NS_14adl_serializerENS3_IhNS7_IhEEEEE4sizeEv:
22717|  26.6k|    {
22718|  26.6k|        switch (m_type)
22719|  26.6k|        {
22720|      0|            case value_t::null:
  ------------------
  |  Branch (22720:13): [True: 0, False: 26.6k]
  ------------------
22721|      0|            {
22722|       |                // null values are empty
22723|      0|                return 0;
22724|      0|            }
22725|       |
22726|  26.6k|            case value_t::array:
  ------------------
  |  Branch (22726:13): [True: 26.6k, False: 0]
  ------------------
22727|  26.6k|            {
22728|       |                // delegate call to array_t::size()
22729|  26.6k|                return m_value.array->size();
22730|      0|            }
22731|       |
22732|      0|            case value_t::object:
  ------------------
  |  Branch (22732:13): [True: 0, False: 26.6k]
  ------------------
22733|      0|            {
22734|       |                // delegate call to object_t::size()
22735|      0|                return m_value.object->size();
22736|      0|            }
22737|       |
22738|      0|            case value_t::string:
  ------------------
  |  Branch (22738:13): [True: 0, False: 26.6k]
  ------------------
22739|      0|            case value_t::boolean:
  ------------------
  |  Branch (22739:13): [True: 0, False: 26.6k]
  ------------------
22740|      0|            case value_t::number_integer:
  ------------------
  |  Branch (22740:13): [True: 0, False: 26.6k]
  ------------------
22741|      0|            case value_t::number_unsigned:
  ------------------
  |  Branch (22741:13): [True: 0, False: 26.6k]
  ------------------
22742|      0|            case value_t::number_float:
  ------------------
  |  Branch (22742:13): [True: 0, False: 26.6k]
  ------------------
22743|      0|            case value_t::binary:
  ------------------
  |  Branch (22743:13): [True: 0, False: 26.6k]
  ------------------
22744|      0|            case value_t::discarded:
  ------------------
  |  Branch (22744:13): [True: 0, False: 26.6k]
  ------------------
22745|      0|            default:
  ------------------
  |  Branch (22745:13): [True: 0, False: 26.6k]
  ------------------
22746|      0|            {
22747|       |                // all other types have size 1
22748|      0|                return 1;
22749|      0|            }
22750|  26.6k|        }
22751|  26.6k|    }
_ZNK8nlohmann10basic_jsonINSt3__13mapENS1_6vectorENS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEblmdS7_NS_14adl_serializerENS3_IhNS7_IhEEEEE3getIbbEEDTcldtclL_ZNS1_7declvalIRKSD_EEDTcl9__declvalIT_ELi0EEEvEE8get_implIT0_EtlNS_6detail12priority_tagILj4EEEEEEv:
20711|    702|    {
20712|       |        // we cannot static_assert on ValueTypeCV being non-const, because
20713|       |        // there is support for get<const basic_json_t>(), which is why we
20714|       |        // still need the uncvref
20715|    702|        static_assert(!std::is_reference<ValueTypeCV>::value,
20716|    702|                      "get() cannot be used with reference types, you might want to use get_ref()");
20717|    702|        return get_impl<ValueType>(detail::priority_tag<4> {});
20718|    702|    }
_ZNK8nlohmann10basic_jsonINSt3__13mapENS1_6vectorENS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEblmdS7_NS_14adl_serializerENS3_IhNS7_IhEEEEE8get_implIbLi0EEET_NS_6detail12priority_tagILj0EEE:
20572|    702|    {
20573|    702|        auto ret = ValueType();
20574|    702|        JSONSerializer<ValueType>::from_json(*this, ret);
20575|    702|        return ret;
20576|    702|    }
_ZN8nlohmann14adl_serializerIbvE9from_jsonIRKNS_10basic_jsonINSt3__13mapENS4_6vectorENS4_12basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEblmdSA_S0_NS6_IhNSA_IhEEEEEEbEEDTcmclL_ZNS_12_GLOBAL__N_19from_jsonEEclsr3stdE7forwardIT_Efp_Efp0_Ecvv_EEOSJ_RT0_:
 5059|    702|    {
 5060|    702|        ::nlohmann::from_json(std::forward<BasicJsonType>(j), val);
 5061|    702|    }
_ZNK8nlohmann6detail12from_json_fnclINS_10basic_jsonINSt3__13mapENS4_6vectorENS4_12basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEblmdSA_NS_14adl_serializerENS6_IhNSA_IhEEEEEERbEEDTcl9from_jsonfp_clsr3stdE7forwardIT0_Efp0_EEERKT_OSI_:
 4400|    702|    {
 4401|    702|        return from_json(j, std::forward<T>(val));
 4402|    702|    }
_ZN8nlohmann6detail9from_jsonINS_10basic_jsonINSt3__13mapENS3_6vectorENS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEblmdS9_NS_14adl_serializerENS5_IhNS9_IhEEEEEEEEvRKT_RNSG_9boolean_tE:
 4010|    702|{
 4011|    702|    if (JSON_HEDLEY_UNLIKELY(!j.is_boolean()))
  ------------------
  |  | 1529|    702|#  define JSON_HEDLEY_UNLIKELY(expr)                    __builtin_expect                 (!!(expr),    0                  )
  |  |  ------------------
  |  |  |  Branch (1529:57): [True: 0, False: 702]
  |  |  ------------------
  ------------------
 4012|      0|    {
 4013|      0|        JSON_THROW(type_error::create(302, "type must be boolean, but is " + std::string(j.type_name()), j));
  ------------------
  |  | 2337|      0|    #define JSON_THROW(exception) throw exception
  ------------------
 4014|      0|    }
 4015|    702|    b = *j.template get_ptr<const typename BasicJsonType::boolean_t*>();
 4016|    702|}
_ZNK8nlohmann10basic_jsonINSt3__13mapENS1_6vectorENS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEblmdS7_NS_14adl_serializerENS3_IhNS7_IhEEEEE10is_booleanEv:
20075|  2.50k|    {
20076|  2.50k|        return m_type == value_t::boolean;
20077|  2.50k|    }
_ZN8nlohmann6detail9exception4nameERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEi:
 2782|    180|    {
 2783|    180|        return "[json.exception." + ename + "." + std::to_string(id_) + "] ";
 2784|    180|    }
_ZN8nlohmann6detail9exception11diagnosticsINS_10basic_jsonINSt3__13mapENS4_6vectorENS4_12basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEblmdSA_NS_14adl_serializerENS6_IhNSA_IhEEEEEEEESC_RKT_:
 2788|    180|    {
 2789|       |#if JSON_DIAGNOSTICS
 2790|       |        std::vector<std::string> tokens;
 2791|       |        for (const auto* current = &leaf_element; current->m_parent != nullptr; current = current->m_parent)
 2792|       |        {
 2793|       |            switch (current->m_parent->type())
 2794|       |            {
 2795|       |                case value_t::array:
 2796|       |                {
 2797|       |                    for (std::size_t i = 0; i < current->m_parent->m_value.array->size(); ++i)
 2798|       |                    {
 2799|       |                        if (&current->m_parent->m_value.array->operator[](i) == current)
 2800|       |                        {
 2801|       |                            tokens.emplace_back(std::to_string(i));
 2802|       |                            break;
 2803|       |                        }
 2804|       |                    }
 2805|       |                    break;
 2806|       |                }
 2807|       |
 2808|       |                case value_t::object:
 2809|       |                {
 2810|       |                    for (const auto& element : *current->m_parent->m_value.object)
 2811|       |                    {
 2812|       |                        if (&element.second == current)
 2813|       |                        {
 2814|       |                            tokens.emplace_back(element.first.c_str());
 2815|       |                            break;
 2816|       |                        }
 2817|       |                    }
 2818|       |                    break;
 2819|       |                }
 2820|       |
 2821|       |                case value_t::null: // LCOV_EXCL_LINE
 2822|       |                case value_t::string: // LCOV_EXCL_LINE
 2823|       |                case value_t::boolean: // LCOV_EXCL_LINE
 2824|       |                case value_t::number_integer: // LCOV_EXCL_LINE
 2825|       |                case value_t::number_unsigned: // LCOV_EXCL_LINE
 2826|       |                case value_t::number_float: // LCOV_EXCL_LINE
 2827|       |                case value_t::binary: // LCOV_EXCL_LINE
 2828|       |                case value_t::discarded: // LCOV_EXCL_LINE
 2829|       |                default:   // LCOV_EXCL_LINE
 2830|       |                    break; // LCOV_EXCL_LINE
 2831|       |            }
 2832|       |        }
 2833|       |
 2834|       |        if (tokens.empty())
 2835|       |        {
 2836|       |            return "";
 2837|       |        }
 2838|       |
 2839|       |        return "(" + std::accumulate(tokens.rbegin(), tokens.rend(), std::string{},
 2840|       |                                     [](const std::string & a, const std::string & b)
 2841|       |        {
 2842|       |            return a + "/" + detail::escape(b);
 2843|       |        }) + ") ";
 2844|       |#else
 2845|    180|        static_cast<void>(leaf_element);
 2846|    180|        return "";
 2847|    180|#endif
 2848|    180|    }
_ZN8nlohmann6detail9exceptionC2EiPKc:
 2779|    180|    exception(int id_, const char* what_arg) : id(id_), m(what_arg) {}
_ZNK8nlohmann6detail9exception4whatEv:
 2770|    180|    {
 2771|    180|        return m.what();
 2772|    180|    }
_ZNK8nlohmann10basic_jsonINSt3__13mapENS1_6vectorENS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEblmdS7_NS_14adl_serializerENS3_IhNS7_IhEEEEE7get_ptrIPKbLi0EEEDTcldtclL_ZNS1_7declvalIRKSD_EEDTcl9__declvalIT_ELi0EEEvEE12get_impl_ptrclsr3stdE7declvalISK_EEEEv:
20521|    702|    {
20522|       |        // delegate the call to get_impl_ptr<>() const
20523|    702|        return get_impl_ptr(static_cast<PointerType>(nullptr));
20524|    702|    }
_ZNK8nlohmann10basic_jsonINSt3__13mapENS1_6vectorENS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEblmdS7_NS_14adl_serializerENS3_IhNS7_IhEEEEE12get_impl_ptrEPKb:
20397|    702|    {
20398|    702|        return is_boolean() ? &m_value.boolean : nullptr;
  ------------------
  |  Branch (20398:16): [True: 702, False: 0]
  ------------------
20399|    702|    }
_ZN8nlohmann10basic_jsonINSt3__13mapENS1_6vectorENS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEblmdS7_NS_14adl_serializerENS3_IhNS7_IhEEEEEC2IRmmLi0EEEOT_:
19074|  4.72M|    {
19075|  4.72M|        JSONSerializer<U>::to_json(*this, std::forward<CompatibleType>(val));
19076|  4.72M|        set_parents();
19077|  4.72M|        assert_invariant();
19078|  4.72M|    }
_ZN8nlohmann14adl_serializerImvE7to_jsonINS_10basic_jsonINSt3__13mapENS4_6vectorENS4_12basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEblmdSA_S0_NS6_IhNSA_IhEEEEEERmEEDTcmclL_ZNS_12_GLOBAL__N_17to_jsonEEfp_clsr3stdE7forwardIT0_Efp0_EEcvv_EERT_OSI_:
 5096|  4.72M|    {
 5097|  4.72M|        ::nlohmann::to_json(j, std::forward<TargetType>(val));
 5098|  4.72M|    }
_ZNK8nlohmann6detail10to_json_fnclINS_10basic_jsonINSt3__13mapENS4_6vectorENS4_12basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEblmdSA_NS_14adl_serializerENS6_IhNSA_IhEEEEEERmEEDTcmcl7to_jsonfp_clsr3stdE7forwardIT0_Efp0_EEcvv_EERT_OSI_:
 5018|  4.72M|    {
 5019|  4.72M|        return to_json(j, std::forward<T>(val));
 5020|  4.72M|    }
_ZN8nlohmann6detail7to_jsonINS_10basic_jsonINSt3__13mapENS3_6vectorENS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEblmdS9_NS_14adl_serializerENS5_IhNS9_IhEEEEEEmLi0EEEvRT_T0_:
 4899|  4.72M|{
 4900|  4.72M|    external_constructor<value_t::number_unsigned>::construct(j, static_cast<typename BasicJsonType::number_unsigned_t>(val));
 4901|  4.72M|}
_ZN8nlohmann6detail20external_constructorILNS0_7value_tE6EE9constructINS_10basic_jsonINSt3__13mapENS6_6vectorENS6_12basic_stringIcNS6_11char_traitsIcEENS6_9allocatorIcEEEEblmdSC_NS_14adl_serializerENS8_IhNSC_IhEEEEEEEEvRT_NSJ_17number_unsigned_tE:
 4736|  4.72M|    {
 4737|  4.72M|        j.m_value.destroy(j.m_type);
 4738|  4.72M|        j.m_type = value_t::number_unsigned;
 4739|  4.72M|        j.m_value = val;
 4740|  4.72M|        j.assert_invariant();
 4741|  4.72M|    }
_ZN8nlohmann10basic_jsonINSt3__13mapENS1_6vectorENS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEblmdS7_NS_14adl_serializerENS3_IhNS7_IhEEEEE10json_value7destroyENS_6detail7value_tE:
18637|  55.0M|        {
18638|  55.0M|            if (t == value_t::array || t == value_t::object)
  ------------------
  |  Branch (18638:17): [True: 4.59M, False: 50.4M]
  |  Branch (18638:40): [True: 1.31M, False: 49.1M]
  ------------------
18639|  5.91M|            {
18640|       |                // flatten the current json_value to a heap-allocated stack
18641|  5.91M|                std::vector<basic_json> stack;
18642|       |
18643|       |                // move the top-level items to stack
18644|  5.91M|                if (t == value_t::array)
  ------------------
  |  Branch (18644:21): [True: 4.59M, False: 1.31M]
  ------------------
18645|  4.59M|                {
18646|  4.59M|                    stack.reserve(array->size());
18647|  4.59M|                    std::move(array->begin(), array->end(), std::back_inserter(stack));
18648|  4.59M|                }
18649|  1.31M|                else
18650|  1.31M|                {
18651|  1.31M|                    stack.reserve(object->size());
18652|  1.31M|                    for (auto&& it : *object)
  ------------------
  |  Branch (18652:36): [True: 5.15k, False: 1.31M]
  ------------------
18653|  5.15k|                    {
18654|  5.15k|                        stack.push_back(std::move(it.second));
18655|  5.15k|                    }
18656|  1.31M|                }
18657|       |
18658|  16.7M|                while (!stack.empty())
  ------------------
  |  Branch (18658:24): [True: 10.8M, False: 5.91M]
  ------------------
18659|  10.8M|                {
18660|       |                    // move the last item to local variable to be processed
18661|  10.8M|                    basic_json current_item(std::move(stack.back()));
18662|  10.8M|                    stack.pop_back();
18663|       |
18664|       |                    // if current_item is array/object, move
18665|       |                    // its children to the stack to be processed later
18666|  10.8M|                    if (current_item.is_array())
  ------------------
  |  Branch (18666:25): [True: 4.59M, False: 6.22M]
  ------------------
18667|  4.59M|                    {
18668|  4.59M|                        std::move(current_item.m_value.array->begin(), current_item.m_value.array->end(), std::back_inserter(stack));
18669|       |
18670|  4.59M|                        current_item.m_value.array->clear();
18671|  4.59M|                    }
18672|  6.22M|                    else if (current_item.is_object())
  ------------------
  |  Branch (18672:30): [True: 1.31M, False: 4.91M]
  ------------------
18673|  1.31M|                    {
18674|  1.31M|                        for (auto&& it : *current_item.m_value.object)
  ------------------
  |  Branch (18674:40): [True: 476k, False: 1.31M]
  ------------------
18675|   476k|                        {
18676|   476k|                            stack.push_back(std::move(it.second));
18677|   476k|                        }
18678|       |
18679|  1.31M|                        current_item.m_value.object->clear();
18680|  1.31M|                    }
18681|       |
18682|       |                    // it's now safe that current_item get destructed
18683|       |                    // since it doesn't have any children
18684|  10.8M|                }
18685|  5.91M|            }
18686|       |
18687|  55.0M|            switch (t)
18688|  55.0M|            {
18689|  1.31M|                case value_t::object:
  ------------------
  |  Branch (18689:17): [True: 1.31M, False: 53.7M]
  ------------------
18690|  1.31M|                {
18691|  1.31M|                    AllocatorType<object_t> alloc;
18692|  1.31M|                    std::allocator_traits<decltype(alloc)>::destroy(alloc, object);
18693|  1.31M|                    std::allocator_traits<decltype(alloc)>::deallocate(alloc, object, 1);
18694|  1.31M|                    break;
18695|      0|                }
18696|       |
18697|  4.59M|                case value_t::array:
  ------------------
  |  Branch (18697:17): [True: 4.59M, False: 50.4M]
  ------------------
18698|  4.59M|                {
18699|  4.59M|                    AllocatorType<array_t> alloc;
18700|  4.59M|                    std::allocator_traits<decltype(alloc)>::destroy(alloc, array);
18701|  4.59M|                    std::allocator_traits<decltype(alloc)>::deallocate(alloc, array, 1);
18702|  4.59M|                    break;
18703|      0|                }
18704|       |
18705|   174k|                case value_t::string:
  ------------------
  |  Branch (18705:17): [True: 174k, False: 54.9M]
  ------------------
18706|   174k|                {
18707|   174k|                    AllocatorType<string_t> alloc;
18708|   174k|                    std::allocator_traits<decltype(alloc)>::destroy(alloc, string);
18709|   174k|                    std::allocator_traits<decltype(alloc)>::deallocate(alloc, string, 1);
18710|   174k|                    break;
18711|      0|                }
18712|       |
18713|      0|                case value_t::binary:
  ------------------
  |  Branch (18713:17): [True: 0, False: 55.0M]
  ------------------
18714|      0|                {
18715|      0|                    AllocatorType<binary_t> alloc;
18716|      0|                    std::allocator_traits<decltype(alloc)>::destroy(alloc, binary);
18717|      0|                    std::allocator_traits<decltype(alloc)>::deallocate(alloc, binary, 1);
18718|      0|                    break;
18719|      0|                }
18720|       |
18721|  44.2M|                case value_t::null:
  ------------------
  |  Branch (18721:17): [True: 44.2M, False: 10.8M]
  ------------------
18722|  44.2M|                case value_t::boolean:
  ------------------
  |  Branch (18722:17): [True: 2.26k, False: 55.0M]
  ------------------
18723|  44.2M|                case value_t::number_integer:
  ------------------
  |  Branch (18723:17): [True: 5.57k, False: 55.0M]
  ------------------
18724|  48.9M|                case value_t::number_unsigned:
  ------------------
  |  Branch (18724:17): [True: 4.72M, False: 50.3M]
  ------------------
18725|  49.0M|                case value_t::number_float:
  ------------------
  |  Branch (18725:17): [True: 11.0k, False: 55.0M]
  ------------------
18726|  49.0M|                case value_t::discarded:
  ------------------
  |  Branch (18726:17): [True: 0, False: 55.0M]
  ------------------
18727|  49.0M|                default:
  ------------------
  |  Branch (18727:17): [True: 0, False: 55.0M]
  ------------------
18728|  49.0M|                {
18729|  49.0M|                    break;
18730|  49.0M|                }
18731|  55.0M|            }
18732|  55.0M|        }
_ZN8nlohmann10basic_jsonINSt3__13mapENS1_6vectorENS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEblmdS7_NS_14adl_serializerENS3_IhNS7_IhEEEEE10json_valueC2Em:
18501|  4.72M|        json_value(number_unsigned_t v) noexcept : number_unsigned(v) {}
_ZN8nlohmann10basic_jsonINSt3__13mapENS1_6vectorENS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEblmdS7_NS_14adl_serializerENS3_IhNS7_IhEEEEE11set_parentsEv:
18776|  45.4M|    {
18777|       |#if JSON_DIAGNOSTICS
18778|       |        switch (m_type)
18779|       |        {
18780|       |            case value_t::array:
18781|       |            {
18782|       |                for (auto& element : *m_value.array)
18783|       |                {
18784|       |                    element.m_parent = this;
18785|       |                }
18786|       |                break;
18787|       |            }
18788|       |
18789|       |            case value_t::object:
18790|       |            {
18791|       |                for (auto& element : *m_value.object)
18792|       |                {
18793|       |                    element.second.m_parent = this;
18794|       |                }
18795|       |                break;
18796|       |            }
18797|       |
18798|       |            case value_t::null:
18799|       |            case value_t::string:
18800|       |            case value_t::boolean:
18801|       |            case value_t::number_integer:
18802|       |            case value_t::number_unsigned:
18803|       |            case value_t::number_float:
18804|       |            case value_t::binary:
18805|       |            case value_t::discarded:
18806|       |            default:
18807|       |                break;
18808|       |        }
18809|       |#endif
18810|  45.4M|    }
_ZNK8nlohmann10basic_jsonINSt3__13mapENS1_6vectorENS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEblmdS7_NS_14adl_serializerENS3_IhNS7_IhEEEEE16assert_invariantEb:
18755|   145M|    {
18756|   145M|        JSON_ASSERT(m_type != value_t::object || m_value.object != nullptr);
  ------------------
  |  | 2372|   145M|    #define JSON_ASSERT(x) assert(x)
  ------------------
18757|   145M|        JSON_ASSERT(m_type != value_t::array || m_value.array != nullptr);
  ------------------
  |  | 2372|   145M|    #define JSON_ASSERT(x) assert(x)
  ------------------
18758|   145M|        JSON_ASSERT(m_type != value_t::string || m_value.string != nullptr);
  ------------------
  |  | 2372|   145M|    #define JSON_ASSERT(x) assert(x)
  ------------------
18759|   145M|        JSON_ASSERT(m_type != value_t::binary || m_value.binary != nullptr);
  ------------------
  |  | 2372|   145M|    #define JSON_ASSERT(x) assert(x)
  ------------------
18760|       |
18761|       |#if JSON_DIAGNOSTICS
18762|       |        JSON_TRY
18763|       |        {
18764|       |            // cppcheck-suppress assertWithSideEffect
18765|       |            JSON_ASSERT(!check_parents || !is_structured() || std::all_of(begin(), end(), [this](const basic_json & j)
18766|       |            {
18767|       |                return j.m_parent == this;
18768|       |            }));
18769|       |        }
18770|       |        JSON_CATCH(...) {} // LCOV_EXCL_LINE
18771|       |#endif
18772|      0|        static_cast<void>(check_parents);
18773|   145M|    }
_ZN8nlohmann6detail7to_jsonINS_10basic_jsonINSt3__13mapENS3_6vectorENS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEblmdS9_NS_14adl_serializerENS5_IhNS9_IhEEEEEEdLi0EEEvRT_T0_:
 4892|  11.0k|{
 4893|  11.0k|    external_constructor<value_t::number_float>::construct(j, static_cast<typename BasicJsonType::number_float_t>(val));
 4894|  11.0k|}
_ZN8nlohmann6detail20external_constructorILNS0_7value_tE7EE9constructINS_10basic_jsonINSt3__13mapENS6_6vectorENS6_12basic_stringIcNS6_11char_traitsIcEENS6_9allocatorIcEEEEblmdSC_NS_14adl_serializerENS8_IhNSC_IhEEEEEEEEvRT_NSJ_14number_float_tE:
 4723|  11.0k|    {
 4724|  11.0k|        j.m_value.destroy(j.m_type);
 4725|  11.0k|        j.m_type = value_t::number_float;
 4726|  11.0k|        j.m_value = val;
 4727|  11.0k|        j.assert_invariant();
 4728|  11.0k|    }
_ZN8nlohmann10basic_jsonINSt3__13mapENS1_6vectorENS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEblmdS7_NS_14adl_serializerENS3_IhNS7_IhEEEEE10json_valueC2Ed:
18503|  11.0k|        json_value(number_float_t v) noexcept : number_float(v) {}
_ZN8nlohmann6detail20external_constructorILNS0_7value_tE5EE9constructINS_10basic_jsonINSt3__13mapENS6_6vectorENS6_12basic_stringIcNS6_11char_traitsIcEENS6_9allocatorIcEEEEblmdSC_NS_14adl_serializerENS8_IhNSC_IhEEEEEEEEvRT_NSJ_16number_integer_tE:
 4749|  5.57k|    {
 4750|  5.57k|        j.m_value.destroy(j.m_type);
 4751|  5.57k|        j.m_type = value_t::number_integer;
 4752|  5.57k|        j.m_value = val;
 4753|  5.57k|        j.assert_invariant();
 4754|  5.57k|    }
_ZN8nlohmann10basic_jsonINSt3__13mapENS1_6vectorENS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEblmdS7_NS_14adl_serializerENS3_IhNS7_IhEEEEE10json_valueC2El:
18499|  5.57k|        json_value(number_integer_t v) noexcept : number_integer(v) {}
_ZN8nlohmann6detail7to_jsonINS_10basic_jsonINSt3__13mapENS3_6vectorENS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEblmdS9_NS_14adl_serializerENS5_IhNS9_IhEEEEEEbLi0EEEvRT_T0_:
 4872|  2.26k|{
 4873|  2.26k|    external_constructor<value_t::boolean>::construct(j, b);
 4874|  2.26k|}
_ZN8nlohmann6detail20external_constructorILNS0_7value_tE4EE9constructINS_10basic_jsonINSt3__13mapENS6_6vectorENS6_12basic_stringIcNS6_11char_traitsIcEENS6_9allocatorIcEEEEblmdSC_NS_14adl_serializerENS8_IhNSC_IhEEEEEEEEvRT_NSJ_9boolean_tE:
 4655|  2.26k|    {
 4656|  2.26k|        j.m_value.destroy(j.m_type);
 4657|  2.26k|        j.m_type = value_t::boolean;
 4658|  2.26k|        j.m_value = b;
 4659|  2.26k|        j.assert_invariant();
 4660|  2.26k|    }
_ZN8nlohmann10basic_jsonINSt3__13mapENS1_6vectorENS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEblmdS7_NS_14adl_serializerENS3_IhNS7_IhEEEEE10json_valueC2Eb:
18497|  2.26k|        json_value(boolean_t v) noexcept : boolean(v) {}
_ZN8nlohmann6detail7to_jsonINS_10basic_jsonINSt3__13mapENS3_6vectorENS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEblmdS9_NS_14adl_serializerENS5_IhNS9_IhEEEEEESB_Li0EEEvRT_RKT0_:
 4879|   174k|{
 4880|   174k|    external_constructor<value_t::string>::construct(j, s);
 4881|   174k|}
_ZN8nlohmann6detail20external_constructorILNS0_7value_tE3EE9constructINS_10basic_jsonINSt3__13mapENS6_6vectorENS6_12basic_stringIcNS6_11char_traitsIcEENS6_9allocatorIcEEEEblmdSC_NS_14adl_serializerENS8_IhNSC_IhEEEEEEEEvRT_RKNSJ_8string_tE:
 4668|   174k|    {
 4669|   174k|        j.m_value.destroy(j.m_type);
 4670|   174k|        j.m_type = value_t::string;
 4671|   174k|        j.m_value = s;
 4672|   174k|        j.assert_invariant();
 4673|   174k|    }
_ZN8nlohmann10basic_jsonINSt3__13mapENS1_6vectorENS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEblmdS7_NS_14adl_serializerENS3_IhNS7_IhEEEEE10json_valueC2ERKS9_:
18578|   174k|        {
18579|   174k|            string = create<string_t>(value);
18580|   174k|        }
_ZN8nlohmann10basic_jsonINSt3__13mapENS1_6vectorENS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEblmdS7_NS_14adl_serializerENS3_IhNS7_IhEEEEE6createIS9_JRKS9_EEEPT_DpOT0_:
18431|   174k|    {
18432|   174k|        AllocatorType<T> alloc;
18433|   174k|        using AllocatorTraits = std::allocator_traits<AllocatorType<T>>;
18434|       |
18435|   174k|        auto deleter = [&](T * obj)
18436|   174k|        {
18437|   174k|            AllocatorTraits::deallocate(alloc, obj, 1);
18438|   174k|        };
18439|   174k|        std::unique_ptr<T, decltype(deleter)> obj(AllocatorTraits::allocate(alloc, 1), deleter);
18440|   174k|        AllocatorTraits::construct(alloc, obj.get(), std::forward<Args>(args)...);
18441|   174k|        JSON_ASSERT(obj != nullptr);
  ------------------
  |  | 2372|   174k|    #define JSON_ASSERT(x) assert(x)
  ------------------
18442|      0|        return obj.release();
18443|   174k|    }
_ZN8nlohmann10basic_jsonINSt3__13mapENS1_6vectorENS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEblmdS7_NS_14adl_serializerENS3_IhNS7_IhEEEEE10json_valueC2ENS_6detail7value_tE:
18506|  6.39M|        {
18507|  6.39M|            switch (t)
18508|  6.39M|            {
18509|  1.31M|                case value_t::object:
  ------------------
  |  Branch (18509:17): [True: 1.31M, False: 5.08M]
  ------------------
18510|  1.31M|                {
18511|  1.31M|                    object = create<object_t>();
18512|  1.31M|                    break;
18513|      0|                }
18514|       |
18515|  4.59M|                case value_t::array:
  ------------------
  |  Branch (18515:17): [True: 4.59M, False: 1.80M]
  ------------------
18516|  4.59M|                {
18517|  4.59M|                    array = create<array_t>();
18518|  4.59M|                    break;
18519|      0|                }
18520|       |
18521|      0|                case value_t::string:
  ------------------
  |  Branch (18521:17): [True: 0, False: 6.39M]
  ------------------
18522|      0|                {
18523|      0|                    string = create<string_t>("");
18524|      0|                    break;
18525|      0|                }
18526|       |
18527|      0|                case value_t::binary:
  ------------------
  |  Branch (18527:17): [True: 0, False: 6.39M]
  ------------------
18528|      0|                {
18529|      0|                    binary = create<binary_t>();
18530|      0|                    break;
18531|      0|                }
18532|       |
18533|      0|                case value_t::boolean:
  ------------------
  |  Branch (18533:17): [True: 0, False: 6.39M]
  ------------------
18534|      0|                {
18535|      0|                    boolean = boolean_t(false);
18536|      0|                    break;
18537|      0|                }
18538|       |
18539|      0|                case value_t::number_integer:
  ------------------
  |  Branch (18539:17): [True: 0, False: 6.39M]
  ------------------
18540|      0|                {
18541|      0|                    number_integer = number_integer_t(0);
18542|      0|                    break;
18543|      0|                }
18544|       |
18545|      0|                case value_t::number_unsigned:
  ------------------
  |  Branch (18545:17): [True: 0, False: 6.39M]
  ------------------
18546|      0|                {
18547|      0|                    number_unsigned = number_unsigned_t(0);
18548|      0|                    break;
18549|      0|                }
18550|       |
18551|      0|                case value_t::number_float:
  ------------------
  |  Branch (18551:17): [True: 0, False: 6.39M]
  ------------------
18552|      0|                {
18553|      0|                    number_float = number_float_t(0.0);
18554|      0|                    break;
18555|      0|                }
18556|       |
18557|   485k|                case value_t::null:
  ------------------
  |  Branch (18557:17): [True: 485k, False: 5.91M]
  ------------------
18558|   485k|                {
18559|   485k|                    object = nullptr;  // silence warning, see #821
18560|   485k|                    break;
18561|      0|                }
18562|       |
18563|      0|                case value_t::discarded:
  ------------------
  |  Branch (18563:17): [True: 0, False: 6.39M]
  ------------------
18564|      0|                default:
  ------------------
  |  Branch (18564:17): [True: 0, False: 6.39M]
  ------------------
18565|      0|                {
18566|      0|                    object = nullptr;  // silence warning, see #821
18567|      0|                    if (JSON_HEDLEY_UNLIKELY(t == value_t::null))
  ------------------
  |  | 1529|      0|#  define JSON_HEDLEY_UNLIKELY(expr)                    __builtin_expect                 (!!(expr),    0                  )
  |  |  ------------------
  |  |  |  Branch (1529:57): [True: 0, False: 0]
  |  |  ------------------
  ------------------
18568|      0|                    {
18569|      0|                        JSON_THROW(other_error::create(500, "961c151d2e87f2686a955a9be24d316f1362bf21 3.10.4", basic_json())); // LCOV_EXCL_LINE
  ------------------
  |  | 2337|      0|    #define JSON_THROW(exception) throw exception
  ------------------
18570|      0|                    }
18571|      0|                    break;
18572|      0|                }
18573|  6.39M|            }
18574|  6.39M|        }
_ZN8nlohmann10basic_jsonINSt3__13mapENS1_6vectorENS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEblmdS7_NS_14adl_serializerENS3_IhNS7_IhEEEEE6createINS2_IS9_SD_NS1_4lessIS9_EENS7_INS1_4pairIKS9_SD_EEEEEEJEEEPT_DpOT0_:
18431|  1.31M|    {
18432|  1.31M|        AllocatorType<T> alloc;
18433|  1.31M|        using AllocatorTraits = std::allocator_traits<AllocatorType<T>>;
18434|       |
18435|  1.31M|        auto deleter = [&](T * obj)
18436|  1.31M|        {
18437|  1.31M|            AllocatorTraits::deallocate(alloc, obj, 1);
18438|  1.31M|        };
18439|  1.31M|        std::unique_ptr<T, decltype(deleter)> obj(AllocatorTraits::allocate(alloc, 1), deleter);
18440|  1.31M|        AllocatorTraits::construct(alloc, obj.get(), std::forward<Args>(args)...);
18441|  1.31M|        JSON_ASSERT(obj != nullptr);
  ------------------
  |  | 2372|  1.31M|    #define JSON_ASSERT(x) assert(x)
  ------------------
18442|      0|        return obj.release();
18443|  1.31M|    }
_ZN8nlohmann10basic_jsonINSt3__13mapENS1_6vectorENS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEblmdS7_NS_14adl_serializerENS3_IhNS7_IhEEEEE6createINS3_ISD_NS7_ISD_EEEEJEEEPT_DpOT0_:
18431|  4.59M|    {
18432|  4.59M|        AllocatorType<T> alloc;
18433|  4.59M|        using AllocatorTraits = std::allocator_traits<AllocatorType<T>>;
18434|       |
18435|  4.59M|        auto deleter = [&](T * obj)
18436|  4.59M|        {
18437|  4.59M|            AllocatorTraits::deallocate(alloc, obj, 1);
18438|  4.59M|        };
18439|  4.59M|        std::unique_ptr<T, decltype(deleter)> obj(AllocatorTraits::allocate(alloc, 1), deleter);
18440|  4.59M|        AllocatorTraits::construct(alloc, obj.get(), std::forward<Args>(args)...);
18441|  4.59M|        JSON_ASSERT(obj != nullptr);
  ------------------
  |  | 2372|  4.59M|    #define JSON_ASSERT(x) assert(x)
  ------------------
18442|      0|        return obj.release();
18443|  4.59M|    }
_ZN8nlohmann10basic_jsonINSt3__13mapENS1_6vectorENS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEblmdS7_NS_14adl_serializerENS3_IhNS7_IhEEEEEC2IRddLi0EEEOT_:
19074|  11.0k|    {
19075|  11.0k|        JSONSerializer<U>::to_json(*this, std::forward<CompatibleType>(val));
19076|  11.0k|        set_parents();
19077|  11.0k|        assert_invariant();
19078|  11.0k|    }
_ZN8nlohmann14adl_serializerIdvE7to_jsonINS_10basic_jsonINSt3__13mapENS4_6vectorENS4_12basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEblmdSA_S0_NS6_IhNSA_IhEEEEEERdEEDTcmclL_ZNS_12_GLOBAL__N_17to_jsonEEfp_clsr3stdE7forwardIT0_Efp0_EEcvv_EERT_OSI_:
 5096|  11.0k|    {
 5097|  11.0k|        ::nlohmann::to_json(j, std::forward<TargetType>(val));
 5098|  11.0k|    }
_ZNK8nlohmann6detail10to_json_fnclINS_10basic_jsonINSt3__13mapENS4_6vectorENS4_12basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEblmdSA_NS_14adl_serializerENS6_IhNSA_IhEEEEEERdEEDTcmcl7to_jsonfp_clsr3stdE7forwardIT0_Efp0_EEcvv_EERT_OSI_:
 5018|  11.0k|    {
 5019|  11.0k|        return to_json(j, std::forward<T>(val));
 5020|  11.0k|    }
_ZN8nlohmann10basic_jsonINSt3__13mapENS1_6vectorENS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEblmdS7_NS_14adl_serializerENS3_IhNS7_IhEEEEE5parseIPKcEESD_T_SH_NS1_8functionIFbiNS_6detail13parse_event_tERSD_EEEbb:
24441|  1.57k|    {
24442|  1.57k|        basic_json result;
24443|  1.57k|        parser(detail::input_adapter(std::move(first), std::move(last)), cb, allow_exceptions, ignore_comments).parse(true, result);
24444|  1.57k|        return result;
24445|  1.57k|    }
_ZN8nlohmann10basic_jsonINSt3__13mapENS1_6vectorENS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEblmdS7_NS_14adl_serializerENS3_IhNS7_IhEEEEE6parserINS_6detail22iterator_input_adapterIPKcEEEENSF_6parserISD_T_EESL_NS1_8functionIFbiNSF_13parse_event_tERSD_EEEbb:
17712|  1.57k|    {
17713|  1.57k|        return ::nlohmann::detail::parser<basic_json, InputAdapterType>(std::move(adapter),
17714|  1.57k|                std::move(cb), allow_exceptions, ignore_comments);
17715|  1.57k|    }
_ZN8nlohmann6detail6parserINS_10basic_jsonINSt3__13mapENS3_6vectorENS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEblmdS9_NS_14adl_serializerENS5_IhNS9_IhEEEEEENS0_22iterator_input_adapterIPKcEEEC2EOSJ_NS3_8functionIFbiNS0_13parse_event_tERSF_EEEbb:
10995|  1.57k|    {
10996|       |        // read first token
10997|  1.57k|        get_token();
10998|  1.57k|    }
_ZN8nlohmann6detail5lexerINS_10basic_jsonINSt3__13mapENS3_6vectorENS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEblmdS9_NS_14adl_serializerENS5_IhNS9_IhEEEEEENS0_22iterator_input_adapterIPKcEEEC2EOSJ_b:
 6747|  1.57k|    {}
_ZN8nlohmann6detail5lexerINS_10basic_jsonINSt3__13mapENS3_6vectorENS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEblmdS9_NS_14adl_serializerENS5_IhNS9_IhEEEEEENS0_22iterator_input_adapterIPKcEEE17get_decimal_pointEv:
 6764|  1.57k|    {
 6765|  1.57k|        const auto* loc = localeconv();
 6766|  1.57k|        JSON_ASSERT(loc != nullptr);
  ------------------
  |  | 2372|  1.57k|    #define JSON_ASSERT(x) assert(x)
  ------------------
 6767|  1.57k|        return (loc->decimal_point == nullptr) ? '.' : *(loc->decimal_point);
  ------------------
  |  Branch (6767:16): [True: 0, False: 1.57k]
  ------------------
 6768|  1.57k|    }
_ZN8nlohmann6detail6parserINS_10basic_jsonINSt3__13mapENS3_6vectorENS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEblmdS9_NS_14adl_serializerENS5_IhNS9_IhEEEEEENS0_22iterator_input_adapterIPKcEEE9get_tokenEv:
11379|  18.8M|    {
11380|  18.8M|        return last_token = m_lexer.scan();
11381|  18.8M|    }
_ZN8nlohmann6detail5lexerINS_10basic_jsonINSt3__13mapENS3_6vectorENS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEblmdS9_NS_14adl_serializerENS5_IhNS9_IhEEEEEENS0_22iterator_input_adapterIPKcEEE4scanEv:
 8130|  18.8M|    {
 8131|       |        // initially, skip the BOM
 8132|  18.8M|        if (position.chars_read_total == 0 && !skip_bom())
  ------------------
  |  Branch (8132:13): [True: 1.57k, False: 18.8M]
  |  Branch (8132:47): [True: 0, False: 1.57k]
  ------------------
 8133|      0|        {
 8134|      0|            error_message = "invalid BOM; must be 0xEF 0xBB 0xBF if given";
 8135|      0|            return token_type::parse_error;
 8136|      0|        }
 8137|       |
 8138|       |        // read next character and ignore whitespace
 8139|  18.8M|        skip_whitespace();
 8140|       |
 8141|       |        // ignore comments
 8142|  18.8M|        while (ignore_comments && current == '/')
  ------------------
  |  Branch (8142:16): [True: 0, False: 18.8M]
  |  Branch (8142:35): [True: 0, False: 0]
  ------------------
 8143|      0|        {
 8144|      0|            if (!scan_comment())
  ------------------
  |  Branch (8144:17): [True: 0, False: 0]
  ------------------
 8145|      0|            {
 8146|      0|                return token_type::parse_error;
 8147|      0|            }
 8148|       |
 8149|       |            // skip following whitespace
 8150|      0|            skip_whitespace();
 8151|      0|        }
 8152|       |
 8153|  18.8M|        switch (current)
 8154|  18.8M|        {
 8155|       |            // structural characters
 8156|  4.59M|            case '[':
  ------------------
  |  Branch (8156:13): [True: 4.59M, False: 14.2M]
  ------------------
 8157|  4.59M|                return token_type::begin_array;
 8158|   100k|            case ']':
  ------------------
  |  Branch (8158:13): [True: 100k, False: 18.7M]
  ------------------
 8159|   100k|                return token_type::end_array;
 8160|  1.31M|            case '{':
  ------------------
  |  Branch (8160:13): [True: 1.31M, False: 17.5M]
  ------------------
 8161|  1.31M|                return token_type::begin_object;
 8162|  1.12M|            case '}':
  ------------------
  |  Branch (8162:13): [True: 1.12M, False: 17.7M]
  ------------------
 8163|  1.12M|                return token_type::end_object;
 8164|   485k|            case ':':
  ------------------
  |  Branch (8164:13): [True: 485k, False: 18.3M]
  ------------------
 8165|   485k|                return token_type::name_separator;
 8166|  5.85M|            case ',':
  ------------------
  |  Branch (8166:13): [True: 5.85M, False: 13.0M]
  ------------------
 8167|  5.85M|                return token_type::value_separator;
 8168|       |
 8169|       |            // literals
 8170|  2.27k|            case 't':
  ------------------
  |  Branch (8170:13): [True: 2.27k, False: 18.8M]
  ------------------
 8171|  2.27k|            {
 8172|  2.27k|                std::array<char_type, 4> true_literal = {{char_type('t'), char_type('r'), char_type('u'), char_type('e')}};
 8173|  2.27k|                return scan_literal(true_literal.data(), true_literal.size(), token_type::literal_true);
 8174|      0|            }
 8175|      1|            case 'f':
  ------------------
  |  Branch (8175:13): [True: 1, False: 18.8M]
  ------------------
 8176|      1|            {
 8177|      1|                std::array<char_type, 5> false_literal = {{char_type('f'), char_type('a'), char_type('l'), char_type('s'), char_type('e')}};
 8178|      1|                return scan_literal(false_literal.data(), false_literal.size(), token_type::literal_false);
 8179|      0|            }
 8180|    492|            case 'n':
  ------------------
  |  Branch (8180:13): [True: 492, False: 18.8M]
  ------------------
 8181|    492|            {
 8182|    492|                std::array<char_type, 4> null_literal = {{char_type('n'), char_type('u'), char_type('l'), char_type('l')}};
 8183|    492|                return scan_literal(null_literal.data(), null_literal.size(), token_type::literal_null);
 8184|      0|            }
 8185|       |
 8186|       |            // string
 8187|   660k|            case '\"':
  ------------------
  |  Branch (8187:13): [True: 660k, False: 18.2M]
  ------------------
 8188|   660k|                return scan_string();
 8189|       |
 8190|       |            // number
 8191|  5.71k|            case '-':
  ------------------
  |  Branch (8191:13): [True: 5.71k, False: 18.8M]
  ------------------
 8192|   730k|            case '0':
  ------------------
  |  Branch (8192:13): [True: 724k, False: 18.1M]
  ------------------
 8193|   894k|            case '1':
  ------------------
  |  Branch (8193:13): [True: 164k, False: 18.7M]
  ------------------
 8194|  1.33M|            case '2':
  ------------------
  |  Branch (8194:13): [True: 440k, False: 18.4M]
  ------------------
 8195|  1.57M|            case '3':
  ------------------
  |  Branch (8195:13): [True: 240k, False: 18.6M]
  ------------------
 8196|  1.57M|            case '4':
  ------------------
  |  Branch (8196:13): [True: 3.48k, False: 18.8M]
  ------------------
 8197|  1.61M|            case '5':
  ------------------
  |  Branch (8197:13): [True: 39.9k, False: 18.8M]
  ------------------
 8198|  2.37M|            case '6':
  ------------------
  |  Branch (8198:13): [True: 760k, False: 18.1M]
  ------------------
 8199|  2.45M|            case '7':
  ------------------
  |  Branch (8199:13): [True: 72.2k, False: 18.8M]
  ------------------
 8200|  4.25M|            case '8':
  ------------------
  |  Branch (8200:13): [True: 1.80M, False: 17.0M]
  ------------------
 8201|  4.73M|            case '9':
  ------------------
  |  Branch (8201:13): [True: 484k, False: 18.3M]
  ------------------
 8202|  4.73M|                return scan_number();
 8203|       |
 8204|       |            // end of input (the null byte is needed when parsing from
 8205|       |            // string literals)
 8206|     38|            case '\0':
  ------------------
  |  Branch (8206:13): [True: 38, False: 18.8M]
  ------------------
 8207|  1.44k|            case std::char_traits<char_type>::eof():
  ------------------
  |  Branch (8207:13): [True: 1.40k, False: 18.8M]
  ------------------
 8208|  1.44k|                return token_type::end_of_input;
 8209|       |
 8210|       |            // error
 8211|     72|            default:
  ------------------
  |  Branch (8211:13): [True: 72, False: 18.8M]
  ------------------
 8212|     72|                error_message = "invalid literal";
 8213|     72|                return token_type::parse_error;
 8214|  18.8M|        }
 8215|  18.8M|    }
_ZN8nlohmann6detail5lexerINS_10basic_jsonINSt3__13mapENS3_6vectorENS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEblmdS9_NS_14adl_serializerENS5_IhNS9_IhEEEEEENS0_22iterator_input_adapterIPKcEEE8skip_bomEv:
 8107|  1.57k|    {
 8108|  1.57k|        if (get() == 0xEF)
  ------------------
  |  Branch (8108:13): [True: 0, False: 1.57k]
  ------------------
 8109|      0|        {
 8110|       |            // check if we completely parse the BOM
 8111|      0|            return get() == 0xBB && get() == 0xBF;
  ------------------
  |  Branch (8111:20): [True: 0, False: 0]
  |  Branch (8111:37): [True: 0, False: 0]
  ------------------
 8112|      0|        }
 8113|       |
 8114|       |        // the first character is not the beginning of the BOM; unget it to
 8115|       |        // process is later
 8116|  1.57k|        unget();
 8117|  1.57k|        return true;
 8118|  1.57k|    }
_ZN8nlohmann6detail5lexerINS_10basic_jsonINSt3__13mapENS3_6vectorENS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEblmdS9_NS_14adl_serializerENS5_IhNS9_IhEEEEEENS0_22iterator_input_adapterIPKcEEE3getEv:
 7958|  95.1M|    {
 7959|  95.1M|        ++position.chars_read_total;
 7960|  95.1M|        ++position.chars_read_current_line;
 7961|       |
 7962|  95.1M|        if (next_unget)
  ------------------
  |  Branch (7962:13): [True: 4.73M, False: 90.4M]
  ------------------
 7963|  4.73M|        {
 7964|       |            // just reset the next_unget variable and work with current
 7965|  4.73M|            next_unget = false;
 7966|  4.73M|        }
 7967|  90.4M|        else
 7968|  90.4M|        {
 7969|  90.4M|            current = ia.get_character();
 7970|  90.4M|        }
 7971|       |
 7972|  95.1M|        if (JSON_HEDLEY_LIKELY(current != std::char_traits<char_type>::eof()))
  ------------------
  |  | 1528|  95.1M|#  define JSON_HEDLEY_LIKELY(expr)                      __builtin_expect                 (!!(expr),    1                  )
  |  |  ------------------
  |  |  |  Branch (1528:57): [True: 95.1M, False: 1.42k]
  |  |  ------------------
  ------------------
 7973|  95.1M|        {
 7974|  95.1M|            token_string.push_back(std::char_traits<char_type>::to_char_type(current));
 7975|  95.1M|        }
 7976|       |
 7977|  95.1M|        if (current == '\n')
  ------------------
  |  Branch (7977:13): [True: 1.06M, False: 94.1M]
  ------------------
 7978|  1.06M|        {
 7979|  1.06M|            ++position.lines_read;
 7980|  1.06M|            position.chars_read_current_line = 0;
 7981|  1.06M|        }
 7982|       |
 7983|  95.1M|        return current;
 7984|  95.1M|    }
_ZN8nlohmann6detail22iterator_input_adapterIPKcE13get_characterEv:
 5564|  90.4M|    {
 5565|  90.4M|        if (JSON_HEDLEY_LIKELY(current != end))
  ------------------
  |  | 1528|  90.4M|#  define JSON_HEDLEY_LIKELY(expr)                      __builtin_expect                 (!!(expr),    1                  )
  |  |  ------------------
  |  |  |  Branch (1528:57): [True: 90.4M, False: 1.41k]
  |  |  ------------------
  ------------------
 5566|  90.4M|        {
 5567|  90.4M|            auto result = std::char_traits<char_type>::to_int_type(*current);
 5568|  90.4M|            std::advance(current, 1);
 5569|  90.4M|            return result;
 5570|  90.4M|        }
 5571|       |
 5572|  1.41k|        return std::char_traits<char_type>::eof();
 5573|  90.4M|    }
_ZN8nlohmann6detail5lexerINS_10basic_jsonINSt3__13mapENS3_6vectorENS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEblmdS9_NS_14adl_serializerENS5_IhNS9_IhEEEEEENS0_22iterator_input_adapterIPKcEEE5ungetEv:
 7995|  4.73M|    {
 7996|  4.73M|        next_unget = true;
 7997|       |
 7998|  4.73M|        --position.chars_read_total;
 7999|       |
 8000|       |        // in case we "unget" a newline, we have to also decrement the lines_read
 8001|  4.73M|        if (position.chars_read_current_line == 0)
  ------------------
  |  Branch (8001:13): [True: 520k, False: 4.21M]
  ------------------
 8002|   520k|        {
 8003|   520k|            if (position.lines_read > 0)
  ------------------
  |  Branch (8003:17): [True: 520k, False: 0]
  ------------------
 8004|   520k|            {
 8005|   520k|                --position.lines_read;
 8006|   520k|            }
 8007|   520k|        }
 8008|  4.21M|        else
 8009|  4.21M|        {
 8010|  4.21M|            --position.chars_read_current_line;
 8011|  4.21M|        }
 8012|       |
 8013|  4.73M|        if (JSON_HEDLEY_LIKELY(current != std::char_traits<char_type>::eof()))
  ------------------
  |  | 1528|  4.73M|#  define JSON_HEDLEY_LIKELY(expr)                      __builtin_expect                 (!!(expr),    1                  )
  |  |  ------------------
  |  |  |  Branch (1528:57): [True: 4.73M, False: 6]
  |  |  ------------------
  ------------------
 8014|  4.73M|        {
 8015|  4.73M|            JSON_ASSERT(!token_string.empty());
  ------------------
  |  | 2372|  4.73M|    #define JSON_ASSERT(x) assert(x)
  ------------------
 8016|      0|            token_string.pop_back();
 8017|  4.73M|        }
 8018|  4.73M|    }
_ZN8nlohmann6detail5lexerINS_10basic_jsonINSt3__13mapENS3_6vectorENS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEblmdS9_NS_14adl_serializerENS5_IhNS9_IhEEEEEENS0_22iterator_input_adapterIPKcEEE15skip_whitespaceEv:
 8121|  18.8M|    {
 8122|  18.8M|        do
 8123|  19.5M|        {
 8124|  19.5M|            get();
 8125|  19.5M|        }
 8126|  19.5M|        while (current == ' ' || current == '\t' || current == '\n' || current == '\r');
  ------------------
  |  Branch (8126:16): [True: 280, False: 19.5M]
  |  Branch (8126:34): [True: 3.58k, False: 19.5M]
  |  Branch (8126:53): [True: 541k, False: 18.9M]
  |  Branch (8126:72): [True: 94.7k, False: 18.8M]
  ------------------
 8127|  18.8M|    }
_ZN8nlohmann6detail5lexerINS_10basic_jsonINSt3__13mapENS3_6vectorENS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEblmdS9_NS_14adl_serializerENS5_IhNS9_IhEEEEEENS0_22iterator_input_adapterIPKcEEE12scan_literalESI_mNS0_10lexer_baseISF_E10token_typeE:
 7922|  2.76k|    {
 7923|  2.76k|        JSON_ASSERT(std::char_traits<char_type>::to_char_type(current) == literal_text[0]);
  ------------------
  |  | 2372|  2.76k|    #define JSON_ASSERT(x) assert(x)
  ------------------
 7924|  11.0k|        for (std::size_t i = 1; i < length; ++i)
  ------------------
  |  Branch (7924:33): [True: 8.28k, False: 2.75k]
  ------------------
 7925|  8.28k|        {
 7926|  8.28k|            if (JSON_HEDLEY_UNLIKELY(std::char_traits<char_type>::to_char_type(get()) != literal_text[i]))
  ------------------
  |  | 1529|  8.28k|#  define JSON_HEDLEY_UNLIKELY(expr)                    __builtin_expect                 (!!(expr),    0                  )
  |  |  ------------------
  |  |  |  Branch (1529:57): [True: 6, False: 8.27k]
  |  |  ------------------
  ------------------
 7927|      6|            {
 7928|      6|                error_message = "invalid literal";
 7929|      6|                return token_type::parse_error;
 7930|      6|            }
 7931|  8.28k|        }
 7932|  2.75k|        return return_type;
 7933|  2.76k|    }
_ZN8nlohmann6detail5lexerINS_10basic_jsonINSt3__13mapENS3_6vectorENS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEblmdS9_NS_14adl_serializerENS5_IhNS9_IhEEEEEENS0_22iterator_input_adapterIPKcEEE11scan_stringEv:
 6875|   660k|    {
 6876|       |        // reset token_buffer (ignore opening quote)
 6877|   660k|        reset();
 6878|       |
 6879|       |        // we entered the function by reading an open quote
 6880|   660k|        JSON_ASSERT(current == '\"');
  ------------------
  |  | 2372|   660k|    #define JSON_ASSERT(x) assert(x)
  ------------------
 6881|       |
 6882|  70.5M|        while (true)
  ------------------
  |  Branch (6882:16): [Folded - Ignored]
  ------------------
 6883|  70.5M|        {
 6884|       |            // get next character
 6885|  70.5M|            switch (get())
 6886|  70.5M|            {
 6887|       |                // end of file while parsing string
 6888|     11|                case std::char_traits<char_type>::eof():
  ------------------
  |  Branch (6888:17): [True: 11, False: 70.5M]
  ------------------
 6889|     11|                {
 6890|     11|                    error_message = "invalid string: missing closing quote";
 6891|     11|                    return token_type::parse_error;
 6892|      0|                }
 6893|       |
 6894|       |                // closing quote
 6895|   660k|                case '\"':
  ------------------
  |  Branch (6895:17): [True: 660k, False: 69.8M]
  ------------------
 6896|   660k|                {
 6897|   660k|                    return token_type::value_string;
 6898|      0|                }
 6899|       |
 6900|       |                // escapes
 6901|  4.12k|                case '\\':
  ------------------
  |  Branch (6901:17): [True: 4.12k, False: 70.5M]
  ------------------
 6902|  4.12k|                {
 6903|  4.12k|                    switch (get())
 6904|  4.12k|                    {
 6905|       |                        // quotation mark
 6906|    159|                        case '\"':
  ------------------
  |  Branch (6906:25): [True: 159, False: 3.96k]
  ------------------
 6907|    159|                            add('\"');
 6908|    159|                            break;
 6909|       |                        // reverse solidus
 6910|     89|                        case '\\':
  ------------------
  |  Branch (6910:25): [True: 89, False: 4.03k]
  ------------------
 6911|     89|                            add('\\');
 6912|     89|                            break;
 6913|       |                        // solidus
 6914|     58|                        case '/':
  ------------------
  |  Branch (6914:25): [True: 58, False: 4.07k]
  ------------------
 6915|     58|                            add('/');
 6916|     58|                            break;
 6917|       |                        // backspace
 6918|     19|                        case 'b':
  ------------------
  |  Branch (6918:25): [True: 19, False: 4.10k]
  ------------------
 6919|     19|                            add('\b');
 6920|     19|                            break;
 6921|       |                        // form feed
 6922|      0|                        case 'f':
  ------------------
  |  Branch (6922:25): [True: 0, False: 4.12k]
  ------------------
 6923|      0|                            add('\f');
 6924|      0|                            break;
 6925|       |                        // line feed
 6926|     26|                        case 'n':
  ------------------
  |  Branch (6926:25): [True: 26, False: 4.10k]
  ------------------
 6927|     26|                            add('\n');
 6928|     26|                            break;
 6929|       |                        // carriage return
 6930|     17|                        case 'r':
  ------------------
  |  Branch (6930:25): [True: 17, False: 4.11k]
  ------------------
 6931|     17|                            add('\r');
 6932|     17|                            break;
 6933|       |                        // tab
 6934|     25|                        case 't':
  ------------------
  |  Branch (6934:25): [True: 25, False: 4.10k]
  ------------------
 6935|     25|                            add('\t');
 6936|     25|                            break;
 6937|       |
 6938|       |                        // unicode escapes
 6939|  3.73k|                        case 'u':
  ------------------
  |  Branch (6939:25): [True: 3.73k, False: 394]
  ------------------
 6940|  3.73k|                        {
 6941|  3.73k|                            const int codepoint1 = get_codepoint();
 6942|  3.73k|                            int codepoint = codepoint1; // start with codepoint1
 6943|       |
 6944|  3.73k|                            if (JSON_HEDLEY_UNLIKELY(codepoint1 == -1))
  ------------------
  |  | 1529|  3.73k|#  define JSON_HEDLEY_UNLIKELY(expr)                    __builtin_expect                 (!!(expr),    0                  )
  |  |  ------------------
  |  |  |  Branch (1529:57): [True: 0, False: 3.73k]
  |  |  ------------------
  ------------------
 6945|      0|                            {
 6946|      0|                                error_message = "invalid string: '\\u' must be followed by 4 hex digits";
 6947|      0|                                return token_type::parse_error;
 6948|      0|                            }
 6949|       |
 6950|       |                            // check if code point is a high surrogate
 6951|  3.73k|                            if (0xD800 <= codepoint1 && codepoint1 <= 0xDBFF)
  ------------------
  |  Branch (6951:33): [True: 133, False: 3.60k]
  |  Branch (6951:57): [True: 133, False: 0]
  ------------------
 6952|    133|                            {
 6953|       |                                // expect next \uxxxx entry
 6954|    133|                                if (JSON_HEDLEY_LIKELY(get() == '\\' && get() == 'u'))
  ------------------
  |  | 1528|    266|#  define JSON_HEDLEY_LIKELY(expr)                      __builtin_expect                 (!!(expr),    1                  )
  |  |  ------------------
  |  |  |  Branch (1528:57): [True: 133, False: 0]
  |  |  |  Branch (1528:94): [True: 133, False: 0]
  |  |  |  Branch (1528:94): [True: 133, False: 0]
  |  |  ------------------
  ------------------
 6955|    133|                                {
 6956|    133|                                    const int codepoint2 = get_codepoint();
 6957|       |
 6958|    133|                                    if (JSON_HEDLEY_UNLIKELY(codepoint2 == -1))
  ------------------
  |  | 1529|    133|#  define JSON_HEDLEY_UNLIKELY(expr)                    __builtin_expect                 (!!(expr),    0                  )
  |  |  ------------------
  |  |  |  Branch (1529:57): [True: 0, False: 133]
  |  |  ------------------
  ------------------
 6959|      0|                                    {
 6960|      0|                                        error_message = "invalid string: '\\u' must be followed by 4 hex digits";
 6961|      0|                                        return token_type::parse_error;
 6962|      0|                                    }
 6963|       |
 6964|       |                                    // check if codepoint2 is a low surrogate
 6965|    133|                                    if (JSON_HEDLEY_LIKELY(0xDC00 <= codepoint2 && codepoint2 <= 0xDFFF))
  ------------------
  |  | 1528|    266|#  define JSON_HEDLEY_LIKELY(expr)                      __builtin_expect                 (!!(expr),    1                  )
  |  |  ------------------
  |  |  |  Branch (1528:57): [True: 133, False: 0]
  |  |  |  Branch (1528:94): [True: 133, False: 0]
  |  |  |  Branch (1528:94): [True: 133, False: 0]
  |  |  ------------------
  ------------------
 6966|    133|                                    {
 6967|       |                                        // overwrite codepoint
 6968|    133|                                        codepoint = static_cast<int>(
 6969|       |                                                        // high surrogate occupies the most significant 22 bits
 6970|    133|                                                        (static_cast<unsigned int>(codepoint1) << 10u)
 6971|       |                                                        // low surrogate occupies the least significant 15 bits
 6972|    133|                                                        + static_cast<unsigned int>(codepoint2)
 6973|       |                                                        // there is still the 0xD800, 0xDC00 and 0x10000 noise
 6974|       |                                                        // in the result so we have to subtract with:
 6975|       |                                                        // (0xD800 << 10) + DC00 - 0x10000 = 0x35FDC00
 6976|    133|                                                        - 0x35FDC00u);
 6977|    133|                                    }
 6978|      0|                                    else
 6979|      0|                                    {
 6980|      0|                                        error_message = "invalid string: surrogate U+D800..U+DBFF must be followed by U+DC00..U+DFFF";
 6981|      0|                                        return token_type::parse_error;
 6982|      0|                                    }
 6983|    133|                                }
 6984|      0|                                else
 6985|      0|                                {
 6986|      0|                                    error_message = "invalid string: surrogate U+D800..U+DBFF must be followed by U+DC00..U+DFFF";
 6987|      0|                                    return token_type::parse_error;
 6988|      0|                                }
 6989|    133|                            }
 6990|  3.60k|                            else
 6991|  3.60k|                            {
 6992|  3.60k|                                if (JSON_HEDLEY_UNLIKELY(0xDC00 <= codepoint1 && codepoint1 <= 0xDFFF))
  ------------------
  |  | 1529|  3.60k|#  define JSON_HEDLEY_UNLIKELY(expr)                    __builtin_expect                 (!!(expr),    0                  )
  |  |  ------------------
  |  |  |  Branch (1529:57): [True: 0, False: 3.60k]
  |  |  |  Branch (1529:94): [True: 0, False: 3.60k]
  |  |  |  Branch (1529:94): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 6993|      0|                                {
 6994|      0|                                    error_message = "invalid string: surrogate U+DC00..U+DFFF must follow U+D800..U+DBFF";
 6995|      0|                                    return token_type::parse_error;
 6996|      0|                                }
 6997|  3.60k|                            }
 6998|       |
 6999|       |                            // result of the above calculation yields a proper codepoint
 7000|  3.73k|                            JSON_ASSERT(0x00 <= codepoint && codepoint <= 0x10FFFF);
  ------------------
  |  | 2372|  3.73k|    #define JSON_ASSERT(x) assert(x)
  ------------------
 7001|       |
 7002|       |                            // translate codepoint into bytes
 7003|  3.73k|                            if (codepoint < 0x80)
  ------------------
  |  Branch (7003:33): [True: 3.37k, False: 362]
  ------------------
 7004|  3.37k|                            {
 7005|       |                                // 1-byte characters: 0xxxxxxx (ASCII)
 7006|  3.37k|                                add(static_cast<char_int_type>(codepoint));
 7007|  3.37k|                            }
 7008|    362|                            else if (codepoint <= 0x7FF)
  ------------------
  |  Branch (7008:38): [True: 40, False: 322]
  ------------------
 7009|     40|                            {
 7010|       |                                // 2-byte characters: 110xxxxx 10xxxxxx
 7011|     40|                                add(static_cast<char_int_type>(0xC0u | (static_cast<unsigned int>(codepoint) >> 6u)));
 7012|     40|                                add(static_cast<char_int_type>(0x80u | (static_cast<unsigned int>(codepoint) & 0x3Fu)));
 7013|     40|                            }
 7014|    322|                            else if (codepoint <= 0xFFFF)
  ------------------
  |  Branch (7014:38): [True: 189, False: 133]
  ------------------
 7015|    189|                            {
 7016|       |                                // 3-byte characters: 1110xxxx 10xxxxxx 10xxxxxx
 7017|    189|                                add(static_cast<char_int_type>(0xE0u | (static_cast<unsigned int>(codepoint) >> 12u)));
 7018|    189|                                add(static_cast<char_int_type>(0x80u | ((static_cast<unsigned int>(codepoint) >> 6u) & 0x3Fu)));
 7019|    189|                                add(static_cast<char_int_type>(0x80u | (static_cast<unsigned int>(codepoint) & 0x3Fu)));
 7020|    189|                            }
 7021|    133|                            else
 7022|    133|                            {
 7023|       |                                // 4-byte characters: 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx
 7024|    133|                                add(static_cast<char_int_type>(0xF0u | (static_cast<unsigned int>(codepoint) >> 18u)));
 7025|    133|                                add(static_cast<char_int_type>(0x80u | ((static_cast<unsigned int>(codepoint) >> 12u) & 0x3Fu)));
 7026|    133|                                add(static_cast<char_int_type>(0x80u | ((static_cast<unsigned int>(codepoint) >> 6u) & 0x3Fu)));
 7027|    133|                                add(static_cast<char_int_type>(0x80u | (static_cast<unsigned int>(codepoint) & 0x3Fu)));
 7028|    133|                            }
 7029|       |
 7030|  3.73k|                            break;
 7031|  3.73k|                        }
 7032|       |
 7033|       |                        // other characters after escape
 7034|      1|                        default:
  ------------------
  |  Branch (7034:25): [True: 1, False: 4.12k]
  ------------------
 7035|      1|                            error_message = "invalid string: forbidden character after backslash";
 7036|      1|                            return token_type::parse_error;
 7037|  4.12k|                    }
 7038|       |
 7039|  4.12k|                    break;
 7040|  4.12k|                }
 7041|       |
 7042|       |                // invalid control characters
 7043|  4.12k|                case 0x00:
  ------------------
  |  Branch (7043:17): [True: 2, False: 70.5M]
  ------------------
 7044|      2|                {
 7045|      2|                    error_message = "invalid string: control character U+0000 (NUL) must be escaped to \\u0000";
 7046|      2|                    return token_type::parse_error;
 7047|  4.12k|                }
 7048|       |
 7049|      0|                case 0x01:
  ------------------
  |  Branch (7049:17): [True: 0, False: 70.5M]
  ------------------
 7050|      0|                {
 7051|      0|                    error_message = "invalid string: control character U+0001 (SOH) must be escaped to \\u0001";
 7052|      0|                    return token_type::parse_error;
 7053|  4.12k|                }
 7054|       |
 7055|      0|                case 0x02:
  ------------------
  |  Branch (7055:17): [True: 0, False: 70.5M]
  ------------------
 7056|      0|                {
 7057|      0|                    error_message = "invalid string: control character U+0002 (STX) must be escaped to \\u0002";
 7058|      0|                    return token_type::parse_error;
 7059|  4.12k|                }
 7060|       |
 7061|      0|                case 0x03:
  ------------------
  |  Branch (7061:17): [True: 0, False: 70.5M]
  ------------------
 7062|      0|                {
 7063|      0|                    error_message = "invalid string: control character U+0003 (ETX) must be escaped to \\u0003";
 7064|      0|                    return token_type::parse_error;
 7065|  4.12k|                }
 7066|       |
 7067|      0|                case 0x04:
  ------------------
  |  Branch (7067:17): [True: 0, False: 70.5M]
  ------------------
 7068|      0|                {
 7069|      0|                    error_message = "invalid string: control character U+0004 (EOT) must be escaped to \\u0004";
 7070|      0|                    return token_type::parse_error;
 7071|  4.12k|                }
 7072|       |
 7073|      0|                case 0x05:
  ------------------
  |  Branch (7073:17): [True: 0, False: 70.5M]
  ------------------
 7074|      0|                {
 7075|      0|                    error_message = "invalid string: control character U+0005 (ENQ) must be escaped to \\u0005";
 7076|      0|                    return token_type::parse_error;
 7077|  4.12k|                }
 7078|       |
 7079|      0|                case 0x06:
  ------------------
  |  Branch (7079:17): [True: 0, False: 70.5M]
  ------------------
 7080|      0|                {
 7081|      0|                    error_message = "invalid string: control character U+0006 (ACK) must be escaped to \\u0006";
 7082|      0|                    return token_type::parse_error;
 7083|  4.12k|                }
 7084|       |
 7085|      0|                case 0x07:
  ------------------
  |  Branch (7085:17): [True: 0, False: 70.5M]
  ------------------
 7086|      0|                {
 7087|      0|                    error_message = "invalid string: control character U+0007 (BEL) must be escaped to \\u0007";
 7088|      0|                    return token_type::parse_error;
 7089|  4.12k|                }
 7090|       |
 7091|      0|                case 0x08:
  ------------------
  |  Branch (7091:17): [True: 0, False: 70.5M]
  ------------------
 7092|      0|                {
 7093|      0|                    error_message = "invalid string: control character U+0008 (BS) must be escaped to \\u0008 or \\b";
 7094|      0|                    return token_type::parse_error;
 7095|  4.12k|                }
 7096|       |
 7097|      0|                case 0x09:
  ------------------
  |  Branch (7097:17): [True: 0, False: 70.5M]
  ------------------
 7098|      0|                {
 7099|      0|                    error_message = "invalid string: control character U+0009 (HT) must be escaped to \\u0009 or \\t";
 7100|      0|                    return token_type::parse_error;
 7101|  4.12k|                }
 7102|       |
 7103|      0|                case 0x0A:
  ------------------
  |  Branch (7103:17): [True: 0, False: 70.5M]
  ------------------
 7104|      0|                {
 7105|      0|                    error_message = "invalid string: control character U+000A (LF) must be escaped to \\u000A or \\n";
 7106|      0|                    return token_type::parse_error;
 7107|  4.12k|                }
 7108|       |
 7109|      0|                case 0x0B:
  ------------------
  |  Branch (7109:17): [True: 0, False: 70.5M]
  ------------------
 7110|      0|                {
 7111|      0|                    error_message = "invalid string: control character U+000B (VT) must be escaped to \\u000B";
 7112|      0|                    return token_type::parse_error;
 7113|  4.12k|                }
 7114|       |
 7115|      0|                case 0x0C:
  ------------------
  |  Branch (7115:17): [True: 0, False: 70.5M]
  ------------------
 7116|      0|                {
 7117|      0|                    error_message = "invalid string: control character U+000C (FF) must be escaped to \\u000C or \\f";
 7118|      0|                    return token_type::parse_error;
 7119|  4.12k|                }
 7120|       |
 7121|      0|                case 0x0D:
  ------------------
  |  Branch (7121:17): [True: 0, False: 70.5M]
  ------------------
 7122|      0|                {
 7123|      0|                    error_message = "invalid string: control character U+000D (CR) must be escaped to \\u000D or \\r";
 7124|      0|                    return token_type::parse_error;
 7125|  4.12k|                }
 7126|       |
 7127|      1|                case 0x0E:
  ------------------
  |  Branch (7127:17): [True: 1, False: 70.5M]
  ------------------
 7128|      1|                {
 7129|      1|                    error_message = "invalid string: control character U+000E (SO) must be escaped to \\u000E";
 7130|      1|                    return token_type::parse_error;
 7131|  4.12k|                }
 7132|       |
 7133|      0|                case 0x0F:
  ------------------
  |  Branch (7133:17): [True: 0, False: 70.5M]
  ------------------
 7134|      0|                {
 7135|      0|                    error_message = "invalid string: control character U+000F (SI) must be escaped to \\u000F";
 7136|      0|                    return token_type::parse_error;
 7137|  4.12k|                }
 7138|       |
 7139|      0|                case 0x10:
  ------------------
  |  Branch (7139:17): [True: 0, False: 70.5M]
  ------------------
 7140|      0|                {
 7141|      0|                    error_message = "invalid string: control character U+0010 (DLE) must be escaped to \\u0010";
 7142|      0|                    return token_type::parse_error;
 7143|  4.12k|                }
 7144|       |
 7145|      0|                case 0x11:
  ------------------
  |  Branch (7145:17): [True: 0, False: 70.5M]
  ------------------
 7146|      0|                {
 7147|      0|                    error_message = "invalid string: control character U+0011 (DC1) must be escaped to \\u0011";
 7148|      0|                    return token_type::parse_error;
 7149|  4.12k|                }
 7150|       |
 7151|      0|                case 0x12:
  ------------------
  |  Branch (7151:17): [True: 0, False: 70.5M]
  ------------------
 7152|      0|                {
 7153|      0|                    error_message = "invalid string: control character U+0012 (DC2) must be escaped to \\u0012";
 7154|      0|                    return token_type::parse_error;
 7155|  4.12k|                }
 7156|       |
 7157|      0|                case 0x13:
  ------------------
  |  Branch (7157:17): [True: 0, False: 70.5M]
  ------------------
 7158|      0|                {
 7159|      0|                    error_message = "invalid string: control character U+0013 (DC3) must be escaped to \\u0013";
 7160|      0|                    return token_type::parse_error;
 7161|  4.12k|                }
 7162|       |
 7163|      0|                case 0x14:
  ------------------
  |  Branch (7163:17): [True: 0, False: 70.5M]
  ------------------
 7164|      0|                {
 7165|      0|                    error_message = "invalid string: control character U+0014 (DC4) must be escaped to \\u0014";
 7166|      0|                    return token_type::parse_error;
 7167|  4.12k|                }
 7168|       |
 7169|      0|                case 0x15:
  ------------------
  |  Branch (7169:17): [True: 0, False: 70.5M]
  ------------------
 7170|      0|                {
 7171|      0|                    error_message = "invalid string: control character U+0015 (NAK) must be escaped to \\u0015";
 7172|      0|                    return token_type::parse_error;
 7173|  4.12k|                }
 7174|       |
 7175|      0|                case 0x16:
  ------------------
  |  Branch (7175:17): [True: 0, False: 70.5M]
  ------------------
 7176|      0|                {
 7177|      0|                    error_message = "invalid string: control character U+0016 (SYN) must be escaped to \\u0016";
 7178|      0|                    return token_type::parse_error;
 7179|  4.12k|                }
 7180|       |
 7181|      0|                case 0x17:
  ------------------
  |  Branch (7181:17): [True: 0, False: 70.5M]
  ------------------
 7182|      0|                {
 7183|      0|                    error_message = "invalid string: control character U+0017 (ETB) must be escaped to \\u0017";
 7184|      0|                    return token_type::parse_error;
 7185|  4.12k|                }
 7186|       |
 7187|      0|                case 0x18:
  ------------------
  |  Branch (7187:17): [True: 0, False: 70.5M]
  ------------------
 7188|      0|                {
 7189|      0|                    error_message = "invalid string: control character U+0018 (CAN) must be escaped to \\u0018";
 7190|      0|                    return token_type::parse_error;
 7191|  4.12k|                }
 7192|       |
 7193|      0|                case 0x19:
  ------------------
  |  Branch (7193:17): [True: 0, False: 70.5M]
  ------------------
 7194|      0|                {
 7195|      0|                    error_message = "invalid string: control character U+0019 (EM) must be escaped to \\u0019";
 7196|      0|                    return token_type::parse_error;
 7197|  4.12k|                }
 7198|       |
 7199|      0|                case 0x1A:
  ------------------
  |  Branch (7199:17): [True: 0, False: 70.5M]
  ------------------
 7200|      0|                {
 7201|      0|                    error_message = "invalid string: control character U+001A (SUB) must be escaped to \\u001A";
 7202|      0|                    return token_type::parse_error;
 7203|  4.12k|                }
 7204|       |
 7205|      0|                case 0x1B:
  ------------------
  |  Branch (7205:17): [True: 0, False: 70.5M]
  ------------------
 7206|      0|                {
 7207|      0|                    error_message = "invalid string: control character U+001B (ESC) must be escaped to \\u001B";
 7208|      0|                    return token_type::parse_error;
 7209|  4.12k|                }
 7210|       |
 7211|      0|                case 0x1C:
  ------------------
  |  Branch (7211:17): [True: 0, False: 70.5M]
  ------------------
 7212|      0|                {
 7213|      0|                    error_message = "invalid string: control character U+001C (FS) must be escaped to \\u001C";
 7214|      0|                    return token_type::parse_error;
 7215|  4.12k|                }
 7216|       |
 7217|      0|                case 0x1D:
  ------------------
  |  Branch (7217:17): [True: 0, False: 70.5M]
  ------------------
 7218|      0|                {
 7219|      0|                    error_message = "invalid string: control character U+001D (GS) must be escaped to \\u001D";
 7220|      0|                    return token_type::parse_error;
 7221|  4.12k|                }
 7222|       |
 7223|      0|                case 0x1E:
  ------------------
  |  Branch (7223:17): [True: 0, False: 70.5M]
  ------------------
 7224|      0|                {
 7225|      0|                    error_message = "invalid string: control character U+001E (RS) must be escaped to \\u001E";
 7226|      0|                    return token_type::parse_error;
 7227|  4.12k|                }
 7228|       |
 7229|      0|                case 0x1F:
  ------------------
  |  Branch (7229:17): [True: 0, False: 70.5M]
  ------------------
 7230|      0|                {
 7231|      0|                    error_message = "invalid string: control character U+001F (US) must be escaped to \\u001F";
 7232|      0|                    return token_type::parse_error;
 7233|  4.12k|                }
 7234|       |
 7235|       |                // U+0020..U+007F (except U+0022 (quote) and U+005C (backspace))
 7236|   108k|                case 0x20:
  ------------------
  |  Branch (7236:17): [True: 108k, False: 70.4M]
  ------------------
 7237|   344k|                case 0x21:
  ------------------
  |  Branch (7237:17): [True: 236k, False: 70.2M]
  ------------------
 7238|   626k|                case 0x23:
  ------------------
  |  Branch (7238:17): [True: 281k, False: 70.2M]
  ------------------
 7239|   669k|                case 0x24:
  ------------------
  |  Branch (7239:17): [True: 43.5k, False: 70.4M]
  ------------------
 7240|  1.83M|                case 0x25:
  ------------------
  |  Branch (7240:17): [True: 1.16M, False: 69.3M]
  ------------------
 7241|  1.87M|                case 0x26:
  ------------------
  |  Branch (7241:17): [True: 44.6k, False: 70.4M]
  ------------------
 7242|  1.90M|                case 0x27:
  ------------------
  |  Branch (7242:17): [True: 27.0k, False: 70.5M]
  ------------------
 7243|  1.92M|                case 0x28:
  ------------------
  |  Branch (7243:17): [True: 21.7k, False: 70.5M]
  ------------------
 7244|  3.48M|                case 0x29:
  ------------------
  |  Branch (7244:17): [True: 1.55M, False: 68.9M]
  ------------------
 7245|  3.50M|                case 0x2A:
  ------------------
  |  Branch (7245:17): [True: 24.1k, False: 70.5M]
  ------------------
 7246|  4.03M|                case 0x2B:
  ------------------
  |  Branch (7246:17): [True: 523k, False: 70.0M]
  ------------------
 7247|  10.3M|                case 0x2C:
  ------------------
  |  Branch (7247:17): [True: 6.27M, False: 64.2M]
  ------------------
 7248|  10.5M|                case 0x2D:
  ------------------
  |  Branch (7248:17): [True: 208k, False: 70.3M]
  ------------------
 7249|  10.5M|                case 0x2E:
  ------------------
  |  Branch (7249:17): [True: 64.3k, False: 70.4M]
  ------------------
 7250|  13.9M|                case 0x2F:
  ------------------
  |  Branch (7250:17): [True: 3.40M, False: 67.1M]
  ------------------
 7251|  15.3M|                case 0x30:
  ------------------
  |  Branch (7251:17): [True: 1.40M, False: 69.1M]
  ------------------
 7252|  15.9M|                case 0x31:
  ------------------
  |  Branch (7252:17): [True: 528k, False: 70.0M]
  ------------------
 7253|  16.9M|                case 0x32:
  ------------------
  |  Branch (7253:17): [True: 1.07M, False: 69.4M]
  ------------------
 7254|  17.5M|                case 0x33:
  ------------------
  |  Branch (7254:17): [True: 553k, False: 69.9M]
  ------------------
 7255|  18.6M|                case 0x34:
  ------------------
  |  Branch (7255:17): [True: 1.11M, False: 69.4M]
  ------------------
 7256|  18.9M|                case 0x35:
  ------------------
  |  Branch (7256:17): [True: 273k, False: 70.2M]
  ------------------
 7257|  20.1M|                case 0x36:
  ------------------
  |  Branch (7257:17): [True: 1.19M, False: 69.3M]
  ------------------
 7258|  21.4M|                case 0x37:
  ------------------
  |  Branch (7258:17): [True: 1.33M, False: 69.1M]
  ------------------
 7259|  24.7M|                case 0x38:
  ------------------
  |  Branch (7259:17): [True: 3.25M, False: 67.2M]
  ------------------
 7260|  25.3M|                case 0x39:
  ------------------
  |  Branch (7260:17): [True: 675k, False: 69.8M]
  ------------------
 7261|  25.6M|                case 0x3A:
  ------------------
  |  Branch (7261:17): [True: 212k, False: 70.3M]
  ------------------
 7262|  25.8M|                case 0x3B:
  ------------------
  |  Branch (7262:17): [True: 203k, False: 70.3M]
  ------------------
 7263|  25.8M|                case 0x3C:
  ------------------
  |  Branch (7263:17): [True: 59.5k, False: 70.4M]
  ------------------
 7264|  26.0M|                case 0x3D:
  ------------------
  |  Branch (7264:17): [True: 173k, False: 70.3M]
  ------------------
 7265|  26.0M|                case 0x3E:
  ------------------
  |  Branch (7265:17): [True: 5.71k, False: 70.5M]
  ------------------
 7266|  26.0M|                case 0x3F:
  ------------------
  |  Branch (7266:17): [True: 35.8k, False: 70.4M]
  ------------------
 7267|  26.1M|                case 0x40:
  ------------------
  |  Branch (7267:17): [True: 45.0k, False: 70.4M]
  ------------------
 7268|  29.2M|                case 0x41:
  ------------------
  |  Branch (7268:17): [True: 3.14M, False: 67.3M]
  ------------------
 7269|  29.4M|                case 0x42:
  ------------------
  |  Branch (7269:17): [True: 201k, False: 70.3M]
  ------------------
 7270|  29.5M|                case 0x43:
  ------------------
  |  Branch (7270:17): [True: 58.6k, False: 70.4M]
  ------------------
 7271|  29.7M|                case 0x44:
  ------------------
  |  Branch (7271:17): [True: 208k, False: 70.3M]
  ------------------
 7272|  30.1M|                case 0x45:
  ------------------
  |  Branch (7272:17): [True: 366k, False: 70.1M]
  ------------------
 7273|  30.1M|                case 0x46:
  ------------------
  |  Branch (7273:17): [True: 24.7k, False: 70.5M]
  ------------------
 7274|  30.1M|                case 0x47:
  ------------------
  |  Branch (7274:17): [True: 19.8k, False: 70.5M]
  ------------------
 7275|  30.1M|                case 0x48:
  ------------------
  |  Branch (7275:17): [True: 38.1k, False: 70.4M]
  ------------------
 7276|  30.3M|                case 0x49:
  ------------------
  |  Branch (7276:17): [True: 190k, False: 70.3M]
  ------------------
 7277|  30.7M|                case 0x4A:
  ------------------
  |  Branch (7277:17): [True: 395k, False: 70.1M]
  ------------------
 7278|  30.8M|                case 0x4B:
  ------------------
  |  Branch (7278:17): [True: 64.0k, False: 70.4M]
  ------------------
 7279|  30.8M|                case 0x4C:
  ------------------
  |  Branch (7279:17): [True: 54.9k, False: 70.4M]
  ------------------
 7280|  31.0M|                case 0x4D:
  ------------------
  |  Branch (7280:17): [True: 197k, False: 70.3M]
  ------------------
 7281|  31.1M|                case 0x4E:
  ------------------
  |  Branch (7281:17): [True: 98.3k, False: 70.4M]
  ------------------
 7282|  31.2M|                case 0x4F:
  ------------------
  |  Branch (7282:17): [True: 32.6k, False: 70.4M]
  ------------------
 7283|  32.4M|                case 0x50:
  ------------------
  |  Branch (7283:17): [True: 1.26M, False: 69.2M]
  ------------------
 7284|  33.0M|                case 0x51:
  ------------------
  |  Branch (7284:17): [True: 590k, False: 69.9M]
  ------------------
 7285|  33.1M|                case 0x52:
  ------------------
  |  Branch (7285:17): [True: 36.4k, False: 70.4M]
  ------------------
 7286|  33.7M|                case 0x53:
  ------------------
  |  Branch (7286:17): [True: 640k, False: 69.8M]
  ------------------
 7287|  33.7M|                case 0x54:
  ------------------
  |  Branch (7287:17): [True: 19.9k, False: 70.5M]
  ------------------
 7288|  33.8M|                case 0x55:
  ------------------
  |  Branch (7288:17): [True: 65.0k, False: 70.4M]
  ------------------
 7289|  33.8M|                case 0x56:
  ------------------
  |  Branch (7289:17): [True: 34.3k, False: 70.4M]
  ------------------
 7290|  33.9M|                case 0x57:
  ------------------
  |  Branch (7290:17): [True: 32.1k, False: 70.4M]
  ------------------
 7291|  33.9M|                case 0x58:
  ------------------
  |  Branch (7291:17): [True: 8.28k, False: 70.5M]
  ------------------
 7292|  34.3M|                case 0x59:
  ------------------
  |  Branch (7292:17): [True: 463k, False: 70.0M]
  ------------------
 7293|  34.3M|                case 0x5A:
  ------------------
  |  Branch (7293:17): [True: 12.9k, False: 70.5M]
  ------------------
 7294|  35.0M|                case 0x5B:
  ------------------
  |  Branch (7294:17): [True: 629k, False: 69.8M]
  ------------------
 7295|  35.0M|                case 0x5D:
  ------------------
  |  Branch (7295:17): [True: 41.3k, False: 70.4M]
  ------------------
 7296|  35.1M|                case 0x5E:
  ------------------
  |  Branch (7296:17): [True: 60.1k, False: 70.4M]
  ------------------
 7297|  35.1M|                case 0x5F:
  ------------------
  |  Branch (7297:17): [True: 20.6k, False: 70.5M]
  ------------------
 7298|  36.6M|                case 0x60:
  ------------------
  |  Branch (7298:17): [True: 1.54M, False: 68.9M]
  ------------------
 7299|  43.7M|                case 0x61:
  ------------------
  |  Branch (7299:17): [True: 7.02M, False: 63.5M]
  ------------------
 7300|  44.2M|                case 0x62:
  ------------------
  |  Branch (7300:17): [True: 502k, False: 70.0M]
  ------------------
 7301|  45.2M|                case 0x63:
  ------------------
  |  Branch (7301:17): [True: 1.03M, False: 69.4M]
  ------------------
 7302|  47.2M|                case 0x64:
  ------------------
  |  Branch (7302:17): [True: 2.01M, False: 68.5M]
  ------------------
 7303|  48.4M|                case 0x65:
  ------------------
  |  Branch (7303:17): [True: 1.15M, False: 69.3M]
  ------------------
 7304|  48.5M|                case 0x66:
  ------------------
  |  Branch (7304:17): [True: 175k, False: 70.3M]
  ------------------
 7305|  49.1M|                case 0x67:
  ------------------
  |  Branch (7305:17): [True: 589k, False: 69.9M]
  ------------------
 7306|  49.2M|                case 0x68:
  ------------------
  |  Branch (7306:17): [True: 73.8k, False: 70.4M]
  ------------------
 7307|  49.9M|                case 0x69:
  ------------------
  |  Branch (7307:17): [True: 696k, False: 69.8M]
  ------------------
 7308|  50.1M|                case 0x6A:
  ------------------
  |  Branch (7308:17): [True: 205k, False: 70.3M]
  ------------------
 7309|  50.3M|                case 0x6B:
  ------------------
  |  Branch (7309:17): [True: 234k, False: 70.2M]
  ------------------
 7310|  51.3M|                case 0x6C:
  ------------------
  |  Branch (7310:17): [True: 961k, False: 69.5M]
  ------------------
 7311|  62.7M|                case 0x6D:
  ------------------
  |  Branch (7311:17): [True: 11.3M, False: 59.1M]
  ------------------
 7312|  63.0M|                case 0x6E:
  ------------------
  |  Branch (7312:17): [True: 348k, False: 70.1M]
  ------------------
 7313|  63.5M|                case 0x6F:
  ------------------
  |  Branch (7313:17): [True: 433k, False: 70.0M]
  ------------------
 7314|  64.6M|                case 0x70:
  ------------------
  |  Branch (7314:17): [True: 1.16M, False: 69.3M]
  ------------------
 7315|  65.4M|                case 0x71:
  ------------------
  |  Branch (7315:17): [True: 712k, False: 69.8M]
  ------------------
 7316|  66.1M|                case 0x72:
  ------------------
  |  Branch (7316:17): [True: 743k, False: 69.7M]
  ------------------
 7317|  66.6M|                case 0x73:
  ------------------
  |  Branch (7317:17): [True: 516k, False: 70.0M]
  ------------------
 7318|  67.5M|                case 0x74:
  ------------------
  |  Branch (7318:17): [True: 884k, False: 69.6M]
  ------------------
 7319|  67.8M|                case 0x75:
  ------------------
  |  Branch (7319:17): [True: 329k, False: 70.1M]
  ------------------
 7320|  67.9M|                case 0x76:
  ------------------
  |  Branch (7320:17): [True: 73.8k, False: 70.4M]
  ------------------
 7321|  68.0M|                case 0x77:
  ------------------
  |  Branch (7321:17): [True: 106k, False: 70.4M]
  ------------------
 7322|  68.1M|                case 0x78:
  ------------------
  |  Branch (7322:17): [True: 127k, False: 70.4M]
  ------------------
 7323|  68.2M|                case 0x79:
  ------------------
  |  Branch (7323:17): [True: 87.1k, False: 70.4M]
  ------------------
 7324|  68.3M|                case 0x7A:
  ------------------
  |  Branch (7324:17): [True: 38.8k, False: 70.4M]
  ------------------
 7325|  69.0M|                case 0x7B:
  ------------------
  |  Branch (7325:17): [True: 711k, False: 69.8M]
  ------------------
 7326|  69.0M|                case 0x7C:
  ------------------
  |  Branch (7326:17): [True: 5.04k, False: 70.5M]
  ------------------
 7327|  69.6M|                case 0x7D:
  ------------------
  |  Branch (7327:17): [True: 635k, False: 69.8M]
  ------------------
 7328|  69.7M|                case 0x7E:
  ------------------
  |  Branch (7328:17): [True: 70.2k, False: 70.4M]
  ------------------
 7329|  69.7M|                case 0x7F:
  ------------------
  |  Branch (7329:17): [True: 54.7k, False: 70.4M]
  ------------------
 7330|  69.7M|                {
 7331|  69.7M|                    add(current);
 7332|  69.7M|                    break;
 7333|  69.7M|                }
 7334|       |
 7335|       |                // U+0080..U+07FF: bytes C2..DF 80..BF
 7336|     78|                case 0xC2:
  ------------------
  |  Branch (7336:17): [True: 78, False: 70.5M]
  ------------------
 7337|    982|                case 0xC3:
  ------------------
  |  Branch (7337:17): [True: 904, False: 70.5M]
  ------------------
 7338|    992|                case 0xC4:
  ------------------
  |  Branch (7338:17): [True: 10, False: 70.5M]
  ------------------
 7339|  1.37k|                case 0xC5:
  ------------------
  |  Branch (7339:17): [True: 381, False: 70.5M]
  ------------------
 7340|  1.38k|                case 0xC6:
  ------------------
  |  Branch (7340:17): [True: 9, False: 70.5M]
  ------------------
 7341|  2.13k|                case 0xC7:
  ------------------
  |  Branch (7341:17): [True: 753, False: 70.5M]
  ------------------
 7342|  2.25k|                case 0xC8:
  ------------------
  |  Branch (7342:17): [True: 122, False: 70.5M]
  ------------------
 7343|  2.87k|                case 0xC9:
  ------------------
  |  Branch (7343:17): [True: 613, False: 70.5M]
  ------------------
 7344|  3.71k|                case 0xCA:
  ------------------
  |  Branch (7344:17): [True: 845, False: 70.5M]
  ------------------
 7345|  3.73k|                case 0xCB:
  ------------------
  |  Branch (7345:17): [True: 22, False: 70.5M]
  ------------------
 7346|  4.70k|                case 0xCC:
  ------------------
  |  Branch (7346:17): [True: 965, False: 70.5M]
  ------------------
 7347|  4.86k|                case 0xCD:
  ------------------
  |  Branch (7347:17): [True: 167, False: 70.5M]
  ------------------
 7348|  12.7k|                case 0xCE:
  ------------------
  |  Branch (7348:17): [True: 7.91k, False: 70.5M]
  ------------------
 7349|  13.2k|                case 0xCF:
  ------------------
  |  Branch (7349:17): [True: 415, False: 70.5M]
  ------------------
 7350|  13.4k|                case 0xD0:
  ------------------
  |  Branch (7350:17): [True: 221, False: 70.5M]
  ------------------
 7351|  13.8k|                case 0xD1:
  ------------------
  |  Branch (7351:17): [True: 438, False: 70.5M]
  ------------------
 7352|  13.8k|                case 0xD2:
  ------------------
  |  Branch (7352:17): [True: 11, False: 70.5M]
  ------------------
 7353|  14.2k|                case 0xD3:
  ------------------
  |  Branch (7353:17): [True: 328, False: 70.5M]
  ------------------
 7354|  14.7k|                case 0xD4:
  ------------------
  |  Branch (7354:17): [True: 566, False: 70.5M]
  ------------------
 7355|  16.2k|                case 0xD5:
  ------------------
  |  Branch (7355:17): [True: 1.52k, False: 70.5M]
  ------------------
 7356|  16.4k|                case 0xD6:
  ------------------
  |  Branch (7356:17): [True: 202, False: 70.5M]
  ------------------
 7357|  16.5k|                case 0xD7:
  ------------------
  |  Branch (7357:17): [True: 8, False: 70.5M]
  ------------------
 7358|  16.7k|                case 0xD8:
  ------------------
  |  Branch (7358:17): [True: 259, False: 70.5M]
  ------------------
 7359|  16.8k|                case 0xD9:
  ------------------
  |  Branch (7359:17): [True: 137, False: 70.5M]
  ------------------
 7360|  19.4k|                case 0xDA:
  ------------------
  |  Branch (7360:17): [True: 2.50k, False: 70.5M]
  ------------------
 7361|  21.7k|                case 0xDB:
  ------------------
  |  Branch (7361:17): [True: 2.31k, False: 70.5M]
  ------------------
 7362|  21.7k|                case 0xDC:
  ------------------
  |  Branch (7362:17): [True: 16, False: 70.5M]
  ------------------
 7363|  21.8k|                case 0xDD:
  ------------------
  |  Branch (7363:17): [True: 153, False: 70.5M]
  ------------------
 7364|  21.9k|                case 0xDE:
  ------------------
  |  Branch (7364:17): [True: 70, False: 70.5M]
  ------------------
 7365|  22.1k|                case 0xDF:
  ------------------
  |  Branch (7365:17): [True: 179, False: 70.5M]
  ------------------
 7366|  22.1k|                {
 7367|  22.1k|                    if (JSON_HEDLEY_UNLIKELY(!next_byte_in_range({0x80, 0xBF})))
  ------------------
  |  | 1529|  22.1k|#  define JSON_HEDLEY_UNLIKELY(expr)                    __builtin_expect                 (!!(expr),    0                  )
  |  |  ------------------
  |  |  |  Branch (1529:57): [True: 1, False: 22.1k]
  |  |  ------------------
  ------------------
 7368|      1|                    {
 7369|      1|                        return token_type::parse_error;
 7370|      1|                    }
 7371|  22.1k|                    break;
 7372|  22.1k|                }
 7373|       |
 7374|       |                // U+0800..U+0FFF: bytes E0 A0..BF 80..BF
 7375|  22.1k|                case 0xE0:
  ------------------
  |  Branch (7375:17): [True: 85, False: 70.5M]
  ------------------
 7376|     85|                {
 7377|     85|                    if (JSON_HEDLEY_UNLIKELY(!(next_byte_in_range({0xA0, 0xBF, 0x80, 0xBF}))))
  ------------------
  |  | 1529|     85|#  define JSON_HEDLEY_UNLIKELY(expr)                    __builtin_expect                 (!!(expr),    0                  )
  |  |  ------------------
  |  |  |  Branch (1529:57): [True: 0, False: 85]
  |  |  ------------------
  ------------------
 7378|      0|                    {
 7379|      0|                        return token_type::parse_error;
 7380|      0|                    }
 7381|     85|                    break;
 7382|     85|                }
 7383|       |
 7384|       |                // U+1000..U+CFFF: bytes E1..EC 80..BF 80..BF
 7385|       |                // U+E000..U+FFFF: bytes EE..EF 80..BF 80..BF
 7386|    265|                case 0xE1:
  ------------------
  |  Branch (7386:17): [True: 265, False: 70.5M]
  ------------------
 7387|  2.13k|                case 0xE2:
  ------------------
  |  Branch (7387:17): [True: 1.86k, False: 70.5M]
  ------------------
 7388|  2.14k|                case 0xE3:
  ------------------
  |  Branch (7388:17): [True: 7, False: 70.5M]
  ------------------
 7389|  2.29k|                case 0xE4:
  ------------------
  |  Branch (7389:17): [True: 150, False: 70.5M]
  ------------------
 7390|  2.29k|                case 0xE5:
  ------------------
  |  Branch (7390:17): [True: 1, False: 70.5M]
  ------------------
 7391|  2.42k|                case 0xE6:
  ------------------
  |  Branch (7391:17): [True: 130, False: 70.5M]
  ------------------
 7392|  2.42k|                case 0xE7:
  ------------------
  |  Branch (7392:17): [True: 1, False: 70.5M]
  ------------------
 7393|  2.42k|                case 0xE8:
  ------------------
  |  Branch (7393:17): [True: 2, False: 70.5M]
  ------------------
 7394|  2.42k|                case 0xE9:
  ------------------
  |  Branch (7394:17): [True: 0, False: 70.5M]
  ------------------
 7395|  2.59k|                case 0xEA:
  ------------------
  |  Branch (7395:17): [True: 169, False: 70.5M]
  ------------------
 7396|  2.59k|                case 0xEB:
  ------------------
  |  Branch (7396:17): [True: 0, False: 70.5M]
  ------------------
 7397|  2.77k|                case 0xEC:
  ------------------
  |  Branch (7397:17): [True: 179, False: 70.5M]
  ------------------
 7398|  2.78k|                case 0xEE:
  ------------------
  |  Branch (7398:17): [True: 9, False: 70.5M]
  ------------------
 7399|  9.17k|                case 0xEF:
  ------------------
  |  Branch (7399:17): [True: 6.39k, False: 70.5M]
  ------------------
 7400|  9.17k|                {
 7401|  9.17k|                    if (JSON_HEDLEY_UNLIKELY(!(next_byte_in_range({0x80, 0xBF, 0x80, 0xBF}))))
  ------------------
  |  | 1529|  9.17k|#  define JSON_HEDLEY_UNLIKELY(expr)                    __builtin_expect                 (!!(expr),    0                  )
  |  |  ------------------
  |  |  |  Branch (1529:57): [True: 4, False: 9.17k]
  |  |  ------------------
  ------------------
 7402|      4|                    {
 7403|      4|                        return token_type::parse_error;
 7404|      4|                    }
 7405|  9.17k|                    break;
 7406|  9.17k|                }
 7407|       |
 7408|       |                // U+D000..U+D7FF: bytes ED 80..9F 80..BF
 7409|  9.17k|                case 0xED:
  ------------------
  |  Branch (7409:17): [True: 128, False: 70.5M]
  ------------------
 7410|    128|                {
 7411|    128|                    if (JSON_HEDLEY_UNLIKELY(!(next_byte_in_range({0x80, 0x9F, 0x80, 0xBF}))))
  ------------------
  |  | 1529|    128|#  define JSON_HEDLEY_UNLIKELY(expr)                    __builtin_expect                 (!!(expr),    0                  )
  |  |  ------------------
  |  |  |  Branch (1529:57): [True: 0, False: 128]
  |  |  ------------------
  ------------------
 7412|      0|                    {
 7413|      0|                        return token_type::parse_error;
 7414|      0|                    }
 7415|    128|                    break;
 7416|    128|                }
 7417|       |
 7418|       |                // U+10000..U+3FFFF F0 90..BF 80..BF 80..BF
 7419|    132|                case 0xF0:
  ------------------
  |  Branch (7419:17): [True: 132, False: 70.5M]
  ------------------
 7420|    132|                {
 7421|    132|                    if (JSON_HEDLEY_UNLIKELY(!(next_byte_in_range({0x90, 0xBF, 0x80, 0xBF, 0x80, 0xBF}))))
  ------------------
  |  | 1529|    132|#  define JSON_HEDLEY_UNLIKELY(expr)                    __builtin_expect                 (!!(expr),    0                  )
  |  |  ------------------
  |  |  |  Branch (1529:57): [True: 0, False: 132]
  |  |  ------------------
  ------------------
 7422|      0|                    {
 7423|      0|                        return token_type::parse_error;
 7424|      0|                    }
 7425|    132|                    break;
 7426|    132|                }
 7427|       |
 7428|       |                // U+40000..U+FFFFF F1..F3 80..BF 80..BF 80..BF
 7429|  21.0k|                case 0xF1:
  ------------------
  |  Branch (7429:17): [True: 21.0k, False: 70.5M]
  ------------------
 7430|  21.2k|                case 0xF2:
  ------------------
  |  Branch (7430:17): [True: 129, False: 70.5M]
  ------------------
 7431|  36.8k|                case 0xF3:
  ------------------
  |  Branch (7431:17): [True: 15.5k, False: 70.5M]
  ------------------
 7432|  36.8k|                {
 7433|  36.8k|                    if (JSON_HEDLEY_UNLIKELY(!(next_byte_in_range({0x80, 0xBF, 0x80, 0xBF, 0x80, 0xBF}))))
  ------------------
  |  | 1529|  36.8k|#  define JSON_HEDLEY_UNLIKELY(expr)                    __builtin_expect                 (!!(expr),    0                  )
  |  |  ------------------
  |  |  |  Branch (1529:57): [True: 0, False: 36.8k]
  |  |  ------------------
  ------------------
 7434|      0|                    {
 7435|      0|                        return token_type::parse_error;
 7436|      0|                    }
 7437|  36.8k|                    break;
 7438|  36.8k|                }
 7439|       |
 7440|       |                // U+100000..U+10FFFF F4 80..8F 80..BF 80..BF
 7441|  36.8k|                case 0xF4:
  ------------------
  |  Branch (7441:17): [True: 196, False: 70.5M]
  ------------------
 7442|    196|                {
 7443|    196|                    if (JSON_HEDLEY_UNLIKELY(!(next_byte_in_range({0x80, 0x8F, 0x80, 0xBF, 0x80, 0xBF}))))
  ------------------
  |  | 1529|    196|#  define JSON_HEDLEY_UNLIKELY(expr)                    __builtin_expect                 (!!(expr),    0                  )
  |  |  ------------------
  |  |  |  Branch (1529:57): [True: 0, False: 196]
  |  |  ------------------
  ------------------
 7444|      0|                    {
 7445|      0|                        return token_type::parse_error;
 7446|      0|                    }
 7447|    196|                    break;
 7448|    196|                }
 7449|       |
 7450|       |                // remaining bytes (80..C1 and F5..FF) are ill-formed
 7451|    196|                default:
  ------------------
  |  Branch (7451:17): [True: 5, False: 70.5M]
  ------------------
 7452|      5|                {
 7453|      5|                    error_message = "invalid string: ill-formed UTF-8 byte";
 7454|      5|                    return token_type::parse_error;
 7455|    196|                }
 7456|  70.5M|            }
 7457|  70.5M|        }
 7458|   660k|    }
_ZN8nlohmann6detail5lexerINS_10basic_jsonINSt3__13mapENS3_6vectorENS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEblmdS9_NS_14adl_serializerENS5_IhNS9_IhEEEEEENS0_22iterator_input_adapterIPKcEEE5resetEv:
 7941|  5.39M|    {
 7942|  5.39M|        token_buffer.clear();
 7943|  5.39M|        token_string.clear();
 7944|  5.39M|        token_string.push_back(std::char_traits<char_type>::to_char_type(current));
 7945|  5.39M|    }
_ZN8nlohmann6detail5lexerINS_10basic_jsonINSt3__13mapENS3_6vectorENS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEblmdS9_NS_14adl_serializerENS5_IhNS9_IhEEEEEENS0_22iterator_input_adapterIPKcEEE3addEi:
 8022|  74.9M|    {
 8023|  74.9M|        token_buffer.push_back(static_cast<typename string_t::value_type>(c));
 8024|  74.9M|    }
_ZN8nlohmann6detail5lexerINS_10basic_jsonINSt3__13mapENS3_6vectorENS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEblmdS9_NS_14adl_serializerENS5_IhNS9_IhEEEEEENS0_22iterator_input_adapterIPKcEEE13get_codepointEv:
 6790|  3.86k|    {
 6791|       |        // this function only makes sense after reading `\u`
 6792|  3.86k|        JSON_ASSERT(current == 'u');
  ------------------
  |  | 2372|  3.86k|    #define JSON_ASSERT(x) assert(x)
  ------------------
 6793|      0|        int codepoint = 0;
 6794|       |
 6795|  3.86k|        const auto factors = { 12u, 8u, 4u, 0u };
 6796|  3.86k|        for (const auto factor : factors)
  ------------------
  |  Branch (6796:32): [True: 15.4k, False: 3.86k]
  ------------------
 6797|  15.4k|        {
 6798|  15.4k|            get();
 6799|       |
 6800|  15.4k|            if (current >= '0' && current <= '9')
  ------------------
  |  Branch (6800:17): [True: 15.4k, False: 0]
  |  Branch (6800:35): [True: 14.4k, False: 1.02k]
  ------------------
 6801|  14.4k|            {
 6802|  14.4k|                codepoint += static_cast<int>((static_cast<unsigned int>(current) - 0x30u) << factor);
 6803|  14.4k|            }
 6804|  1.02k|            else if (current >= 'A' && current <= 'F')
  ------------------
  |  Branch (6804:22): [True: 1.02k, False: 0]
  |  Branch (6804:40): [True: 219, False: 801]
  ------------------
 6805|    219|            {
 6806|    219|                codepoint += static_cast<int>((static_cast<unsigned int>(current) - 0x37u) << factor);
 6807|    219|            }
 6808|    801|            else if (current >= 'a' && current <= 'f')
  ------------------
  |  Branch (6808:22): [True: 801, False: 0]
  |  Branch (6808:40): [True: 801, False: 0]
  ------------------
 6809|    801|            {
 6810|    801|                codepoint += static_cast<int>((static_cast<unsigned int>(current) - 0x57u) << factor);
 6811|    801|            }
 6812|      0|            else
 6813|      0|            {
 6814|      0|                return -1;
 6815|      0|            }
 6816|  15.4k|        }
 6817|       |
 6818|  3.86k|        JSON_ASSERT(0x0000 <= codepoint && codepoint <= 0xFFFF);
  ------------------
  |  | 2372|  3.86k|    #define JSON_ASSERT(x) assert(x)
  ------------------
 6819|      0|        return codepoint;
 6820|  3.86k|    }
_ZN8nlohmann6detail5lexerINS_10basic_jsonINSt3__13mapENS3_6vectorENS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEblmdS9_NS_14adl_serializerENS5_IhNS9_IhEEEEEENS0_22iterator_input_adapterIPKcEEE18next_byte_in_rangeESt16initializer_listIiE:
 6838|  68.6k|    {
 6839|  68.6k|        JSON_ASSERT(ranges.size() == 2 || ranges.size() == 4 || ranges.size() == 6);
  ------------------
  |  | 2372|  68.6k|    #define JSON_ASSERT(x) assert(x)
  ------------------
 6840|      0|        add(current);
 6841|       |
 6842|   220k|        for (auto range = ranges.begin(); range != ranges.end(); ++range)
  ------------------
  |  Branch (6842:43): [True: 152k, False: 68.6k]
  ------------------
 6843|   152k|        {
 6844|   152k|            get();
 6845|   152k|            if (JSON_HEDLEY_LIKELY(*range <= current && current <= *(++range)))
  ------------------
  |  | 1528|   304k|#  define JSON_HEDLEY_LIKELY(expr)                      __builtin_expect                 (!!(expr),    1                  )
  |  |  ------------------
  |  |  |  Branch (1528:57): [True: 152k, False: 5]
  |  |  |  Branch (1528:94): [True: 152k, False: 2]
  |  |  |  Branch (1528:94): [True: 152k, False: 3]
  |  |  ------------------
  ------------------
 6846|   152k|            {
 6847|   152k|                add(current);
 6848|   152k|            }
 6849|      5|            else
 6850|      5|            {
 6851|      5|                error_message = "invalid string: ill-formed UTF-8 byte";
 6852|      5|                return false;
 6853|      5|            }
 6854|   152k|        }
 6855|       |
 6856|  68.6k|        return true;
 6857|  68.6k|    }
_ZN8nlohmann6detail5lexerINS_10basic_jsonINSt3__13mapENS3_6vectorENS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEblmdS9_NS_14adl_serializerENS5_IhNS9_IhEEEEEENS0_22iterator_input_adapterIPKcEEE11scan_numberEv:
 7590|  4.73M|    {
 7591|       |        // reset token_buffer to store the number's bytes
 7592|  4.73M|        reset();
 7593|       |
 7594|       |        // the type of the parsed number; initially set to unsigned; will be
 7595|       |        // changed if minus sign, decimal point or exponent is read
 7596|  4.73M|        token_type number_type = token_type::value_unsigned;
 7597|       |
 7598|       |        // state (init): we just found out we need to scan a number
 7599|  4.73M|        switch (current)
 7600|  4.73M|        {
 7601|  5.71k|            case '-':
  ------------------
  |  Branch (7601:13): [True: 5.71k, False: 4.73M]
  ------------------
 7602|  5.71k|            {
 7603|  5.71k|                add(current);
 7604|  5.71k|                goto scan_number_minus;
 7605|      0|            }
 7606|       |
 7607|   724k|            case '0':
  ------------------
  |  Branch (7607:13): [True: 724k, False: 4.01M]
  ------------------
 7608|   724k|            {
 7609|   724k|                add(current);
 7610|   724k|                goto scan_number_zero;
 7611|      0|            }
 7612|       |
 7613|   164k|            case '1':
  ------------------
  |  Branch (7613:13): [True: 164k, False: 4.57M]
  ------------------
 7614|   605k|            case '2':
  ------------------
  |  Branch (7614:13): [True: 440k, False: 4.29M]
  ------------------
 7615|   845k|            case '3':
  ------------------
  |  Branch (7615:13): [True: 240k, False: 4.49M]
  ------------------
 7616|   849k|            case '4':
  ------------------
  |  Branch (7616:13): [True: 3.48k, False: 4.73M]
  ------------------
 7617|   889k|            case '5':
  ------------------
  |  Branch (7617:13): [True: 39.9k, False: 4.69M]
  ------------------
 7618|  1.64M|            case '6':
  ------------------
  |  Branch (7618:13): [True: 760k, False: 3.97M]
  ------------------
 7619|  1.72M|            case '7':
  ------------------
  |  Branch (7619:13): [True: 72.2k, False: 4.66M]
  ------------------
 7620|  3.52M|            case '8':
  ------------------
  |  Branch (7620:13): [True: 1.80M, False: 2.93M]
  ------------------
 7621|  4.00M|            case '9':
  ------------------
  |  Branch (7621:13): [True: 484k, False: 4.25M]
  ------------------
 7622|  4.00M|            {
 7623|  4.00M|                add(current);
 7624|  4.00M|                goto scan_number_any1;
 7625|  3.52M|            }
 7626|       |
 7627|       |            // all other characters are rejected outside scan_number()
 7628|      0|            default:            // LCOV_EXCL_LINE
  ------------------
  |  Branch (7628:13): [True: 0, False: 4.73M]
  ------------------
 7629|      0|                JSON_ASSERT(false); // NOLINT(cert-dcl03-c,hicpp-static-assert,misc-static-assert) LCOV_EXCL_LINE
  ------------------
  |  | 2372|      0|    #define JSON_ASSERT(x) assert(x)
  ------------------
 7630|  4.73M|        }
 7631|       |
 7632|  5.71k|scan_number_minus:
 7633|       |        // state: we just parsed a leading minus sign
 7634|  5.71k|        number_type = token_type::value_integer;
 7635|  5.71k|        switch (get())
 7636|  5.71k|        {
 7637|    593|            case '0':
  ------------------
  |  Branch (7637:13): [True: 593, False: 5.12k]
  ------------------
 7638|    593|            {
 7639|    593|                add(current);
 7640|    593|                goto scan_number_zero;
 7641|      0|            }
 7642|       |
 7643|  1.87k|            case '1':
  ------------------
  |  Branch (7643:13): [True: 1.87k, False: 3.84k]
  ------------------
 7644|  3.14k|            case '2':
  ------------------
  |  Branch (7644:13): [True: 1.26k, False: 4.45k]
  ------------------
 7645|  3.65k|            case '3':
  ------------------
  |  Branch (7645:13): [True: 516, False: 5.20k]
  ------------------
 7646|  3.84k|            case '4':
  ------------------
  |  Branch (7646:13): [True: 185, False: 5.53k]
  ------------------
 7647|  4.11k|            case '5':
  ------------------
  |  Branch (7647:13): [True: 277, False: 5.44k]
  ------------------
 7648|  4.41k|            case '6':
  ------------------
  |  Branch (7648:13): [True: 300, False: 5.41k]
  ------------------
 7649|  4.45k|            case '7':
  ------------------
  |  Branch (7649:13): [True: 37, False: 5.68k]
  ------------------
 7650|  4.59k|            case '8':
  ------------------
  |  Branch (7650:13): [True: 138, False: 5.57k]
  ------------------
 7651|  5.12k|            case '9':
  ------------------
  |  Branch (7651:13): [True: 527, False: 5.19k]
  ------------------
 7652|  5.12k|            {
 7653|  5.12k|                add(current);
 7654|  5.12k|                goto scan_number_any1;
 7655|  4.59k|            }
 7656|       |
 7657|      3|            default:
  ------------------
  |  Branch (7657:13): [True: 3, False: 5.71k]
  ------------------
 7658|      3|            {
 7659|      3|                error_message = "invalid number; expected digit after '-'";
 7660|      3|                return token_type::parse_error;
 7661|  4.59k|            }
 7662|  5.71k|        }
 7663|       |
 7664|   725k|scan_number_zero:
 7665|       |        // state: we just parse a zero (maybe with a leading minus sign)
 7666|   725k|        switch (get())
 7667|   725k|        {
 7668|    143|            case '.':
  ------------------
  |  Branch (7668:13): [True: 143, False: 724k]
  ------------------
 7669|    143|            {
 7670|    143|                add(decimal_point_char);
 7671|    143|                goto scan_number_decimal1;
 7672|      0|            }
 7673|       |
 7674|     63|            case 'e':
  ------------------
  |  Branch (7674:13): [True: 63, False: 725k]
  ------------------
 7675|     64|            case 'E':
  ------------------
  |  Branch (7675:13): [True: 1, False: 725k]
  ------------------
 7676|     64|            {
 7677|     64|                add(current);
 7678|     64|                goto scan_number_exponent;
 7679|     63|            }
 7680|       |
 7681|   724k|            default:
  ------------------
  |  Branch (7681:13): [True: 724k, False: 207]
  ------------------
 7682|   724k|                goto scan_number_done;
 7683|   725k|        }
 7684|       |
 7685|  4.17M|scan_number_any1:
 7686|       |        // state: we just parsed a number 0-9 (maybe with a leading minus sign)
 7687|  4.17M|        switch (get())
 7688|  4.17M|        {
 7689|  7.10k|            case '0':
  ------------------
  |  Branch (7689:13): [True: 7.10k, False: 4.17M]
  ------------------
 7690|  11.0k|            case '1':
  ------------------
  |  Branch (7690:13): [True: 3.97k, False: 4.17M]
  ------------------
 7691|   101k|            case '2':
  ------------------
  |  Branch (7691:13): [True: 90.7k, False: 4.08M]
  ------------------
 7692|   106k|            case '3':
  ------------------
  |  Branch (7692:13): [True: 4.82k, False: 4.17M]
  ------------------
 7693|   111k|            case '4':
  ------------------
  |  Branch (7693:13): [True: 4.51k, False: 4.17M]
  ------------------
 7694|   115k|            case '5':
  ------------------
  |  Branch (7694:13): [True: 3.95k, False: 4.17M]
  ------------------
 7695|   123k|            case '6':
  ------------------
  |  Branch (7695:13): [True: 8.62k, False: 4.17M]
  ------------------
 7696|   134k|            case '7':
  ------------------
  |  Branch (7696:13): [True: 10.6k, False: 4.16M]
  ------------------
 7697|   160k|            case '8':
  ------------------
  |  Branch (7697:13): [True: 26.3k, False: 4.15M]
  ------------------
 7698|   166k|            case '9':
  ------------------
  |  Branch (7698:13): [True: 6.13k, False: 4.17M]
  ------------------
 7699|   166k|            {
 7700|   166k|                add(current);
 7701|   166k|                goto scan_number_any1;
 7702|   160k|            }
 7703|       |
 7704|  2.77k|            case '.':
  ------------------
  |  Branch (7704:13): [True: 2.77k, False: 4.17M]
  ------------------
 7705|  2.77k|            {
 7706|  2.77k|                add(decimal_point_char);
 7707|  2.77k|                goto scan_number_decimal1;
 7708|   160k|            }
 7709|       |
 7710|    278|            case 'e':
  ------------------
  |  Branch (7710:13): [True: 278, False: 4.17M]
  ------------------
 7711|  7.36k|            case 'E':
  ------------------
  |  Branch (7711:13): [True: 7.09k, False: 4.17M]
  ------------------
 7712|  7.36k|            {
 7713|  7.36k|                add(current);
 7714|  7.36k|                goto scan_number_exponent;
 7715|    278|            }
 7716|       |
 7717|  4.00M|            default:
  ------------------
  |  Branch (7717:13): [True: 4.00M, False: 177k]
  ------------------
 7718|  4.00M|                goto scan_number_done;
 7719|  4.17M|        }
 7720|       |
 7721|  2.91k|scan_number_decimal1:
 7722|       |        // state: we just parsed a decimal point
 7723|  2.91k|        number_type = token_type::value_float;
 7724|  2.91k|        switch (get())
 7725|  2.91k|        {
 7726|     98|            case '0':
  ------------------
  |  Branch (7726:13): [True: 98, False: 2.81k]
  ------------------
 7727|    127|            case '1':
  ------------------
  |  Branch (7727:13): [True: 29, False: 2.88k]
  ------------------
 7728|    130|            case '2':
  ------------------
  |  Branch (7728:13): [True: 3, False: 2.91k]
  ------------------
 7729|    170|            case '3':
  ------------------
  |  Branch (7729:13): [True: 40, False: 2.87k]
  ------------------
 7730|    171|            case '4':
  ------------------
  |  Branch (7730:13): [True: 1, False: 2.91k]
  ------------------
 7731|    178|            case '5':
  ------------------
  |  Branch (7731:13): [True: 7, False: 2.90k]
  ------------------
 7732|  2.69k|            case '6':
  ------------------
  |  Branch (7732:13): [True: 2.51k, False: 401]
  ------------------
 7733|  2.73k|            case '7':
  ------------------
  |  Branch (7733:13): [True: 45, False: 2.87k]
  ------------------
 7734|  2.75k|            case '8':
  ------------------
  |  Branch (7734:13): [True: 16, False: 2.90k]
  ------------------
 7735|  2.91k|            case '9':
  ------------------
  |  Branch (7735:13): [True: 162, False: 2.75k]
  ------------------
 7736|  2.91k|            {
 7737|  2.91k|                add(current);
 7738|  2.91k|                goto scan_number_decimal2;
 7739|  2.75k|            }
 7740|       |
 7741|      0|            default:
  ------------------
  |  Branch (7741:13): [True: 0, False: 2.91k]
  ------------------
 7742|      0|            {
 7743|      0|                error_message = "invalid number; expected digit after '.'";
 7744|      0|                return token_type::parse_error;
 7745|  2.75k|            }
 7746|  2.91k|        }
 7747|       |
 7748|  4.46k|scan_number_decimal2:
 7749|       |        // we just parsed at least one number after a decimal point
 7750|  4.46k|        switch (get())
 7751|  4.46k|        {
 7752|    339|            case '0':
  ------------------
  |  Branch (7752:13): [True: 339, False: 4.12k]
  ------------------
 7753|    445|            case '1':
  ------------------
  |  Branch (7753:13): [True: 106, False: 4.36k]
  ------------------
 7754|    609|            case '2':
  ------------------
  |  Branch (7754:13): [True: 164, False: 4.30k]
  ------------------
 7755|    704|            case '3':
  ------------------
  |  Branch (7755:13): [True: 95, False: 4.37k]
  ------------------
 7756|    888|            case '4':
  ------------------
  |  Branch (7756:13): [True: 184, False: 4.28k]
  ------------------
 7757|    997|            case '5':
  ------------------
  |  Branch (7757:13): [True: 109, False: 4.35k]
  ------------------
 7758|  1.40k|            case '6':
  ------------------
  |  Branch (7758:13): [True: 410, False: 4.05k]
  ------------------
 7759|  1.46k|            case '7':
  ------------------
  |  Branch (7759:13): [True: 54, False: 4.41k]
  ------------------
 7760|  1.48k|            case '8':
  ------------------
  |  Branch (7760:13): [True: 23, False: 4.44k]
  ------------------
 7761|  1.55k|            case '9':
  ------------------
  |  Branch (7761:13): [True: 67, False: 4.40k]
  ------------------
 7762|  1.55k|            {
 7763|  1.55k|                add(current);
 7764|  1.55k|                goto scan_number_decimal2;
 7765|  1.48k|            }
 7766|       |
 7767|     26|            case 'e':
  ------------------
  |  Branch (7767:13): [True: 26, False: 4.44k]
  ------------------
 7768|     26|            case 'E':
  ------------------
  |  Branch (7768:13): [True: 0, False: 4.46k]
  ------------------
 7769|     26|            {
 7770|     26|                add(current);
 7771|     26|                goto scan_number_exponent;
 7772|     26|            }
 7773|       |
 7774|  2.89k|            default:
  ------------------
  |  Branch (7774:13): [True: 2.89k, False: 1.57k]
  ------------------
 7775|  2.89k|                goto scan_number_done;
 7776|  4.46k|        }
 7777|       |
 7778|  7.45k|scan_number_exponent:
 7779|       |        // we just parsed an exponent
 7780|  7.45k|        number_type = token_type::value_float;
 7781|  7.45k|        switch (get())
 7782|  7.45k|        {
 7783|     35|            case '+':
  ------------------
  |  Branch (7783:13): [True: 35, False: 7.42k]
  ------------------
 7784|     40|            case '-':
  ------------------
  |  Branch (7784:13): [True: 5, False: 7.45k]
  ------------------
 7785|     40|            {
 7786|     40|                add(current);
 7787|     40|                goto scan_number_sign;
 7788|     35|            }
 7789|       |
 7790|      9|            case '0':
  ------------------
  |  Branch (7790:13): [True: 9, False: 7.45k]
  ------------------
 7791|    909|            case '1':
  ------------------
  |  Branch (7791:13): [True: 900, False: 6.55k]
  ------------------
 7792|    909|            case '2':
  ------------------
  |  Branch (7792:13): [True: 0, False: 7.45k]
  ------------------
 7793|  2.73k|            case '3':
  ------------------
  |  Branch (7793:13): [True: 1.82k, False: 5.63k]
  ------------------
 7794|  2.84k|            case '4':
  ------------------
  |  Branch (7794:13): [True: 113, False: 7.34k]
  ------------------
 7795|  3.75k|            case '5':
  ------------------
  |  Branch (7795:13): [True: 909, False: 6.55k]
  ------------------
 7796|  6.50k|            case '6':
  ------------------
  |  Branch (7796:13): [True: 2.75k, False: 4.70k]
  ------------------
 7797|  7.40k|            case '7':
  ------------------
  |  Branch (7797:13): [True: 898, False: 6.56k]
  ------------------
 7798|  7.41k|            case '8':
  ------------------
  |  Branch (7798:13): [True: 12, False: 7.44k]
  ------------------
 7799|  7.41k|            case '9':
  ------------------
  |  Branch (7799:13): [True: 1, False: 7.45k]
  ------------------
 7800|  7.41k|            {
 7801|  7.41k|                add(current);
 7802|  7.41k|                goto scan_number_any2;
 7803|  7.41k|            }
 7804|       |
 7805|      0|            default:
  ------------------
  |  Branch (7805:13): [True: 0, False: 7.45k]
  ------------------
 7806|      0|            {
 7807|      0|                error_message =
 7808|      0|                    "invalid number; expected '+', '-', or digit after exponent";
 7809|      0|                return token_type::parse_error;
 7810|  7.41k|            }
 7811|  7.45k|        }
 7812|       |
 7813|     40|scan_number_sign:
 7814|       |        // we just parsed an exponent sign
 7815|     40|        switch (get())
 7816|     40|        {
 7817|      0|            case '0':
  ------------------
  |  Branch (7817:13): [True: 0, False: 40]
  ------------------
 7818|      2|            case '1':
  ------------------
  |  Branch (7818:13): [True: 2, False: 38]
  ------------------
 7819|     10|            case '2':
  ------------------
  |  Branch (7819:13): [True: 8, False: 32]
  ------------------
 7820|     37|            case '3':
  ------------------
  |  Branch (7820:13): [True: 27, False: 13]
  ------------------
 7821|     37|            case '4':
  ------------------
  |  Branch (7821:13): [True: 0, False: 40]
  ------------------
 7822|     37|            case '5':
  ------------------
  |  Branch (7822:13): [True: 0, False: 40]
  ------------------
 7823|     40|            case '6':
  ------------------
  |  Branch (7823:13): [True: 3, False: 37]
  ------------------
 7824|     40|            case '7':
  ------------------
  |  Branch (7824:13): [True: 0, False: 40]
  ------------------
 7825|     40|            case '8':
  ------------------
  |  Branch (7825:13): [True: 0, False: 40]
  ------------------
 7826|     40|            case '9':
  ------------------
  |  Branch (7826:13): [True: 0, False: 40]
  ------------------
 7827|     40|            {
 7828|     40|                add(current);
 7829|     40|                goto scan_number_any2;
 7830|     40|            }
 7831|       |
 7832|      0|            default:
  ------------------
  |  Branch (7832:13): [True: 0, False: 40]
  ------------------
 7833|      0|            {
 7834|      0|                error_message = "invalid number; expected digit after exponent sign";
 7835|      0|                return token_type::parse_error;
 7836|     40|            }
 7837|     40|        }
 7838|       |
 7839|  8.46k|scan_number_any2:
 7840|       |        // we just parsed a number after the exponent or exponent sign
 7841|  8.46k|        switch (get())
 7842|  8.46k|        {
 7843|      2|            case '0':
  ------------------
  |  Branch (7843:13): [True: 2, False: 8.46k]
  ------------------
 7844|      2|            case '1':
  ------------------
  |  Branch (7844:13): [True: 0, False: 8.46k]
  ------------------
 7845|      2|            case '2':
  ------------------
  |  Branch (7845:13): [True: 0, False: 8.46k]
  ------------------
 7846|     10|            case '3':
  ------------------
  |  Branch (7846:13): [True: 8, False: 8.45k]
  ------------------
 7847|     75|            case '4':
  ------------------
  |  Branch (7847:13): [True: 65, False: 8.39k]
  ------------------
 7848|     75|            case '5':
  ------------------
  |  Branch (7848:13): [True: 0, False: 8.46k]
  ------------------
 7849|     84|            case '6':
  ------------------
  |  Branch (7849:13): [True: 9, False: 8.45k]
  ------------------
 7850|     84|            case '7':
  ------------------
  |  Branch (7850:13): [True: 0, False: 8.46k]
  ------------------
 7851|    132|            case '8':
  ------------------
  |  Branch (7851:13): [True: 48, False: 8.41k]
  ------------------
 7852|  1.00k|            case '9':
  ------------------
  |  Branch (7852:13): [True: 871, False: 7.59k]
  ------------------
 7853|  1.00k|            {
 7854|  1.00k|                add(current);
 7855|  1.00k|                goto scan_number_any2;
 7856|    132|            }
 7857|       |
 7858|  7.45k|            default:
  ------------------
  |  Branch (7858:13): [True: 7.45k, False: 1.00k]
  ------------------
 7859|  7.45k|                goto scan_number_done;
 7860|  8.46k|        }
 7861|       |
 7862|  4.73M|scan_number_done:
 7863|       |        // unget the character after the number (we only read it to know that
 7864|       |        // we are done scanning a number)
 7865|  4.73M|        unget();
 7866|       |
 7867|  4.73M|        char* endptr = nullptr; // NOLINT(cppcoreguidelines-pro-type-vararg,hicpp-vararg)
 7868|  4.73M|        errno = 0;
 7869|       |
 7870|       |        // try to parse integers first and fall back to floats
 7871|  4.73M|        if (number_type == token_type::value_unsigned)
  ------------------
  |  Branch (7871:13): [True: 4.72M, False: 16.0k]
  ------------------
 7872|  4.72M|        {
 7873|  4.72M|            const auto x = std::strtoull(token_buffer.data(), &endptr, 10);
 7874|       |
 7875|       |            // we checked the number format before
 7876|  4.72M|            JSON_ASSERT(endptr == token_buffer.data() + token_buffer.size());
  ------------------
  |  | 2372|  4.72M|    #define JSON_ASSERT(x) assert(x)
  ------------------
 7877|       |
 7878|  4.72M|            if (errno == 0)
  ------------------
  |  Branch (7878:17): [True: 4.72M, False: 570]
  ------------------
 7879|  4.72M|            {
 7880|  4.72M|                value_unsigned = static_cast<number_unsigned_t>(x);
 7881|  4.72M|                if (value_unsigned == x)
  ------------------
  |  Branch (7881:21): [True: 4.72M, False: 0]
  ------------------
 7882|  4.72M|                {
 7883|  4.72M|                    return token_type::value_unsigned;
 7884|  4.72M|                }
 7885|  4.72M|            }
 7886|  4.72M|        }
 7887|  16.0k|        else if (number_type == token_type::value_integer)
  ------------------
  |  Branch (7887:18): [True: 5.71k, False: 10.3k]
  ------------------
 7888|  5.71k|        {
 7889|  5.71k|            const auto x = std::strtoll(token_buffer.data(), &endptr, 10);
 7890|       |
 7891|       |            // we checked the number format before
 7892|  5.71k|            JSON_ASSERT(endptr == token_buffer.data() + token_buffer.size());
  ------------------
  |  | 2372|  5.71k|    #define JSON_ASSERT(x) assert(x)
  ------------------
 7893|       |
 7894|  5.71k|            if (errno == 0)
  ------------------
  |  Branch (7894:17): [True: 5.57k, False: 139]
  ------------------
 7895|  5.57k|            {
 7896|  5.57k|                value_integer = static_cast<number_integer_t>(x);
 7897|  5.57k|                if (value_integer == x)
  ------------------
  |  Branch (7897:21): [True: 5.57k, False: 0]
  ------------------
 7898|  5.57k|                {
 7899|  5.57k|                    return token_type::value_integer;
 7900|  5.57k|                }
 7901|  5.57k|            }
 7902|  5.71k|        }
 7903|       |
 7904|       |        // this code is reached if we parse a floating-point number or if an
 7905|       |        // integer conversion above failed
 7906|  11.0k|        strtof(value_float, token_buffer.data(), &endptr);
 7907|       |
 7908|       |        // we checked the number format before
 7909|  11.0k|        JSON_ASSERT(endptr == token_buffer.data() + token_buffer.size());
  ------------------
  |  | 2372|  11.0k|    #define JSON_ASSERT(x) assert(x)
  ------------------
 7910|       |
 7911|      0|        return token_type::value_float;
 7912|  4.73M|    }
_ZN8nlohmann6detail5lexerINS_10basic_jsonINSt3__13mapENS3_6vectorENS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEblmdS9_NS_14adl_serializerENS5_IhNS9_IhEEEEEENS0_22iterator_input_adapterIPKcEEE6strtofERdSI_PPc:
 7539|  11.0k|    {
 7540|  11.0k|        f = std::strtod(str, endptr);
 7541|  11.0k|    }
_ZN8nlohmann6detail5lexerINS_10basic_jsonINSt3__13mapENS3_6vectorENS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEblmdS9_NS_14adl_serializerENS5_IhNS9_IhEEEEEENS0_22iterator_input_adapterIPKcEEED2Ev:
 6754|  1.57k|    ~lexer() = default;
_ZN8nlohmann6detail13input_adapterIPKcEENS0_30iterator_input_adapter_factoryIT_vE12adapter_typeES5_S5_:
 5798|  1.57k|{
 5799|  1.57k|    using factory_type = iterator_input_adapter_factory<IteratorType>;
 5800|  1.57k|    return factory_type::create(first, last);
 5801|  1.57k|}
_ZN8nlohmann6detail30iterator_input_adapter_factoryIPKcvE6createES3_S3_:
 5766|  1.57k|    {
 5767|  1.57k|        return adapter_type(std::move(first), std::move(last));
 5768|  1.57k|    }
_ZN8nlohmann6detail22iterator_input_adapterIPKcEC2ES3_S3_:
 5561|  1.57k|    {}
_ZN8nlohmann6detail6parserINS_10basic_jsonINSt3__13mapENS3_6vectorENS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEblmdS9_NS_14adl_serializerENS5_IhNS9_IhEEEEEENS0_22iterator_input_adapterIPKcEEE5parseEbRSF_:
11011|  1.57k|    {
11012|  1.57k|        if (callback)
  ------------------
  |  Branch (11012:13): [True: 0, False: 1.57k]
  ------------------
11013|      0|        {
11014|      0|            json_sax_dom_callback_parser<BasicJsonType> sdp(result, callback, allow_exceptions);
11015|      0|            sax_parse_internal(&sdp);
11016|       |
11017|       |            // in strict mode, input must be completely read
11018|      0|            if (strict && (get_token() != token_type::end_of_input))
  ------------------
  |  Branch (11018:17): [True: 0, False: 0]
  |  Branch (11018:27): [True: 0, False: 0]
  ------------------
11019|      0|            {
11020|      0|                sdp.parse_error(m_lexer.get_position(),
11021|      0|                                m_lexer.get_token_string(),
11022|      0|                                parse_error::create(101, m_lexer.get_position(),
11023|      0|                                                    exception_message(token_type::end_of_input, "value"), BasicJsonType()));
11024|      0|            }
11025|       |
11026|       |            // in case of an error, return discarded value
11027|      0|            if (sdp.is_errored())
  ------------------
  |  Branch (11027:17): [True: 0, False: 0]
  ------------------
11028|      0|            {
11029|      0|                result = value_t::discarded;
11030|      0|                return;
11031|      0|            }
11032|       |
11033|       |            // set top-level value to null if it was discarded by the callback
11034|       |            // function
11035|      0|            if (result.is_discarded())
  ------------------
  |  Branch (11035:17): [True: 0, False: 0]
  ------------------
11036|      0|            {
11037|      0|                result = nullptr;
11038|      0|            }
11039|      0|        }
11040|  1.57k|        else
11041|  1.57k|        {
11042|  1.57k|            json_sax_dom_parser<BasicJsonType> sdp(result, allow_exceptions);
11043|  1.57k|            sax_parse_internal(&sdp);
11044|       |
11045|       |            // in strict mode, input must be completely read
11046|  1.57k|            if (strict && (get_token() != token_type::end_of_input))
  ------------------
  |  Branch (11046:17): [True: 1.39k, False: 179]
  |  Branch (11046:27): [True: 1, False: 1.39k]
  ------------------
11047|      1|            {
11048|      1|                sdp.parse_error(m_lexer.get_position(),
11049|      1|                                m_lexer.get_token_string(),
11050|      1|                                parse_error::create(101, m_lexer.get_position(), exception_message(token_type::end_of_input, "value"), BasicJsonType()));
11051|      1|            }
11052|       |
11053|       |            // in case of an error, return discarded value
11054|  1.57k|            if (sdp.is_errored())
  ------------------
  |  Branch (11054:17): [True: 0, False: 1.57k]
  ------------------
11055|      0|            {
11056|      0|                result = value_t::discarded;
11057|      0|                return;
11058|      0|            }
11059|  1.57k|        }
11060|       |
11061|  1.57k|        result.assert_invariant();
11062|  1.57k|    }
_ZN8nlohmann6detail20primitive_iterator_t7set_endEv:
11476|  5.01k|    {
11477|  5.01k|        m_it = end_value;
11478|  5.01k|    }
_ZN8nlohmann6detaileqENS0_20primitive_iterator_tES1_:
11493|  2.50k|    {
11494|  2.50k|        return lhs.m_it == rhs.m_it;
11495|  2.50k|    }
_ZNK8nlohmann10basic_jsonINSt3__13mapENS1_6vectorENS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEblmdS7_NS_14adl_serializerENS3_IhNS7_IhEEEEE9is_stringEv:
20256|   146k|    {
20257|   146k|        return m_type == value_t::string;
20258|   146k|    }
_ZN8nlohmann10basic_jsonINSt3__13mapENS1_6vectorENS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEblmdS7_NS_14adl_serializerENS3_IhNS7_IhEEEEEC2IRS9_S9_Li0EEEOT_:
19074|   174k|    {
19075|   174k|        JSONSerializer<U>::to_json(*this, std::forward<CompatibleType>(val));
19076|   174k|        set_parents();
19077|   174k|        assert_invariant();
19078|   174k|    }
_ZN8nlohmann14adl_serializerINSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEvE7to_jsonINS_10basic_jsonINS1_3mapENS1_6vectorES7_blmdS5_S0_NSC_IhNS5_IhEEEEEERS7_EEDTcmclL_ZNS_12_GLOBAL__N_17to_jsonEEfp_clsr3stdE7forwardIT0_Efp0_EEcvv_EERT_OSI_:
 5096|   174k|    {
 5097|   174k|        ::nlohmann::to_json(j, std::forward<TargetType>(val));
 5098|   174k|    }
_ZNK8nlohmann6detail10to_json_fnclINS_10basic_jsonINSt3__13mapENS4_6vectorENS4_12basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEblmdSA_NS_14adl_serializerENS6_IhNSA_IhEEEEEERSC_EEDTcmcl7to_jsonfp_clsr3stdE7forwardIT0_Efp0_EEcvv_EERT_OSI_:
 5018|   174k|    {
 5019|   174k|        return to_json(j, std::forward<T>(val));
 5020|   174k|    }
_ZN8nlohmann6detail5lexerINS_10basic_jsonINSt3__13mapENS3_6vectorENS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEblmdS9_NS_14adl_serializerENS5_IhNS9_IhEEEEEENS0_22iterator_input_adapterIPKcEEE10get_stringEv:
 8051|   671k|    {
 8052|   671k|        return token_buffer;
 8053|   671k|    }
_ZNK8nlohmann6detail5lexerINS_10basic_jsonINSt3__13mapENS3_6vectorENS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEblmdS9_NS_14adl_serializerENS5_IhNS9_IhEEEEEENS0_22iterator_input_adapterIPKcEEE16get_number_floatEv:
 8045|  11.0k|    {
 8046|  11.0k|        return value_float;
 8047|  11.0k|    }
_ZN8nlohmann10basic_jsonINSt3__13mapENS1_6vectorENS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEblmdS7_NS_14adl_serializerENS3_IhNS7_IhEEEEEC2IRbbLi0EEEOT_:
19074|  2.26k|    {
19075|  2.26k|        JSONSerializer<U>::to_json(*this, std::forward<CompatibleType>(val));
19076|  2.26k|        set_parents();
19077|  2.26k|        assert_invariant();
19078|  2.26k|    }
_ZN8nlohmann14adl_serializerIbvE7to_jsonINS_10basic_jsonINSt3__13mapENS4_6vectorENS4_12basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEblmdSA_S0_NS6_IhNSA_IhEEEEEERbEEDTcmclL_ZNS_12_GLOBAL__N_17to_jsonEEfp_clsr3stdE7forwardIT0_Efp0_EEcvv_EERT_OSI_:
 5096|  2.26k|    {
 5097|  2.26k|        ::nlohmann::to_json(j, std::forward<TargetType>(val));
 5098|  2.26k|    }
_ZNK8nlohmann6detail10to_json_fnclINS_10basic_jsonINSt3__13mapENS4_6vectorENS4_12basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEblmdSA_NS_14adl_serializerENS6_IhNSA_IhEEEEEERbEEDTcmcl7to_jsonfp_clsr3stdE7forwardIT0_Efp0_EEcvv_EERT_OSI_:
 5018|  2.26k|    {
 5019|  2.26k|        return to_json(j, std::forward<T>(val));
 5020|  2.26k|    }
_ZN8nlohmann10basic_jsonINSt3__13mapENS1_6vectorENS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEblmdS7_NS_14adl_serializerENS3_IhNS7_IhEEEEEC2IRllLi0EEEOT_:
19074|  5.57k|    {
19075|  5.57k|        JSONSerializer<U>::to_json(*this, std::forward<CompatibleType>(val));
19076|  5.57k|        set_parents();
19077|  5.57k|        assert_invariant();
19078|  5.57k|    }
_ZN8nlohmann14adl_serializerIlvE7to_jsonINS_10basic_jsonINSt3__13mapENS4_6vectorENS4_12basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEblmdSA_S0_NS6_IhNSA_IhEEEEEERlEEDTcmclL_ZNS_12_GLOBAL__N_17to_jsonEEfp_clsr3stdE7forwardIT0_Efp0_EEcvv_EERT_OSI_:
 5096|  5.57k|    {
 5097|  5.57k|        ::nlohmann::to_json(j, std::forward<TargetType>(val));
 5098|  5.57k|    }
_ZNK8nlohmann6detail10to_json_fnclINS_10basic_jsonINSt3__13mapENS4_6vectorENS4_12basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEblmdSA_NS_14adl_serializerENS6_IhNSA_IhEEEEEERlEEDTcmcl7to_jsonfp_clsr3stdE7forwardIT0_Efp0_EEcvv_EERT_OSI_:
 5018|  5.57k|    {
 5019|  5.57k|        return to_json(j, std::forward<T>(val));
 5020|  5.57k|    }
_ZN8nlohmann6detail7to_jsonINS_10basic_jsonINSt3__13mapENS3_6vectorENS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEblmdS9_NS_14adl_serializerENS5_IhNS9_IhEEEEEElLi0EEEvRT_T0_:
 4906|  5.57k|{
 4907|  5.57k|    external_constructor<value_t::number_integer>::construct(j, static_cast<typename BasicJsonType::number_integer_t>(val));
 4908|  5.57k|}
_ZNK8nlohmann6detail5lexerINS_10basic_jsonINSt3__13mapENS3_6vectorENS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEblmdS9_NS_14adl_serializerENS5_IhNS9_IhEEEEEENS0_22iterator_input_adapterIPKcEEE18get_number_integerEv:
 8033|  5.57k|    {
 8034|  5.57k|        return value_integer;
 8035|  5.57k|    }
_ZNK8nlohmann6detail5lexerINS_10basic_jsonINSt3__13mapENS3_6vectorENS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEblmdS9_NS_14adl_serializerENS5_IhNS9_IhEEEEEENS0_22iterator_input_adapterIPKcEEE19get_number_unsignedEv:
 8039|  4.72M|    {
 8040|  4.72M|        return value_unsigned;
 8041|  4.72M|    }
_ZNK8nlohmann6detail5lexerINS_10basic_jsonINSt3__13mapENS3_6vectorENS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEblmdS9_NS_14adl_serializerENS5_IhNS9_IhEEEEEENS0_22iterator_input_adapterIPKcEEE12get_positionEv:
 8061|    360|    {
 8062|    360|        return position;
 8063|    360|    }
_ZNK8nlohmann6detail10position_tcvmEv:
 2718|    180|    {
 2719|    180|        return chars_read_total;
 2720|    180|    }
_ZNK8nlohmann6detail5lexerINS_10basic_jsonINSt3__13mapENS3_6vectorENS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEblmdS9_NS_14adl_serializerENS5_IhNS9_IhEEEEEENS0_22iterator_input_adapterIPKcEEE16get_token_stringEv:
 8069|    286|    {
 8070|       |        // escape control characters
 8071|    286|        std::string result;
 8072|    286|        for (const auto c : token_string)
  ------------------
  |  Branch (8072:27): [True: 3.41M, False: 286]
  ------------------
 8073|  3.41M|        {
 8074|  3.41M|            if (static_cast<unsigned char>(c) <= '\x1F')
  ------------------
  |  Branch (8074:17): [True: 94.8k, False: 3.32M]
  ------------------
 8075|  94.8k|            {
 8076|       |                // escape control characters
 8077|  94.8k|                std::array<char, 9> cs{{}};
 8078|  94.8k|                (std::snprintf)(cs.data(), cs.size(), "<U+%.4X>", static_cast<unsigned char>(c)); // NOLINT(cppcoreguidelines-pro-type-vararg,hicpp-vararg)
 8079|  94.8k|                result += cs.data();
 8080|  94.8k|            }
 8081|  3.32M|            else
 8082|  3.32M|            {
 8083|       |                // add character as is
 8084|  3.32M|                result.push_back(static_cast<std::string::value_type>(c));
 8085|  3.32M|            }
 8086|  3.41M|        }
 8087|       |
 8088|    286|        return result;
 8089|    286|    }
_ZN8nlohmann6detail11parse_error6createINS_10basic_jsonINSt3__13mapENS4_6vectorENS4_12basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEblmdSA_NS_14adl_serializerENS6_IhNSA_IhEEEEEEEES1_iRKNS0_10position_tERKSC_RKT_:
 2914|    180|    {
 2915|    180|        std::string w = exception::name("parse_error", id_) + "parse error" +
 2916|    180|                        position_string(pos) + ": " + exception::diagnostics(context) + what_arg;
 2917|    180|        return parse_error(id_, pos.chars_read_total, w.c_str());
 2918|    180|    }
_ZN8nlohmann6detail11parse_error15position_stringERKNS0_10position_tE:
 2945|    180|    {
 2946|    180|        return " at line " + std::to_string(pos.lines_read + 1) +
 2947|    180|               ", column " + std::to_string(pos.chars_read_current_line);
 2948|    180|    }
_ZN8nlohmann6detail11parse_errorC2EimPKc:
 2942|    180|        : exception(id_, what_arg), byte(byte_) {}
_ZN8nlohmann6detail6parserINS_10basic_jsonINSt3__13mapENS3_6vectorENS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEblmdS9_NS_14adl_serializerENS5_IhNS9_IhEEEEEENS0_22iterator_input_adapterIPKcEEE17exception_messageENS0_10lexer_baseISF_E10token_typeERKSB_:
11384|    180|    {
11385|    180|        std::string error_msg = "syntax error ";
11386|       |
11387|    180|        if (!context.empty())
  ------------------
  |  Branch (11387:13): [True: 180, False: 0]
  ------------------
11388|    180|        {
11389|    180|            error_msg += "while parsing " + context + " ";
11390|    180|        }
11391|       |
11392|    180|        error_msg += "- ";
11393|       |
11394|    180|        if (last_token == token_type::parse_error)
  ------------------
  |  Branch (11394:13): [True: 106, False: 74]
  ------------------
11395|    106|        {
11396|    106|            error_msg += std::string(m_lexer.get_error_message()) + "; last read: '" +
11397|    106|                         m_lexer.get_token_string() + "'";
11398|    106|        }
11399|     74|        else
11400|     74|        {
11401|     74|            error_msg += "unexpected " + std::string(lexer_t::token_type_name(last_token));
11402|     74|        }
11403|       |
11404|    180|        if (expected != token_type::uninitialized)
  ------------------
  |  Branch (11404:13): [True: 153, False: 27]
  ------------------
11405|    153|        {
11406|    153|            error_msg += "; expected " + std::string(lexer_t::token_type_name(expected));
11407|    153|        }
11408|       |
11409|    180|        return error_msg;
11410|    180|    }
_ZNK8nlohmann6detail5lexerINS_10basic_jsonINSt3__13mapENS3_6vectorENS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEblmdS9_NS_14adl_serializerENS5_IhNS9_IhEEEEEENS0_22iterator_input_adapterIPKcEEE17get_error_messageEv:
 8094|    106|    {
 8095|    106|        return error_message;
 8096|    106|    }
_ZN8nlohmann6detail10lexer_baseINS_10basic_jsonINSt3__13mapENS3_6vectorENS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEblmdS9_NS_14adl_serializerENS5_IhNS9_IhEEEEEEE15token_type_nameENSG_10token_typeE:
 6683|    227|    {
 6684|    227|        switch (t)
 6685|    227|        {
 6686|      0|            case token_type::uninitialized:
  ------------------
  |  Branch (6686:13): [True: 0, False: 227]
  ------------------
 6687|      0|                return "<uninitialized>";
 6688|      0|            case token_type::literal_true:
  ------------------
  |  Branch (6688:13): [True: 0, False: 227]
  ------------------
 6689|      0|                return "true literal";
 6690|      0|            case token_type::literal_false:
  ------------------
  |  Branch (6690:13): [True: 0, False: 227]
  ------------------
 6691|      0|                return "false literal";
 6692|      0|            case token_type::literal_null:
  ------------------
  |  Branch (6692:13): [True: 0, False: 227]
  ------------------
 6693|      0|                return "null literal";
 6694|     31|            case token_type::value_string:
  ------------------
  |  Branch (6694:13): [True: 31, False: 196]
  ------------------
 6695|     31|                return "string literal";
 6696|      5|            case token_type::value_unsigned:
  ------------------
  |  Branch (6696:13): [True: 5, False: 222]
  ------------------
 6697|      5|            case token_type::value_integer:
  ------------------
  |  Branch (6697:13): [True: 0, False: 227]
  ------------------
 6698|      5|            case token_type::value_float:
  ------------------
  |  Branch (6698:13): [True: 0, False: 227]
  ------------------
 6699|      5|                return "number literal";
 6700|      2|            case token_type::begin_array:
  ------------------
  |  Branch (6700:13): [True: 2, False: 225]
  ------------------
 6701|      2|                return "'['";
 6702|      4|            case token_type::begin_object:
  ------------------
  |  Branch (6702:13): [True: 4, False: 223]
  ------------------
 6703|      4|                return "'{'";
 6704|     48|            case token_type::end_array:
  ------------------
  |  Branch (6704:13): [True: 48, False: 179]
  ------------------
 6705|     48|                return "']'";
 6706|     19|            case token_type::end_object:
  ------------------
  |  Branch (6706:13): [True: 19, False: 208]
  ------------------
 6707|     19|                return "'}'";
 6708|     34|            case token_type::name_separator:
  ------------------
  |  Branch (6708:13): [True: 34, False: 193]
  ------------------
 6709|     34|                return "':'";
 6710|      8|            case token_type::value_separator:
  ------------------
  |  Branch (6710:13): [True: 8, False: 219]
  ------------------
 6711|      8|                return "','";
 6712|      0|            case token_type::parse_error:
  ------------------
  |  Branch (6712:13): [True: 0, False: 227]
  ------------------
 6713|      0|                return "<parse error>";
 6714|     44|            case token_type::end_of_input:
  ------------------
  |  Branch (6714:13): [True: 44, False: 183]
  ------------------
 6715|     44|                return "end of input";
 6716|     32|            case token_type::literal_or_value:
  ------------------
  |  Branch (6716:13): [True: 32, False: 195]
  ------------------
 6717|     32|                return "'[', '{', or a literal";
 6718|       |            // LCOV_EXCL_START
 6719|      0|            default: // catch non-enum values
  ------------------
  |  Branch (6719:13): [True: 0, False: 227]
  ------------------
 6720|      0|                return "unknown token";
 6721|       |                // LCOV_EXCL_STOP
 6722|    227|        }
 6723|    227|    }
_ZN8nlohmann10basic_jsonINSt3__13mapENS1_6vectorENS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEblmdS7_NS_14adl_serializerENS3_IhNS7_IhEEEEEC2ENS_6detail7value_tE:
18977|  6.39M|    {
18978|  6.39M|        assert_invariant();
18979|  6.39M|    }
_ZN8nlohmann6detail19json_sax_dom_parserINS_10basic_jsonINSt3__13mapENS3_6vectorENS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEblmdS9_NS_14adl_serializerENS5_IhNS9_IhEEEEEEEC2ERSF_b:
 6082|  1.57k|    {}
_ZN8nlohmann6detail6parserINS_10basic_jsonINSt3__13mapENS3_6vectorENS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEblmdS9_NS_14adl_serializerENS5_IhNS9_IhEEEEEENS0_22iterator_input_adapterIPKcEEE18sax_parse_internalINS0_19json_sax_dom_parserISF_EEEEbPT_:
11098|  1.57k|    {
11099|       |        // stack to remember the hierarchy of structured values we are parsing
11100|       |        // true = array; false = object
11101|  1.57k|        std::vector<bool> states;
11102|       |        // value to avoid a goto (see comment where set to true)
11103|  1.57k|        bool skip_to_state_evaluation = false;
11104|       |
11105|  11.1M|        while (true)
  ------------------
  |  Branch (11105:16): [Folded - Ignored]
  ------------------
11106|  11.1M|        {
11107|  11.1M|            if (!skip_to_state_evaluation)
  ------------------
  |  Branch (11107:17): [True: 10.8M, False: 291k]
  ------------------
11108|  10.8M|            {
11109|       |                // invariant: get_token() was called before each iteration
11110|  10.8M|                switch (last_token)
11111|  10.8M|                {
11112|  1.31M|                    case token_type::begin_object:
  ------------------
  |  Branch (11112:21): [True: 1.31M, False: 9.51M]
  ------------------
11113|  1.31M|                    {
11114|  1.31M|                        if (JSON_HEDLEY_UNLIKELY(!sax->start_object(std::size_t(-1))))
  ------------------
  |  | 1529|  1.31M|#  define JSON_HEDLEY_UNLIKELY(expr)                    __builtin_expect                 (!!(expr),    0                  )
  |  |  ------------------
  |  |  |  Branch (1529:57): [True: 0, False: 1.31M]
  |  |  ------------------
  ------------------
11115|      0|                        {
11116|      0|                            return false;
11117|      0|                        }
11118|       |
11119|       |                        // closing } -> we are done
11120|  1.31M|                        if (get_token() == token_type::end_object)
  ------------------
  |  Branch (11120:29): [True: 874k, False: 440k]
  ------------------
11121|   874k|                        {
11122|   874k|                            if (JSON_HEDLEY_UNLIKELY(!sax->end_object()))
  ------------------
  |  | 1529|   874k|#  define JSON_HEDLEY_UNLIKELY(expr)                    __builtin_expect                 (!!(expr),    0                  )
  |  |  ------------------
  |  |  |  Branch (1529:57): [True: 0, False: 874k]
  |  |  ------------------
  ------------------
11123|      0|                            {
11124|      0|                                return false;
11125|      0|                            }
11126|   874k|                            break;
11127|   874k|                        }
11128|       |
11129|       |                        // parse key
11130|   440k|                        if (JSON_HEDLEY_UNLIKELY(last_token != token_type::value_string))
  ------------------
  |  | 1529|   440k|#  define JSON_HEDLEY_UNLIKELY(expr)                    __builtin_expect                 (!!(expr),    0                  )
  |  |  ------------------
  |  |  |  Branch (1529:57): [True: 14, False: 440k]
  |  |  ------------------
  ------------------
11131|     14|                        {
11132|     14|                            return sax->parse_error(m_lexer.get_position(),
11133|     14|                                                    m_lexer.get_token_string(),
11134|     14|                                                    parse_error::create(101, m_lexer.get_position(), exception_message(token_type::value_string, "object key"), BasicJsonType()));
11135|     14|                        }
11136|   440k|                        if (JSON_HEDLEY_UNLIKELY(!sax->key(m_lexer.get_string())))
  ------------------
  |  | 1529|   440k|#  define JSON_HEDLEY_UNLIKELY(expr)                    __builtin_expect                 (!!(expr),    0                  )
  |  |  ------------------
  |  |  |  Branch (1529:57): [True: 0, False: 440k]
  |  |  ------------------
  ------------------
11137|      0|                        {
11138|      0|                            return false;
11139|      0|                        }
11140|       |
11141|       |                        // parse separator (:)
11142|   440k|                        if (JSON_HEDLEY_UNLIKELY(get_token() != token_type::name_separator))
  ------------------
  |  | 1529|   440k|#  define JSON_HEDLEY_UNLIKELY(expr)                    __builtin_expect                 (!!(expr),    0                  )
  |  |  ------------------
  |  |  |  Branch (1529:57): [True: 12, False: 440k]
  |  |  ------------------
  ------------------
11143|     12|                        {
11144|     12|                            return sax->parse_error(m_lexer.get_position(),
11145|     12|                                                    m_lexer.get_token_string(),
11146|     12|                                                    parse_error::create(101, m_lexer.get_position(), exception_message(token_type::name_separator, "object separator"), BasicJsonType()));
11147|     12|                        }
11148|       |
11149|       |                        // remember we are now inside an object
11150|   440k|                        states.push_back(false);
11151|       |
11152|       |                        // parse values
11153|   440k|                        get_token();
11154|   440k|                        continue;
11155|   440k|                    }
11156|       |
11157|  4.59M|                    case token_type::begin_array:
  ------------------
  |  Branch (11157:21): [True: 4.59M, False: 6.23M]
  ------------------
11158|  4.59M|                    {
11159|  4.59M|                        if (JSON_HEDLEY_UNLIKELY(!sax->start_array(std::size_t(-1))))
  ------------------
  |  | 1529|  4.59M|#  define JSON_HEDLEY_UNLIKELY(expr)                    __builtin_expect                 (!!(expr),    0                  )
  |  |  ------------------
  |  |  |  Branch (1529:57): [True: 0, False: 4.59M]
  |  |  ------------------
  ------------------
11160|      0|                        {
11161|      0|                            return false;
11162|      0|                        }
11163|       |
11164|       |                        // closing ] -> we are done
11165|  4.59M|                        if (get_token() == token_type::end_array)
  ------------------
  |  Branch (11165:29): [True: 62.3k, False: 4.53M]
  ------------------
11166|  62.3k|                        {
11167|  62.3k|                            if (JSON_HEDLEY_UNLIKELY(!sax->end_array()))
  ------------------
  |  | 1529|  62.3k|#  define JSON_HEDLEY_UNLIKELY(expr)                    __builtin_expect                 (!!(expr),    0                  )
  |  |  ------------------
  |  |  |  Branch (1529:57): [True: 0, False: 62.3k]
  |  |  ------------------
  ------------------
11168|      0|                            {
11169|      0|                                return false;
11170|      0|                            }
11171|  62.3k|                            break;
11172|  62.3k|                        }
11173|       |
11174|       |                        // remember we are now inside an array
11175|  4.53M|                        states.push_back(true);
11176|       |
11177|       |                        // parse values (no need to call get_token)
11178|  4.53M|                        continue;
11179|  4.59M|                    }
11180|       |
11181|  11.0k|                    case token_type::value_float:
  ------------------
  |  Branch (11181:21): [True: 11.0k, False: 10.8M]
  ------------------
11182|  11.0k|                    {
11183|  11.0k|                        const auto res = m_lexer.get_number_float();
11184|       |
11185|  11.0k|                        if (JSON_HEDLEY_UNLIKELY(!std::isfinite(res)))
  ------------------
  |  | 1529|  11.0k|#  define JSON_HEDLEY_UNLIKELY(expr)                    __builtin_expect                 (!!(expr),    0                  )
  |  |  ------------------
  |  |  |  Branch (1529:57): [True: 0, False: 11.0k]
  |  |  ------------------
  ------------------
11186|      0|                        {
11187|      0|                            return sax->parse_error(m_lexer.get_position(),
11188|      0|                                                    m_lexer.get_token_string(),
11189|      0|                                                    out_of_range::create(406, "number overflow parsing '" + m_lexer.get_token_string() + "'", BasicJsonType()));
11190|      0|                        }
11191|       |
11192|  11.0k|                        if (JSON_HEDLEY_UNLIKELY(!sax->number_float(res, m_lexer.get_string())))
  ------------------
  |  | 1529|  11.0k|#  define JSON_HEDLEY_UNLIKELY(expr)                    __builtin_expect                 (!!(expr),    0                  )
  |  |  ------------------
  |  |  |  Branch (1529:57): [True: 0, False: 11.0k]
  |  |  ------------------
  ------------------
11193|      0|                        {
11194|      0|                            return false;
11195|      0|                        }
11196|       |
11197|  11.0k|                        break;
11198|  11.0k|                    }
11199|       |
11200|  11.0k|                    case token_type::literal_false:
  ------------------
  |  Branch (11200:21): [True: 0, False: 10.8M]
  ------------------
11201|      0|                    {
11202|      0|                        if (JSON_HEDLEY_UNLIKELY(!sax->boolean(false)))
  ------------------
  |  | 1529|      0|#  define JSON_HEDLEY_UNLIKELY(expr)                    __builtin_expect                 (!!(expr),    0                  )
  |  |  ------------------
  |  |  |  Branch (1529:57): [True: 0, False: 0]
  |  |  ------------------
  ------------------
11203|      0|                        {
11204|      0|                            return false;
11205|      0|                        }
11206|      0|                        break;
11207|      0|                    }
11208|       |
11209|    491|                    case token_type::literal_null:
  ------------------
  |  Branch (11209:21): [True: 491, False: 10.8M]
  ------------------
11210|    491|                    {
11211|    491|                        if (JSON_HEDLEY_UNLIKELY(!sax->null()))
  ------------------
  |  | 1529|    491|#  define JSON_HEDLEY_UNLIKELY(expr)                    __builtin_expect                 (!!(expr),    0                  )
  |  |  ------------------
  |  |  |  Branch (1529:57): [True: 0, False: 491]
  |  |  ------------------
  ------------------
11212|      0|                        {
11213|      0|                            return false;
11214|      0|                        }
11215|    491|                        break;
11216|    491|                    }
11217|       |
11218|  2.26k|                    case token_type::literal_true:
  ------------------
  |  Branch (11218:21): [True: 2.26k, False: 10.8M]
  ------------------
11219|  2.26k|                    {
11220|  2.26k|                        if (JSON_HEDLEY_UNLIKELY(!sax->boolean(true)))
  ------------------
  |  | 1529|  2.26k|#  define JSON_HEDLEY_UNLIKELY(expr)                    __builtin_expect                 (!!(expr),    0                  )
  |  |  ------------------
  |  |  |  Branch (1529:57): [True: 0, False: 2.26k]
  |  |  ------------------
  ------------------
11221|      0|                        {
11222|      0|                            return false;
11223|      0|                        }
11224|  2.26k|                        break;
11225|  2.26k|                    }
11226|       |
11227|  5.57k|                    case token_type::value_integer:
  ------------------
  |  Branch (11227:21): [True: 5.57k, False: 10.8M]
  ------------------
11228|  5.57k|                    {
11229|  5.57k|                        if (JSON_HEDLEY_UNLIKELY(!sax->number_integer(m_lexer.get_number_integer())))
  ------------------
  |  | 1529|  5.57k|#  define JSON_HEDLEY_UNLIKELY(expr)                    __builtin_expect                 (!!(expr),    0                  )
  |  |  ------------------
  |  |  |  Branch (1529:57): [True: 0, False: 5.57k]
  |  |  ------------------
  ------------------
11230|      0|                        {
11231|      0|                            return false;
11232|      0|                        }
11233|  5.57k|                        break;
11234|  5.57k|                    }
11235|       |
11236|   174k|                    case token_type::value_string:
  ------------------
  |  Branch (11236:21): [True: 174k, False: 10.6M]
  ------------------
11237|   174k|                    {
11238|   174k|                        if (JSON_HEDLEY_UNLIKELY(!sax->string(m_lexer.get_string())))
  ------------------
  |  | 1529|   174k|#  define JSON_HEDLEY_UNLIKELY(expr)                    __builtin_expect                 (!!(expr),    0                  )
  |  |  ------------------
  |  |  |  Branch (1529:57): [True: 0, False: 174k]
  |  |  ------------------
  ------------------
11239|      0|                        {
11240|      0|                            return false;
11241|      0|                        }
11242|   174k|                        break;
11243|   174k|                    }
11244|       |
11245|  4.72M|                    case token_type::value_unsigned:
  ------------------
  |  Branch (11245:21): [True: 4.72M, False: 6.10M]
  ------------------
11246|  4.72M|                    {
11247|  4.72M|                        if (JSON_HEDLEY_UNLIKELY(!sax->number_unsigned(m_lexer.get_number_unsigned())))
  ------------------
  |  | 1529|  4.72M|#  define JSON_HEDLEY_UNLIKELY(expr)                    __builtin_expect                 (!!(expr),    0                  )
  |  |  ------------------
  |  |  |  Branch (1529:57): [True: 0, False: 4.72M]
  |  |  ------------------
  ------------------
11248|      0|                        {
11249|      0|                            return false;
11250|      0|                        }
11251|  4.72M|                        break;
11252|  4.72M|                    }
11253|       |
11254|  4.72M|                    case token_type::parse_error:
  ------------------
  |  Branch (11254:21): [True: 27, False: 10.8M]
  ------------------
11255|     27|                    {
11256|       |                        // using "uninitialized" to avoid "expected" message
11257|     27|                        return sax->parse_error(m_lexer.get_position(),
11258|     27|                                                m_lexer.get_token_string(),
11259|     27|                                                parse_error::create(101, m_lexer.get_position(), exception_message(token_type::uninitialized, "value"), BasicJsonType()));
11260|  4.72M|                    }
11261|       |
11262|      0|                    case token_type::uninitialized:
  ------------------
  |  Branch (11262:21): [True: 0, False: 10.8M]
  ------------------
11263|      0|                    case token_type::end_array:
  ------------------
  |  Branch (11263:21): [True: 0, False: 10.8M]
  ------------------
11264|      2|                    case token_type::end_object:
  ------------------
  |  Branch (11264:21): [True: 2, False: 10.8M]
  ------------------
11265|      2|                    case token_type::name_separator:
  ------------------
  |  Branch (11265:21): [True: 0, False: 10.8M]
  ------------------
11266|      6|                    case token_type::value_separator:
  ------------------
  |  Branch (11266:21): [True: 4, False: 10.8M]
  ------------------
11267|     32|                    case token_type::end_of_input:
  ------------------
  |  Branch (11267:21): [True: 26, False: 10.8M]
  ------------------
11268|     32|                    case token_type::literal_or_value:
  ------------------
  |  Branch (11268:21): [True: 0, False: 10.8M]
  ------------------
11269|     32|                    default: // the last token was unexpected
  ------------------
  |  Branch (11269:21): [True: 0, False: 10.8M]
  ------------------
11270|     32|                    {
11271|     32|                        return sax->parse_error(m_lexer.get_position(),
11272|     32|                                                m_lexer.get_token_string(),
11273|     32|                                                parse_error::create(101, m_lexer.get_position(), exception_message(token_type::literal_or_value, "value"), BasicJsonType()));
11274|     32|                    }
11275|  10.8M|                }
11276|  10.8M|            }
11277|   291k|            else
11278|   291k|            {
11279|   291k|                skip_to_state_evaluation = false;
11280|   291k|            }
11281|       |
11282|       |            // we reached this line after we successfully parsed a value
11283|  6.14M|            if (states.empty())
  ------------------
  |  Branch (11283:17): [True: 1.39k, False: 6.14M]
  ------------------
11284|  1.39k|            {
11285|       |                // empty stack: we reached the end of the hierarchy: done
11286|  1.39k|                return true;
11287|  1.39k|            }
11288|       |
11289|  6.14M|            if (states.back())  // array
  ------------------
  |  Branch (11289:17): [True: 5.84M, False: 298k]
  ------------------
11290|  5.84M|            {
11291|       |                // comma -> next value
11292|  5.84M|                if (get_token() == token_type::value_separator)
  ------------------
  |  Branch (11292:21): [True: 5.80M, False: 38.5k]
  ------------------
11293|  5.80M|                {
11294|       |                    // parse a new value
11295|  5.80M|                    get_token();
11296|  5.80M|                    continue;
11297|  5.80M|                }
11298|       |
11299|       |                // closing ]
11300|  38.5k|                if (JSON_HEDLEY_LIKELY(last_token == token_type::end_array))
  ------------------
  |  | 1528|  38.5k|#  define JSON_HEDLEY_LIKELY(expr)                      __builtin_expect                 (!!(expr),    1                  )
  |  |  ------------------
  |  |  |  Branch (1528:57): [True: 38.5k, False: 48]
  |  |  ------------------
  ------------------
11301|  38.5k|                {
11302|  38.5k|                    if (JSON_HEDLEY_UNLIKELY(!sax->end_array()))
  ------------------
  |  | 1529|  38.5k|#  define JSON_HEDLEY_UNLIKELY(expr)                    __builtin_expect                 (!!(expr),    0                  )
  |  |  ------------------
  |  |  |  Branch (1529:57): [True: 0, False: 38.5k]
  |  |  ------------------
  ------------------
11303|      0|                    {
11304|      0|                        return false;
11305|      0|                    }
11306|       |
11307|       |                    // We are done with this array. Before we can parse a
11308|       |                    // new value, we need to evaluate the new state first.
11309|       |                    // By setting skip_to_state_evaluation to false, we
11310|       |                    // are effectively jumping to the beginning of this if.
11311|  38.5k|                    JSON_ASSERT(!states.empty());
  ------------------
  |  | 2372|  38.5k|    #define JSON_ASSERT(x) assert(x)
  ------------------
11312|      0|                    states.pop_back();
11313|  38.5k|                    skip_to_state_evaluation = true;
11314|  38.5k|                    continue;
11315|  38.5k|                }
11316|       |
11317|     48|                return sax->parse_error(m_lexer.get_position(),
11318|     48|                                        m_lexer.get_token_string(),
11319|     48|                                        parse_error::create(101, m_lexer.get_position(), exception_message(token_type::end_array, "array"), BasicJsonType()));
11320|  38.5k|            }
11321|       |
11322|       |            // states.back() is false -> object
11323|       |
11324|       |            // comma -> next value
11325|   298k|            if (get_token() == token_type::value_separator)
  ------------------
  |  Branch (11325:17): [True: 45.5k, False: 252k]
  ------------------
11326|  45.5k|            {
11327|       |                // parse key
11328|  45.5k|                if (JSON_HEDLEY_UNLIKELY(get_token() != token_type::value_string))
  ------------------
  |  | 1529|  45.5k|#  define JSON_HEDLEY_UNLIKELY(expr)                    __builtin_expect                 (!!(expr),    0                  )
  |  |  ------------------
  |  |  |  Branch (1529:57): [True: 11, False: 45.4k]
  |  |  ------------------
  ------------------
11329|     11|                {
11330|     11|                    return sax->parse_error(m_lexer.get_position(),
11331|     11|                                            m_lexer.get_token_string(),
11332|     11|                                            parse_error::create(101, m_lexer.get_position(), exception_message(token_type::value_string, "object key"), BasicJsonType()));
11333|     11|                }
11334|       |
11335|  45.4k|                if (JSON_HEDLEY_UNLIKELY(!sax->key(m_lexer.get_string())))
  ------------------
  |  | 1529|  45.4k|#  define JSON_HEDLEY_UNLIKELY(expr)                    __builtin_expect                 (!!(expr),    0                  )
  |  |  ------------------
  |  |  |  Branch (1529:57): [True: 0, False: 45.4k]
  |  |  ------------------
  ------------------
11336|      0|                {
11337|      0|                    return false;
11338|      0|                }
11339|       |
11340|       |                // parse separator (:)
11341|  45.4k|                if (JSON_HEDLEY_UNLIKELY(get_token() != token_type::name_separator))
  ------------------
  |  | 1529|  45.4k|#  define JSON_HEDLEY_UNLIKELY(expr)                    __builtin_expect                 (!!(expr),    0                  )
  |  |  ------------------
  |  |  |  Branch (1529:57): [True: 19, False: 45.4k]
  |  |  ------------------
  ------------------
11342|     19|                {
11343|     19|                    return sax->parse_error(m_lexer.get_position(),
11344|     19|                                            m_lexer.get_token_string(),
11345|     19|                                            parse_error::create(101, m_lexer.get_position(), exception_message(token_type::name_separator, "object separator"), BasicJsonType()));
11346|     19|                }
11347|       |
11348|       |                // parse values
11349|  45.4k|                get_token();
11350|  45.4k|                continue;
11351|  45.4k|            }
11352|       |
11353|       |            // closing }
11354|   252k|            if (JSON_HEDLEY_LIKELY(last_token == token_type::end_object))
  ------------------
  |  | 1528|   252k|#  define JSON_HEDLEY_LIKELY(expr)                      __builtin_expect                 (!!(expr),    1                  )
  |  |  ------------------
  |  |  |  Branch (1528:57): [True: 252k, False: 16]
  |  |  ------------------
  ------------------
11355|   252k|            {
11356|   252k|                if (JSON_HEDLEY_UNLIKELY(!sax->end_object()))
  ------------------
  |  | 1529|   252k|#  define JSON_HEDLEY_UNLIKELY(expr)                    __builtin_expect                 (!!(expr),    0                  )
  |  |  ------------------
  |  |  |  Branch (1529:57): [True: 0, False: 252k]
  |  |  ------------------
  ------------------
11357|      0|                {
11358|      0|                    return false;
11359|      0|                }
11360|       |
11361|       |                // We are done with this object. Before we can parse a
11362|       |                // new value, we need to evaluate the new state first.
11363|       |                // By setting skip_to_state_evaluation to false, we
11364|       |                // are effectively jumping to the beginning of this if.
11365|   252k|                JSON_ASSERT(!states.empty());
  ------------------
  |  | 2372|   252k|    #define JSON_ASSERT(x) assert(x)
  ------------------
11366|      0|                states.pop_back();
11367|   252k|                skip_to_state_evaluation = true;
11368|   252k|                continue;
11369|   252k|            }
11370|       |
11371|     16|            return sax->parse_error(m_lexer.get_position(),
11372|     16|                                    m_lexer.get_token_string(),
11373|     16|                                    parse_error::create(101, m_lexer.get_position(), exception_message(token_type::end_object, "object"), BasicJsonType()));
11374|   252k|        }
11375|  1.57k|    }
_ZN8nlohmann6detail19json_sax_dom_parserINS_10basic_jsonINSt3__13mapENS3_6vectorENS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEblmdS9_NS_14adl_serializerENS5_IhNS9_IhEEEEEEE12start_objectEm:
 6134|  1.31M|    {
 6135|  1.31M|        ref_stack.push_back(handle_value(BasicJsonType::value_t::object));
 6136|       |
 6137|  1.31M|        if (JSON_HEDLEY_UNLIKELY(len != std::size_t(-1) && len > ref_stack.back()->max_size()))
  ------------------
  |  | 1529|  1.31M|#  define JSON_HEDLEY_UNLIKELY(expr)                    __builtin_expect                 (!!(expr),    0                  )
  |  |  ------------------
  |  |  |  Branch (1529:57): [True: 0, False: 1.31M]
  |  |  |  Branch (1529:94): [True: 0, False: 1.31M]
  |  |  |  Branch (1529:94): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 6138|      0|        {
 6139|      0|            JSON_THROW(out_of_range::create(408, "excessive object size: " + std::to_string(len), *ref_stack.back()));
  ------------------
  |  | 2337|      0|    #define JSON_THROW(exception) throw exception
  ------------------
 6140|      0|        }
 6141|       |
 6142|  1.31M|        return true;
 6143|  1.31M|    }
_ZN8nlohmann6detail19json_sax_dom_parserINS_10basic_jsonINSt3__13mapENS3_6vectorENS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEblmdS9_NS_14adl_serializerENS5_IhNS9_IhEEEEEEE12handle_valueINS0_7value_tEEEPSF_OT_:
 6206|  5.91M|    {
 6207|  5.91M|        if (ref_stack.empty())
  ------------------
  |  Branch (6207:13): [True: 1.57k, False: 5.91M]
  ------------------
 6208|  1.57k|        {
 6209|  1.57k|            root = BasicJsonType(std::forward<Value>(v));
 6210|  1.57k|            return &root;
 6211|  1.57k|        }
 6212|       |
 6213|  5.91M|        JSON_ASSERT(ref_stack.back()->is_array() || ref_stack.back()->is_object());
  ------------------
  |  | 2372|  5.91M|    #define JSON_ASSERT(x) assert(x)
  ------------------
 6214|       |
 6215|  5.91M|        if (ref_stack.back()->is_array())
  ------------------
  |  Branch (6215:13): [True: 5.57M, False: 341k]
  ------------------
 6216|  5.57M|        {
 6217|  5.57M|            ref_stack.back()->m_value.array->emplace_back(std::forward<Value>(v));
 6218|  5.57M|            return &(ref_stack.back()->m_value.array->back());
 6219|  5.57M|        }
 6220|       |
 6221|   341k|        JSON_ASSERT(ref_stack.back()->is_object());
  ------------------
  |  | 2372|   341k|    #define JSON_ASSERT(x) assert(x)
  ------------------
 6222|   341k|        JSON_ASSERT(object_element);
  ------------------
  |  | 2372|   341k|    #define JSON_ASSERT(x) assert(x)
  ------------------
 6223|      0|        *object_element = BasicJsonType(std::forward<Value>(v));
 6224|   341k|        return object_element;
 6225|  5.91M|    }
_ZN8nlohmann6detail19json_sax_dom_parserINS_10basic_jsonINSt3__13mapENS3_6vectorENS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEblmdS9_NS_14adl_serializerENS5_IhNS9_IhEEEEEEE10end_objectEv:
 6153|  1.12M|    {
 6154|  1.12M|        ref_stack.back()->set_parents();
 6155|  1.12M|        ref_stack.pop_back();
 6156|  1.12M|        return true;
 6157|  1.12M|    }
_ZN8nlohmann6detail19json_sax_dom_parserINS_10basic_jsonINSt3__13mapENS3_6vectorENS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEblmdS9_NS_14adl_serializerENS5_IhNS9_IhEEEEEEE3keyERSB_:
 6146|   485k|    {
 6147|       |        // add null at given key and store the reference for later
 6148|   485k|        object_element = &(ref_stack.back()->m_value.object->operator[](val));
 6149|   485k|        return true;
 6150|   485k|    }
_ZN8nlohmann6detail19json_sax_dom_parserINS_10basic_jsonINSt3__13mapENS3_6vectorENS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEblmdS9_NS_14adl_serializerENS5_IhNS9_IhEEEEEEE11start_arrayEm:
 6160|  4.59M|    {
 6161|  4.59M|        ref_stack.push_back(handle_value(BasicJsonType::value_t::array));
 6162|       |
 6163|  4.59M|        if (JSON_HEDLEY_UNLIKELY(len != std::size_t(-1) && len > ref_stack.back()->max_size()))
  ------------------
  |  | 1529|  4.59M|#  define JSON_HEDLEY_UNLIKELY(expr)                    __builtin_expect                 (!!(expr),    0                  )
  |  |  ------------------
  |  |  |  Branch (1529:57): [True: 0, False: 4.59M]
  |  |  |  Branch (1529:94): [True: 0, False: 4.59M]
  |  |  |  Branch (1529:94): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 6164|      0|        {
 6165|      0|            JSON_THROW(out_of_range::create(408, "excessive array size: " + std::to_string(len), *ref_stack.back()));
  ------------------
  |  | 2337|      0|    #define JSON_THROW(exception) throw exception
  ------------------
 6166|      0|        }
 6167|       |
 6168|  4.59M|        return true;
 6169|  4.59M|    }
_ZN8nlohmann6detail19json_sax_dom_parserINS_10basic_jsonINSt3__13mapENS3_6vectorENS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEblmdS9_NS_14adl_serializerENS5_IhNS9_IhEEEEEEE9end_arrayEv:
 6172|   100k|    {
 6173|   100k|        ref_stack.back()->set_parents();
 6174|   100k|        ref_stack.pop_back();
 6175|   100k|        return true;
 6176|   100k|    }
_ZN8nlohmann6detail19json_sax_dom_parserINS_10basic_jsonINSt3__13mapENS3_6vectorENS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEblmdS9_NS_14adl_serializerENS5_IhNS9_IhEEEEEEE12number_floatEdRKSB_:
 6116|  11.0k|    {
 6117|  11.0k|        handle_value(val);
 6118|  11.0k|        return true;
 6119|  11.0k|    }
_ZN8nlohmann6detail19json_sax_dom_parserINS_10basic_jsonINSt3__13mapENS3_6vectorENS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEblmdS9_NS_14adl_serializerENS5_IhNS9_IhEEEEEEE12handle_valueIRdEEPSF_OT_:
 6206|  11.0k|    {
 6207|  11.0k|        if (ref_stack.empty())
  ------------------
  |  Branch (6207:13): [True: 0, False: 11.0k]
  ------------------
 6208|      0|        {
 6209|      0|            root = BasicJsonType(std::forward<Value>(v));
 6210|      0|            return &root;
 6211|      0|        }
 6212|       |
 6213|  11.0k|        JSON_ASSERT(ref_stack.back()->is_array() || ref_stack.back()->is_object());
  ------------------
  |  | 2372|  11.0k|    #define JSON_ASSERT(x) assert(x)
  ------------------
 6214|       |
 6215|  11.0k|        if (ref_stack.back()->is_array())
  ------------------
  |  Branch (6215:13): [True: 10.7k, False: 332]
  ------------------
 6216|  10.7k|        {
 6217|  10.7k|            ref_stack.back()->m_value.array->emplace_back(std::forward<Value>(v));
 6218|  10.7k|            return &(ref_stack.back()->m_value.array->back());
 6219|  10.7k|        }
 6220|       |
 6221|    332|        JSON_ASSERT(ref_stack.back()->is_object());
  ------------------
  |  | 2372|    332|    #define JSON_ASSERT(x) assert(x)
  ------------------
 6222|    332|        JSON_ASSERT(object_element);
  ------------------
  |  | 2372|    332|    #define JSON_ASSERT(x) assert(x)
  ------------------
 6223|      0|        *object_element = BasicJsonType(std::forward<Value>(v));
 6224|    332|        return object_element;
 6225|  11.0k|    }
_ZN8nlohmann6detail19json_sax_dom_parserINS_10basic_jsonINSt3__13mapENS3_6vectorENS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEblmdS9_NS_14adl_serializerENS5_IhNS9_IhEEEEEEE7booleanEb:
 6098|  2.26k|    {
 6099|  2.26k|        handle_value(val);
 6100|  2.26k|        return true;
 6101|  2.26k|    }
_ZN8nlohmann6detail19json_sax_dom_parserINS_10basic_jsonINSt3__13mapENS3_6vectorENS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEblmdS9_NS_14adl_serializerENS5_IhNS9_IhEEEEEEE12handle_valueIRbEEPSF_OT_:
 6206|  2.26k|    {
 6207|  2.26k|        if (ref_stack.empty())
  ------------------
  |  Branch (6207:13): [True: 0, False: 2.26k]
  ------------------
 6208|      0|        {
 6209|      0|            root = BasicJsonType(std::forward<Value>(v));
 6210|      0|            return &root;
 6211|      0|        }
 6212|       |
 6213|  2.26k|        JSON_ASSERT(ref_stack.back()->is_array() || ref_stack.back()->is_object());
  ------------------
  |  | 2372|  2.26k|    #define JSON_ASSERT(x) assert(x)
  ------------------
 6214|       |
 6215|  2.26k|        if (ref_stack.back()->is_array())
  ------------------
  |  Branch (6215:13): [True: 2.05k, False: 213]
  ------------------
 6216|  2.05k|        {
 6217|  2.05k|            ref_stack.back()->m_value.array->emplace_back(std::forward<Value>(v));
 6218|  2.05k|            return &(ref_stack.back()->m_value.array->back());
 6219|  2.05k|        }
 6220|       |
 6221|    213|        JSON_ASSERT(ref_stack.back()->is_object());
  ------------------
  |  | 2372|    213|    #define JSON_ASSERT(x) assert(x)
  ------------------
 6222|    213|        JSON_ASSERT(object_element);
  ------------------
  |  | 2372|    213|    #define JSON_ASSERT(x) assert(x)
  ------------------
 6223|      0|        *object_element = BasicJsonType(std::forward<Value>(v));
 6224|    213|        return object_element;
 6225|  2.26k|    }
_ZN8nlohmann6detail19json_sax_dom_parserINS_10basic_jsonINSt3__13mapENS3_6vectorENS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEblmdS9_NS_14adl_serializerENS5_IhNS9_IhEEEEEEE4nullEv:
 6092|    491|    {
 6093|    491|        handle_value(nullptr);
 6094|    491|        return true;
 6095|    491|    }
_ZN8nlohmann6detail19json_sax_dom_parserINS_10basic_jsonINSt3__13mapENS3_6vectorENS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEblmdS9_NS_14adl_serializerENS5_IhNS9_IhEEEEEEE12handle_valueIDnEEPSF_OT_:
 6206|    491|    {
 6207|    491|        if (ref_stack.empty())
  ------------------
  |  Branch (6207:13): [True: 0, False: 491]
  ------------------
 6208|      0|        {
 6209|      0|            root = BasicJsonType(std::forward<Value>(v));
 6210|      0|            return &root;
 6211|      0|        }
 6212|       |
 6213|    491|        JSON_ASSERT(ref_stack.back()->is_array() || ref_stack.back()->is_object());
  ------------------
  |  | 2372|    491|    #define JSON_ASSERT(x) assert(x)
  ------------------
 6214|       |
 6215|    491|        if (ref_stack.back()->is_array())
  ------------------
  |  Branch (6215:13): [True: 363, False: 128]
  ------------------
 6216|    363|        {
 6217|    363|            ref_stack.back()->m_value.array->emplace_back(std::forward<Value>(v));
 6218|    363|            return &(ref_stack.back()->m_value.array->back());
 6219|    363|        }
 6220|       |
 6221|    128|        JSON_ASSERT(ref_stack.back()->is_object());
  ------------------
  |  | 2372|    128|    #define JSON_ASSERT(x) assert(x)
  ------------------
 6222|    128|        JSON_ASSERT(object_element);
  ------------------
  |  | 2372|    128|    #define JSON_ASSERT(x) assert(x)
  ------------------
 6223|      0|        *object_element = BasicJsonType(std::forward<Value>(v));
 6224|    128|        return object_element;
 6225|    491|    }
_ZN8nlohmann6detail19json_sax_dom_parserINS_10basic_jsonINSt3__13mapENS3_6vectorENS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEblmdS9_NS_14adl_serializerENS5_IhNS9_IhEEEEEEE14number_integerEl:
 6104|  5.57k|    {
 6105|  5.57k|        handle_value(val);
 6106|  5.57k|        return true;
 6107|  5.57k|    }
_ZN8nlohmann6detail19json_sax_dom_parserINS_10basic_jsonINSt3__13mapENS3_6vectorENS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEblmdS9_NS_14adl_serializerENS5_IhNS9_IhEEEEEEE12handle_valueIRlEEPSF_OT_:
 6206|  5.57k|    {
 6207|  5.57k|        if (ref_stack.empty())
  ------------------
  |  Branch (6207:13): [True: 0, False: 5.57k]
  ------------------
 6208|      0|        {
 6209|      0|            root = BasicJsonType(std::forward<Value>(v));
 6210|      0|            return &root;
 6211|      0|        }
 6212|       |
 6213|  5.57k|        JSON_ASSERT(ref_stack.back()->is_array() || ref_stack.back()->is_object());
  ------------------
  |  | 2372|  5.57k|    #define JSON_ASSERT(x) assert(x)
  ------------------
 6214|       |
 6215|  5.57k|        if (ref_stack.back()->is_array())
  ------------------
  |  Branch (6215:13): [True: 2.22k, False: 3.35k]
  ------------------
 6216|  2.22k|        {
 6217|  2.22k|            ref_stack.back()->m_value.array->emplace_back(std::forward<Value>(v));
 6218|  2.22k|            return &(ref_stack.back()->m_value.array->back());
 6219|  2.22k|        }
 6220|       |
 6221|  3.35k|        JSON_ASSERT(ref_stack.back()->is_object());
  ------------------
  |  | 2372|  3.35k|    #define JSON_ASSERT(x) assert(x)
  ------------------
 6222|  3.35k|        JSON_ASSERT(object_element);
  ------------------
  |  | 2372|  3.35k|    #define JSON_ASSERT(x) assert(x)
  ------------------
 6223|      0|        *object_element = BasicJsonType(std::forward<Value>(v));
 6224|  3.35k|        return object_element;
 6225|  5.57k|    }
_ZN8nlohmann6detail19json_sax_dom_parserINS_10basic_jsonINSt3__13mapENS3_6vectorENS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEblmdS9_NS_14adl_serializerENS5_IhNS9_IhEEEEEEE6stringERSB_:
 6122|   174k|    {
 6123|   174k|        handle_value(val);
 6124|   174k|        return true;
 6125|   174k|    }
_ZN8nlohmann6detail19json_sax_dom_parserINS_10basic_jsonINSt3__13mapENS3_6vectorENS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEblmdS9_NS_14adl_serializerENS5_IhNS9_IhEEEEEEE12handle_valueIRSB_EEPSF_OT_:
 6206|   174k|    {
 6207|   174k|        if (ref_stack.empty())
  ------------------
  |  Branch (6207:13): [True: 0, False: 174k]
  ------------------
 6208|      0|        {
 6209|      0|            root = BasicJsonType(std::forward<Value>(v));
 6210|      0|            return &root;
 6211|      0|        }
 6212|       |
 6213|   174k|        JSON_ASSERT(ref_stack.back()->is_array() || ref_stack.back()->is_object());
  ------------------
  |  | 2372|   174k|    #define JSON_ASSERT(x) assert(x)
  ------------------
 6214|       |
 6215|   174k|        if (ref_stack.back()->is_array())
  ------------------
  |  Branch (6215:13): [True: 82.8k, False: 91.6k]
  ------------------
 6216|  82.8k|        {
 6217|  82.8k|            ref_stack.back()->m_value.array->emplace_back(std::forward<Value>(v));
 6218|  82.8k|            return &(ref_stack.back()->m_value.array->back());
 6219|  82.8k|        }
 6220|       |
 6221|  91.6k|        JSON_ASSERT(ref_stack.back()->is_object());
  ------------------
  |  | 2372|  91.6k|    #define JSON_ASSERT(x) assert(x)
  ------------------
 6222|  91.6k|        JSON_ASSERT(object_element);
  ------------------
  |  | 2372|  91.6k|    #define JSON_ASSERT(x) assert(x)
  ------------------
 6223|      0|        *object_element = BasicJsonType(std::forward<Value>(v));
 6224|  91.6k|        return object_element;
 6225|   174k|    }
_ZN8nlohmann6detail19json_sax_dom_parserINS_10basic_jsonINSt3__13mapENS3_6vectorENS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEblmdS9_NS_14adl_serializerENS5_IhNS9_IhEEEEEEE15number_unsignedEm:
 6110|  4.72M|    {
 6111|  4.72M|        handle_value(val);
 6112|  4.72M|        return true;
 6113|  4.72M|    }
_ZN8nlohmann6detail19json_sax_dom_parserINS_10basic_jsonINSt3__13mapENS3_6vectorENS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEblmdS9_NS_14adl_serializerENS5_IhNS9_IhEEEEEEE12handle_valueIRmEEPSF_OT_:
 6206|  4.72M|    {
 6207|  4.72M|        if (ref_stack.empty())
  ------------------
  |  Branch (6207:13): [True: 1, False: 4.72M]
  ------------------
 6208|      1|        {
 6209|      1|            root = BasicJsonType(std::forward<Value>(v));
 6210|      1|            return &root;
 6211|      1|        }
 6212|       |
 6213|  4.72M|        JSON_ASSERT(ref_stack.back()->is_array() || ref_stack.back()->is_object());
  ------------------
  |  | 2372|  4.72M|    #define JSON_ASSERT(x) assert(x)
  ------------------
 6214|       |
 6215|  4.72M|        if (ref_stack.back()->is_array())
  ------------------
  |  Branch (6215:13): [True: 4.67M, False: 48.1k]
  ------------------
 6216|  4.67M|        {
 6217|  4.67M|            ref_stack.back()->m_value.array->emplace_back(std::forward<Value>(v));
 6218|  4.67M|            return &(ref_stack.back()->m_value.array->back());
 6219|  4.67M|        }
 6220|       |
 6221|  48.1k|        JSON_ASSERT(ref_stack.back()->is_object());
  ------------------
  |  | 2372|  48.1k|    #define JSON_ASSERT(x) assert(x)
  ------------------
 6222|  48.1k|        JSON_ASSERT(object_element);
  ------------------
  |  | 2372|  48.1k|    #define JSON_ASSERT(x) assert(x)
  ------------------
 6223|      0|        *object_element = BasicJsonType(std::forward<Value>(v));
 6224|  48.1k|        return object_element;
 6225|  4.72M|    }
_ZN8nlohmann6detail19json_sax_dom_parserINS_10basic_jsonINSt3__13mapENS3_6vectorENS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEblmdS9_NS_14adl_serializerENS5_IhNS9_IhEEEEEEE11parse_errorINS0_11parse_errorEEEbmRKSB_RKT_:
 6181|    180|    {
 6182|    180|        errored = true;
 6183|    180|        static_cast<void>(ex);
 6184|    180|        if (allow_exceptions)
  ------------------
  |  Branch (6184:13): [True: 180, False: 0]
  ------------------
 6185|    180|        {
 6186|    180|            JSON_THROW(ex);
  ------------------
  |  | 2337|    180|    #define JSON_THROW(exception) throw exception
  ------------------
 6187|    180|        }
 6188|      0|        return false;
 6189|    180|    }
_ZNK8nlohmann6detail19json_sax_dom_parserINS_10basic_jsonINSt3__13mapENS3_6vectorENS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEblmdS9_NS_14adl_serializerENS5_IhNS9_IhEEEEEEE10is_erroredEv:
 6192|  1.39k|    {
 6193|  1.39k|        return errored;
 6194|  1.39k|    }
_ZN8nlohmann6detail19json_sax_dom_parserINS_10basic_jsonINSt3__13mapENS3_6vectorENS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEblmdS9_NS_14adl_serializerENS5_IhNS9_IhEEEEEEED2Ev:
 6089|  1.57k|    ~json_sax_dom_parser() = default;
_ZN8nlohmann10basic_jsonINSt3__13mapENS1_6vectorENS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEblmdS7_NS_14adl_serializerENS3_IhNS7_IhEEEEED2Ev:
19856|  50.1M|    {
19857|  50.1M|        assert_invariant(false);
19858|  50.1M|        m_value.destroy(m_type);
19859|  50.1M|    }
_ZN8nlohmann10basic_jsonINSt3__13mapENS1_6vectorENS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEblmdS7_NS_14adl_serializerENS3_IhNS7_IhEEEEEC2EOSD_:
19786|  38.8M|    {
19787|       |        // check that passed value is valid
19788|  38.8M|        other.assert_invariant(false);
19789|       |
19790|       |        // invalidate payload
19791|  38.8M|        other.m_type = value_t::null;
19792|  38.8M|        other.m_value = {};
19793|       |
19794|  38.8M|        set_parents();
19795|  38.8M|        assert_invariant();
19796|  38.8M|    }
_ZN8nlohmann10basic_jsonINSt3__13mapENS1_6vectorENS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEblmdS7_NS_14adl_serializerENS3_IhNS7_IhEEEEEaSESD_:
19827|   488k|    {
19828|       |        // check that passed value is valid
19829|   488k|        other.assert_invariant();
19830|       |
19831|   488k|        using std::swap;
19832|   488k|        swap(m_type, other.m_type);
19833|   488k|        swap(m_value, other.m_value);
19834|       |
19835|   488k|        set_parents();
19836|   488k|        assert_invariant();
19837|   488k|        return *this;
19838|   488k|    }
_ZNK8nlohmann10basic_jsonINSt3__13mapENS1_6vectorENS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEblmdS7_NS_14adl_serializerENS3_IhNS7_IhEEEEE3getIllEEDTcldtclL_ZNS1_7declvalIRKSD_EEDTcl9__declvalIT_ELi0EEEvEE8get_implIT0_EtlNS_6detail12priority_tagILj4EEEEEEv:
20711|   245k|    {
20712|       |        // we cannot static_assert on ValueTypeCV being non-const, because
20713|       |        // there is support for get<const basic_json_t>(), which is why we
20714|       |        // still need the uncvref
20715|   245k|        static_assert(!std::is_reference<ValueTypeCV>::value,
20716|   245k|                      "get() cannot be used with reference types, you might want to use get_ref()");
20717|   245k|        return get_impl<ValueType>(detail::priority_tag<4> {});
20718|   245k|    }
_ZNK8nlohmann10basic_jsonINSt3__13mapENS1_6vectorENS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEblmdS7_NS_14adl_serializerENS3_IhNS7_IhEEEEE8get_implIlLi0EEET_NS_6detail12priority_tagILj0EEE:
20572|   245k|    {
20573|   245k|        auto ret = ValueType();
20574|   245k|        JSONSerializer<ValueType>::from_json(*this, ret);
20575|   245k|        return ret;
20576|   245k|    }
_ZN8nlohmann14adl_serializerIlvE9from_jsonIRKNS_10basic_jsonINSt3__13mapENS4_6vectorENS4_12basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEblmdSA_S0_NS6_IhNSA_IhEEEEEElEEDTcmclL_ZNS_12_GLOBAL__N_19from_jsonEEclsr3stdE7forwardIT_Efp_Efp0_Ecvv_EEOSJ_RT0_:
 5059|   245k|    {
 5060|   245k|        ::nlohmann::from_json(std::forward<BasicJsonType>(j), val);
 5061|   245k|    }
_ZNK8nlohmann6detail12from_json_fnclINS_10basic_jsonINSt3__13mapENS4_6vectorENS4_12basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEblmdSA_NS_14adl_serializerENS6_IhNSA_IhEEEEEERlEEDTcl9from_jsonfp_clsr3stdE7forwardIT0_Efp0_EEERKT_OSI_:
 4400|   245k|    {
 4401|   245k|        return from_json(j, std::forward<T>(val));
 4402|   245k|    }
_ZN8nlohmann6detail9from_jsonINS_10basic_jsonINSt3__13mapENS3_6vectorENS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEblmdS9_NS_14adl_serializerENS5_IhNS9_IhEEEEEEEEvRKT_RNSG_16number_integer_tE:
 4059|   245k|{
 4060|   245k|    get_arithmetic_value(j, val);
 4061|   245k|}
_ZN8nlohmann6detail20get_arithmetic_valueINS_10basic_jsonINSt3__13mapENS3_6vectorENS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEblmdS9_NS_14adl_serializerENS5_IhNS9_IhEEEEEElLi0EEEvRKT_RT0_:
 3977|   245k|{
 3978|   245k|    switch (static_cast<value_t>(j))
 3979|   245k|    {
 3980|   243k|        case value_t::number_unsigned:
  ------------------
  |  Branch (3980:9): [True: 243k, False: 2.00k]
  ------------------
 3981|   243k|        {
 3982|   243k|            val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_unsigned_t*>());
 3983|   243k|            break;
 3984|      0|        }
 3985|  2.00k|        case value_t::number_integer:
  ------------------
  |  Branch (3985:9): [True: 2.00k, False: 243k]
  ------------------
 3986|  2.00k|        {
 3987|  2.00k|            val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_integer_t*>());
 3988|  2.00k|            break;
 3989|      0|        }
 3990|      0|        case value_t::number_float:
  ------------------
  |  Branch (3990:9): [True: 0, False: 245k]
  ------------------
 3991|      0|        {
 3992|      0|            val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_float_t*>());
 3993|      0|            break;
 3994|      0|        }
 3995|       |
 3996|      0|        case value_t::null:
  ------------------
  |  Branch (3996:9): [True: 0, False: 245k]
  ------------------
 3997|      0|        case value_t::object:
  ------------------
  |  Branch (3997:9): [True: 0, False: 245k]
  ------------------
 3998|      0|        case value_t::array:
  ------------------
  |  Branch (3998:9): [True: 0, False: 245k]
  ------------------
 3999|      0|        case value_t::string:
  ------------------
  |  Branch (3999:9): [True: 0, False: 245k]
  ------------------
 4000|      0|        case value_t::boolean:
  ------------------
  |  Branch (4000:9): [True: 0, False: 245k]
  ------------------
 4001|      0|        case value_t::binary:
  ------------------
  |  Branch (4001:9): [True: 0, False: 245k]
  ------------------
 4002|      0|        case value_t::discarded:
  ------------------
  |  Branch (4002:9): [True: 0, False: 245k]
  ------------------
 4003|      0|        default:
  ------------------
  |  Branch (4003:9): [True: 0, False: 245k]
  ------------------
 4004|      0|            JSON_THROW(type_error::create(302, "type must be number, but is " + std::string(j.type_name()), j));
  ------------------
  |  | 2337|      0|    #define JSON_THROW(exception) throw exception
  ------------------
 4005|   245k|    }
 4006|   245k|}
_ZNK8nlohmann10basic_jsonINSt3__13mapENS1_6vectorENS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEblmdS7_NS_14adl_serializerENS3_IhNS7_IhEEEEEcvNS_6detail7value_tEEv:
20331|  1.47M|    {
20332|  1.47M|        return m_type;
20333|  1.47M|    }
_ZNK8nlohmann10basic_jsonINSt3__13mapENS1_6vectorENS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEblmdS7_NS_14adl_serializerENS3_IhNS7_IhEEEEE7get_ptrIPKmLi0EEEDTcldtclL_ZNS1_7declvalIRKSD_EEDTcl9__declvalIT_ELi0EEEvEE12get_impl_ptrclsr3stdE7declvalISK_EEEEv:
20521|  1.47M|    {
20522|       |        // delegate the call to get_impl_ptr<>() const
20523|  1.47M|        return get_impl_ptr(static_cast<PointerType>(nullptr));
20524|  1.47M|    }
_ZNK8nlohmann10basic_jsonINSt3__13mapENS1_6vectorENS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEblmdS7_NS_14adl_serializerENS3_IhNS7_IhEEEEE12get_impl_ptrEPKm:
20421|  1.47M|    {
20422|  1.47M|        return is_number_unsigned() ? &m_value.number_unsigned : nullptr;
  ------------------
  |  Branch (20422:16): [True: 1.47M, False: 0]
  ------------------
20423|  1.47M|    }
_ZNK8nlohmann10basic_jsonINSt3__13mapENS1_6vectorENS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEblmdS7_NS_14adl_serializerENS3_IhNS7_IhEEEEE18is_number_unsignedEv:
20162|  1.47M|    {
20163|  1.47M|        return m_type == value_t::number_unsigned;
20164|  1.47M|    }
_ZNK8nlohmann10basic_jsonINSt3__13mapENS1_6vectorENS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEblmdS7_NS_14adl_serializerENS3_IhNS7_IhEEEEE7get_ptrIPKlLi0EEEDTcldtclL_ZNS1_7declvalIRKSD_EEDTcl9__declvalIT_ELi0EEEvEE12get_impl_ptrclsr3stdE7declvalISK_EEEEv:
20521|  2.95k|    {
20522|       |        // delegate the call to get_impl_ptr<>() const
20523|  2.95k|        return get_impl_ptr(static_cast<PointerType>(nullptr));
20524|  2.95k|    }
_ZNK8nlohmann10basic_jsonINSt3__13mapENS1_6vectorENS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEblmdS7_NS_14adl_serializerENS3_IhNS7_IhEEEEE12get_impl_ptrEPKl:
20409|  2.95k|    {
20410|  2.95k|        return is_number_integer() ? &m_value.number_integer : nullptr;
  ------------------
  |  Branch (20410:16): [True: 2.95k, False: 0]
  ------------------
20411|  2.95k|    }
_ZNK8nlohmann10basic_jsonINSt3__13mapENS1_6vectorENS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEblmdS7_NS_14adl_serializerENS3_IhNS7_IhEEEEE7get_ptrIPKdLi0EEEDTcldtclL_ZNS1_7declvalIRKSD_EEDTcl9__declvalIT_ELi0EEEvEE12get_impl_ptrclsr3stdE7declvalISK_EEEEv:
20521|    433|    {
20522|       |        // delegate the call to get_impl_ptr<>() const
20523|    433|        return get_impl_ptr(static_cast<PointerType>(nullptr));
20524|    433|    }
_ZNK8nlohmann10basic_jsonINSt3__13mapENS1_6vectorENS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEblmdS7_NS_14adl_serializerENS3_IhNS7_IhEEEEE12get_impl_ptrEPKd:
20433|    433|    {
20434|    433|        return is_number_float() ? &m_value.number_float : nullptr;
  ------------------
  |  Branch (20434:16): [True: 433, False: 0]
  ------------------
20435|    433|    }
_ZNK8nlohmann10basic_jsonINSt3__13mapENS1_6vectorENS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEblmdS7_NS_14adl_serializerENS3_IhNS7_IhEEEEE3getIddEEDTcldtclL_ZNS1_7declvalIRKSD_EEDTcl9__declvalIT_ELi0EEEvEE8get_implIT0_EtlNS_6detail12priority_tagILj4EEEEEEv:
20711|  1.23M|    {
20712|       |        // we cannot static_assert on ValueTypeCV being non-const, because
20713|       |        // there is support for get<const basic_json_t>(), which is why we
20714|       |        // still need the uncvref
20715|  1.23M|        static_assert(!std::is_reference<ValueTypeCV>::value,
20716|  1.23M|                      "get() cannot be used with reference types, you might want to use get_ref()");
20717|  1.23M|        return get_impl<ValueType>(detail::priority_tag<4> {});
20718|  1.23M|    }
_ZNK8nlohmann10basic_jsonINSt3__13mapENS1_6vectorENS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEblmdS7_NS_14adl_serializerENS3_IhNS7_IhEEEEE8get_implIdLi0EEET_NS_6detail12priority_tagILj0EEE:
20572|  1.23M|    {
20573|  1.23M|        auto ret = ValueType();
20574|  1.23M|        JSONSerializer<ValueType>::from_json(*this, ret);
20575|  1.23M|        return ret;
20576|  1.23M|    }
_ZN8nlohmann14adl_serializerIdvE9from_jsonIRKNS_10basic_jsonINSt3__13mapENS4_6vectorENS4_12basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEblmdSA_S0_NS6_IhNSA_IhEEEEEEdEEDTcmclL_ZNS_12_GLOBAL__N_19from_jsonEEclsr3stdE7forwardIT_Efp_Efp0_Ecvv_EEOSJ_RT0_:
 5059|  1.23M|    {
 5060|  1.23M|        ::nlohmann::from_json(std::forward<BasicJsonType>(j), val);
 5061|  1.23M|    }
_ZNK8nlohmann6detail12from_json_fnclINS_10basic_jsonINSt3__13mapENS4_6vectorENS4_12basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEblmdSA_NS_14adl_serializerENS6_IhNSA_IhEEEEEERdEEDTcl9from_jsonfp_clsr3stdE7forwardIT0_Efp0_EEERKT_OSI_:
 4400|  1.23M|    {
 4401|  1.23M|        return from_json(j, std::forward<T>(val));
 4402|  1.23M|    }
_ZN8nlohmann6detail9from_jsonINS_10basic_jsonINSt3__13mapENS3_6vectorENS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEblmdS9_NS_14adl_serializerENS5_IhNS9_IhEEEEEEEEvRKT_RNSG_14number_float_tE:
 4047|  1.23M|{
 4048|  1.23M|    get_arithmetic_value(j, val);
 4049|  1.23M|}
_ZN8nlohmann6detail20get_arithmetic_valueINS_10basic_jsonINSt3__13mapENS3_6vectorENS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEblmdS9_NS_14adl_serializerENS5_IhNS9_IhEEEEEEdLi0EEEvRKT_RT0_:
 3977|  1.23M|{
 3978|  1.23M|    switch (static_cast<value_t>(j))
 3979|  1.23M|    {
 3980|  1.22M|        case value_t::number_unsigned:
  ------------------
  |  Branch (3980:9): [True: 1.22M, False: 1.38k]
  ------------------
 3981|  1.22M|        {
 3982|  1.22M|            val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_unsigned_t*>());
 3983|  1.22M|            break;
 3984|      0|        }
 3985|    951|        case value_t::number_integer:
  ------------------
  |  Branch (3985:9): [True: 951, False: 1.22M]
  ------------------
 3986|    951|        {
 3987|    951|            val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_integer_t*>());
 3988|    951|            break;
 3989|      0|        }
 3990|    433|        case value_t::number_float:
  ------------------
  |  Branch (3990:9): [True: 433, False: 1.22M]
  ------------------
 3991|    433|        {
 3992|    433|            val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_float_t*>());
 3993|    433|            break;
 3994|      0|        }
 3995|       |
 3996|      0|        case value_t::null:
  ------------------
  |  Branch (3996:9): [True: 0, False: 1.23M]
  ------------------
 3997|      0|        case value_t::object:
  ------------------
  |  Branch (3997:9): [True: 0, False: 1.23M]
  ------------------
 3998|      0|        case value_t::array:
  ------------------
  |  Branch (3998:9): [True: 0, False: 1.23M]
  ------------------
 3999|      0|        case value_t::string:
  ------------------
  |  Branch (3999:9): [True: 0, False: 1.23M]
  ------------------
 4000|      0|        case value_t::boolean:
  ------------------
  |  Branch (4000:9): [True: 0, False: 1.23M]
  ------------------
 4001|      0|        case value_t::binary:
  ------------------
  |  Branch (4001:9): [True: 0, False: 1.23M]
  ------------------
 4002|      0|        case value_t::discarded:
  ------------------
  |  Branch (4002:9): [True: 0, False: 1.23M]
  ------------------
 4003|      0|        default:
  ------------------
  |  Branch (4003:9): [True: 0, False: 1.23M]
  ------------------
 4004|      0|            JSON_THROW(type_error::create(302, "type must be number, but is " + std::string(j.type_name()), j));
  ------------------
  |  | 2337|      0|    #define JSON_THROW(exception) throw exception
  ------------------
 4005|  1.23M|    }
 4006|  1.23M|}
_ZNK8nlohmann10basic_jsonINSt3__13mapENS1_6vectorENS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEblmdS7_NS_14adl_serializerENS3_IhNS7_IhEEEEE3getIS9_S9_EEDTcldtclL_ZNS1_7declvalIRKSD_EEDTcl9__declvalIT_ELi0EEEvEE8get_implIT0_EtlNS_6detail12priority_tagILj4EEEEEEv:
20711|  73.3k|    {
20712|       |        // we cannot static_assert on ValueTypeCV being non-const, because
20713|       |        // there is support for get<const basic_json_t>(), which is why we
20714|       |        // still need the uncvref
20715|  73.3k|        static_assert(!std::is_reference<ValueTypeCV>::value,
20716|  73.3k|                      "get() cannot be used with reference types, you might want to use get_ref()");
20717|  73.3k|        return get_impl<ValueType>(detail::priority_tag<4> {});
20718|  73.3k|    }
_ZNK8nlohmann10basic_jsonINSt3__13mapENS1_6vectorENS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEblmdS7_NS_14adl_serializerENS3_IhNS7_IhEEEEE8get_implIS9_Li0EEET_NS_6detail12priority_tagILj0EEE:
20572|  73.3k|    {
20573|  73.3k|        auto ret = ValueType();
20574|  73.3k|        JSONSerializer<ValueType>::from_json(*this, ret);
20575|  73.3k|        return ret;
20576|  73.3k|    }
_ZN8nlohmann14adl_serializerINSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEvE9from_jsonIRKNS_10basic_jsonINS1_3mapENS1_6vectorES7_blmdS5_S0_NSC_IhNS5_IhEEEEEES7_EEDTcmclL_ZNS_12_GLOBAL__N_19from_jsonEEclsr3stdE7forwardIT_Efp_Efp0_Ecvv_EEOSJ_RT0_:
 5059|  73.3k|    {
 5060|  73.3k|        ::nlohmann::from_json(std::forward<BasicJsonType>(j), val);
 5061|  73.3k|    }
_ZNK8nlohmann6detail12from_json_fnclINS_10basic_jsonINSt3__13mapENS4_6vectorENS4_12basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEblmdSA_NS_14adl_serializerENS6_IhNSA_IhEEEEEERSC_EEDTcl9from_jsonfp_clsr3stdE7forwardIT0_Efp0_EEERKT_OSI_:
 4400|  73.3k|    {
 4401|  73.3k|        return from_json(j, std::forward<T>(val));
 4402|  73.3k|    }
_ZN8nlohmann6detail9from_jsonINS_10basic_jsonINSt3__13mapENS3_6vectorENS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEblmdS9_NS_14adl_serializerENS5_IhNS9_IhEEEEEEEEvRKT_RNSG_8string_tE:
 4020|  73.3k|{
 4021|  73.3k|    if (JSON_HEDLEY_UNLIKELY(!j.is_string()))
  ------------------
  |  | 1529|  73.3k|#  define JSON_HEDLEY_UNLIKELY(expr)                    __builtin_expect                 (!!(expr),    0                  )
  |  |  ------------------
  |  |  |  Branch (1529:57): [True: 0, False: 73.3k]
  |  |  ------------------
  ------------------
 4022|      0|    {
 4023|      0|        JSON_THROW(type_error::create(302, "type must be string, but is " + std::string(j.type_name()), j));
  ------------------
  |  | 2337|      0|    #define JSON_THROW(exception) throw exception
  ------------------
 4024|      0|    }
 4025|  73.3k|    s = *j.template get_ptr<const typename BasicJsonType::string_t*>();
 4026|  73.3k|}
_ZNK8nlohmann10basic_jsonINSt3__13mapENS1_6vectorENS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEblmdS7_NS_14adl_serializerENS3_IhNS7_IhEEEEE7get_ptrIPKS9_Li0EEEDTcldtclL_ZNS1_7declvalIRKSD_EEDTcl9__declvalIT_ELi0EEEvEE12get_impl_ptrclsr3stdE7declvalISK_EEEEv:
20521|  73.3k|    {
20522|       |        // delegate the call to get_impl_ptr<>() const
20523|  73.3k|        return get_impl_ptr(static_cast<PointerType>(nullptr));
20524|  73.3k|    }
_ZNK8nlohmann10basic_jsonINSt3__13mapENS1_6vectorENS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEblmdS7_NS_14adl_serializerENS3_IhNS7_IhEEEEE12get_impl_ptrEPKS9_:
20385|  73.3k|    {
20386|  73.3k|        return is_string() ? m_value.string : nullptr;
  ------------------
  |  Branch (20386:16): [True: 73.3k, False: 0]
  ------------------
20387|  73.3k|    }
_ZNK8nlohmann10basic_jsonINSt3__13mapENS1_6vectorENS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEblmdS7_NS_14adl_serializerENS3_IhNS7_IhEEEEE5beginEv:
22192|   314k|    {
22193|   314k|        return cbegin();
22194|   314k|    }
_ZNK8nlohmann10basic_jsonINSt3__13mapENS1_6vectorENS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEblmdS7_NS_14adl_serializerENS3_IhNS7_IhEEEEE6cbeginEv:
22222|   314k|    {
22223|   314k|        const_iterator result(this);
22224|   314k|        result.set_begin();
22225|   314k|        return result;
22226|   314k|    }
_ZN8nlohmann6detail9iter_implIKNS_10basic_jsonINSt3__13mapENS3_6vectorENS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEblmdS9_NS_14adl_serializerENS5_IhNS9_IhEEEEEEEC2EPSG_:
11675|  11.5M|    {
11676|  11.5M|        JSON_ASSERT(m_object != nullptr);
  ------------------
  |  | 2372|  11.5M|    #define JSON_ASSERT(x) assert(x)
  ------------------
11677|       |
11678|      0|        switch (m_object->m_type)
11679|  11.5M|        {
11680|  11.2M|            case value_t::object:
  ------------------
  |  Branch (11680:13): [True: 11.2M, False: 328k]
  ------------------
11681|  11.2M|            {
11682|  11.2M|                m_it.object_iterator = typename object_t::iterator();
11683|  11.2M|                break;
11684|      0|            }
11685|       |
11686|   323k|            case value_t::array:
  ------------------
  |  Branch (11686:13): [True: 323k, False: 11.2M]
  ------------------
11687|   323k|            {
11688|   323k|                m_it.array_iterator = typename array_t::iterator();
11689|   323k|                break;
11690|      0|            }
11691|       |
11692|      0|            case value_t::null:
  ------------------
  |  Branch (11692:13): [True: 0, False: 11.5M]
  ------------------
11693|     26|            case value_t::string:
  ------------------
  |  Branch (11693:13): [True: 26, False: 11.5M]
  ------------------
11694|     26|            case value_t::boolean:
  ------------------
  |  Branch (11694:13): [True: 0, False: 11.5M]
  ------------------
11695|     48|            case value_t::number_integer:
  ------------------
  |  Branch (11695:13): [True: 22, False: 11.5M]
  ------------------
11696|  5.01k|            case value_t::number_unsigned:
  ------------------
  |  Branch (11696:13): [True: 4.96k, False: 11.5M]
  ------------------
11697|  5.01k|            case value_t::number_float:
  ------------------
  |  Branch (11697:13): [True: 8, False: 11.5M]
  ------------------
11698|  5.01k|            case value_t::binary:
  ------------------
  |  Branch (11698:13): [True: 0, False: 11.5M]
  ------------------
11699|  5.01k|            case value_t::discarded:
  ------------------
  |  Branch (11699:13): [True: 0, False: 11.5M]
  ------------------
11700|  5.01k|            default:
  ------------------
  |  Branch (11700:13): [True: 0, False: 11.5M]
  ------------------
11701|  5.01k|            {
11702|  5.01k|                m_it.primitive_iterator = primitive_iterator_t();
11703|  5.01k|                break;
11704|  5.01k|            }
11705|  11.5M|        }
11706|  11.5M|    }
_ZN8nlohmann6detail9iter_implIKNS_10basic_jsonINSt3__13mapENS3_6vectorENS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEblmdS9_NS_14adl_serializerENS5_IhNS9_IhEEEEEEE9set_beginEv:
11772|   314k|    {
11773|   314k|        JSON_ASSERT(m_object != nullptr);
  ------------------
  |  | 2372|   314k|    #define JSON_ASSERT(x) assert(x)
  ------------------
11774|       |
11775|      0|        switch (m_object->m_type)
11776|   314k|        {
11777|   264k|            case value_t::object:
  ------------------
  |  Branch (11777:13): [True: 264k, False: 50.3k]
  ------------------
11778|   264k|            {
11779|   264k|                m_it.object_iterator = m_object->m_value.object->begin();
11780|   264k|                break;
11781|      0|            }
11782|       |
11783|  50.3k|            case value_t::array:
  ------------------
  |  Branch (11783:13): [True: 50.3k, False: 264k]
  ------------------
11784|  50.3k|            {
11785|  50.3k|                m_it.array_iterator = m_object->m_value.array->begin();
11786|  50.3k|                break;
11787|      0|            }
11788|       |
11789|      0|            case value_t::null:
  ------------------
  |  Branch (11789:13): [True: 0, False: 314k]
  ------------------
11790|      0|            {
11791|       |                // set to end so begin()==end() is true: null is empty
11792|      0|                m_it.primitive_iterator.set_end();
11793|      0|                break;
11794|      0|            }
11795|       |
11796|      0|            case value_t::string:
  ------------------
  |  Branch (11796:13): [True: 0, False: 314k]
  ------------------
11797|      0|            case value_t::boolean:
  ------------------
  |  Branch (11797:13): [True: 0, False: 314k]
  ------------------
11798|      0|            case value_t::number_integer:
  ------------------
  |  Branch (11798:13): [True: 0, False: 314k]
  ------------------
11799|      0|            case value_t::number_unsigned:
  ------------------
  |  Branch (11799:13): [True: 0, False: 314k]
  ------------------
11800|      0|            case value_t::number_float:
  ------------------
  |  Branch (11800:13): [True: 0, False: 314k]
  ------------------
11801|      0|            case value_t::binary:
  ------------------
  |  Branch (11801:13): [True: 0, False: 314k]
  ------------------
11802|      0|            case value_t::discarded:
  ------------------
  |  Branch (11802:13): [True: 0, False: 314k]
  ------------------
11803|      0|            default:
  ------------------
  |  Branch (11803:13): [True: 0, False: 314k]
  ------------------
11804|      0|            {
11805|      0|                m_it.primitive_iterator.set_begin();
11806|      0|                break;
11807|      0|            }
11808|   314k|        }
11809|   314k|    }
_ZNK8nlohmann10basic_jsonINSt3__13mapENS1_6vectorENS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEblmdS7_NS_14adl_serializerENS3_IhNS7_IhEEEEE3endEv:
22263|  5.89M|    {
22264|  5.89M|        return cend();
22265|  5.89M|    }
_ZNK8nlohmann10basic_jsonINSt3__13mapENS1_6vectorENS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEblmdS7_NS_14adl_serializerENS3_IhNS7_IhEEEEE4cendEv:
22293|  11.2M|    {
22294|  11.2M|        const_iterator result(this);
22295|  11.2M|        result.set_end();
22296|  11.2M|        return result;
22297|  11.2M|    }
_ZN8nlohmann6detail9iter_implIKNS_10basic_jsonINSt3__13mapENS3_6vectorENS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEblmdS9_NS_14adl_serializerENS5_IhNS9_IhEEEEEEE7set_endEv:
11816|  11.2M|    {
11817|  11.2M|        JSON_ASSERT(m_object != nullptr);
  ------------------
  |  | 2372|  11.2M|    #define JSON_ASSERT(x) assert(x)
  ------------------
11818|       |
11819|      0|        switch (m_object->m_type)
11820|  11.2M|        {
11821|  10.9M|            case value_t::object:
  ------------------
  |  Branch (11821:13): [True: 10.9M, False: 277k]
  ------------------
11822|  10.9M|            {
11823|  10.9M|                m_it.object_iterator = m_object->m_value.object->end();
11824|  10.9M|                break;
11825|      0|            }
11826|       |
11827|   272k|            case value_t::array:
  ------------------
  |  Branch (11827:13): [True: 272k, False: 10.9M]
  ------------------
11828|   272k|            {
11829|   272k|                m_it.array_iterator = m_object->m_value.array->end();
11830|   272k|                break;
11831|      0|            }
11832|       |
11833|      0|            case value_t::null:
  ------------------
  |  Branch (11833:13): [True: 0, False: 11.2M]
  ------------------
11834|     26|            case value_t::string:
  ------------------
  |  Branch (11834:13): [True: 26, False: 11.2M]
  ------------------
11835|     26|            case value_t::boolean:
  ------------------
  |  Branch (11835:13): [True: 0, False: 11.2M]
  ------------------
11836|     48|            case value_t::number_integer:
  ------------------
  |  Branch (11836:13): [True: 22, False: 11.2M]
  ------------------
11837|  5.01k|            case value_t::number_unsigned:
  ------------------
  |  Branch (11837:13): [True: 4.96k, False: 11.2M]
  ------------------
11838|  5.01k|            case value_t::number_float:
  ------------------
  |  Branch (11838:13): [True: 8, False: 11.2M]
  ------------------
11839|  5.01k|            case value_t::binary:
  ------------------
  |  Branch (11839:13): [True: 0, False: 11.2M]
  ------------------
11840|  5.01k|            case value_t::discarded:
  ------------------
  |  Branch (11840:13): [True: 0, False: 11.2M]
  ------------------
11841|  5.01k|            default:
  ------------------
  |  Branch (11841:13): [True: 0, False: 11.2M]
  ------------------
11842|  5.01k|            {
11843|  5.01k|                m_it.primitive_iterator.set_end();
11844|  5.01k|                break;
11845|  5.01k|            }
11846|  11.2M|        }
11847|  11.2M|    }
_ZNK8nlohmann6detail9iter_implIKNS_10basic_jsonINSt3__13mapENS3_6vectorENS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEblmdS9_NS_14adl_serializerENS5_IhNS9_IhEEEEEEE3keyEv:
12297|  53.3k|    {
12298|  53.3k|        JSON_ASSERT(m_object != nullptr);
  ------------------
  |  | 2372|  53.3k|    #define JSON_ASSERT(x) assert(x)
  ------------------
12299|       |
12300|  53.3k|        if (JSON_HEDLEY_LIKELY(m_object->is_object()))
  ------------------
  |  | 1528|  53.3k|#  define JSON_HEDLEY_LIKELY(expr)                      __builtin_expect                 (!!(expr),    1                  )
  |  |  ------------------
  |  |  |  Branch (1528:57): [True: 53.3k, False: 0]
  |  |  ------------------
  ------------------
12301|  53.3k|        {
12302|  53.3k|            return m_it.object_iterator->first;
12303|  53.3k|        }
12304|       |
12305|      0|        JSON_THROW(invalid_iterator::create(207, "cannot use key() for non-object iterators", *m_object));
  ------------------
  |  | 2337|      0|    #define JSON_THROW(exception) throw exception
  ------------------
12306|  53.3k|    }
_ZNK8nlohmann10basic_jsonINSt3__13mapENS1_6vectorENS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEblmdS7_NS_14adl_serializerENS3_IhNS7_IhEEEEE4findIRPKcEENS_6detail9iter_implIKSD_EEOT_:
22045|  5.35M|    {
22046|  5.35M|        auto result = cend();
22047|       |
22048|  5.35M|        if (is_object())
  ------------------
  |  Branch (22048:13): [True: 5.35M, False: 3.85k]
  ------------------
22049|  5.35M|        {
22050|  5.35M|            result.m_it.object_iterator = m_value.object->find(std::forward<KeyT>(key));
22051|  5.35M|        }
22052|       |
22053|  5.35M|        return result;
22054|  5.35M|    }
_ZNK8nlohmann6detail9iter_implIKNS_10basic_jsonINSt3__13mapENS3_6vectorENS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEblmdS9_NS_14adl_serializerENS5_IhNS9_IhEEEEEEEneISH_LDn0EEEbRKT_:
12080|  8.76M|    {
12081|  8.76M|        return !operator==(other);
12082|  8.76M|    }
_ZNK8nlohmann6detail9iter_implIKNS_10basic_jsonINSt3__13mapENS3_6vectorENS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEblmdS9_NS_14adl_serializerENS5_IhNS9_IhEEEEEEEeqISH_LDn0EEEbRKT_:
12044|  8.76M|    {
12045|       |        // if objects are not the same, the comparison is undefined
12046|  8.76M|        if (JSON_HEDLEY_UNLIKELY(m_object != other.m_object))
  ------------------
  |  | 1529|  8.76M|#  define JSON_HEDLEY_UNLIKELY(expr)                    __builtin_expect                 (!!(expr),    0                  )
  |  |  ------------------
  |  |  |  Branch (1529:57): [True: 0, False: 8.76M]
  |  |  ------------------
  ------------------
12047|      0|        {
12048|      0|            JSON_THROW(invalid_iterator::create(212, "cannot compare iterators of different containers", *m_object));
  ------------------
  |  | 2337|      0|    #define JSON_THROW(exception) throw exception
  ------------------
12049|      0|        }
12050|       |
12051|  8.76M|        JSON_ASSERT(m_object != nullptr);
  ------------------
  |  | 2372|  8.76M|    #define JSON_ASSERT(x) assert(x)
  ------------------
12052|       |
12053|      0|        switch (m_object->m_type)
12054|  8.76M|        {
12055|  5.66M|            case value_t::object:
  ------------------
  |  Branch (12055:13): [True: 5.66M, False: 3.10M]
  ------------------
12056|  5.66M|                return (m_it.object_iterator == other.m_it.object_iterator);
12057|       |
12058|  3.10M|            case value_t::array:
  ------------------
  |  Branch (12058:13): [True: 3.10M, False: 5.66M]
  ------------------
12059|  3.10M|                return (m_it.array_iterator == other.m_it.array_iterator);
12060|       |
12061|      0|            case value_t::null:
  ------------------
  |  Branch (12061:13): [True: 0, False: 8.76M]
  ------------------
12062|     13|            case value_t::string:
  ------------------
  |  Branch (12062:13): [True: 13, False: 8.76M]
  ------------------
12063|     13|            case value_t::boolean:
  ------------------
  |  Branch (12063:13): [True: 0, False: 8.76M]
  ------------------
12064|     24|            case value_t::number_integer:
  ------------------
  |  Branch (12064:13): [True: 11, False: 8.76M]
  ------------------
12065|  2.50k|            case value_t::number_unsigned:
  ------------------
  |  Branch (12065:13): [True: 2.48k, False: 8.76M]
  ------------------
12066|  2.50k|            case value_t::number_float:
  ------------------
  |  Branch (12066:13): [True: 4, False: 8.76M]
  ------------------
12067|  2.50k|            case value_t::binary:
  ------------------
  |  Branch (12067:13): [True: 0, False: 8.76M]
  ------------------
12068|  2.50k|            case value_t::discarded:
  ------------------
  |  Branch (12068:13): [True: 0, False: 8.76M]
  ------------------
12069|  2.50k|            default:
  ------------------
  |  Branch (12069:13): [True: 0, False: 8.76M]
  ------------------
12070|  2.50k|                return (m_it.primitive_iterator == other.m_it.primitive_iterator);
12071|  8.76M|        }
12072|  8.76M|    }
_ZNK8nlohmann6detail9iter_implIKNS_10basic_jsonINSt3__13mapENS3_6vectorENS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEblmdS9_NS_14adl_serializerENS5_IhNS9_IhEEEEEEE5valueEv:
12313|   494k|    {
12314|   494k|        return operator*();
12315|   494k|    }
_ZN8nlohmann6detail9iter_implIKNS_10basic_jsonINSt3__13mapENS3_6vectorENS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEblmdS9_NS_14adl_serializerENS5_IhNS9_IhEEEEEEEppEv:
11952|  3.09M|    {
11953|  3.09M|        JSON_ASSERT(m_object != nullptr);
  ------------------
  |  | 2372|  3.09M|    #define JSON_ASSERT(x) assert(x)
  ------------------
11954|       |
11955|      0|        switch (m_object->m_type)
11956|  3.09M|        {
11957|  48.8k|            case value_t::object:
  ------------------
  |  Branch (11957:13): [True: 48.8k, False: 3.04M]
  ------------------
11958|  48.8k|            {
11959|  48.8k|                std::advance(m_it.object_iterator, 1);
11960|  48.8k|                break;
11961|      0|            }
11962|       |
11963|  3.04M|            case value_t::array:
  ------------------
  |  Branch (11963:13): [True: 3.04M, False: 48.8k]
  ------------------
11964|  3.04M|            {
11965|  3.04M|                std::advance(m_it.array_iterator, 1);
11966|  3.04M|                break;
11967|      0|            }
11968|       |
11969|      0|            case value_t::null:
  ------------------
  |  Branch (11969:13): [True: 0, False: 3.09M]
  ------------------
11970|      0|            case value_t::string:
  ------------------
  |  Branch (11970:13): [True: 0, False: 3.09M]
  ------------------
11971|      0|            case value_t::boolean:
  ------------------
  |  Branch (11971:13): [True: 0, False: 3.09M]
  ------------------
11972|      0|            case value_t::number_integer:
  ------------------
  |  Branch (11972:13): [True: 0, False: 3.09M]
  ------------------
11973|      0|            case value_t::number_unsigned:
  ------------------
  |  Branch (11973:13): [True: 0, False: 3.09M]
  ------------------
11974|      0|            case value_t::number_float:
  ------------------
  |  Branch (11974:13): [True: 0, False: 3.09M]
  ------------------
11975|      0|            case value_t::binary:
  ------------------
  |  Branch (11975:13): [True: 0, False: 3.09M]
  ------------------
11976|      0|            case value_t::discarded:
  ------------------
  |  Branch (11976:13): [True: 0, False: 3.09M]
  ------------------
11977|      0|            default:
  ------------------
  |  Branch (11977:13): [True: 0, False: 3.09M]
  ------------------
11978|      0|            {
11979|      0|                ++m_it.primitive_iterator;
11980|      0|                break;
11981|      0|            }
11982|  3.09M|        }
11983|       |
11984|  3.09M|        return *this;
11985|  3.09M|    }
_ZNK8nlohmann6detail9iter_implIKNS_10basic_jsonINSt3__13mapENS3_6vectorENS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEblmdS9_NS_14adl_serializerENS5_IhNS9_IhEEEEEEEdeEv:
11855|  3.32M|    {
11856|  3.32M|        JSON_ASSERT(m_object != nullptr);
  ------------------
  |  | 2372|  3.32M|    #define JSON_ASSERT(x) assert(x)
  ------------------
11857|       |
11858|      0|        switch (m_object->m_type)
11859|  3.32M|        {
11860|   274k|            case value_t::object:
  ------------------
  |  Branch (11860:13): [True: 274k, False: 3.05M]
  ------------------
11861|   274k|            {
11862|   274k|                JSON_ASSERT(m_it.object_iterator != m_object->m_value.object->end());
  ------------------
  |  | 2372|   274k|    #define JSON_ASSERT(x) assert(x)
  ------------------
11863|      0|                return m_it.object_iterator->second;
11864|      0|            }
11865|       |
11866|  3.05M|            case value_t::array:
  ------------------
  |  Branch (11866:13): [True: 3.05M, False: 274k]
  ------------------
11867|  3.05M|            {
11868|  3.05M|                JSON_ASSERT(m_it.array_iterator != m_object->m_value.array->end());
  ------------------
  |  | 2372|  3.05M|    #define JSON_ASSERT(x) assert(x)
  ------------------
11869|      0|                return *m_it.array_iterator;
11870|      0|            }
11871|       |
11872|      0|            case value_t::null:
  ------------------
  |  Branch (11872:13): [True: 0, False: 3.32M]
  ------------------
11873|      0|                JSON_THROW(invalid_iterator::create(214, "cannot get value", *m_object));
  ------------------
  |  | 2337|      0|    #define JSON_THROW(exception) throw exception
  ------------------
11874|       |
11875|      0|            case value_t::string:
  ------------------
  |  Branch (11875:13): [True: 0, False: 3.32M]
  ------------------
11876|      0|            case value_t::boolean:
  ------------------
  |  Branch (11876:13): [True: 0, False: 3.32M]
  ------------------
11877|      0|            case value_t::number_integer:
  ------------------
  |  Branch (11877:13): [True: 0, False: 3.32M]
  ------------------
11878|      0|            case value_t::number_unsigned:
  ------------------
  |  Branch (11878:13): [True: 0, False: 3.32M]
  ------------------
11879|      0|            case value_t::number_float:
  ------------------
  |  Branch (11879:13): [True: 0, False: 3.32M]
  ------------------
11880|      0|            case value_t::binary:
  ------------------
  |  Branch (11880:13): [True: 0, False: 3.32M]
  ------------------
11881|      0|            case value_t::discarded:
  ------------------
  |  Branch (11881:13): [True: 0, False: 3.32M]
  ------------------
11882|      0|            default:
  ------------------
  |  Branch (11882:13): [True: 0, False: 3.32M]
  ------------------
11883|      0|            {
11884|      0|                if (JSON_HEDLEY_LIKELY(m_it.primitive_iterator.is_begin()))
  ------------------
  |  | 1528|      0|#  define JSON_HEDLEY_LIKELY(expr)                      __builtin_expect                 (!!(expr),    1                  )
  |  |  ------------------
  |  |  |  Branch (1528:57): [True: 0, False: 0]
  |  |  ------------------
  ------------------
11885|      0|                {
11886|      0|                    return *m_object;
11887|      0|                }
11888|       |
11889|      0|                JSON_THROW(invalid_iterator::create(214, "cannot get value", *m_object));
  ------------------
  |  | 2337|      0|    #define JSON_THROW(exception) throw exception
  ------------------
11890|      0|            }
11891|  3.32M|        }
11892|  3.32M|    }
_ZN8nlohmann10basic_jsonINSt3__13mapENS1_6vectorENS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEblmdS7_NS_14adl_serializerENS3_IhNS7_IhEEEEEC2EDn:
19001|   485k|    {
19002|   485k|        assert_invariant();
19003|   485k|    }

stbi_image_free:
 1100|  21.1k|{
 1101|  21.1k|   STBI_FREE(retval_from_stbi_load);
  ------------------
  |  |  682|  21.1k|#define STBI_FREE(p)              free(p)
  ------------------
 1102|  21.1k|}
stbi_load_16_from_memory:
 1414|  1.22k|{
 1415|  1.22k|   stbi__context s;
 1416|  1.22k|   stbi__start_mem(&s,buffer,len);
 1417|  1.22k|   return stbi__load_and_postprocess_16bit(&s,x,y,channels_in_file,desired_channels);
 1418|  1.22k|}
stbi_load_from_memory:
 1428|  20.2k|{
 1429|  20.2k|   stbi__context s;
 1430|  20.2k|   stbi__start_mem(&s,buffer,len);
 1431|  20.2k|   return stbi__load_and_postprocess_8bit(&s,x,y,comp,req_comp);
 1432|  20.2k|}
stbi_is_16_bit_from_memory:
 7768|  21.4k|{
 7769|  21.4k|   stbi__context s;
 7770|  21.4k|   stbi__start_mem(&s,buffer,len);
 7771|  21.4k|   return stbi__is_16_main(&s);
 7772|  21.4k|}
fuzz_gltf.cc:_ZL9stbi__errPKc:
  977|  62.6k|{
  978|  62.6k|   stbi__g_failure_reason = str;
  979|  62.6k|   return 0;
  980|  62.6k|}
fuzz_gltf.cc:_ZL31stbi__load_and_postprocess_8bitP13stbi__contextPiS1_S1_i:
 1259|  20.2k|{
 1260|  20.2k|   stbi__result_info ri;
 1261|  20.2k|   void *result = stbi__load_main(s, x, y, comp, req_comp, &ri, 8);
 1262|       |
 1263|  20.2k|   if (result == NULL)
  ------------------
  |  Branch (1263:8): [True: 283, False: 19.9k]
  ------------------
 1264|    283|      return NULL;
 1265|       |
 1266|       |   // it is the responsibility of the loaders to make sure we get either 8 or 16 bit.
 1267|  19.9k|   STBI_ASSERT(ri.bits_per_channel == 8 || ri.bits_per_channel == 16);
  ------------------
  |  |  601|  19.9k|#define STBI_ASSERT(x) assert(x)
  ------------------
 1268|       |
 1269|  19.9k|   if (ri.bits_per_channel != 8) {
  ------------------
  |  Branch (1269:8): [True: 0, False: 19.9k]
  ------------------
 1270|      0|      result = stbi__convert_16_to_8((stbi__uint16 *) result, *x, *y, req_comp == 0 ? *comp : req_comp);
  ------------------
  |  Branch (1270:71): [True: 0, False: 0]
  ------------------
 1271|      0|      ri.bits_per_channel = 8;
 1272|      0|   }
 1273|       |
 1274|       |   // @TODO: move stbi__convert_format to here
 1275|       |
 1276|  19.9k|   if (stbi__vertically_flip_on_load) {
  ------------------
  |  | 1130|  19.9k|#define stbi__vertically_flip_on_load  (stbi__vertically_flip_on_load_set       \
  |  |  ------------------
  |  |  |  Branch (1130:40): [True: 0, False: 19.9k]
  |  |  |  Branch (1130:41): [True: 0, False: 19.9k]
  |  |  ------------------
  |  | 1131|  19.9k|                                         ? stbi__vertically_flip_on_load_local  \
  |  | 1132|  19.9k|                                         : stbi__vertically_flip_on_load_global)
  ------------------
 1277|      0|      int channels = req_comp ? req_comp : *comp;
  ------------------
  |  Branch (1277:22): [True: 0, False: 0]
  ------------------
 1278|      0|      stbi__vertical_flip(result, *x, *y, channels * sizeof(stbi_uc));
 1279|      0|   }
 1280|       |
 1281|  19.9k|   return (unsigned char *) result;
 1282|  20.2k|}
fuzz_gltf.cc:_ZL15stbi__load_mainP13stbi__contextPiS1_S1_iP17stbi__result_infoi:
 1136|  21.4k|{
 1137|  21.4k|   memset(ri, 0, sizeof(*ri)); // make sure it's initialized if we add new fields
 1138|  21.4k|   ri->bits_per_channel = 8; // default is 8 so most paths don't have to be changed
 1139|  21.4k|   ri->channel_order = STBI_ORDER_RGB; // all current input & output are this, but this is here so we can add BGR order
 1140|  21.4k|   ri->num_channels = 0;
 1141|       |
 1142|       |   // test the formats with a very explicit header first (at least a FOURCC
 1143|       |   // or distinctive magic number first)
 1144|  21.4k|   #ifndef STBI_NO_PNG
 1145|  21.4k|   if (stbi__png_test(s))  return stbi__png_load(s,x,y,comp,req_comp, ri);
  ------------------
  |  Branch (1145:8): [True: 0, False: 21.4k]
  ------------------
 1146|  21.4k|   #endif
 1147|  21.4k|   #ifndef STBI_NO_BMP
 1148|  21.4k|   if (stbi__bmp_test(s))  return stbi__bmp_load(s,x,y,comp,req_comp, ri);
  ------------------
  |  Branch (1148:8): [True: 782, False: 20.6k]
  ------------------
 1149|  20.6k|   #endif
 1150|  20.6k|   #ifndef STBI_NO_GIF
 1151|  20.6k|   if (stbi__gif_test(s))  return stbi__gif_load(s,x,y,comp,req_comp, ri);
  ------------------
  |  Branch (1151:8): [True: 0, False: 20.6k]
  ------------------
 1152|  20.6k|   #endif
 1153|  20.6k|   #ifndef STBI_NO_PSD
 1154|  20.6k|   if (stbi__psd_test(s))  return stbi__psd_load(s,x,y,comp,req_comp, ri, bpc);
  ------------------
  |  Branch (1154:8): [True: 0, False: 20.6k]
  ------------------
 1155|       |   #else
 1156|       |   STBI_NOTUSED(bpc);
 1157|       |   #endif
 1158|  20.6k|   #ifndef STBI_NO_PIC
 1159|  20.6k|   if (stbi__pic_test(s))  return stbi__pic_load(s,x,y,comp,req_comp, ri);
  ------------------
  |  Branch (1159:8): [True: 0, False: 20.6k]
  ------------------
 1160|  20.6k|   #endif
 1161|       |
 1162|       |   // then the formats that can end up attempting to load with just 1 or 2
 1163|       |   // bytes matching expectations; these are prone to false positives, so
 1164|       |   // try them later
 1165|  20.6k|   #ifndef STBI_NO_JPEG
 1166|  20.6k|   if (stbi__jpeg_test(s)) return stbi__jpeg_load(s,x,y,comp,req_comp, ri);
  ------------------
  |  Branch (1166:8): [True: 7.96k, False: 12.7k]
  ------------------
 1167|  12.7k|   #endif
 1168|  12.7k|   #ifndef STBI_NO_PNM
 1169|  12.7k|   if (stbi__pnm_test(s))  return stbi__pnm_load(s,x,y,comp,req_comp, ri);
  ------------------
  |  Branch (1169:8): [True: 9.07k, False: 3.62k]
  ------------------
 1170|  3.62k|   #endif
 1171|       |
 1172|  3.62k|   #ifndef STBI_NO_HDR
 1173|  3.62k|   if (stbi__hdr_test(s)) {
  ------------------
  |  Branch (1173:8): [True: 0, False: 3.62k]
  ------------------
 1174|      0|      float *hdr = stbi__hdr_load(s, x,y,comp,req_comp, ri);
 1175|      0|      return stbi__hdr_to_ldr(hdr, *x, *y, req_comp ? req_comp : *comp);
  ------------------
  |  Branch (1175:44): [True: 0, False: 0]
  ------------------
 1176|      0|   }
 1177|  3.62k|   #endif
 1178|       |
 1179|  3.62k|   #ifndef STBI_NO_TGA
 1180|       |   // test tga last because it's a crappy test!
 1181|  3.62k|   if (stbi__tga_test(s))
  ------------------
  |  Branch (1181:8): [True: 3.48k, False: 139]
  ------------------
 1182|  3.48k|      return stbi__tga_load(s,x,y,comp,req_comp, ri);
 1183|    139|   #endif
 1184|       |
 1185|    139|   return stbi__errpuc("unknown image type", "Image not of any known type, or corrupt");
  ------------------
  |  | 1097|    139|#define stbi__errpuc(x,y)  ((unsigned char *)(size_t) (stbi__err(x,y)?NULL:NULL))
  |  |  ------------------
  |  |  |  | 1093|    139|   #define stbi__err(x,y)  stbi__err(x)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1093:28): [True: 0, False: 139]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1186|  3.62k|}
fuzz_gltf.cc:_ZL14stbi__png_testP13stbi__context:
 5322|  21.4k|{
 5323|  21.4k|   int r;
 5324|  21.4k|   r = stbi__check_png_header(s);
 5325|  21.4k|   stbi__rewind(s);
 5326|  21.4k|   return r;
 5327|  21.4k|}
fuzz_gltf.cc:_ZL22stbi__check_png_headerP13stbi__context:
 4620|  42.8k|{
 4621|  42.8k|   static const stbi_uc png_sig[8] = { 137,80,78,71,13,10,26,10 };
 4622|  42.8k|   int i;
 4623|  42.8k|   for (i=0; i < 8; ++i)
  ------------------
  |  Branch (4623:14): [True: 42.8k, False: 0]
  ------------------
 4624|  42.8k|      if (stbi__get8(s) != png_sig[i]) return stbi__err("bad png sig","Not a PNG");
  ------------------
  |  | 1093|  42.8k|   #define stbi__err(x,y)  stbi__err(x)
  ------------------
  |  Branch (4624:11): [True: 42.8k, False: 0]
  ------------------
 4625|      0|   return 1;
 4626|  42.8k|}
fuzz_gltf.cc:_ZL10stbi__get8P13stbi__context:
 1613|  3.61G|{
 1614|  3.61G|   if (s->img_buffer < s->img_buffer_end)
  ------------------
  |  Branch (1614:8): [True: 1.02M, False: 3.61G]
  ------------------
 1615|  1.02M|      return *s->img_buffer++;
 1616|  3.61G|   if (s->read_from_callbacks) {
  ------------------
  |  Branch (1616:8): [True: 0, False: 3.61G]
  ------------------
 1617|      0|      stbi__refill_buffer(s);
 1618|      0|      return *s->img_buffer++;
 1619|      0|   }
 1620|  3.61G|   return 0;
 1621|  3.61G|}
fuzz_gltf.cc:_ZL12stbi__rewindP13stbi__context:
  885|   225k|{
  886|       |   // conceptually rewind SHOULD rewind to the beginning of the stream,
  887|       |   // but we just rewind to the beginning of the initial buffer, because
  888|       |   // we only use it after doing 'test', which only ever looks at at most 92 bytes
  889|   225k|   s->img_buffer = s->img_buffer_original;
  890|   225k|   s->img_buffer_end = s->img_buffer_original_end;
  891|   225k|}
fuzz_gltf.cc:_ZL20stbi__parse_png_fileP9stbi__pngii:
 5100|  21.4k|{
 5101|  21.4k|   stbi_uc palette[1024], pal_img_n=0;
 5102|  21.4k|   stbi_uc has_trans=0, tc[3]={0};
 5103|  21.4k|   stbi__uint16 tc16[3];
 5104|  21.4k|   stbi__uint32 ioff=0, idata_limit=0, i, pal_len=0;
 5105|  21.4k|   int first=1,k,interlace=0, color=0, is_iphone=0;
 5106|  21.4k|   stbi__context *s = z->s;
 5107|       |
 5108|  21.4k|   z->expanded = NULL;
 5109|  21.4k|   z->idata = NULL;
 5110|  21.4k|   z->out = NULL;
 5111|       |
 5112|  21.4k|   if (!stbi__check_png_header(s)) return 0;
  ------------------
  |  Branch (5112:8): [True: 21.4k, False: 0]
  ------------------
 5113|       |
 5114|      0|   if (scan == STBI__SCAN_type) return 1;
  ------------------
  |  Branch (5114:8): [True: 0, False: 0]
  ------------------
 5115|       |
 5116|      0|   for (;;) {
 5117|      0|      stbi__pngchunk c = stbi__get_chunk_header(s);
 5118|      0|      switch (c.type) {
 5119|      0|         case STBI__PNG_TYPE('C','g','B','I'):
  ------------------
  |  | 5097|      0|#define STBI__PNG_TYPE(a,b,c,d)  (((unsigned) (a) << 24) + ((unsigned) (b) << 16) + ((unsigned) (c) << 8) + (unsigned) (d))
  ------------------
  |  Branch (5119:10): [True: 0, False: 0]
  ------------------
 5120|      0|            is_iphone = 1;
 5121|      0|            stbi__skip(s, c.length);
 5122|      0|            break;
 5123|      0|         case STBI__PNG_TYPE('I','H','D','R'): {
  ------------------
  |  | 5097|      0|#define STBI__PNG_TYPE(a,b,c,d)  (((unsigned) (a) << 24) + ((unsigned) (b) << 16) + ((unsigned) (c) << 8) + (unsigned) (d))
  ------------------
  |  Branch (5123:10): [True: 0, False: 0]
  ------------------
 5124|      0|            int comp,filter;
 5125|      0|            if (!first) return stbi__err("multiple IHDR","Corrupt PNG");
  ------------------
  |  | 1093|      0|   #define stbi__err(x,y)  stbi__err(x)
  ------------------
  |  Branch (5125:17): [True: 0, False: 0]
  ------------------
 5126|      0|            first = 0;
 5127|      0|            if (c.length != 13) return stbi__err("bad IHDR len","Corrupt PNG");
  ------------------
  |  | 1093|      0|   #define stbi__err(x,y)  stbi__err(x)
  ------------------
  |  Branch (5127:17): [True: 0, False: 0]
  ------------------
 5128|      0|            s->img_x = stbi__get32be(s);
 5129|      0|            s->img_y = stbi__get32be(s);
 5130|      0|            if (s->img_y > STBI_MAX_DIMENSIONS) return stbi__err("too large","Very large image (corrupt?)");
  ------------------
  |  |  794|      0|#define STBI_MAX_DIMENSIONS (1 << 24)
  ------------------
                          if (s->img_y > STBI_MAX_DIMENSIONS) return stbi__err("too large","Very large image (corrupt?)");
  ------------------
  |  | 1093|      0|   #define stbi__err(x,y)  stbi__err(x)
  ------------------
  |  Branch (5130:17): [True: 0, False: 0]
  ------------------
 5131|      0|            if (s->img_x > STBI_MAX_DIMENSIONS) return stbi__err("too large","Very large image (corrupt?)");
  ------------------
  |  |  794|      0|#define STBI_MAX_DIMENSIONS (1 << 24)
  ------------------
                          if (s->img_x > STBI_MAX_DIMENSIONS) return stbi__err("too large","Very large image (corrupt?)");
  ------------------
  |  | 1093|      0|   #define stbi__err(x,y)  stbi__err(x)
  ------------------
  |  Branch (5131:17): [True: 0, False: 0]
  ------------------
 5132|      0|            z->depth = stbi__get8(s);  if (z->depth != 1 && z->depth != 2 && z->depth != 4 && z->depth != 8 && z->depth != 16)  return stbi__err("1/2/4/8/16-bit only","PNG not supported: 1/2/4/8/16-bit only");
  ------------------
  |  | 1093|      0|   #define stbi__err(x,y)  stbi__err(x)
  ------------------
  |  Branch (5132:44): [True: 0, False: 0]
  |  Branch (5132:61): [True: 0, False: 0]
  |  Branch (5132:78): [True: 0, False: 0]
  |  Branch (5132:95): [True: 0, False: 0]
  |  Branch (5132:112): [True: 0, False: 0]
  ------------------
 5133|      0|            color = stbi__get8(s);  if (color > 6)         return stbi__err("bad ctype","Corrupt PNG");
  ------------------
  |  | 1093|      0|   #define stbi__err(x,y)  stbi__err(x)
  ------------------
  |  Branch (5133:41): [True: 0, False: 0]
  ------------------
 5134|      0|            if (color == 3 && z->depth == 16)                  return stbi__err("bad ctype","Corrupt PNG");
  ------------------
  |  | 1093|      0|   #define stbi__err(x,y)  stbi__err(x)
  ------------------
  |  Branch (5134:17): [True: 0, False: 0]
  |  Branch (5134:31): [True: 0, False: 0]
  ------------------
 5135|      0|            if (color == 3) pal_img_n = 3; else if (color & 1) return stbi__err("bad ctype","Corrupt PNG");
  ------------------
  |  | 1093|      0|   #define stbi__err(x,y)  stbi__err(x)
  ------------------
  |  Branch (5135:17): [True: 0, False: 0]
  |  Branch (5135:53): [True: 0, False: 0]
  ------------------
 5136|      0|            comp  = stbi__get8(s);  if (comp) return stbi__err("bad comp method","Corrupt PNG");
  ------------------
  |  | 1093|      0|   #define stbi__err(x,y)  stbi__err(x)
  ------------------
  |  Branch (5136:41): [True: 0, False: 0]
  ------------------
 5137|      0|            filter= stbi__get8(s);  if (filter) return stbi__err("bad filter method","Corrupt PNG");
  ------------------
  |  | 1093|      0|   #define stbi__err(x,y)  stbi__err(x)
  ------------------
  |  Branch (5137:41): [True: 0, False: 0]
  ------------------
 5138|      0|            interlace = stbi__get8(s); if (interlace>1) return stbi__err("bad interlace method","Corrupt PNG");
  ------------------
  |  | 1093|      0|   #define stbi__err(x,y)  stbi__err(x)
  ------------------
  |  Branch (5138:44): [True: 0, False: 0]
  ------------------
 5139|      0|            if (!s->img_x || !s->img_y) return stbi__err("0-pixel image","Corrupt PNG");
  ------------------
  |  | 1093|      0|   #define stbi__err(x,y)  stbi__err(x)
  ------------------
  |  Branch (5139:17): [True: 0, False: 0]
  |  Branch (5139:30): [True: 0, False: 0]
  ------------------
 5140|      0|            if (!pal_img_n) {
  ------------------
  |  Branch (5140:17): [True: 0, False: 0]
  ------------------
 5141|      0|               s->img_n = (color & 2 ? 3 : 1) + (color & 4 ? 1 : 0);
  ------------------
  |  Branch (5141:28): [True: 0, False: 0]
  |  Branch (5141:50): [True: 0, False: 0]
  ------------------
 5142|      0|               if ((1 << 30) / s->img_x / s->img_n < s->img_y) return stbi__err("too large", "Image too large to decode");
  ------------------
  |  | 1093|      0|   #define stbi__err(x,y)  stbi__err(x)
  ------------------
  |  Branch (5142:20): [True: 0, False: 0]
  ------------------
 5143|      0|            } else {
 5144|       |               // if paletted, then pal_n is our final components, and
 5145|       |               // img_n is # components to decompress/filter.
 5146|      0|               s->img_n = 1;
 5147|      0|               if ((1 << 30) / s->img_x / 4 < s->img_y) return stbi__err("too large","Corrupt PNG");
  ------------------
  |  | 1093|      0|   #define stbi__err(x,y)  stbi__err(x)
  ------------------
  |  Branch (5147:20): [True: 0, False: 0]
  ------------------
 5148|      0|            }
 5149|       |            // even with SCAN_header, have to scan to see if we have a tRNS
 5150|      0|            break;
 5151|      0|         }
 5152|       |
 5153|      0|         case STBI__PNG_TYPE('P','L','T','E'):  {
  ------------------
  |  | 5097|      0|#define STBI__PNG_TYPE(a,b,c,d)  (((unsigned) (a) << 24) + ((unsigned) (b) << 16) + ((unsigned) (c) << 8) + (unsigned) (d))
  ------------------
  |  Branch (5153:10): [True: 0, False: 0]
  ------------------
 5154|      0|            if (first) return stbi__err("first not IHDR", "Corrupt PNG");
  ------------------
  |  | 1093|      0|   #define stbi__err(x,y)  stbi__err(x)
  ------------------
  |  Branch (5154:17): [True: 0, False: 0]
  ------------------
 5155|      0|            if (c.length > 256*3) return stbi__err("invalid PLTE","Corrupt PNG");
  ------------------
  |  | 1093|      0|   #define stbi__err(x,y)  stbi__err(x)
  ------------------
  |  Branch (5155:17): [True: 0, False: 0]
  ------------------
 5156|      0|            pal_len = c.length / 3;
 5157|      0|            if (pal_len * 3 != c.length) return stbi__err("invalid PLTE","Corrupt PNG");
  ------------------
  |  | 1093|      0|   #define stbi__err(x,y)  stbi__err(x)
  ------------------
  |  Branch (5157:17): [True: 0, False: 0]
  ------------------
 5158|      0|            for (i=0; i < pal_len; ++i) {
  ------------------
  |  Branch (5158:23): [True: 0, False: 0]
  ------------------
 5159|      0|               palette[i*4+0] = stbi__get8(s);
 5160|      0|               palette[i*4+1] = stbi__get8(s);
 5161|      0|               palette[i*4+2] = stbi__get8(s);
 5162|      0|               palette[i*4+3] = 255;
 5163|      0|            }
 5164|      0|            break;
 5165|      0|         }
 5166|       |
 5167|      0|         case STBI__PNG_TYPE('t','R','N','S'): {
  ------------------
  |  | 5097|      0|#define STBI__PNG_TYPE(a,b,c,d)  (((unsigned) (a) << 24) + ((unsigned) (b) << 16) + ((unsigned) (c) << 8) + (unsigned) (d))
  ------------------
  |  Branch (5167:10): [True: 0, False: 0]
  ------------------
 5168|      0|            if (first) return stbi__err("first not IHDR", "Corrupt PNG");
  ------------------
  |  | 1093|      0|   #define stbi__err(x,y)  stbi__err(x)
  ------------------
  |  Branch (5168:17): [True: 0, False: 0]
  ------------------
 5169|      0|            if (z->idata) return stbi__err("tRNS after IDAT","Corrupt PNG");
  ------------------
  |  | 1093|      0|   #define stbi__err(x,y)  stbi__err(x)
  ------------------
  |  Branch (5169:17): [True: 0, False: 0]
  ------------------
 5170|      0|            if (pal_img_n) {
  ------------------
  |  Branch (5170:17): [True: 0, False: 0]
  ------------------
 5171|      0|               if (scan == STBI__SCAN_header) { s->img_n = 4; return 1; }
  ------------------
  |  Branch (5171:20): [True: 0, False: 0]
  ------------------
 5172|      0|               if (pal_len == 0) return stbi__err("tRNS before PLTE","Corrupt PNG");
  ------------------
  |  | 1093|      0|   #define stbi__err(x,y)  stbi__err(x)
  ------------------
  |  Branch (5172:20): [True: 0, False: 0]
  ------------------
 5173|      0|               if (c.length > pal_len) return stbi__err("bad tRNS len","Corrupt PNG");
  ------------------
  |  | 1093|      0|   #define stbi__err(x,y)  stbi__err(x)
  ------------------
  |  Branch (5173:20): [True: 0, False: 0]
  ------------------
 5174|      0|               pal_img_n = 4;
 5175|      0|               for (i=0; i < c.length; ++i)
  ------------------
  |  Branch (5175:26): [True: 0, False: 0]
  ------------------
 5176|      0|                  palette[i*4+3] = stbi__get8(s);
 5177|      0|            } else {
 5178|      0|               if (!(s->img_n & 1)) return stbi__err("tRNS with alpha","Corrupt PNG");
  ------------------
  |  | 1093|      0|   #define stbi__err(x,y)  stbi__err(x)
  ------------------
  |  Branch (5178:20): [True: 0, False: 0]
  ------------------
 5179|      0|               if (c.length != (stbi__uint32) s->img_n*2) return stbi__err("bad tRNS len","Corrupt PNG");
  ------------------
  |  | 1093|      0|   #define stbi__err(x,y)  stbi__err(x)
  ------------------
  |  Branch (5179:20): [True: 0, False: 0]
  ------------------
 5180|      0|               has_trans = 1;
 5181|       |               // non-paletted with tRNS = constant alpha. if header-scanning, we can stop now.
 5182|      0|               if (scan == STBI__SCAN_header) { ++s->img_n; return 1; }
  ------------------
  |  Branch (5182:20): [True: 0, False: 0]
  ------------------
 5183|      0|               if (z->depth == 16) {
  ------------------
  |  Branch (5183:20): [True: 0, False: 0]
  ------------------
 5184|      0|                  for (k = 0; k < s->img_n; ++k) tc16[k] = (stbi__uint16)stbi__get16be(s); // copy the values as-is
  ------------------
  |  Branch (5184:31): [True: 0, False: 0]
  ------------------
 5185|      0|               } else {
 5186|      0|                  for (k = 0; k < s->img_n; ++k) tc[k] = (stbi_uc)(stbi__get16be(s) & 255) * stbi__depth_scale_table[z->depth]; // non 8-bit images will be larger
  ------------------
  |  Branch (5186:31): [True: 0, False: 0]
  ------------------
 5187|      0|               }
 5188|      0|            }
 5189|      0|            break;
 5190|      0|         }
 5191|       |
 5192|      0|         case STBI__PNG_TYPE('I','D','A','T'): {
  ------------------
  |  | 5097|      0|#define STBI__PNG_TYPE(a,b,c,d)  (((unsigned) (a) << 24) + ((unsigned) (b) << 16) + ((unsigned) (c) << 8) + (unsigned) (d))
  ------------------
  |  Branch (5192:10): [True: 0, False: 0]
  ------------------
 5193|      0|            if (first) return stbi__err("first not IHDR", "Corrupt PNG");
  ------------------
  |  | 1093|      0|   #define stbi__err(x,y)  stbi__err(x)
  ------------------
  |  Branch (5193:17): [True: 0, False: 0]
  ------------------
 5194|      0|            if (pal_img_n && !pal_len) return stbi__err("no PLTE","Corrupt PNG");
  ------------------
  |  | 1093|      0|   #define stbi__err(x,y)  stbi__err(x)
  ------------------
  |  Branch (5194:17): [True: 0, False: 0]
  |  Branch (5194:30): [True: 0, False: 0]
  ------------------
 5195|      0|            if (scan == STBI__SCAN_header) {
  ------------------
  |  Branch (5195:17): [True: 0, False: 0]
  ------------------
 5196|       |               // header scan definitely stops at first IDAT
 5197|      0|               if (pal_img_n)
  ------------------
  |  Branch (5197:20): [True: 0, False: 0]
  ------------------
 5198|      0|                  s->img_n = pal_img_n;
 5199|      0|               return 1;
 5200|      0|            }
 5201|      0|            if (c.length > (1u << 30)) return stbi__err("IDAT size limit", "IDAT section larger than 2^30 bytes");
  ------------------
  |  | 1093|      0|   #define stbi__err(x,y)  stbi__err(x)
  ------------------
  |  Branch (5201:17): [True: 0, False: 0]
  ------------------
 5202|      0|            if ((int)(ioff + c.length) < (int)ioff) return 0;
  ------------------
  |  Branch (5202:17): [True: 0, False: 0]
  ------------------
 5203|      0|            if (ioff + c.length > idata_limit) {
  ------------------
  |  Branch (5203:17): [True: 0, False: 0]
  ------------------
 5204|      0|               stbi__uint32 idata_limit_old = idata_limit;
 5205|      0|               stbi_uc *p;
 5206|      0|               if (idata_limit == 0) idata_limit = c.length > 4096 ? c.length : 4096;
  ------------------
  |  Branch (5206:20): [True: 0, False: 0]
  |  Branch (5206:52): [True: 0, False: 0]
  ------------------
 5207|      0|               while (ioff + c.length > idata_limit)
  ------------------
  |  Branch (5207:23): [True: 0, False: 0]
  ------------------
 5208|      0|                  idata_limit *= 2;
 5209|      0|               STBI_NOTUSED(idata_limit_old);
  ------------------
  |  |  658|      0|#define STBI_NOTUSED(v)  (void)sizeof(v)
  ------------------
 5210|      0|               p = (stbi_uc *) STBI_REALLOC_SIZED(z->idata, idata_limit_old, idata_limit); if (p == NULL) return stbi__err("outofmem", "Out of memory");
  ------------------
  |  |  686|      0|#define STBI_REALLOC_SIZED(p,oldsz,newsz) STBI_REALLOC(p,newsz)
  |  |  ------------------
  |  |  |  |  681|      0|#define STBI_REALLOC(p,newsz)     realloc(p,newsz)
  |  |  ------------------
  ------------------
                             p = (stbi_uc *) STBI_REALLOC_SIZED(z->idata, idata_limit_old, idata_limit); if (p == NULL) return stbi__err("outofmem", "Out of memory");
  ------------------
  |  | 1093|      0|   #define stbi__err(x,y)  stbi__err(x)
  ------------------
  |  Branch (5210:96): [True: 0, False: 0]
  ------------------
 5211|      0|               z->idata = p;
 5212|      0|            }
 5213|      0|            if (!stbi__getn(s, z->idata+ioff,c.length)) return stbi__err("outofdata","Corrupt PNG");
  ------------------
  |  | 1093|      0|   #define stbi__err(x,y)  stbi__err(x)
  ------------------
  |  Branch (5213:17): [True: 0, False: 0]
  ------------------
 5214|      0|            ioff += c.length;
 5215|      0|            break;
 5216|      0|         }
 5217|       |
 5218|      0|         case STBI__PNG_TYPE('I','E','N','D'): {
  ------------------
  |  | 5097|      0|#define STBI__PNG_TYPE(a,b,c,d)  (((unsigned) (a) << 24) + ((unsigned) (b) << 16) + ((unsigned) (c) << 8) + (unsigned) (d))
  ------------------
  |  Branch (5218:10): [True: 0, False: 0]
  ------------------
 5219|      0|            stbi__uint32 raw_len, bpl;
 5220|      0|            if (first) return stbi__err("first not IHDR", "Corrupt PNG");
  ------------------
  |  | 1093|      0|   #define stbi__err(x,y)  stbi__err(x)
  ------------------
  |  Branch (5220:17): [True: 0, False: 0]
  ------------------
 5221|      0|            if (scan != STBI__SCAN_load) return 1;
  ------------------
  |  Branch (5221:17): [True: 0, False: 0]
  ------------------
 5222|      0|            if (z->idata == NULL) return stbi__err("no IDAT","Corrupt PNG");
  ------------------
  |  | 1093|      0|   #define stbi__err(x,y)  stbi__err(x)
  ------------------
  |  Branch (5222:17): [True: 0, False: 0]
  ------------------
 5223|       |            // initial guess for decoded data size to avoid unnecessary reallocs
 5224|      0|            bpl = (s->img_x * z->depth + 7) / 8; // bytes per line, per component
 5225|      0|            raw_len = bpl * s->img_y * s->img_n /* pixels */ + s->img_y /* filter mode per row */;
 5226|      0|            z->expanded = (stbi_uc *) stbi_zlib_decode_malloc_guesssize_headerflag((char *) z->idata, ioff, raw_len, (int *) &raw_len, !is_iphone);
 5227|      0|            if (z->expanded == NULL) return 0; // zlib should set error
  ------------------
  |  Branch (5227:17): [True: 0, False: 0]
  ------------------
 5228|      0|            STBI_FREE(z->idata); z->idata = NULL;
  ------------------
  |  |  682|      0|#define STBI_FREE(p)              free(p)
  ------------------
 5229|      0|            if ((req_comp == s->img_n+1 && req_comp != 3 && !pal_img_n) || has_trans)
  ------------------
  |  Branch (5229:18): [True: 0, False: 0]
  |  Branch (5229:44): [True: 0, False: 0]
  |  Branch (5229:61): [True: 0, False: 0]
  |  Branch (5229:76): [True: 0, False: 0]
  ------------------
 5230|      0|               s->img_out_n = s->img_n+1;
 5231|      0|            else
 5232|      0|               s->img_out_n = s->img_n;
 5233|      0|            if (!stbi__create_png_image(z, z->expanded, raw_len, s->img_out_n, z->depth, color, interlace)) return 0;
  ------------------
  |  Branch (5233:17): [True: 0, False: 0]
  ------------------
 5234|      0|            if (has_trans) {
  ------------------
  |  Branch (5234:17): [True: 0, False: 0]
  ------------------
 5235|      0|               if (z->depth == 16) {
  ------------------
  |  Branch (5235:20): [True: 0, False: 0]
  ------------------
 5236|      0|                  if (!stbi__compute_transparency16(z, tc16, s->img_out_n)) return 0;
  ------------------
  |  Branch (5236:23): [True: 0, False: 0]
  ------------------
 5237|      0|               } else {
 5238|      0|                  if (!stbi__compute_transparency(z, tc, s->img_out_n)) return 0;
  ------------------
  |  Branch (5238:23): [True: 0, False: 0]
  ------------------
 5239|      0|               }
 5240|      0|            }
 5241|      0|            if (is_iphone && stbi__de_iphone_flag && s->img_out_n > 2)
  ------------------
  |  | 5049|      0|#define stbi__de_iphone_flag  (stbi__de_iphone_flag_set                         \
  |  |  ------------------
  |  |  |  Branch (5049:31): [True: 0, False: 0]
  |  |  |  Branch (5049:32): [True: 0, False: 0]
  |  |  ------------------
  |  | 5050|      0|                                ? stbi__de_iphone_flag_local                    \
  |  | 5051|      0|                                : stbi__de_iphone_flag_global)
  ------------------
  |  Branch (5241:17): [True: 0, False: 0]
  |  Branch (5241:54): [True: 0, False: 0]
  ------------------
 5242|      0|               stbi__de_iphone(z);
 5243|      0|            if (pal_img_n) {
  ------------------
  |  Branch (5243:17): [True: 0, False: 0]
  ------------------
 5244|       |               // pal_img_n == 3 or 4
 5245|      0|               s->img_n = pal_img_n; // record the actual colors we had
 5246|      0|               s->img_out_n = pal_img_n;
 5247|      0|               if (req_comp >= 3) s->img_out_n = req_comp;
  ------------------
  |  Branch (5247:20): [True: 0, False: 0]
  ------------------
 5248|      0|               if (!stbi__expand_png_palette(z, palette, pal_len, s->img_out_n))
  ------------------
  |  Branch (5248:20): [True: 0, False: 0]
  ------------------
 5249|      0|                  return 0;
 5250|      0|            } else if (has_trans) {
  ------------------
  |  Branch (5250:24): [True: 0, False: 0]
  ------------------
 5251|       |               // non-paletted image with tRNS -> source image has (constant) alpha
 5252|      0|               ++s->img_n;
 5253|      0|            }
 5254|      0|            STBI_FREE(z->expanded); z->expanded = NULL;
  ------------------
  |  |  682|      0|#define STBI_FREE(p)              free(p)
  ------------------
 5255|       |            // end of PNG chunk, read and skip CRC
 5256|      0|            stbi__get32be(s);
 5257|      0|            return 1;
 5258|      0|         }
 5259|       |
 5260|      0|         default:
  ------------------
  |  Branch (5260:10): [True: 0, False: 0]
  ------------------
 5261|       |            // if critical, fail
 5262|      0|            if (first) return stbi__err("first not IHDR", "Corrupt PNG");
  ------------------
  |  | 1093|      0|   #define stbi__err(x,y)  stbi__err(x)
  ------------------
  |  Branch (5262:17): [True: 0, False: 0]
  ------------------
 5263|      0|            if ((c.type & (1 << 29)) == 0) {
  ------------------
  |  Branch (5263:17): [True: 0, False: 0]
  ------------------
 5264|      0|               #ifndef STBI_NO_FAILURE_STRINGS
 5265|       |               // not threadsafe
 5266|      0|               static char invalid_chunk[] = "XXXX PNG chunk not known";
 5267|      0|               invalid_chunk[0] = STBI__BYTECAST(c.type >> 24);
  ------------------
  |  | 1728|      0|#define STBI__BYTECAST(x)  ((stbi_uc) ((x) & 255))  // truncate int to byte without warnings
  ------------------
 5268|      0|               invalid_chunk[1] = STBI__BYTECAST(c.type >> 16);
  ------------------
  |  | 1728|      0|#define STBI__BYTECAST(x)  ((stbi_uc) ((x) & 255))  // truncate int to byte without warnings
  ------------------
 5269|      0|               invalid_chunk[2] = STBI__BYTECAST(c.type >>  8);
  ------------------
  |  | 1728|      0|#define STBI__BYTECAST(x)  ((stbi_uc) ((x) & 255))  // truncate int to byte without warnings
  ------------------
 5270|      0|               invalid_chunk[3] = STBI__BYTECAST(c.type >>  0);
  ------------------
  |  | 1728|      0|#define STBI__BYTECAST(x)  ((stbi_uc) ((x) & 255))  // truncate int to byte without warnings
  ------------------
 5271|      0|               #endif
 5272|      0|               return stbi__err(invalid_chunk, "PNG not supported: unknown PNG chunk type");
  ------------------
  |  | 1093|      0|   #define stbi__err(x,y)  stbi__err(x)
  ------------------
 5273|      0|            }
 5274|      0|            stbi__skip(s, c.length);
 5275|      0|            break;
 5276|      0|      }
 5277|       |      // end of PNG chunk, read and skip CRC
 5278|      0|      stbi__get32be(s);
 5279|      0|   }
 5280|      0|}
fuzz_gltf.cc:_ZL10stbi__skipP13stbi__contexti:
 1643|   457k|{
 1644|   457k|   if (n == 0) return;  // already there!
  ------------------
  |  Branch (1644:8): [True: 327k, False: 129k]
  ------------------
 1645|   129k|   if (n < 0) {
  ------------------
  |  Branch (1645:8): [True: 0, False: 129k]
  ------------------
 1646|      0|      s->img_buffer = s->img_buffer_end;
 1647|      0|      return;
 1648|      0|   }
 1649|   129k|   if (s->io.read) {
  ------------------
  |  Branch (1649:8): [True: 0, False: 129k]
  ------------------
 1650|      0|      int blen = (int) (s->img_buffer_end - s->img_buffer);
 1651|      0|      if (blen < n) {
  ------------------
  |  Branch (1651:11): [True: 0, False: 0]
  ------------------
 1652|      0|         s->img_buffer = s->img_buffer_end;
 1653|      0|         (s->io.skip)(s->io_user_data, n - blen);
 1654|      0|         return;
 1655|      0|      }
 1656|      0|   }
 1657|   129k|   s->img_buffer += n;
 1658|   129k|}
fuzz_gltf.cc:_ZL13stbi__get32beP13stbi__context:
 1703|  42.0k|{
 1704|  42.0k|   stbi__uint32 z = stbi__get16be(s);
 1705|  42.0k|   return (z << 16) + stbi__get16be(s);
 1706|  42.0k|}
fuzz_gltf.cc:_ZL13stbi__get16beP13stbi__context:
 1693|   128k|{
 1694|   128k|   int z = stbi__get8(s);
 1695|   128k|   return (z << 8) + stbi__get8(s);
 1696|   128k|}
fuzz_gltf.cc:_ZL10stbi__getnP13stbi__contextPhi:
 1665|  64.9k|{
 1666|  64.9k|   if (s->io.read) {
  ------------------
  |  Branch (1666:8): [True: 0, False: 64.9k]
  ------------------
 1667|      0|      int blen = (int) (s->img_buffer_end - s->img_buffer);
 1668|      0|      if (blen < n) {
  ------------------
  |  Branch (1668:11): [True: 0, False: 0]
  ------------------
 1669|      0|         int res, count;
 1670|       |
 1671|      0|         memcpy(buffer, s->img_buffer, blen);
 1672|       |
 1673|      0|         count = (s->io.read)(s->io_user_data, (char*) buffer + blen, n - blen);
 1674|      0|         res = (count == (n-blen));
 1675|      0|         s->img_buffer = s->img_buffer_end;
 1676|      0|         return res;
 1677|      0|      }
 1678|      0|   }
 1679|       |
 1680|  64.9k|   if (s->img_buffer+n <= s->img_buffer_end) {
  ------------------
  |  Branch (1680:8): [True: 9.40k, False: 55.5k]
  ------------------
 1681|  9.40k|      memcpy(buffer, s->img_buffer, n);
 1682|  9.40k|      s->img_buffer += n;
 1683|  9.40k|      return 1;
 1684|  9.40k|   } else
 1685|  55.5k|      return 0;
 1686|  64.9k|}
fuzz_gltf.cc:_ZL21stbi__mad3sizes_validiiii:
 1030|  41.5k|{
 1031|  41.5k|   return stbi__mul2sizes_valid(a, b) && stbi__mul2sizes_valid(a*b, c) &&
  ------------------
  |  Branch (1031:11): [True: 41.5k, False: 1]
  |  Branch (1031:42): [True: 41.5k, False: 0]
  ------------------
 1032|  41.5k|      stbi__addsizes_valid(a*b*c, add);
  ------------------
  |  Branch (1032:7): [True: 41.5k, False: 0]
  ------------------
 1033|  41.5k|}
fuzz_gltf.cc:_ZL21stbi__mul2sizes_validii:
 1013|   170k|{
 1014|   170k|   if (a < 0 || b < 0) return 0;
  ------------------
  |  Branch (1014:8): [True: 0, False: 170k]
  |  Branch (1014:17): [True: 0, False: 170k]
  ------------------
 1015|   170k|   if (b == 0) return 1; // mul-by-0 is always safe
  ------------------
  |  Branch (1015:8): [True: 0, False: 170k]
  ------------------
 1016|       |   // portable way to check for no overflows in a*b
 1017|   170k|   return a <= INT_MAX/b;
 1018|   170k|}
fuzz_gltf.cc:_ZL20stbi__addsizes_validii:
 1001|  92.2k|{
 1002|  92.2k|   if (b < 0) return 0;
  ------------------
  |  Branch (1002:8): [True: 0, False: 92.2k]
  ------------------
 1003|       |   // now 0 <= b <= INT_MAX, hence also
 1004|       |   // 0 <= INT_MAX - b <= INTMAX.
 1005|       |   // And "a + b <= INT_MAX" (which might overflow) is the
 1006|       |   // same as a <= INT_MAX - b (no overflow)
 1007|  92.2k|   return a <= INT_MAX - b;
 1008|  92.2k|}
fuzz_gltf.cc:_ZL17stbi__malloc_mad3iiii:
 1054|  29.3k|{
 1055|  29.3k|   if (!stbi__mad3sizes_valid(a, b, c, add)) return NULL;
  ------------------
  |  Branch (1055:8): [True: 0, False: 29.3k]
  ------------------
 1056|  29.3k|   return stbi__malloc(a*b*c + add);
 1057|  29.3k|}
fuzz_gltf.cc:_ZL17stbi__malloc_mad2iii:
 1047|  32.6k|{
 1048|  32.6k|   if (!stbi__mad2sizes_valid(a, b, add)) return NULL;
  ------------------
  |  Branch (1048:8): [True: 0, False: 32.6k]
  ------------------
 1049|  32.6k|   return stbi__malloc(a*b + add);
 1050|  32.6k|}
fuzz_gltf.cc:_ZL21stbi__mad2sizes_validiii:
 1023|  32.6k|{
 1024|  32.6k|   return stbi__mul2sizes_valid(a, b) && stbi__addsizes_valid(a*b, add);
  ------------------
  |  Branch (1024:11): [True: 32.6k, False: 0]
  |  Branch (1024:42): [True: 32.6k, False: 0]
  ------------------
 1025|  32.6k|}
fuzz_gltf.cc:_ZL20stbi__convert_formatPhiijj:
 1754|  11.1k|{
 1755|  11.1k|   int i,j;
 1756|  11.1k|   unsigned char *good;
 1757|       |
 1758|  11.1k|   if (req_comp == img_n) return data;
  ------------------
  |  Branch (1758:8): [True: 0, False: 11.1k]
  ------------------
 1759|  11.1k|   STBI_ASSERT(req_comp >= 1 && req_comp <= 4);
  ------------------
  |  |  601|  11.1k|#define STBI_ASSERT(x) assert(x)
  ------------------
 1760|       |
 1761|      0|   good = (unsigned char *) stbi__malloc_mad3(req_comp, x, y, 0);
 1762|  11.1k|   if (good == NULL) {
  ------------------
  |  Branch (1762:8): [True: 0, False: 11.1k]
  ------------------
 1763|      0|      STBI_FREE(data);
  ------------------
  |  |  682|      0|#define STBI_FREE(p)              free(p)
  ------------------
 1764|      0|      return stbi__errpuc("outofmem", "Out of memory");
  ------------------
  |  | 1097|      0|#define stbi__errpuc(x,y)  ((unsigned char *)(size_t) (stbi__err(x,y)?NULL:NULL))
  |  |  ------------------
  |  |  |  | 1093|      0|   #define stbi__err(x,y)  stbi__err(x)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1093:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1765|      0|   }
 1766|       |
 1767|  31.0M|   for (j=0; j < (int) y; ++j) {
  ------------------
  |  Branch (1767:14): [True: 31.0M, False: 11.1k]
  ------------------
 1768|  31.0M|      unsigned char *src  = data + j * x * img_n   ;
 1769|  31.0M|      unsigned char *dest = good + j * x * req_comp;
 1770|       |
 1771|  31.0M|      #define STBI__COMBO(a,b)  ((a)*8+(b))
 1772|  31.0M|      #define STBI__CASE(a,b)   case STBI__COMBO(a,b): for(i=x-1; i >= 0; --i, src += a, dest += b)
 1773|       |      // convert source image with img_n components to one with req_comp components;
 1774|       |      // avoid switch per pixel, so use switch per scanline and massive macros
 1775|  31.0M|      switch (STBI__COMBO(img_n, req_comp)) {
  ------------------
  |  | 1771|  31.0M|      #define STBI__COMBO(a,b)  ((a)*8+(b))
  ------------------
 1776|      0|         STBI__CASE(1,2) { dest[0]=src[0]; dest[1]=255;                                     } break;
  ------------------
  |  | 1772|      0|      #define STBI__CASE(a,b)   case STBI__COMBO(a,b): for(i=x-1; i >= 0; --i, src += a, dest += b)
  |  |  ------------------
  |  |  |  | 1771|      0|      #define STBI__COMBO(a,b)  ((a)*8+(b))
  |  |  ------------------
  |  |  |  Branch (1772:33): [True: 0, False: 31.0M]
  |  |  |  Branch (1772:67): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1777|      0|         STBI__CASE(1,3) { dest[0]=dest[1]=dest[2]=src[0];                                  } break;
  ------------------
  |  | 1772|      0|      #define STBI__CASE(a,b)   case STBI__COMBO(a,b): for(i=x-1; i >= 0; --i, src += a, dest += b)
  |  |  ------------------
  |  |  |  | 1771|      0|      #define STBI__COMBO(a,b)  ((a)*8+(b))
  |  |  ------------------
  |  |  |  Branch (1772:33): [True: 0, False: 31.0M]
  |  |  |  Branch (1772:67): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1778|   472M|         STBI__CASE(1,4) { dest[0]=dest[1]=dest[2]=src[0]; dest[3]=255;                     } break;
  ------------------
  |  | 1772|   501M|      #define STBI__CASE(a,b)   case STBI__COMBO(a,b): for(i=x-1; i >= 0; --i, src += a, dest += b)
  |  |  ------------------
  |  |  |  | 1771|  29.3M|      #define STBI__COMBO(a,b)  ((a)*8+(b))
  |  |  ------------------
  |  |  |  Branch (1772:33): [True: 29.3M, False: 1.71M]
  |  |  |  Branch (1772:67): [True: 472M, False: 29.3M]
  |  |  ------------------
  ------------------
 1779|      0|         STBI__CASE(2,1) { dest[0]=src[0];                                                  } break;
  ------------------
  |  | 1772|      0|      #define STBI__CASE(a,b)   case STBI__COMBO(a,b): for(i=x-1; i >= 0; --i, src += a, dest += b)
  |  |  ------------------
  |  |  |  | 1771|      0|      #define STBI__COMBO(a,b)  ((a)*8+(b))
  |  |  ------------------
  |  |  |  Branch (1772:33): [True: 0, False: 31.0M]
  |  |  |  Branch (1772:67): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1780|      0|         STBI__CASE(2,3) { dest[0]=dest[1]=dest[2]=src[0];                                  } break;
  ------------------
  |  | 1772|      0|      #define STBI__CASE(a,b)   case STBI__COMBO(a,b): for(i=x-1; i >= 0; --i, src += a, dest += b)
  |  |  ------------------
  |  |  |  | 1771|      0|      #define STBI__COMBO(a,b)  ((a)*8+(b))
  |  |  ------------------
  |  |  |  Branch (1772:33): [True: 0, False: 31.0M]
  |  |  |  Branch (1772:67): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1781|  78.7M|         STBI__CASE(2,4) { dest[0]=dest[1]=dest[2]=src[0]; dest[3]=src[1];                  } break;
  ------------------
  |  | 1772|  78.7M|      #define STBI__CASE(a,b)   case STBI__COMBO(a,b): for(i=x-1; i >= 0; --i, src += a, dest += b)
  |  |  ------------------
  |  |  |  | 1771|  21.7k|      #define STBI__COMBO(a,b)  ((a)*8+(b))
  |  |  ------------------
  |  |  |  Branch (1772:33): [True: 21.7k, False: 31.0M]
  |  |  |  Branch (1772:67): [True: 78.7M, False: 21.7k]
  |  |  ------------------
  ------------------
 1782|   691M|         STBI__CASE(3,4) { dest[0]=src[0];dest[1]=src[1];dest[2]=src[2];dest[3]=255;        } break;
  ------------------
  |  | 1772|   693M|      #define STBI__CASE(a,b)   case STBI__COMBO(a,b): for(i=x-1; i >= 0; --i, src += a, dest += b)
  |  |  ------------------
  |  |  |  | 1771|  1.69M|      #define STBI__COMBO(a,b)  ((a)*8+(b))
  |  |  ------------------
  |  |  |  Branch (1772:33): [True: 1.69M, False: 29.3M]
  |  |  |  Branch (1772:67): [True: 691M, False: 1.69M]
  |  |  ------------------
  ------------------
 1783|      0|         STBI__CASE(3,1) { dest[0]=stbi__compute_y(src[0],src[1],src[2]);                   } break;
  ------------------
  |  | 1772|      0|      #define STBI__CASE(a,b)   case STBI__COMBO(a,b): for(i=x-1; i >= 0; --i, src += a, dest += b)
  |  |  ------------------
  |  |  |  | 1771|      0|      #define STBI__COMBO(a,b)  ((a)*8+(b))
  |  |  ------------------
  |  |  |  Branch (1772:33): [True: 0, False: 31.0M]
  |  |  |  Branch (1772:67): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1784|      0|         STBI__CASE(3,2) { dest[0]=stbi__compute_y(src[0],src[1],src[2]); dest[1] = 255;    } break;
  ------------------
  |  | 1772|      0|      #define STBI__CASE(a,b)   case STBI__COMBO(a,b): for(i=x-1; i >= 0; --i, src += a, dest += b)
  |  |  ------------------
  |  |  |  | 1771|      0|      #define STBI__COMBO(a,b)  ((a)*8+(b))
  |  |  ------------------
  |  |  |  Branch (1772:33): [True: 0, False: 31.0M]
  |  |  |  Branch (1772:67): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1785|      0|         STBI__CASE(4,1) { dest[0]=stbi__compute_y(src[0],src[1],src[2]);                   } break;
  ------------------
  |  | 1772|      0|      #define STBI__CASE(a,b)   case STBI__COMBO(a,b): for(i=x-1; i >= 0; --i, src += a, dest += b)
  |  |  ------------------
  |  |  |  | 1771|      0|      #define STBI__COMBO(a,b)  ((a)*8+(b))
  |  |  ------------------
  |  |  |  Branch (1772:33): [True: 0, False: 31.0M]
  |  |  |  Branch (1772:67): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1786|      0|         STBI__CASE(4,2) { dest[0]=stbi__compute_y(src[0],src[1],src[2]); dest[1] = src[3]; } break;
  ------------------
  |  | 1772|      0|      #define STBI__CASE(a,b)   case STBI__COMBO(a,b): for(i=x-1; i >= 0; --i, src += a, dest += b)
  |  |  ------------------
  |  |  |  | 1771|      0|      #define STBI__COMBO(a,b)  ((a)*8+(b))
  |  |  ------------------
  |  |  |  Branch (1772:33): [True: 0, False: 31.0M]
  |  |  |  Branch (1772:67): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1787|      0|         STBI__CASE(4,3) { dest[0]=src[0];dest[1]=src[1];dest[2]=src[2];                    } break;
  ------------------
  |  | 1772|      0|      #define STBI__CASE(a,b)   case STBI__COMBO(a,b): for(i=x-1; i >= 0; --i, src += a, dest += b)
  |  |  ------------------
  |  |  |  | 1771|      0|      #define STBI__COMBO(a,b)  ((a)*8+(b))
  |  |  ------------------
  |  |  |  Branch (1772:33): [True: 0, False: 31.0M]
  |  |  |  Branch (1772:67): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1788|      0|         default: STBI_ASSERT(0); STBI_FREE(data); STBI_FREE(good); return stbi__errpuc("unsupported", "Unsupported format conversion");
  ------------------
  |  |  601|      0|#define STBI_ASSERT(x) assert(x)
  ------------------
                       default: STBI_ASSERT(0); STBI_FREE(data); STBI_FREE(good); return stbi__errpuc("unsupported", "Unsupported format conversion");
  ------------------
  |  |  682|      0|#define STBI_FREE(p)              free(p)
  ------------------
                       default: STBI_ASSERT(0); STBI_FREE(data); STBI_FREE(good); return stbi__errpuc("unsupported", "Unsupported format conversion");
  ------------------
  |  |  682|      0|#define STBI_FREE(p)              free(p)
  ------------------
                       default: STBI_ASSERT(0); STBI_FREE(data); STBI_FREE(good); return stbi__errpuc("unsupported", "Unsupported format conversion");
  ------------------
  |  | 1097|      0|#define stbi__errpuc(x,y)  ((unsigned char *)(size_t) (stbi__err(x,y)?NULL:NULL))
  |  |  ------------------
  |  |  |  | 1093|      0|   #define stbi__err(x,y)  stbi__err(x)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1093:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1788:10): [True: 0, False: 31.0M]
  ------------------
 1789|  31.0M|      }
 1790|  31.0M|      #undef STBI__CASE
 1791|  31.0M|   }
 1792|       |
 1793|  11.1k|   STBI_FREE(data);
  ------------------
  |  |  682|  11.1k|#define STBI_FREE(p)              free(p)
  ------------------
 1794|  11.1k|   return good;
 1795|  11.1k|}
fuzz_gltf.cc:_ZL22stbi__convert_format16Ptiijj:
 1811|  1.20k|{
 1812|  1.20k|   int i,j;
 1813|  1.20k|   stbi__uint16 *good;
 1814|       |
 1815|  1.20k|   if (req_comp == img_n) return data;
  ------------------
  |  Branch (1815:8): [True: 0, False: 1.20k]
  ------------------
 1816|  1.20k|   STBI_ASSERT(req_comp >= 1 && req_comp <= 4);
  ------------------
  |  |  601|  1.20k|#define STBI_ASSERT(x) assert(x)
  ------------------
 1817|       |
 1818|      0|   good = (stbi__uint16 *) stbi__malloc(req_comp * x * y * 2);
 1819|  1.20k|   if (good == NULL) {
  ------------------
  |  Branch (1819:8): [True: 0, False: 1.20k]
  ------------------
 1820|      0|      STBI_FREE(data);
  ------------------
  |  |  682|      0|#define STBI_FREE(p)              free(p)
  ------------------
 1821|      0|      return (stbi__uint16 *) stbi__errpuc("outofmem", "Out of memory");
  ------------------
  |  | 1097|      0|#define stbi__errpuc(x,y)  ((unsigned char *)(size_t) (stbi__err(x,y)?NULL:NULL))
  |  |  ------------------
  |  |  |  | 1093|      0|   #define stbi__err(x,y)  stbi__err(x)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1093:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1822|      0|   }
 1823|       |
 1824|  3.89k|   for (j=0; j < (int) y; ++j) {
  ------------------
  |  Branch (1824:14): [True: 2.69k, False: 1.20k]
  ------------------
 1825|  2.69k|      stbi__uint16 *src  = data + j * x * img_n   ;
 1826|  2.69k|      stbi__uint16 *dest = good + j * x * req_comp;
 1827|       |
 1828|  2.69k|      #define STBI__COMBO(a,b)  ((a)*8+(b))
 1829|  2.69k|      #define STBI__CASE(a,b)   case STBI__COMBO(a,b): for(i=x-1; i >= 0; --i, src += a, dest += b)
 1830|       |      // convert source image with img_n components to one with req_comp components;
 1831|       |      // avoid switch per pixel, so use switch per scanline and massive macros
 1832|  2.69k|      switch (STBI__COMBO(img_n, req_comp)) {
  ------------------
  |  | 1828|  2.69k|      #define STBI__COMBO(a,b)  ((a)*8+(b))
  ------------------
 1833|      0|         STBI__CASE(1,2) { dest[0]=src[0]; dest[1]=0xffff;                                     } break;
  ------------------
  |  | 1829|      0|      #define STBI__CASE(a,b)   case STBI__COMBO(a,b): for(i=x-1; i >= 0; --i, src += a, dest += b)
  |  |  ------------------
  |  |  |  | 1828|      0|      #define STBI__COMBO(a,b)  ((a)*8+(b))
  |  |  ------------------
  |  |  |  Branch (1829:33): [True: 0, False: 2.69k]
  |  |  |  Branch (1829:67): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1834|      0|         STBI__CASE(1,3) { dest[0]=dest[1]=dest[2]=src[0];                                     } break;
  ------------------
  |  | 1829|      0|      #define STBI__CASE(a,b)   case STBI__COMBO(a,b): for(i=x-1; i >= 0; --i, src += a, dest += b)
  |  |  ------------------
  |  |  |  | 1828|      0|      #define STBI__COMBO(a,b)  ((a)*8+(b))
  |  |  ------------------
  |  |  |  Branch (1829:33): [True: 0, False: 2.69k]
  |  |  |  Branch (1829:67): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1835|  4.51k|         STBI__CASE(1,4) { dest[0]=dest[1]=dest[2]=src[0]; dest[3]=0xffff;                     } break;
  ------------------
  |  | 1829|  6.02k|      #define STBI__CASE(a,b)   case STBI__COMBO(a,b): for(i=x-1; i >= 0; --i, src += a, dest += b)
  |  |  ------------------
  |  |  |  | 1828|  1.50k|      #define STBI__COMBO(a,b)  ((a)*8+(b))
  |  |  ------------------
  |  |  |  Branch (1829:33): [True: 1.50k, False: 1.19k]
  |  |  |  Branch (1829:67): [True: 4.51k, False: 1.50k]
  |  |  ------------------
  ------------------
 1836|      0|         STBI__CASE(2,1) { dest[0]=src[0];                                                     } break;
  ------------------
  |  | 1829|      0|      #define STBI__CASE(a,b)   case STBI__COMBO(a,b): for(i=x-1; i >= 0; --i, src += a, dest += b)
  |  |  ------------------
  |  |  |  | 1828|      0|      #define STBI__COMBO(a,b)  ((a)*8+(b))
  |  |  ------------------
  |  |  |  Branch (1829:33): [True: 0, False: 2.69k]
  |  |  |  Branch (1829:67): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1837|      0|         STBI__CASE(2,3) { dest[0]=dest[1]=dest[2]=src[0];                                     } break;
  ------------------
  |  | 1829|      0|      #define STBI__CASE(a,b)   case STBI__COMBO(a,b): for(i=x-1; i >= 0; --i, src += a, dest += b)
  |  |  ------------------
  |  |  |  | 1828|      0|      #define STBI__COMBO(a,b)  ((a)*8+(b))
  |  |  ------------------
  |  |  |  Branch (1829:33): [True: 0, False: 2.69k]
  |  |  |  Branch (1829:67): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1838|      0|         STBI__CASE(2,4) { dest[0]=dest[1]=dest[2]=src[0]; dest[3]=src[1];                     } break;
  ------------------
  |  | 1829|      0|      #define STBI__CASE(a,b)   case STBI__COMBO(a,b): for(i=x-1; i >= 0; --i, src += a, dest += b)
  |  |  ------------------
  |  |  |  | 1828|      0|      #define STBI__COMBO(a,b)  ((a)*8+(b))
  |  |  ------------------
  |  |  |  Branch (1829:33): [True: 0, False: 2.69k]
  |  |  |  Branch (1829:67): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1839|  2.50k|         STBI__CASE(3,4) { dest[0]=src[0];dest[1]=src[1];dest[2]=src[2];dest[3]=0xffff;        } break;
  ------------------
  |  | 1829|  3.69k|      #define STBI__CASE(a,b)   case STBI__COMBO(a,b): for(i=x-1; i >= 0; --i, src += a, dest += b)
  |  |  ------------------
  |  |  |  | 1828|  1.19k|      #define STBI__COMBO(a,b)  ((a)*8+(b))
  |  |  ------------------
  |  |  |  Branch (1829:33): [True: 1.19k, False: 1.50k]
  |  |  |  Branch (1829:67): [True: 2.50k, False: 1.19k]
  |  |  ------------------
  ------------------
 1840|      0|         STBI__CASE(3,1) { dest[0]=stbi__compute_y_16(src[0],src[1],src[2]);                   } break;
  ------------------
  |  | 1829|      0|      #define STBI__CASE(a,b)   case STBI__COMBO(a,b): for(i=x-1; i >= 0; --i, src += a, dest += b)
  |  |  ------------------
  |  |  |  | 1828|      0|      #define STBI__COMBO(a,b)  ((a)*8+(b))
  |  |  ------------------
  |  |  |  Branch (1829:33): [True: 0, False: 2.69k]
  |  |  |  Branch (1829:67): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1841|      0|         STBI__CASE(3,2) { dest[0]=stbi__compute_y_16(src[0],src[1],src[2]); dest[1] = 0xffff; } break;
  ------------------
  |  | 1829|      0|      #define STBI__CASE(a,b)   case STBI__COMBO(a,b): for(i=x-1; i >= 0; --i, src += a, dest += b)
  |  |  ------------------
  |  |  |  | 1828|      0|      #define STBI__COMBO(a,b)  ((a)*8+(b))
  |  |  ------------------
  |  |  |  Branch (1829:33): [True: 0, False: 2.69k]
  |  |  |  Branch (1829:67): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1842|      0|         STBI__CASE(4,1) { dest[0]=stbi__compute_y_16(src[0],src[1],src[2]);                   } break;
  ------------------
  |  | 1829|      0|      #define STBI__CASE(a,b)   case STBI__COMBO(a,b): for(i=x-1; i >= 0; --i, src += a, dest += b)
  |  |  ------------------
  |  |  |  | 1828|      0|      #define STBI__COMBO(a,b)  ((a)*8+(b))
  |  |  ------------------
  |  |  |  Branch (1829:33): [True: 0, False: 2.69k]
  |  |  |  Branch (1829:67): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1843|      0|         STBI__CASE(4,2) { dest[0]=stbi__compute_y_16(src[0],src[1],src[2]); dest[1] = src[3]; } break;
  ------------------
  |  | 1829|      0|      #define STBI__CASE(a,b)   case STBI__COMBO(a,b): for(i=x-1; i >= 0; --i, src += a, dest += b)
  |  |  ------------------
  |  |  |  | 1828|      0|      #define STBI__COMBO(a,b)  ((a)*8+(b))
  |  |  ------------------
  |  |  |  Branch (1829:33): [True: 0, False: 2.69k]
  |  |  |  Branch (1829:67): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1844|      0|         STBI__CASE(4,3) { dest[0]=src[0];dest[1]=src[1];dest[2]=src[2];                       } break;
  ------------------
  |  | 1829|      0|      #define STBI__CASE(a,b)   case STBI__COMBO(a,b): for(i=x-1; i >= 0; --i, src += a, dest += b)
  |  |  ------------------
  |  |  |  | 1828|      0|      #define STBI__COMBO(a,b)  ((a)*8+(b))
  |  |  ------------------
  |  |  |  Branch (1829:33): [True: 0, False: 2.69k]
  |  |  |  Branch (1829:67): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1845|      0|         default: STBI_ASSERT(0); STBI_FREE(data); STBI_FREE(good); return (stbi__uint16*) stbi__errpuc("unsupported", "Unsupported format conversion");
  ------------------
  |  |  601|      0|#define STBI_ASSERT(x) assert(x)
  ------------------
                       default: STBI_ASSERT(0); STBI_FREE(data); STBI_FREE(good); return (stbi__uint16*) stbi__errpuc("unsupported", "Unsupported format conversion");
  ------------------
  |  |  682|      0|#define STBI_FREE(p)              free(p)
  ------------------
                       default: STBI_ASSERT(0); STBI_FREE(data); STBI_FREE(good); return (stbi__uint16*) stbi__errpuc("unsupported", "Unsupported format conversion");
  ------------------
  |  |  682|      0|#define STBI_FREE(p)              free(p)
  ------------------
                       default: STBI_ASSERT(0); STBI_FREE(data); STBI_FREE(good); return (stbi__uint16*) stbi__errpuc("unsupported", "Unsupported format conversion");
  ------------------
  |  | 1097|      0|#define stbi__errpuc(x,y)  ((unsigned char *)(size_t) (stbi__err(x,y)?NULL:NULL))
  |  |  ------------------
  |  |  |  | 1093|      0|   #define stbi__err(x,y)  stbi__err(x)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1093:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1845:10): [True: 0, False: 2.69k]
  ------------------
 1846|  2.69k|      }
 1847|  2.69k|      #undef STBI__CASE
 1848|  2.69k|   }
 1849|       |
 1850|  1.20k|   STBI_FREE(data);
  ------------------
  |  |  682|  1.20k|#define STBI_FREE(p)              free(p)
  ------------------
 1851|  1.20k|   return good;
 1852|  1.20k|}
fuzz_gltf.cc:_ZL14stbi__bmp_testP13stbi__context:
 5381|  21.4k|{
 5382|  21.4k|   int r = stbi__bmp_test_raw(s);
 5383|  21.4k|   stbi__rewind(s);
 5384|  21.4k|   return r;
 5385|  21.4k|}
fuzz_gltf.cc:_ZL18stbi__bmp_test_rawP13stbi__context:
 5366|  21.4k|{
 5367|  21.4k|   int r;
 5368|  21.4k|   int sz;
 5369|  21.4k|   if (stbi__get8(s) != 'B') return 0;
  ------------------
  |  Branch (5369:8): [True: 20.6k, False: 787]
  ------------------
 5370|    787|   if (stbi__get8(s) != 'M') return 0;
  ------------------
  |  Branch (5370:8): [True: 0, False: 787]
  ------------------
 5371|    787|   stbi__get32le(s); // discard filesize
 5372|    787|   stbi__get16le(s); // discard reserved
 5373|    787|   stbi__get16le(s); // discard reserved
 5374|    787|   stbi__get32le(s); // discard data offset
 5375|    787|   sz = stbi__get32le(s);
 5376|    787|   r = (sz == 12 || sz == 40 || sz == 56 || sz == 108 || sz == 124);
  ------------------
  |  Branch (5376:9): [True: 778, False: 9]
  |  Branch (5376:21): [True: 3, False: 6]
  |  Branch (5376:33): [True: 1, False: 5]
  |  Branch (5376:45): [True: 0, False: 5]
  |  Branch (5376:58): [True: 0, False: 5]
  ------------------
 5377|    787|   return r;
 5378|    787|}
fuzz_gltf.cc:_ZL13stbi__get32leP13stbi__context:
 1721|  4.73k|{
 1722|  4.73k|   stbi__uint32 z = stbi__get16le(s);
 1723|  4.73k|   z += (stbi__uint32)stbi__get16le(s) << 16;
 1724|  4.73k|   return z;
 1725|  4.73k|}
fuzz_gltf.cc:_ZL13stbi__get16leP13stbi__context:
 1713|   513M|{
 1714|   513M|   int z = stbi__get8(s);
 1715|   513M|   return z + (stbi__get8(s) << 8);
 1716|   513M|}
fuzz_gltf.cc:_ZL14stbi__bmp_loadP13stbi__contextPiS1_S1_iP17stbi__result_info:
 5551|    782|{
 5552|    782|   stbi_uc *out;
 5553|    782|   unsigned int mr=0,mg=0,mb=0,ma=0, all_a;
 5554|    782|   stbi_uc pal[256][4];
 5555|    782|   int psize=0,i,j,width;
 5556|    782|   int flip_vertically, pad, target;
 5557|    782|   stbi__bmp_data info;
 5558|    782|   STBI_NOTUSED(ri);
  ------------------
  |  |  658|    782|#define STBI_NOTUSED(v)  (void)sizeof(v)
  ------------------
 5559|       |
 5560|    782|   info.all_a = 255;
 5561|    782|   if (stbi__bmp_parse_header(s, &info) == NULL)
  ------------------
  |  Branch (5561:8): [True: 5, False: 777]
  ------------------
 5562|      5|      return NULL; // error code already set
 5563|       |
 5564|    777|   flip_vertically = ((int) s->img_y) > 0;
 5565|    777|   s->img_y = abs((int) s->img_y);
 5566|       |
 5567|    777|   if (s->img_y > STBI_MAX_DIMENSIONS) return stbi__errpuc("too large","Very large image (corrupt?)");
  ------------------
  |  |  794|    777|#define STBI_MAX_DIMENSIONS (1 << 24)
  ------------------
                 if (s->img_y > STBI_MAX_DIMENSIONS) return stbi__errpuc("too large","Very large image (corrupt?)");
  ------------------
  |  | 1097|      0|#define stbi__errpuc(x,y)  ((unsigned char *)(size_t) (stbi__err(x,y)?NULL:NULL))
  |  |  ------------------
  |  |  |  | 1093|      0|   #define stbi__err(x,y)  stbi__err(x)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1093:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (5567:8): [True: 0, False: 777]
  ------------------
 5568|    777|   if (s->img_x > STBI_MAX_DIMENSIONS) return stbi__errpuc("too large","Very large image (corrupt?)");
  ------------------
  |  |  794|    777|#define STBI_MAX_DIMENSIONS (1 << 24)
  ------------------
                 if (s->img_x > STBI_MAX_DIMENSIONS) return stbi__errpuc("too large","Very large image (corrupt?)");
  ------------------
  |  | 1097|      0|#define stbi__errpuc(x,y)  ((unsigned char *)(size_t) (stbi__err(x,y)?NULL:NULL))
  |  |  ------------------
  |  |  |  | 1093|      0|   #define stbi__err(x,y)  stbi__err(x)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1093:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (5568:8): [True: 0, False: 777]
  ------------------
 5569|       |
 5570|    777|   mr = info.mr;
 5571|    777|   mg = info.mg;
 5572|    777|   mb = info.mb;
 5573|    777|   ma = info.ma;
 5574|    777|   all_a = info.all_a;
 5575|       |
 5576|    777|   if (info.hsz == 12) {
  ------------------
  |  Branch (5576:8): [True: 774, False: 3]
  ------------------
 5577|    774|      if (info.bpp < 24)
  ------------------
  |  Branch (5577:11): [True: 598, False: 176]
  ------------------
 5578|    598|         psize = (info.offset - info.extra_read - 24) / 3;
 5579|    774|   } else {
 5580|      3|      if (info.bpp < 16)
  ------------------
  |  Branch (5580:11): [True: 3, False: 0]
  ------------------
 5581|      3|         psize = (info.offset - info.extra_read - info.hsz) >> 2;
 5582|      3|   }
 5583|    777|   if (psize == 0) {
  ------------------
  |  Branch (5583:8): [True: 176, False: 601]
  ------------------
 5584|       |      // accept some number of extra bytes after the header, but if the offset points either to before
 5585|       |      // the header ends or implies a large amount of extra data, reject the file as malformed
 5586|    176|      int bytes_read_so_far = s->callback_already_read + (int)(s->img_buffer - s->img_buffer_original);
 5587|    176|      int header_limit = 1024; // max we actually read is below 256 bytes currently.
 5588|    176|      int extra_data_limit = 256*4; // what ordinarily goes here is a palette; 256 entries*4 bytes is its max size.
 5589|    176|      if (bytes_read_so_far <= 0 || bytes_read_so_far > header_limit) {
  ------------------
  |  Branch (5589:11): [True: 0, False: 176]
  |  Branch (5589:37): [True: 0, False: 176]
  ------------------
 5590|      0|         return stbi__errpuc("bad header", "Corrupt BMP");
  ------------------
  |  | 1097|      0|#define stbi__errpuc(x,y)  ((unsigned char *)(size_t) (stbi__err(x,y)?NULL:NULL))
  |  |  ------------------
  |  |  |  | 1093|      0|   #define stbi__err(x,y)  stbi__err(x)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1093:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5591|      0|      }
 5592|       |      // we established that bytes_read_so_far is positive and sensible.
 5593|       |      // the first half of this test rejects offsets that are either too small positives, or
 5594|       |      // negative, and guarantees that info.offset >= bytes_read_so_far > 0. this in turn
 5595|       |      // ensures the number computed in the second half of the test can't overflow.
 5596|    176|      if (info.offset < bytes_read_so_far || info.offset - bytes_read_so_far > extra_data_limit) {
  ------------------
  |  Branch (5596:11): [True: 0, False: 176]
  |  Branch (5596:46): [True: 0, False: 176]
  ------------------
 5597|      0|         return stbi__errpuc("bad offset", "Corrupt BMP");
  ------------------
  |  | 1097|      0|#define stbi__errpuc(x,y)  ((unsigned char *)(size_t) (stbi__err(x,y)?NULL:NULL))
  |  |  ------------------
  |  |  |  | 1093|      0|   #define stbi__err(x,y)  stbi__err(x)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1093:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5598|    176|      } else {
 5599|    176|         stbi__skip(s, info.offset - bytes_read_so_far);
 5600|    176|      }
 5601|    176|   }
 5602|       |
 5603|    777|   if (info.bpp == 24 && ma == 0xff000000)
  ------------------
  |  Branch (5603:8): [True: 176, False: 601]
  |  Branch (5603:26): [True: 0, False: 176]
  ------------------
 5604|      0|      s->img_n = 3;
 5605|    777|   else
 5606|    777|      s->img_n = ma ? 4 : 3;
  ------------------
  |  Branch (5606:18): [True: 0, False: 777]
  ------------------
 5607|    777|   if (req_comp && req_comp >= 3) // we can directly decode 3 or 4
  ------------------
  |  Branch (5607:8): [True: 777, False: 0]
  |  Branch (5607:20): [True: 777, False: 0]
  ------------------
 5608|    777|      target = req_comp;
 5609|      0|   else
 5610|      0|      target = s->img_n; // if they want monochrome, we'll post-convert
 5611|       |
 5612|       |   // sanity-check size
 5613|    777|   if (!stbi__mad3sizes_valid(target, s->img_x, s->img_y, 0))
  ------------------
  |  Branch (5613:8): [True: 0, False: 777]
  ------------------
 5614|      0|      return stbi__errpuc("too large", "Corrupt BMP");
  ------------------
  |  | 1097|      0|#define stbi__errpuc(x,y)  ((unsigned char *)(size_t) (stbi__err(x,y)?NULL:NULL))
  |  |  ------------------
  |  |  |  | 1093|      0|   #define stbi__err(x,y)  stbi__err(x)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1093:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5615|       |
 5616|    777|   out = (stbi_uc *) stbi__malloc_mad3(target, s->img_x, s->img_y, 0);
 5617|    777|   if (!out) return stbi__errpuc("outofmem", "Out of memory");
  ------------------
  |  | 1097|      0|#define stbi__errpuc(x,y)  ((unsigned char *)(size_t) (stbi__err(x,y)?NULL:NULL))
  |  |  ------------------
  |  |  |  | 1093|      0|   #define stbi__err(x,y)  stbi__err(x)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1093:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (5617:8): [True: 0, False: 777]
  ------------------
 5618|    777|   if (info.bpp < 16) {
  ------------------
  |  Branch (5618:8): [True: 601, False: 176]
  ------------------
 5619|    601|      int z=0;
 5620|    601|      if (psize == 0 || psize > 256) { STBI_FREE(out); return stbi__errpuc("invalid", "Corrupt BMP"); }
  ------------------
  |  |  682|      2|#define STBI_FREE(p)              free(p)
  ------------------
                    if (psize == 0 || psize > 256) { STBI_FREE(out); return stbi__errpuc("invalid", "Corrupt BMP"); }
  ------------------
  |  | 1097|      2|#define stbi__errpuc(x,y)  ((unsigned char *)(size_t) (stbi__err(x,y)?NULL:NULL))
  |  |  ------------------
  |  |  |  | 1093|      2|   #define stbi__err(x,y)  stbi__err(x)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1093:28): [True: 0, False: 2]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (5620:11): [True: 0, False: 601]
  |  Branch (5620:25): [True: 2, False: 599]
  ------------------
 5621|  41.9k|      for (i=0; i < psize; ++i) {
  ------------------
  |  Branch (5621:17): [True: 41.3k, False: 599]
  ------------------
 5622|  41.3k|         pal[i][2] = stbi__get8(s);
 5623|  41.3k|         pal[i][1] = stbi__get8(s);
 5624|  41.3k|         pal[i][0] = stbi__get8(s);
 5625|  41.3k|         if (info.hsz != 12) stbi__get8(s);
  ------------------
  |  Branch (5625:14): [True: 0, False: 41.3k]
  ------------------
 5626|  41.3k|         pal[i][3] = 255;
 5627|  41.3k|      }
 5628|    599|      stbi__skip(s, info.offset - info.extra_read - info.hsz - psize * (info.hsz == 12 ? 3 : 4));
  ------------------
  |  Branch (5628:73): [True: 598, False: 1]
  ------------------
 5629|    599|      if (info.bpp == 1) width = (s->img_x + 7) >> 3;
  ------------------
  |  Branch (5629:11): [True: 79, False: 520]
  ------------------
 5630|    520|      else if (info.bpp == 4) width = (s->img_x + 1) >> 1;
  ------------------
  |  Branch (5630:16): [True: 335, False: 185]
  ------------------
 5631|    185|      else if (info.bpp == 8) width = s->img_x;
  ------------------
  |  Branch (5631:16): [True: 184, False: 1]
  ------------------
 5632|      1|      else { STBI_FREE(out); return stbi__errpuc("bad bpp", "Corrupt BMP"); }
  ------------------
  |  |  682|      1|#define STBI_FREE(p)              free(p)
  ------------------
                    else { STBI_FREE(out); return stbi__errpuc("bad bpp", "Corrupt BMP"); }
  ------------------
  |  | 1097|      1|#define stbi__errpuc(x,y)  ((unsigned char *)(size_t) (stbi__err(x,y)?NULL:NULL))
  |  |  ------------------
  |  |  |  | 1093|      1|   #define stbi__err(x,y)  stbi__err(x)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1093:28): [True: 0, False: 1]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5633|    598|      pad = (-width)&3;
 5634|    598|      if (info.bpp == 1) {
  ------------------
  |  Branch (5634:11): [True: 79, False: 519]
  ------------------
 5635|    767|         for (j=0; j < (int) s->img_y; ++j) {
  ------------------
  |  Branch (5635:20): [True: 688, False: 79]
  ------------------
 5636|    688|            int bit_offset = 7, v = stbi__get8(s);
 5637|  14.9M|            for (i=0; i < (int) s->img_x; ++i) {
  ------------------
  |  Branch (5637:23): [True: 14.9M, False: 0]
  ------------------
 5638|  14.9M|               int color = (v>>bit_offset)&0x1;
 5639|  14.9M|               out[z++] = pal[color][0];
 5640|  14.9M|               out[z++] = pal[color][1];
 5641|  14.9M|               out[z++] = pal[color][2];
 5642|  14.9M|               if (target == 4) out[z++] = 255;
  ------------------
  |  Branch (5642:20): [True: 14.9M, False: 0]
  ------------------
 5643|  14.9M|               if (i+1 == (int) s->img_x) break;
  ------------------
  |  Branch (5643:20): [True: 688, False: 14.9M]
  ------------------
 5644|  14.9M|               if((--bit_offset) < 0) {
  ------------------
  |  Branch (5644:19): [True: 1.86M, False: 13.0M]
  ------------------
 5645|  1.86M|                  bit_offset = 7;
 5646|  1.86M|                  v = stbi__get8(s);
 5647|  1.86M|               }
 5648|  14.9M|            }
 5649|    688|            stbi__skip(s, pad);
 5650|    688|         }
 5651|    519|      } else {
 5652|   437k|         for (j=0; j < (int) s->img_y; ++j) {
  ------------------
  |  Branch (5652:20): [True: 436k, False: 519]
  ------------------
 5653|   145M|            for (i=0; i < (int) s->img_x; i += 2) {
  ------------------
  |  Branch (5653:23): [True: 145M, False: 435k]
  ------------------
 5654|   145M|               int v=stbi__get8(s),v2=0;
 5655|   145M|               if (info.bpp == 4) {
  ------------------
  |  Branch (5655:20): [True: 66.6M, False: 78.7M]
  ------------------
 5656|  66.6M|                  v2 = v & 15;
 5657|  66.6M|                  v >>= 4;
 5658|  66.6M|               }
 5659|   145M|               out[z++] = pal[v][0];
 5660|   145M|               out[z++] = pal[v][1];
 5661|   145M|               out[z++] = pal[v][2];
 5662|   145M|               if (target == 4) out[z++] = 255;
  ------------------
  |  Branch (5662:20): [True: 145M, False: 0]
  ------------------
 5663|   145M|               if (i+1 == (int) s->img_x) break;
  ------------------
  |  Branch (5663:20): [True: 1.34k, False: 145M]
  ------------------
 5664|   145M|               v = (info.bpp == 8) ? stbi__get8(s) : v2;
  ------------------
  |  Branch (5664:20): [True: 78.7M, False: 66.6M]
  ------------------
 5665|   145M|               out[z++] = pal[v][0];
 5666|   145M|               out[z++] = pal[v][1];
 5667|   145M|               out[z++] = pal[v][2];
 5668|   145M|               if (target == 4) out[z++] = 255;
  ------------------
  |  Branch (5668:20): [True: 145M, False: 0]
  ------------------
 5669|   145M|            }
 5670|   436k|            stbi__skip(s, pad);
 5671|   436k|         }
 5672|    519|      }
 5673|    598|   } else {
 5674|    176|      int rshift=0,gshift=0,bshift=0,ashift=0,rcount=0,gcount=0,bcount=0,acount=0;
 5675|    176|      int z = 0;
 5676|    176|      int easy=0;
 5677|    176|      stbi__skip(s, info.offset - info.extra_read - info.hsz);
 5678|    176|      if (info.bpp == 24) width = 3 * s->img_x;
  ------------------
  |  Branch (5678:11): [True: 176, False: 0]
  ------------------
 5679|      0|      else if (info.bpp == 16) width = 2*s->img_x;
  ------------------
  |  Branch (5679:16): [True: 0, False: 0]
  ------------------
 5680|      0|      else /* bpp = 32 and pad = 0 */ width=0;
 5681|    176|      pad = (-width) & 3;
 5682|    176|      if (info.bpp == 24) {
  ------------------
  |  Branch (5682:11): [True: 176, False: 0]
  ------------------
 5683|    176|         easy = 1;
 5684|    176|      } else if (info.bpp == 32) {
  ------------------
  |  Branch (5684:18): [True: 0, False: 0]
  ------------------
 5685|      0|         if (mb == 0xff && mg == 0xff00 && mr == 0x00ff0000 && ma == 0xff000000)
  ------------------
  |  Branch (5685:14): [True: 0, False: 0]
  |  Branch (5685:28): [True: 0, False: 0]
  |  Branch (5685:44): [True: 0, False: 0]
  |  Branch (5685:64): [True: 0, False: 0]
  ------------------
 5686|      0|            easy = 2;
 5687|      0|      }
 5688|    176|      if (!easy) {
  ------------------
  |  Branch (5688:11): [True: 0, False: 176]
  ------------------
 5689|      0|         if (!mr || !mg || !mb) { STBI_FREE(out); return stbi__errpuc("bad masks", "Corrupt BMP"); }
  ------------------
  |  |  682|      0|#define STBI_FREE(p)              free(p)
  ------------------
                       if (!mr || !mg || !mb) { STBI_FREE(out); return stbi__errpuc("bad masks", "Corrupt BMP"); }
  ------------------
  |  | 1097|      0|#define stbi__errpuc(x,y)  ((unsigned char *)(size_t) (stbi__err(x,y)?NULL:NULL))
  |  |  ------------------
  |  |  |  | 1093|      0|   #define stbi__err(x,y)  stbi__err(x)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1093:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (5689:14): [True: 0, False: 0]
  |  Branch (5689:21): [True: 0, False: 0]
  |  Branch (5689:28): [True: 0, False: 0]
  ------------------
 5690|       |         // right shift amt to put high bit in position #7
 5691|      0|         rshift = stbi__high_bit(mr)-7; rcount = stbi__bitcount(mr);
 5692|      0|         gshift = stbi__high_bit(mg)-7; gcount = stbi__bitcount(mg);
 5693|      0|         bshift = stbi__high_bit(mb)-7; bcount = stbi__bitcount(mb);
 5694|      0|         ashift = stbi__high_bit(ma)-7; acount = stbi__bitcount(ma);
 5695|      0|         if (rcount > 8 || gcount > 8 || bcount > 8 || acount > 8) { STBI_FREE(out); return stbi__errpuc("bad masks", "Corrupt BMP"); }
  ------------------
  |  |  682|      0|#define STBI_FREE(p)              free(p)
  ------------------
                       if (rcount > 8 || gcount > 8 || bcount > 8 || acount > 8) { STBI_FREE(out); return stbi__errpuc("bad masks", "Corrupt BMP"); }
  ------------------
  |  | 1097|      0|#define stbi__errpuc(x,y)  ((unsigned char *)(size_t) (stbi__err(x,y)?NULL:NULL))
  |  |  ------------------
  |  |  |  | 1093|      0|   #define stbi__err(x,y)  stbi__err(x)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1093:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (5695:14): [True: 0, False: 0]
  |  Branch (5695:28): [True: 0, False: 0]
  |  Branch (5695:42): [True: 0, False: 0]
  |  Branch (5695:56): [True: 0, False: 0]
  ------------------
 5696|      0|      }
 5697|  6.60k|      for (j=0; j < (int) s->img_y; ++j) {
  ------------------
  |  Branch (5697:17): [True: 6.43k, False: 176]
  ------------------
 5698|  6.43k|         if (easy) {
  ------------------
  |  Branch (5698:14): [True: 6.43k, False: 0]
  ------------------
 5699|   155M|            for (i=0; i < (int) s->img_x; ++i) {
  ------------------
  |  Branch (5699:23): [True: 155M, False: 6.43k]
  ------------------
 5700|   155M|               unsigned char a;
 5701|   155M|               out[z+2] = stbi__get8(s);
 5702|   155M|               out[z+1] = stbi__get8(s);
 5703|   155M|               out[z+0] = stbi__get8(s);
 5704|   155M|               z += 3;
 5705|   155M|               a = (easy == 2 ? stbi__get8(s) : 255);
  ------------------
  |  Branch (5705:21): [True: 0, False: 155M]
  ------------------
 5706|   155M|               all_a |= a;
 5707|   155M|               if (target == 4) out[z++] = a;
  ------------------
  |  Branch (5707:20): [True: 155M, False: 0]
  ------------------
 5708|   155M|            }
 5709|  6.43k|         } else {
 5710|      0|            int bpp = info.bpp;
 5711|      0|            for (i=0; i < (int) s->img_x; ++i) {
  ------------------
  |  Branch (5711:23): [True: 0, False: 0]
  ------------------
 5712|      0|               stbi__uint32 v = (bpp == 16 ? (stbi__uint32) stbi__get16le(s) : stbi__get32le(s));
  ------------------
  |  Branch (5712:34): [True: 0, False: 0]
  ------------------
 5713|      0|               unsigned int a;
 5714|      0|               out[z++] = STBI__BYTECAST(stbi__shiftsigned(v & mr, rshift, rcount));
  ------------------
  |  | 1728|      0|#define STBI__BYTECAST(x)  ((stbi_uc) ((x) & 255))  // truncate int to byte without warnings
  ------------------
 5715|      0|               out[z++] = STBI__BYTECAST(stbi__shiftsigned(v & mg, gshift, gcount));
  ------------------
  |  | 1728|      0|#define STBI__BYTECAST(x)  ((stbi_uc) ((x) & 255))  // truncate int to byte without warnings
  ------------------
 5716|      0|               out[z++] = STBI__BYTECAST(stbi__shiftsigned(v & mb, bshift, bcount));
  ------------------
  |  | 1728|      0|#define STBI__BYTECAST(x)  ((stbi_uc) ((x) & 255))  // truncate int to byte without warnings
  ------------------
 5717|      0|               a = (ma ? stbi__shiftsigned(v & ma, ashift, acount) : 255);
  ------------------
  |  Branch (5717:21): [True: 0, False: 0]
  ------------------
 5718|      0|               all_a |= a;
 5719|      0|               if (target == 4) out[z++] = STBI__BYTECAST(a);
  ------------------
  |  | 1728|      0|#define STBI__BYTECAST(x)  ((stbi_uc) ((x) & 255))  // truncate int to byte without warnings
  ------------------
  |  Branch (5719:20): [True: 0, False: 0]
  ------------------
 5720|      0|            }
 5721|      0|         }
 5722|  6.43k|         stbi__skip(s, pad);
 5723|  6.43k|      }
 5724|    176|   }
 5725|       |
 5726|       |   // if alpha channel is all 0s, replace with all 255s
 5727|    774|   if (target == 4 && all_a == 0)
  ------------------
  |  Branch (5727:8): [True: 774, False: 0]
  |  Branch (5727:23): [True: 0, False: 774]
  ------------------
 5728|      0|      for (i=4*s->img_x*s->img_y-1; i >= 0; i -= 4)
  ------------------
  |  Branch (5728:37): [True: 0, False: 0]
  ------------------
 5729|      0|         out[i] = 255;
 5730|       |
 5731|    774|   if (flip_vertically) {
  ------------------
  |  Branch (5731:8): [True: 774, False: 0]
  ------------------
 5732|    774|      stbi_uc t;
 5733|   222k|      for (j=0; j < (int) s->img_y>>1; ++j) {
  ------------------
  |  Branch (5733:17): [True: 221k, False: 774]
  ------------------
 5734|   221k|         stbi_uc *p1 = out +      j     *s->img_x*target;
 5735|   221k|         stbi_uc *p2 = out + (s->img_y-1-j)*s->img_x*target;
 5736|   907M|         for (i=0; i < (int) s->img_x*target; ++i) {
  ------------------
  |  Branch (5736:20): [True: 906M, False: 221k]
  ------------------
 5737|   906M|            t = p1[i]; p1[i] = p2[i]; p2[i] = t;
 5738|   906M|         }
 5739|   221k|      }
 5740|    774|   }
 5741|       |
 5742|    774|   if (req_comp && req_comp != target) {
  ------------------
  |  Branch (5742:8): [True: 774, False: 0]
  |  Branch (5742:20): [True: 0, False: 774]
  ------------------
 5743|      0|      out = stbi__convert_format(out, target, req_comp, s->img_x, s->img_y);
 5744|      0|      if (out == NULL) return out; // stbi__convert_format frees input on failure
  ------------------
  |  Branch (5744:11): [True: 0, False: 0]
  ------------------
 5745|      0|   }
 5746|       |
 5747|    774|   *x = s->img_x;
 5748|    774|   *y = s->img_y;
 5749|    774|   if (comp) *comp = s->img_n;
  ------------------
  |  Branch (5749:8): [True: 774, False: 0]
  ------------------
 5750|    774|   return out;
 5751|    774|}
fuzz_gltf.cc:_ZL22stbi__bmp_parse_headerP13stbi__contextP14stbi__bmp_data:
 5468|    782|{
 5469|    782|   int hsz;
 5470|    782|   if (stbi__get8(s) != 'B' || stbi__get8(s) != 'M') return stbi__errpuc("not BMP", "Corrupt BMP");
  ------------------
  |  | 1097|      0|#define stbi__errpuc(x,y)  ((unsigned char *)(size_t) (stbi__err(x,y)?NULL:NULL))
  |  |  ------------------
  |  |  |  | 1093|      0|   #define stbi__err(x,y)  stbi__err(x)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1093:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (5470:8): [True: 0, False: 782]
  |  Branch (5470:32): [True: 0, False: 782]
  ------------------
 5471|    782|   stbi__get32le(s); // discard filesize
 5472|    782|   stbi__get16le(s); // discard reserved
 5473|    782|   stbi__get16le(s); // discard reserved
 5474|    782|   info->offset = stbi__get32le(s);
 5475|    782|   info->hsz = hsz = stbi__get32le(s);
 5476|    782|   info->mr = info->mg = info->mb = info->ma = 0;
 5477|    782|   info->extra_read = 14;
 5478|       |
 5479|    782|   if (info->offset < 0) return stbi__errpuc("bad BMP", "bad BMP");
  ------------------
  |  | 1097|      0|#define stbi__errpuc(x,y)  ((unsigned char *)(size_t) (stbi__err(x,y)?NULL:NULL))
  |  |  ------------------
  |  |  |  | 1093|      0|   #define stbi__err(x,y)  stbi__err(x)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1093:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (5479:8): [True: 0, False: 782]
  ------------------
 5480|       |
 5481|    782|   if (hsz != 12 && hsz != 40 && hsz != 56 && hsz != 108 && hsz != 124) return stbi__errpuc("unknown BMP", "BMP type not supported: unknown");
  ------------------
  |  | 1097|      0|#define stbi__errpuc(x,y)  ((unsigned char *)(size_t) (stbi__err(x,y)?NULL:NULL))
  |  |  ------------------
  |  |  |  | 1093|      0|   #define stbi__err(x,y)  stbi__err(x)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1093:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (5481:8): [True: 4, False: 778]
  |  Branch (5481:21): [True: 1, False: 3]
  |  Branch (5481:34): [True: 0, False: 1]
  |  Branch (5481:47): [True: 0, False: 0]
  |  Branch (5481:61): [True: 0, False: 0]
  ------------------
 5482|    782|   if (hsz == 12) {
  ------------------
  |  Branch (5482:8): [True: 778, False: 4]
  ------------------
 5483|    778|      s->img_x = stbi__get16le(s);
 5484|    778|      s->img_y = stbi__get16le(s);
 5485|    778|   } else {
 5486|      4|      s->img_x = stbi__get32le(s);
 5487|      4|      s->img_y = stbi__get32le(s);
 5488|      4|   }
 5489|    782|   if (stbi__get16le(s) != 1) return stbi__errpuc("bad BMP", "bad BMP");
  ------------------
  |  | 1097|      5|#define stbi__errpuc(x,y)  ((unsigned char *)(size_t) (stbi__err(x,y)?NULL:NULL))
  |  |  ------------------
  |  |  |  | 1093|      5|   #define stbi__err(x,y)  stbi__err(x)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1093:28): [True: 0, False: 5]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (5489:8): [True: 5, False: 777]
  ------------------
 5490|    777|   info->bpp = stbi__get16le(s);
 5491|    777|   if (hsz != 12) {
  ------------------
  |  Branch (5491:8): [True: 3, False: 774]
  ------------------
 5492|      3|      int compress = stbi__get32le(s);
 5493|      3|      if (compress == 1 || compress == 2) return stbi__errpuc("BMP RLE", "BMP type not supported: RLE");
  ------------------
  |  | 1097|      0|#define stbi__errpuc(x,y)  ((unsigned char *)(size_t) (stbi__err(x,y)?NULL:NULL))
  |  |  ------------------
  |  |  |  | 1093|      0|   #define stbi__err(x,y)  stbi__err(x)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1093:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (5493:11): [True: 0, False: 3]
  |  Branch (5493:28): [True: 0, False: 3]
  ------------------
 5494|      3|      if (compress >= 4) return stbi__errpuc("BMP JPEG/PNG", "BMP type not supported: unsupported compression"); // this includes PNG/JPEG modes
  ------------------
  |  | 1097|      0|#define stbi__errpuc(x,y)  ((unsigned char *)(size_t) (stbi__err(x,y)?NULL:NULL))
  |  |  ------------------
  |  |  |  | 1093|      0|   #define stbi__err(x,y)  stbi__err(x)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1093:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (5494:11): [True: 0, False: 3]
  ------------------
 5495|      3|      if (compress == 3 && info->bpp != 16 && info->bpp != 32) return stbi__errpuc("bad BMP", "bad BMP"); // bitfields requires 16 or 32 bits/pixel
  ------------------
  |  | 1097|      0|#define stbi__errpuc(x,y)  ((unsigned char *)(size_t) (stbi__err(x,y)?NULL:NULL))
  |  |  ------------------
  |  |  |  | 1093|      0|   #define stbi__err(x,y)  stbi__err(x)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1093:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (5495:11): [True: 0, False: 3]
  |  Branch (5495:28): [True: 0, False: 0]
  |  Branch (5495:47): [True: 0, False: 0]
  ------------------
 5496|      3|      stbi__get32le(s); // discard sizeof
 5497|      3|      stbi__get32le(s); // discard hres
 5498|      3|      stbi__get32le(s); // discard vres
 5499|      3|      stbi__get32le(s); // discard colorsused
 5500|      3|      stbi__get32le(s); // discard max important
 5501|      3|      if (hsz == 40 || hsz == 56) {
  ------------------
  |  Branch (5501:11): [True: 3, False: 0]
  |  Branch (5501:24): [True: 0, False: 0]
  ------------------
 5502|      3|         if (hsz == 56) {
  ------------------
  |  Branch (5502:14): [True: 0, False: 3]
  ------------------
 5503|      0|            stbi__get32le(s);
 5504|      0|            stbi__get32le(s);
 5505|      0|            stbi__get32le(s);
 5506|      0|            stbi__get32le(s);
 5507|      0|         }
 5508|      3|         if (info->bpp == 16 || info->bpp == 32) {
  ------------------
  |  Branch (5508:14): [True: 0, False: 3]
  |  Branch (5508:33): [True: 0, False: 3]
  ------------------
 5509|      0|            if (compress == 0) {
  ------------------
  |  Branch (5509:17): [True: 0, False: 0]
  ------------------
 5510|      0|               stbi__bmp_set_mask_defaults(info, compress);
 5511|      0|            } else if (compress == 3) {
  ------------------
  |  Branch (5511:24): [True: 0, False: 0]
  ------------------
 5512|      0|               info->mr = stbi__get32le(s);
 5513|      0|               info->mg = stbi__get32le(s);
 5514|      0|               info->mb = stbi__get32le(s);
 5515|      0|               info->extra_read += 12;
 5516|       |               // not documented, but generated by photoshop and handled by mspaint
 5517|      0|               if (info->mr == info->mg && info->mg == info->mb) {
  ------------------
  |  Branch (5517:20): [True: 0, False: 0]
  |  Branch (5517:44): [True: 0, False: 0]
  ------------------
 5518|       |                  // ?!?!?
 5519|      0|                  return stbi__errpuc("bad BMP", "bad BMP");
  ------------------
  |  | 1097|      0|#define stbi__errpuc(x,y)  ((unsigned char *)(size_t) (stbi__err(x,y)?NULL:NULL))
  |  |  ------------------
  |  |  |  | 1093|      0|   #define stbi__err(x,y)  stbi__err(x)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1093:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5520|      0|               }
 5521|      0|            } else
 5522|      0|               return stbi__errpuc("bad BMP", "bad BMP");
  ------------------
  |  | 1097|      0|#define stbi__errpuc(x,y)  ((unsigned char *)(size_t) (stbi__err(x,y)?NULL:NULL))
  |  |  ------------------
  |  |  |  | 1093|      0|   #define stbi__err(x,y)  stbi__err(x)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1093:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5523|      0|         }
 5524|      3|      } else {
 5525|       |         // V4/V5 header
 5526|      0|         int i;
 5527|      0|         if (hsz != 108 && hsz != 124)
  ------------------
  |  Branch (5527:14): [True: 0, False: 0]
  |  Branch (5527:28): [True: 0, False: 0]
  ------------------
 5528|      0|            return stbi__errpuc("bad BMP", "bad BMP");
  ------------------
  |  | 1097|      0|#define stbi__errpuc(x,y)  ((unsigned char *)(size_t) (stbi__err(x,y)?NULL:NULL))
  |  |  ------------------
  |  |  |  | 1093|      0|   #define stbi__err(x,y)  stbi__err(x)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1093:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5529|      0|         info->mr = stbi__get32le(s);
 5530|      0|         info->mg = stbi__get32le(s);
 5531|      0|         info->mb = stbi__get32le(s);
 5532|      0|         info->ma = stbi__get32le(s);
 5533|      0|         if (compress != 3) // override mr/mg/mb unless in BI_BITFIELDS mode, as per docs
  ------------------
  |  Branch (5533:14): [True: 0, False: 0]
  ------------------
 5534|      0|            stbi__bmp_set_mask_defaults(info, compress);
 5535|      0|         stbi__get32le(s); // discard color space
 5536|      0|         for (i=0; i < 12; ++i)
  ------------------
  |  Branch (5536:20): [True: 0, False: 0]
  ------------------
 5537|      0|            stbi__get32le(s); // discard color space parameters
 5538|      0|         if (hsz == 124) {
  ------------------
  |  Branch (5538:14): [True: 0, False: 0]
  ------------------
 5539|      0|            stbi__get32le(s); // discard rendering intent
 5540|      0|            stbi__get32le(s); // discard offset of profile data
 5541|      0|            stbi__get32le(s); // discard size of profile data
 5542|      0|            stbi__get32le(s); // discard reserved
 5543|      0|         }
 5544|      0|      }
 5545|      3|   }
 5546|    777|   return (void *) 1;
 5547|    777|}
fuzz_gltf.cc:_ZL14stbi__gif_testP13stbi__context:
 6610|  20.6k|{
 6611|  20.6k|   int r = stbi__gif_test_raw(s);
 6612|  20.6k|   stbi__rewind(s);
 6613|  20.6k|   return r;
 6614|  20.6k|}
fuzz_gltf.cc:_ZL18stbi__gif_test_rawP13stbi__context:
 6600|  20.6k|{
 6601|  20.6k|   int sz;
 6602|  20.6k|   if (stbi__get8(s) != 'G' || stbi__get8(s) != 'I' || stbi__get8(s) != 'F' || stbi__get8(s) != '8') return 0;
  ------------------
  |  Branch (6602:8): [True: 20.6k, False: 0]
  |  Branch (6602:32): [True: 0, False: 0]
  |  Branch (6602:56): [True: 0, False: 0]
  |  Branch (6602:80): [True: 0, False: 0]
  ------------------
 6603|      0|   sz = stbi__get8(s);
 6604|      0|   if (sz != '9' && sz != '7') return 0;
  ------------------
  |  Branch (6604:8): [True: 0, False: 0]
  |  Branch (6604:21): [True: 0, False: 0]
  ------------------
 6605|      0|   if (stbi__get8(s) != 'a') return 0;
  ------------------
  |  Branch (6605:8): [True: 0, False: 0]
  ------------------
 6606|      0|   return 1;
 6607|      0|}
fuzz_gltf.cc:_ZL14stbi__psd_testP13stbi__context:
 6101|  20.6k|{
 6102|  20.6k|   int r = (stbi__get32be(s) == 0x38425053);
 6103|  20.6k|   stbi__rewind(s);
 6104|  20.6k|   return r;
 6105|  20.6k|}
fuzz_gltf.cc:_ZL14stbi__pic_testP13stbi__context:
 6561|  20.6k|{
 6562|  20.6k|   int r = stbi__pic_test_core(s);
 6563|  20.6k|   stbi__rewind(s);
 6564|  20.6k|   return r;
 6565|  20.6k|}
fuzz_gltf.cc:_ZL19stbi__pic_test_coreP13stbi__context:
 6366|  20.6k|{
 6367|  20.6k|   int i;
 6368|       |
 6369|  20.6k|   if (!stbi__pic_is4(s,"\x53\x80\xF6\x34"))
  ------------------
  |  Branch (6369:8): [True: 20.6k, False: 1]
  ------------------
 6370|  20.6k|      return 0;
 6371|       |
 6372|     85|   for(i=0;i<84;++i)
  ------------------
  |  Branch (6372:12): [True: 84, False: 1]
  ------------------
 6373|     84|      stbi__get8(s);
 6374|       |
 6375|      1|   if (!stbi__pic_is4(s,"PICT"))
  ------------------
  |  Branch (6375:8): [True: 1, False: 0]
  ------------------
 6376|      1|      return 0;
 6377|       |
 6378|      0|   return 1;
 6379|      1|}
fuzz_gltf.cc:_ZL13stbi__pic_is4P13stbi__contextPKc:
 6356|  20.6k|{
 6357|  20.6k|   int i;
 6358|  20.8k|   for (i=0; i<4; ++i)
  ------------------
  |  Branch (6358:14): [True: 20.8k, False: 1]
  ------------------
 6359|  20.8k|      if (stbi__get8(s) != (stbi_uc)str[i])
  ------------------
  |  Branch (6359:11): [True: 20.6k, False: 207]
  ------------------
 6360|  20.6k|         return 0;
 6361|       |
 6362|      1|   return 1;
 6363|  20.6k|}
fuzz_gltf.cc:_ZL12stbi__at_eofP13stbi__context:
 1627|   320k|{
 1628|   320k|   if (s->io.read) {
  ------------------
  |  Branch (1628:8): [True: 0, False: 320k]
  ------------------
 1629|      0|      if (!(s->io.eof)(s->io_user_data)) return 0;
  ------------------
  |  Branch (1629:11): [True: 0, False: 0]
  ------------------
 1630|       |      // if feof() is true, check if buffer = end
 1631|       |      // special case: we've only got the special 0 character at the end
 1632|      0|      if (s->read_from_callbacks == 0) return 1;
  ------------------
  |  Branch (1632:11): [True: 0, False: 0]
  ------------------
 1633|      0|   }
 1634|       |
 1635|   320k|   return s->img_buffer >= s->img_buffer_end;
 1636|   320k|}
fuzz_gltf.cc:_ZL15stbi__jpeg_testP13stbi__context:
 4041|  20.6k|{
 4042|  20.6k|   int r;
 4043|  20.6k|   stbi__jpeg* j = (stbi__jpeg*)stbi__malloc(sizeof(stbi__jpeg));
 4044|  20.6k|   if (!j) return stbi__err("outofmem", "Out of memory");
  ------------------
  |  | 1093|      0|   #define stbi__err(x,y)  stbi__err(x)
  ------------------
  |  Branch (4044:8): [True: 0, False: 20.6k]
  ------------------
 4045|  20.6k|   memset(j, 0, sizeof(stbi__jpeg));
 4046|  20.6k|   j->s = s;
 4047|  20.6k|   stbi__setup_jpeg(j);
 4048|  20.6k|   r = stbi__decode_jpeg_header(j, STBI__SCAN_type);
 4049|  20.6k|   stbi__rewind(s);
 4050|  20.6k|   STBI_FREE(j);
  ------------------
  |  |  682|  20.6k|#define STBI_FREE(p)              free(p)
  ------------------
 4051|  20.6k|   return r;
 4052|  20.6k|}
fuzz_gltf.cc:_ZL16stbi__setup_jpegP10stbi__jpeg:
 3820|  28.6k|{
 3821|  28.6k|   j->idct_block_kernel = stbi__idct_block;
 3822|  28.6k|   j->YCbCr_to_RGB_kernel = stbi__YCbCr_to_RGB_row;
 3823|  28.6k|   j->resample_row_hv_2_kernel = stbi__resample_row_hv_2;
 3824|       |
 3825|  28.6k|#ifdef STBI_SSE2
 3826|  28.6k|   if (stbi__sse2_available()) {
  ------------------
  |  Branch (3826:8): [True: 28.6k, False: 0]
  ------------------
 3827|  28.6k|      j->idct_block_kernel = stbi__idct_simd;
 3828|  28.6k|      j->YCbCr_to_RGB_kernel = stbi__YCbCr_to_RGB_simd;
 3829|  28.6k|      j->resample_row_hv_2_kernel = stbi__resample_row_hv_2_simd;
 3830|  28.6k|   }
 3831|  28.6k|#endif
 3832|       |
 3833|       |#ifdef STBI_NEON
 3834|       |   j->idct_block_kernel = stbi__idct_simd;
 3835|       |   j->YCbCr_to_RGB_kernel = stbi__YCbCr_to_RGB_simd;
 3836|       |   j->resample_row_hv_2_kernel = stbi__resample_row_hv_2_simd;
 3837|       |#endif
 3838|  28.6k|}
fuzz_gltf.cc:_ZL20stbi__sse2_availablev:
  764|  28.6k|{
  765|       |   // If we're even attempting to compile this on GCC/Clang, that means
  766|       |   // -msse2 is on, which means the compiler is allowed to use SSE2
  767|       |   // instructions at will, and so are we.
  768|  28.6k|   return 1;
  769|  28.6k|}
fuzz_gltf.cc:_ZL15stbi__idct_simdPhiPs:
 2529|  2.83M|{
 2530|       |   // This is constructed to match our regular (generic) integer IDCT exactly.
 2531|  2.83M|   __m128i row0, row1, row2, row3, row4, row5, row6, row7;
 2532|  2.83M|   __m128i tmp;
 2533|       |
 2534|       |   // dot product constant: even elems=x, odd elems=y
 2535|  2.83M|   #define dct_const(x,y)  _mm_setr_epi16((x),(y),(x),(y),(x),(y),(x),(y))
 2536|       |
 2537|       |   // out(0) = c0[even]*x + c0[odd]*y   (c0, x, y 16-bit, out 32-bit)
 2538|       |   // out(1) = c1[even]*x + c1[odd]*y
 2539|  2.83M|   #define dct_rot(out0,out1, x,y,c0,c1) \
 2540|  2.83M|      __m128i c0##lo = _mm_unpacklo_epi16((x),(y)); \
 2541|  2.83M|      __m128i c0##hi = _mm_unpackhi_epi16((x),(y)); \
 2542|  2.83M|      __m128i out0##_l = _mm_madd_epi16(c0##lo, c0); \
 2543|  2.83M|      __m128i out0##_h = _mm_madd_epi16(c0##hi, c0); \
 2544|  2.83M|      __m128i out1##_l = _mm_madd_epi16(c0##lo, c1); \
 2545|  2.83M|      __m128i out1##_h = _mm_madd_epi16(c0##hi, c1)
 2546|       |
 2547|       |   // out = in << 12  (in 16-bit, out 32-bit)
 2548|  2.83M|   #define dct_widen(out, in) \
 2549|  2.83M|      __m128i out##_l = _mm_srai_epi32(_mm_unpacklo_epi16(_mm_setzero_si128(), (in)), 4); \
 2550|  2.83M|      __m128i out##_h = _mm_srai_epi32(_mm_unpackhi_epi16(_mm_setzero_si128(), (in)), 4)
 2551|       |
 2552|       |   // wide add
 2553|  2.83M|   #define dct_wadd(out, a, b) \
 2554|  2.83M|      __m128i out##_l = _mm_add_epi32(a##_l, b##_l); \
 2555|  2.83M|      __m128i out##_h = _mm_add_epi32(a##_h, b##_h)
 2556|       |
 2557|       |   // wide sub
 2558|  2.83M|   #define dct_wsub(out, a, b) \
 2559|  2.83M|      __m128i out##_l = _mm_sub_epi32(a##_l, b##_l); \
 2560|  2.83M|      __m128i out##_h = _mm_sub_epi32(a##_h, b##_h)
 2561|       |
 2562|       |   // butterfly a/b, add bias, then shift by "s" and pack
 2563|  2.83M|   #define dct_bfly32o(out0, out1, a,b,bias,s) \
 2564|  2.83M|      { \
 2565|  2.83M|         __m128i abiased_l = _mm_add_epi32(a##_l, bias); \
 2566|  2.83M|         __m128i abiased_h = _mm_add_epi32(a##_h, bias); \
 2567|  2.83M|         dct_wadd(sum, abiased, b); \
 2568|  2.83M|         dct_wsub(dif, abiased, b); \
 2569|  2.83M|         out0 = _mm_packs_epi32(_mm_srai_epi32(sum_l, s), _mm_srai_epi32(sum_h, s)); \
 2570|  2.83M|         out1 = _mm_packs_epi32(_mm_srai_epi32(dif_l, s), _mm_srai_epi32(dif_h, s)); \
 2571|  2.83M|      }
 2572|       |
 2573|       |   // 8-bit interleave step (for transposes)
 2574|  2.83M|   #define dct_interleave8(a, b) \
 2575|  2.83M|      tmp = a; \
 2576|  2.83M|      a = _mm_unpacklo_epi8(a, b); \
 2577|  2.83M|      b = _mm_unpackhi_epi8(tmp, b)
 2578|       |
 2579|       |   // 16-bit interleave step (for transposes)
 2580|  2.83M|   #define dct_interleave16(a, b) \
 2581|  2.83M|      tmp = a; \
 2582|  2.83M|      a = _mm_unpacklo_epi16(a, b); \
 2583|  2.83M|      b = _mm_unpackhi_epi16(tmp, b)
 2584|       |
 2585|  2.83M|   #define dct_pass(bias,shift) \
 2586|  2.83M|      { \
 2587|       |         /* even part */ \
 2588|  2.83M|         dct_rot(t2e,t3e, row2,row6, rot0_0,rot0_1); \
 2589|  2.83M|         __m128i sum04 = _mm_add_epi16(row0, row4); \
 2590|  2.83M|         __m128i dif04 = _mm_sub_epi16(row0, row4); \
 2591|  2.83M|         dct_widen(t0e, sum04); \
 2592|  2.83M|         dct_widen(t1e, dif04); \
 2593|  2.83M|         dct_wadd(x0, t0e, t3e); \
 2594|  2.83M|         dct_wsub(x3, t0e, t3e); \
 2595|  2.83M|         dct_wadd(x1, t1e, t2e); \
 2596|  2.83M|         dct_wsub(x2, t1e, t2e); \
 2597|       |         /* odd part */ \
 2598|  2.83M|         dct_rot(y0o,y2o, row7,row3, rot2_0,rot2_1); \
 2599|  2.83M|         dct_rot(y1o,y3o, row5,row1, rot3_0,rot3_1); \
 2600|  2.83M|         __m128i sum17 = _mm_add_epi16(row1, row7); \
 2601|  2.83M|         __m128i sum35 = _mm_add_epi16(row3, row5); \
 2602|  2.83M|         dct_rot(y4o,y5o, sum17,sum35, rot1_0,rot1_1); \
 2603|  2.83M|         dct_wadd(x4, y0o, y4o); \
 2604|  2.83M|         dct_wadd(x5, y1o, y5o); \
 2605|  2.83M|         dct_wadd(x6, y2o, y5o); \
 2606|  2.83M|         dct_wadd(x7, y3o, y4o); \
 2607|  2.83M|         dct_bfly32o(row0,row7, x0,x7,bias,shift); \
 2608|  2.83M|         dct_bfly32o(row1,row6, x1,x6,bias,shift); \
 2609|  2.83M|         dct_bfly32o(row2,row5, x2,x5,bias,shift); \
 2610|  2.83M|         dct_bfly32o(row3,row4, x3,x4,bias,shift); \
 2611|  2.83M|      }
 2612|       |
 2613|  2.83M|   __m128i rot0_0 = dct_const(stbi__f2f(0.5411961f), stbi__f2f(0.5411961f) + stbi__f2f(-1.847759065f));
  ------------------
  |  | 2535|  2.83M|   #define dct_const(x,y)  _mm_setr_epi16((x),(y),(x),(y),(x),(y),(x),(y))
  ------------------
 2614|  2.83M|   __m128i rot0_1 = dct_const(stbi__f2f(0.5411961f) + stbi__f2f( 0.765366865f), stbi__f2f(0.5411961f));
  ------------------
  |  | 2535|  2.83M|   #define dct_const(x,y)  _mm_setr_epi16((x),(y),(x),(y),(x),(y),(x),(y))
  ------------------
 2615|  2.83M|   __m128i rot1_0 = dct_const(stbi__f2f(1.175875602f) + stbi__f2f(-0.899976223f), stbi__f2f(1.175875602f));
  ------------------
  |  | 2535|  2.83M|   #define dct_const(x,y)  _mm_setr_epi16((x),(y),(x),(y),(x),(y),(x),(y))
  ------------------
 2616|  2.83M|   __m128i rot1_1 = dct_const(stbi__f2f(1.175875602f), stbi__f2f(1.175875602f) + stbi__f2f(-2.562915447f));
  ------------------
  |  | 2535|  2.83M|   #define dct_const(x,y)  _mm_setr_epi16((x),(y),(x),(y),(x),(y),(x),(y))
  ------------------
 2617|  2.83M|   __m128i rot2_0 = dct_const(stbi__f2f(-1.961570560f) + stbi__f2f( 0.298631336f), stbi__f2f(-1.961570560f));
  ------------------
  |  | 2535|  2.83M|   #define dct_const(x,y)  _mm_setr_epi16((x),(y),(x),(y),(x),(y),(x),(y))
  ------------------
 2618|  2.83M|   __m128i rot2_1 = dct_const(stbi__f2f(-1.961570560f), stbi__f2f(-1.961570560f) + stbi__f2f( 3.072711026f));
  ------------------
  |  | 2535|  2.83M|   #define dct_const(x,y)  _mm_setr_epi16((x),(y),(x),(y),(x),(y),(x),(y))
  ------------------
 2619|  2.83M|   __m128i rot3_0 = dct_const(stbi__f2f(-0.390180644f) + stbi__f2f( 2.053119869f), stbi__f2f(-0.390180644f));
  ------------------
  |  | 2535|  2.83M|   #define dct_const(x,y)  _mm_setr_epi16((x),(y),(x),(y),(x),(y),(x),(y))
  ------------------
 2620|  2.83M|   __m128i rot3_1 = dct_const(stbi__f2f(-0.390180644f), stbi__f2f(-0.390180644f) + stbi__f2f( 1.501321110f));
  ------------------
  |  | 2535|  2.83M|   #define dct_const(x,y)  _mm_setr_epi16((x),(y),(x),(y),(x),(y),(x),(y))
  ------------------
 2621|       |
 2622|       |   // rounding biases in column/row passes, see stbi__idct_block for explanation.
 2623|  2.83M|   __m128i bias_0 = _mm_set1_epi32(512);
 2624|  2.83M|   __m128i bias_1 = _mm_set1_epi32(65536 + (128<<17));
 2625|       |
 2626|       |   // load
 2627|  2.83M|   row0 = _mm_load_si128((const __m128i *) (data + 0*8));
 2628|  2.83M|   row1 = _mm_load_si128((const __m128i *) (data + 1*8));
 2629|  2.83M|   row2 = _mm_load_si128((const __m128i *) (data + 2*8));
 2630|  2.83M|   row3 = _mm_load_si128((const __m128i *) (data + 3*8));
 2631|  2.83M|   row4 = _mm_load_si128((const __m128i *) (data + 4*8));
 2632|  2.83M|   row5 = _mm_load_si128((const __m128i *) (data + 5*8));
 2633|  2.83M|   row6 = _mm_load_si128((const __m128i *) (data + 6*8));
 2634|  2.83M|   row7 = _mm_load_si128((const __m128i *) (data + 7*8));
 2635|       |
 2636|       |   // column pass
 2637|  2.83M|   dct_pass(bias_0, 10);
  ------------------
  |  | 2586|  2.83M|      { \
  |  | 2587|  2.83M|         /* even part */ \
  |  | 2588|  2.83M|         dct_rot(t2e,t3e, row2,row6, rot0_0,rot0_1); \
  |  |  ------------------
  |  |  |  | 2540|  2.83M|      __m128i c0##lo = _mm_unpacklo_epi16((x),(y)); \
  |  |  |  | 2541|  2.83M|      __m128i c0##hi = _mm_unpackhi_epi16((x),(y)); \
  |  |  |  | 2542|  2.83M|      __m128i out0##_l = _mm_madd_epi16(c0##lo, c0); \
  |  |  |  | 2543|  2.83M|      __m128i out0##_h = _mm_madd_epi16(c0##hi, c0); \
  |  |  |  | 2544|  2.83M|      __m128i out1##_l = _mm_madd_epi16(c0##lo, c1); \
  |  |  |  | 2545|  2.83M|      __m128i out1##_h = _mm_madd_epi16(c0##hi, c1)
  |  |  ------------------
  |  | 2589|  2.83M|         __m128i sum04 = _mm_add_epi16(row0, row4); \
  |  | 2590|  2.83M|         __m128i dif04 = _mm_sub_epi16(row0, row4); \
  |  | 2591|  2.83M|         dct_widen(t0e, sum04); \
  |  |  ------------------
  |  |  |  | 2549|  2.83M|      __m128i out##_l = _mm_srai_epi32(_mm_unpacklo_epi16(_mm_setzero_si128(), (in)), 4); \
  |  |  |  | 2550|  2.83M|      __m128i out##_h = _mm_srai_epi32(_mm_unpackhi_epi16(_mm_setzero_si128(), (in)), 4)
  |  |  ------------------
  |  | 2592|  2.83M|         dct_widen(t1e, dif04); \
  |  |  ------------------
  |  |  |  | 2549|  2.83M|      __m128i out##_l = _mm_srai_epi32(_mm_unpacklo_epi16(_mm_setzero_si128(), (in)), 4); \
  |  |  |  | 2550|  2.83M|      __m128i out##_h = _mm_srai_epi32(_mm_unpackhi_epi16(_mm_setzero_si128(), (in)), 4)
  |  |  ------------------
  |  | 2593|  2.83M|         dct_wadd(x0, t0e, t3e); \
  |  |  ------------------
  |  |  |  | 2554|  2.83M|      __m128i out##_l = _mm_add_epi32(a##_l, b##_l); \
  |  |  |  | 2555|  2.83M|      __m128i out##_h = _mm_add_epi32(a##_h, b##_h)
  |  |  ------------------
  |  | 2594|  2.83M|         dct_wsub(x3, t0e, t3e); \
  |  |  ------------------
  |  |  |  | 2559|  2.83M|      __m128i out##_l = _mm_sub_epi32(a##_l, b##_l); \
  |  |  |  | 2560|  2.83M|      __m128i out##_h = _mm_sub_epi32(a##_h, b##_h)
  |  |  ------------------
  |  | 2595|  2.83M|         dct_wadd(x1, t1e, t2e); \
  |  |  ------------------
  |  |  |  | 2554|  2.83M|      __m128i out##_l = _mm_add_epi32(a##_l, b##_l); \
  |  |  |  | 2555|  2.83M|      __m128i out##_h = _mm_add_epi32(a##_h, b##_h)
  |  |  ------------------
  |  | 2596|  2.83M|         dct_wsub(x2, t1e, t2e); \
  |  |  ------------------
  |  |  |  | 2559|  2.83M|      __m128i out##_l = _mm_sub_epi32(a##_l, b##_l); \
  |  |  |  | 2560|  2.83M|      __m128i out##_h = _mm_sub_epi32(a##_h, b##_h)
  |  |  ------------------
  |  | 2597|  2.83M|         /* odd part */ \
  |  | 2598|  2.83M|         dct_rot(y0o,y2o, row7,row3, rot2_0,rot2_1); \
  |  |  ------------------
  |  |  |  | 2540|  2.83M|      __m128i c0##lo = _mm_unpacklo_epi16((x),(y)); \
  |  |  |  | 2541|  2.83M|      __m128i c0##hi = _mm_unpackhi_epi16((x),(y)); \
  |  |  |  | 2542|  2.83M|      __m128i out0##_l = _mm_madd_epi16(c0##lo, c0); \
  |  |  |  | 2543|  2.83M|      __m128i out0##_h = _mm_madd_epi16(c0##hi, c0); \
  |  |  |  | 2544|  2.83M|      __m128i out1##_l = _mm_madd_epi16(c0##lo, c1); \
  |  |  |  | 2545|  2.83M|      __m128i out1##_h = _mm_madd_epi16(c0##hi, c1)
  |  |  ------------------
  |  | 2599|  2.83M|         dct_rot(y1o,y3o, row5,row1, rot3_0,rot3_1); \
  |  |  ------------------
  |  |  |  | 2540|  2.83M|      __m128i c0##lo = _mm_unpacklo_epi16((x),(y)); \
  |  |  |  | 2541|  2.83M|      __m128i c0##hi = _mm_unpackhi_epi16((x),(y)); \
  |  |  |  | 2542|  2.83M|      __m128i out0##_l = _mm_madd_epi16(c0##lo, c0); \
  |  |  |  | 2543|  2.83M|      __m128i out0##_h = _mm_madd_epi16(c0##hi, c0); \
  |  |  |  | 2544|  2.83M|      __m128i out1##_l = _mm_madd_epi16(c0##lo, c1); \
  |  |  |  | 2545|  2.83M|      __m128i out1##_h = _mm_madd_epi16(c0##hi, c1)
  |  |  ------------------
  |  | 2600|  2.83M|         __m128i sum17 = _mm_add_epi16(row1, row7); \
  |  | 2601|  2.83M|         __m128i sum35 = _mm_add_epi16(row3, row5); \
  |  | 2602|  2.83M|         dct_rot(y4o,y5o, sum17,sum35, rot1_0,rot1_1); \
  |  |  ------------------
  |  |  |  | 2540|  2.83M|      __m128i c0##lo = _mm_unpacklo_epi16((x),(y)); \
  |  |  |  | 2541|  2.83M|      __m128i c0##hi = _mm_unpackhi_epi16((x),(y)); \
  |  |  |  | 2542|  2.83M|      __m128i out0##_l = _mm_madd_epi16(c0##lo, c0); \
  |  |  |  | 2543|  2.83M|      __m128i out0##_h = _mm_madd_epi16(c0##hi, c0); \
  |  |  |  | 2544|  2.83M|      __m128i out1##_l = _mm_madd_epi16(c0##lo, c1); \
  |  |  |  | 2545|  2.83M|      __m128i out1##_h = _mm_madd_epi16(c0##hi, c1)
  |  |  ------------------
  |  | 2603|  2.83M|         dct_wadd(x4, y0o, y4o); \
  |  |  ------------------
  |  |  |  | 2554|  2.83M|      __m128i out##_l = _mm_add_epi32(a##_l, b##_l); \
  |  |  |  | 2555|  2.83M|      __m128i out##_h = _mm_add_epi32(a##_h, b##_h)
  |  |  ------------------
  |  | 2604|  2.83M|         dct_wadd(x5, y1o, y5o); \
  |  |  ------------------
  |  |  |  | 2554|  2.83M|      __m128i out##_l = _mm_add_epi32(a##_l, b##_l); \
  |  |  |  | 2555|  2.83M|      __m128i out##_h = _mm_add_epi32(a##_h, b##_h)
  |  |  ------------------
  |  | 2605|  2.83M|         dct_wadd(x6, y2o, y5o); \
  |  |  ------------------
  |  |  |  | 2554|  2.83M|      __m128i out##_l = _mm_add_epi32(a##_l, b##_l); \
  |  |  |  | 2555|  2.83M|      __m128i out##_h = _mm_add_epi32(a##_h, b##_h)
  |  |  ------------------
  |  | 2606|  2.83M|         dct_wadd(x7, y3o, y4o); \
  |  |  ------------------
  |  |  |  | 2554|  2.83M|      __m128i out##_l = _mm_add_epi32(a##_l, b##_l); \
  |  |  |  | 2555|  2.83M|      __m128i out##_h = _mm_add_epi32(a##_h, b##_h)
  |  |  ------------------
  |  | 2607|  2.83M|         dct_bfly32o(row0,row7, x0,x7,bias,shift); \
  |  |  ------------------
  |  |  |  | 2564|  2.83M|      { \
  |  |  |  | 2565|  2.83M|         __m128i abiased_l = _mm_add_epi32(a##_l, bias); \
  |  |  |  | 2566|  2.83M|         __m128i abiased_h = _mm_add_epi32(a##_h, bias); \
  |  |  |  | 2567|  2.83M|         dct_wadd(sum, abiased, b); \
  |  |  |  |  ------------------
  |  |  |  |  |  | 2554|  2.83M|      __m128i out##_l = _mm_add_epi32(a##_l, b##_l); \
  |  |  |  |  |  | 2555|  2.83M|      __m128i out##_h = _mm_add_epi32(a##_h, b##_h)
  |  |  |  |  ------------------
  |  |  |  | 2568|  2.83M|         dct_wsub(dif, abiased, b); \
  |  |  |  |  ------------------
  |  |  |  |  |  | 2559|  2.83M|      __m128i out##_l = _mm_sub_epi32(a##_l, b##_l); \
  |  |  |  |  |  | 2560|  2.83M|      __m128i out##_h = _mm_sub_epi32(a##_h, b##_h)
  |  |  |  |  ------------------
  |  |  |  | 2569|  2.83M|         out0 = _mm_packs_epi32(_mm_srai_epi32(sum_l, s), _mm_srai_epi32(sum_h, s)); \
  |  |  |  | 2570|  2.83M|         out1 = _mm_packs_epi32(_mm_srai_epi32(dif_l, s), _mm_srai_epi32(dif_h, s)); \
  |  |  |  | 2571|  2.83M|      }
  |  |  ------------------
  |  | 2608|  2.83M|         dct_bfly32o(row1,row6, x1,x6,bias,shift); \
  |  |  ------------------
  |  |  |  | 2564|  2.83M|      { \
  |  |  |  | 2565|  2.83M|         __m128i abiased_l = _mm_add_epi32(a##_l, bias); \
  |  |  |  | 2566|  2.83M|         __m128i abiased_h = _mm_add_epi32(a##_h, bias); \
  |  |  |  | 2567|  2.83M|         dct_wadd(sum, abiased, b); \
  |  |  |  |  ------------------
  |  |  |  |  |  | 2554|  2.83M|      __m128i out##_l = _mm_add_epi32(a##_l, b##_l); \
  |  |  |  |  |  | 2555|  2.83M|      __m128i out##_h = _mm_add_epi32(a##_h, b##_h)
  |  |  |  |  ------------------
  |  |  |  | 2568|  2.83M|         dct_wsub(dif, abiased, b); \
  |  |  |  |  ------------------
  |  |  |  |  |  | 2559|  2.83M|      __m128i out##_l = _mm_sub_epi32(a##_l, b##_l); \
  |  |  |  |  |  | 2560|  2.83M|      __m128i out##_h = _mm_sub_epi32(a##_h, b##_h)
  |  |  |  |  ------------------
  |  |  |  | 2569|  2.83M|         out0 = _mm_packs_epi32(_mm_srai_epi32(sum_l, s), _mm_srai_epi32(sum_h, s)); \
  |  |  |  | 2570|  2.83M|         out1 = _mm_packs_epi32(_mm_srai_epi32(dif_l, s), _mm_srai_epi32(dif_h, s)); \
  |  |  |  | 2571|  2.83M|      }
  |  |  ------------------
  |  | 2609|  2.83M|         dct_bfly32o(row2,row5, x2,x5,bias,shift); \
  |  |  ------------------
  |  |  |  | 2564|  2.83M|      { \
  |  |  |  | 2565|  2.83M|         __m128i abiased_l = _mm_add_epi32(a##_l, bias); \
  |  |  |  | 2566|  2.83M|         __m128i abiased_h = _mm_add_epi32(a##_h, bias); \
  |  |  |  | 2567|  2.83M|         dct_wadd(sum, abiased, b); \
  |  |  |  |  ------------------
  |  |  |  |  |  | 2554|  2.83M|      __m128i out##_l = _mm_add_epi32(a##_l, b##_l); \
  |  |  |  |  |  | 2555|  2.83M|      __m128i out##_h = _mm_add_epi32(a##_h, b##_h)
  |  |  |  |  ------------------
  |  |  |  | 2568|  2.83M|         dct_wsub(dif, abiased, b); \
  |  |  |  |  ------------------
  |  |  |  |  |  | 2559|  2.83M|      __m128i out##_l = _mm_sub_epi32(a##_l, b##_l); \
  |  |  |  |  |  | 2560|  2.83M|      __m128i out##_h = _mm_sub_epi32(a##_h, b##_h)
  |  |  |  |  ------------------
  |  |  |  | 2569|  2.83M|         out0 = _mm_packs_epi32(_mm_srai_epi32(sum_l, s), _mm_srai_epi32(sum_h, s)); \
  |  |  |  | 2570|  2.83M|         out1 = _mm_packs_epi32(_mm_srai_epi32(dif_l, s), _mm_srai_epi32(dif_h, s)); \
  |  |  |  | 2571|  2.83M|      }
  |  |  ------------------
  |  | 2610|  2.83M|         dct_bfly32o(row3,row4, x3,x4,bias,shift); \
  |  |  ------------------
  |  |  |  | 2564|  2.83M|      { \
  |  |  |  | 2565|  2.83M|         __m128i abiased_l = _mm_add_epi32(a##_l, bias); \
  |  |  |  | 2566|  2.83M|         __m128i abiased_h = _mm_add_epi32(a##_h, bias); \
  |  |  |  | 2567|  2.83M|         dct_wadd(sum, abiased, b); \
  |  |  |  |  ------------------
  |  |  |  |  |  | 2554|  2.83M|      __m128i out##_l = _mm_add_epi32(a##_l, b##_l); \
  |  |  |  |  |  | 2555|  2.83M|      __m128i out##_h = _mm_add_epi32(a##_h, b##_h)
  |  |  |  |  ------------------
  |  |  |  | 2568|  2.83M|         dct_wsub(dif, abiased, b); \
  |  |  |  |  ------------------
  |  |  |  |  |  | 2559|  2.83M|      __m128i out##_l = _mm_sub_epi32(a##_l, b##_l); \
  |  |  |  |  |  | 2560|  2.83M|      __m128i out##_h = _mm_sub_epi32(a##_h, b##_h)
  |  |  |  |  ------------------
  |  |  |  | 2569|  2.83M|         out0 = _mm_packs_epi32(_mm_srai_epi32(sum_l, s), _mm_srai_epi32(sum_h, s)); \
  |  |  |  | 2570|  2.83M|         out1 = _mm_packs_epi32(_mm_srai_epi32(dif_l, s), _mm_srai_epi32(dif_h, s)); \
  |  |  |  | 2571|  2.83M|      }
  |  |  ------------------
  |  | 2611|  2.83M|      }
  ------------------
 2638|       |
 2639|  2.83M|   {
 2640|       |      // 16bit 8x8 transpose pass 1
 2641|  2.83M|      dct_interleave16(row0, row4);
  ------------------
  |  | 2581|  2.83M|      tmp = a; \
  |  | 2582|  2.83M|      a = _mm_unpacklo_epi16(a, b); \
  |  | 2583|  2.83M|      b = _mm_unpackhi_epi16(tmp, b)
  ------------------
 2642|  2.83M|      dct_interleave16(row1, row5);
  ------------------
  |  | 2581|  2.83M|      tmp = a; \
  |  | 2582|  2.83M|      a = _mm_unpacklo_epi16(a, b); \
  |  | 2583|  2.83M|      b = _mm_unpackhi_epi16(tmp, b)
  ------------------
 2643|  2.83M|      dct_interleave16(row2, row6);
  ------------------
  |  | 2581|  2.83M|      tmp = a; \
  |  | 2582|  2.83M|      a = _mm_unpacklo_epi16(a, b); \
  |  | 2583|  2.83M|      b = _mm_unpackhi_epi16(tmp, b)
  ------------------
 2644|  2.83M|      dct_interleave16(row3, row7);
  ------------------
  |  | 2581|  2.83M|      tmp = a; \
  |  | 2582|  2.83M|      a = _mm_unpacklo_epi16(a, b); \
  |  | 2583|  2.83M|      b = _mm_unpackhi_epi16(tmp, b)
  ------------------
 2645|       |
 2646|       |      // transpose pass 2
 2647|  2.83M|      dct_interleave16(row0, row2);
  ------------------
  |  | 2581|  2.83M|      tmp = a; \
  |  | 2582|  2.83M|      a = _mm_unpacklo_epi16(a, b); \
  |  | 2583|  2.83M|      b = _mm_unpackhi_epi16(tmp, b)
  ------------------
 2648|  2.83M|      dct_interleave16(row1, row3);
  ------------------
  |  | 2581|  2.83M|      tmp = a; \
  |  | 2582|  2.83M|      a = _mm_unpacklo_epi16(a, b); \
  |  | 2583|  2.83M|      b = _mm_unpackhi_epi16(tmp, b)
  ------------------
 2649|  2.83M|      dct_interleave16(row4, row6);
  ------------------
  |  | 2581|  2.83M|      tmp = a; \
  |  | 2582|  2.83M|      a = _mm_unpacklo_epi16(a, b); \
  |  | 2583|  2.83M|      b = _mm_unpackhi_epi16(tmp, b)
  ------------------
 2650|  2.83M|      dct_interleave16(row5, row7);
  ------------------
  |  | 2581|  2.83M|      tmp = a; \
  |  | 2582|  2.83M|      a = _mm_unpacklo_epi16(a, b); \
  |  | 2583|  2.83M|      b = _mm_unpackhi_epi16(tmp, b)
  ------------------
 2651|       |
 2652|       |      // transpose pass 3
 2653|  2.83M|      dct_interleave16(row0, row1);
  ------------------
  |  | 2581|  2.83M|      tmp = a; \
  |  | 2582|  2.83M|      a = _mm_unpacklo_epi16(a, b); \
  |  | 2583|  2.83M|      b = _mm_unpackhi_epi16(tmp, b)
  ------------------
 2654|  2.83M|      dct_interleave16(row2, row3);
  ------------------
  |  | 2581|  2.83M|      tmp = a; \
  |  | 2582|  2.83M|      a = _mm_unpacklo_epi16(a, b); \
  |  | 2583|  2.83M|      b = _mm_unpackhi_epi16(tmp, b)
  ------------------
 2655|  2.83M|      dct_interleave16(row4, row5);
  ------------------
  |  | 2581|  2.83M|      tmp = a; \
  |  | 2582|  2.83M|      a = _mm_unpacklo_epi16(a, b); \
  |  | 2583|  2.83M|      b = _mm_unpackhi_epi16(tmp, b)
  ------------------
 2656|  2.83M|      dct_interleave16(row6, row7);
  ------------------
  |  | 2581|  2.83M|      tmp = a; \
  |  | 2582|  2.83M|      a = _mm_unpacklo_epi16(a, b); \
  |  | 2583|  2.83M|      b = _mm_unpackhi_epi16(tmp, b)
  ------------------
 2657|  2.83M|   }
 2658|       |
 2659|       |   // row pass
 2660|  2.83M|   dct_pass(bias_1, 17);
  ------------------
  |  | 2586|  2.83M|      { \
  |  | 2587|  2.83M|         /* even part */ \
  |  | 2588|  2.83M|         dct_rot(t2e,t3e, row2,row6, rot0_0,rot0_1); \
  |  |  ------------------
  |  |  |  | 2540|  2.83M|      __m128i c0##lo = _mm_unpacklo_epi16((x),(y)); \
  |  |  |  | 2541|  2.83M|      __m128i c0##hi = _mm_unpackhi_epi16((x),(y)); \
  |  |  |  | 2542|  2.83M|      __m128i out0##_l = _mm_madd_epi16(c0##lo, c0); \
  |  |  |  | 2543|  2.83M|      __m128i out0##_h = _mm_madd_epi16(c0##hi, c0); \
  |  |  |  | 2544|  2.83M|      __m128i out1##_l = _mm_madd_epi16(c0##lo, c1); \
  |  |  |  | 2545|  2.83M|      __m128i out1##_h = _mm_madd_epi16(c0##hi, c1)
  |  |  ------------------
  |  | 2589|  2.83M|         __m128i sum04 = _mm_add_epi16(row0, row4); \
  |  | 2590|  2.83M|         __m128i dif04 = _mm_sub_epi16(row0, row4); \
  |  | 2591|  2.83M|         dct_widen(t0e, sum04); \
  |  |  ------------------
  |  |  |  | 2549|  2.83M|      __m128i out##_l = _mm_srai_epi32(_mm_unpacklo_epi16(_mm_setzero_si128(), (in)), 4); \
  |  |  |  | 2550|  2.83M|      __m128i out##_h = _mm_srai_epi32(_mm_unpackhi_epi16(_mm_setzero_si128(), (in)), 4)
  |  |  ------------------
  |  | 2592|  2.83M|         dct_widen(t1e, dif04); \
  |  |  ------------------
  |  |  |  | 2549|  2.83M|      __m128i out##_l = _mm_srai_epi32(_mm_unpacklo_epi16(_mm_setzero_si128(), (in)), 4); \
  |  |  |  | 2550|  2.83M|      __m128i out##_h = _mm_srai_epi32(_mm_unpackhi_epi16(_mm_setzero_si128(), (in)), 4)
  |  |  ------------------
  |  | 2593|  2.83M|         dct_wadd(x0, t0e, t3e); \
  |  |  ------------------
  |  |  |  | 2554|  2.83M|      __m128i out##_l = _mm_add_epi32(a##_l, b##_l); \
  |  |  |  | 2555|  2.83M|      __m128i out##_h = _mm_add_epi32(a##_h, b##_h)
  |  |  ------------------
  |  | 2594|  2.83M|         dct_wsub(x3, t0e, t3e); \
  |  |  ------------------
  |  |  |  | 2559|  2.83M|      __m128i out##_l = _mm_sub_epi32(a##_l, b##_l); \
  |  |  |  | 2560|  2.83M|      __m128i out##_h = _mm_sub_epi32(a##_h, b##_h)
  |  |  ------------------
  |  | 2595|  2.83M|         dct_wadd(x1, t1e, t2e); \
  |  |  ------------------
  |  |  |  | 2554|  2.83M|      __m128i out##_l = _mm_add_epi32(a##_l, b##_l); \
  |  |  |  | 2555|  2.83M|      __m128i out##_h = _mm_add_epi32(a##_h, b##_h)
  |  |  ------------------
  |  | 2596|  2.83M|         dct_wsub(x2, t1e, t2e); \
  |  |  ------------------
  |  |  |  | 2559|  2.83M|      __m128i out##_l = _mm_sub_epi32(a##_l, b##_l); \
  |  |  |  | 2560|  2.83M|      __m128i out##_h = _mm_sub_epi32(a##_h, b##_h)
  |  |  ------------------
  |  | 2597|  2.83M|         /* odd part */ \
  |  | 2598|  2.83M|         dct_rot(y0o,y2o, row7,row3, rot2_0,rot2_1); \
  |  |  ------------------
  |  |  |  | 2540|  2.83M|      __m128i c0##lo = _mm_unpacklo_epi16((x),(y)); \
  |  |  |  | 2541|  2.83M|      __m128i c0##hi = _mm_unpackhi_epi16((x),(y)); \
  |  |  |  | 2542|  2.83M|      __m128i out0##_l = _mm_madd_epi16(c0##lo, c0); \
  |  |  |  | 2543|  2.83M|      __m128i out0##_h = _mm_madd_epi16(c0##hi, c0); \
  |  |  |  | 2544|  2.83M|      __m128i out1##_l = _mm_madd_epi16(c0##lo, c1); \
  |  |  |  | 2545|  2.83M|      __m128i out1##_h = _mm_madd_epi16(c0##hi, c1)
  |  |  ------------------
  |  | 2599|  2.83M|         dct_rot(y1o,y3o, row5,row1, rot3_0,rot3_1); \
  |  |  ------------------
  |  |  |  | 2540|  2.83M|      __m128i c0##lo = _mm_unpacklo_epi16((x),(y)); \
  |  |  |  | 2541|  2.83M|      __m128i c0##hi = _mm_unpackhi_epi16((x),(y)); \
  |  |  |  | 2542|  2.83M|      __m128i out0##_l = _mm_madd_epi16(c0##lo, c0); \
  |  |  |  | 2543|  2.83M|      __m128i out0##_h = _mm_madd_epi16(c0##hi, c0); \
  |  |  |  | 2544|  2.83M|      __m128i out1##_l = _mm_madd_epi16(c0##lo, c1); \
  |  |  |  | 2545|  2.83M|      __m128i out1##_h = _mm_madd_epi16(c0##hi, c1)
  |  |  ------------------
  |  | 2600|  2.83M|         __m128i sum17 = _mm_add_epi16(row1, row7); \
  |  | 2601|  2.83M|         __m128i sum35 = _mm_add_epi16(row3, row5); \
  |  | 2602|  2.83M|         dct_rot(y4o,y5o, sum17,sum35, rot1_0,rot1_1); \
  |  |  ------------------
  |  |  |  | 2540|  2.83M|      __m128i c0##lo = _mm_unpacklo_epi16((x),(y)); \
  |  |  |  | 2541|  2.83M|      __m128i c0##hi = _mm_unpackhi_epi16((x),(y)); \
  |  |  |  | 2542|  2.83M|      __m128i out0##_l = _mm_madd_epi16(c0##lo, c0); \
  |  |  |  | 2543|  2.83M|      __m128i out0##_h = _mm_madd_epi16(c0##hi, c0); \
  |  |  |  | 2544|  2.83M|      __m128i out1##_l = _mm_madd_epi16(c0##lo, c1); \
  |  |  |  | 2545|  2.83M|      __m128i out1##_h = _mm_madd_epi16(c0##hi, c1)
  |  |  ------------------
  |  | 2603|  2.83M|         dct_wadd(x4, y0o, y4o); \
  |  |  ------------------
  |  |  |  | 2554|  2.83M|      __m128i out##_l = _mm_add_epi32(a##_l, b##_l); \
  |  |  |  | 2555|  2.83M|      __m128i out##_h = _mm_add_epi32(a##_h, b##_h)
  |  |  ------------------
  |  | 2604|  2.83M|         dct_wadd(x5, y1o, y5o); \
  |  |  ------------------
  |  |  |  | 2554|  2.83M|      __m128i out##_l = _mm_add_epi32(a##_l, b##_l); \
  |  |  |  | 2555|  2.83M|      __m128i out##_h = _mm_add_epi32(a##_h, b##_h)
  |  |  ------------------
  |  | 2605|  2.83M|         dct_wadd(x6, y2o, y5o); \
  |  |  ------------------
  |  |  |  | 2554|  2.83M|      __m128i out##_l = _mm_add_epi32(a##_l, b##_l); \
  |  |  |  | 2555|  2.83M|      __m128i out##_h = _mm_add_epi32(a##_h, b##_h)
  |  |  ------------------
  |  | 2606|  2.83M|         dct_wadd(x7, y3o, y4o); \
  |  |  ------------------
  |  |  |  | 2554|  2.83M|      __m128i out##_l = _mm_add_epi32(a##_l, b##_l); \
  |  |  |  | 2555|  2.83M|      __m128i out##_h = _mm_add_epi32(a##_h, b##_h)
  |  |  ------------------
  |  | 2607|  2.83M|         dct_bfly32o(row0,row7, x0,x7,bias,shift); \
  |  |  ------------------
  |  |  |  | 2564|  2.83M|      { \
  |  |  |  | 2565|  2.83M|         __m128i abiased_l = _mm_add_epi32(a##_l, bias); \
  |  |  |  | 2566|  2.83M|         __m128i abiased_h = _mm_add_epi32(a##_h, bias); \
  |  |  |  | 2567|  2.83M|         dct_wadd(sum, abiased, b); \
  |  |  |  |  ------------------
  |  |  |  |  |  | 2554|  2.83M|      __m128i out##_l = _mm_add_epi32(a##_l, b##_l); \
  |  |  |  |  |  | 2555|  2.83M|      __m128i out##_h = _mm_add_epi32(a##_h, b##_h)
  |  |  |  |  ------------------
  |  |  |  | 2568|  2.83M|         dct_wsub(dif, abiased, b); \
  |  |  |  |  ------------------
  |  |  |  |  |  | 2559|  2.83M|      __m128i out##_l = _mm_sub_epi32(a##_l, b##_l); \
  |  |  |  |  |  | 2560|  2.83M|      __m128i out##_h = _mm_sub_epi32(a##_h, b##_h)
  |  |  |  |  ------------------
  |  |  |  | 2569|  2.83M|         out0 = _mm_packs_epi32(_mm_srai_epi32(sum_l, s), _mm_srai_epi32(sum_h, s)); \
  |  |  |  | 2570|  2.83M|         out1 = _mm_packs_epi32(_mm_srai_epi32(dif_l, s), _mm_srai_epi32(dif_h, s)); \
  |  |  |  | 2571|  2.83M|      }
  |  |  ------------------
  |  | 2608|  2.83M|         dct_bfly32o(row1,row6, x1,x6,bias,shift); \
  |  |  ------------------
  |  |  |  | 2564|  2.83M|      { \
  |  |  |  | 2565|  2.83M|         __m128i abiased_l = _mm_add_epi32(a##_l, bias); \
  |  |  |  | 2566|  2.83M|         __m128i abiased_h = _mm_add_epi32(a##_h, bias); \
  |  |  |  | 2567|  2.83M|         dct_wadd(sum, abiased, b); \
  |  |  |  |  ------------------
  |  |  |  |  |  | 2554|  2.83M|      __m128i out##_l = _mm_add_epi32(a##_l, b##_l); \
  |  |  |  |  |  | 2555|  2.83M|      __m128i out##_h = _mm_add_epi32(a##_h, b##_h)
  |  |  |  |  ------------------
  |  |  |  | 2568|  2.83M|         dct_wsub(dif, abiased, b); \
  |  |  |  |  ------------------
  |  |  |  |  |  | 2559|  2.83M|      __m128i out##_l = _mm_sub_epi32(a##_l, b##_l); \
  |  |  |  |  |  | 2560|  2.83M|      __m128i out##_h = _mm_sub_epi32(a##_h, b##_h)
  |  |  |  |  ------------------
  |  |  |  | 2569|  2.83M|         out0 = _mm_packs_epi32(_mm_srai_epi32(sum_l, s), _mm_srai_epi32(sum_h, s)); \
  |  |  |  | 2570|  2.83M|         out1 = _mm_packs_epi32(_mm_srai_epi32(dif_l, s), _mm_srai_epi32(dif_h, s)); \
  |  |  |  | 2571|  2.83M|      }
  |  |  ------------------
  |  | 2609|  2.83M|         dct_bfly32o(row2,row5, x2,x5,bias,shift); \
  |  |  ------------------
  |  |  |  | 2564|  2.83M|      { \
  |  |  |  | 2565|  2.83M|         __m128i abiased_l = _mm_add_epi32(a##_l, bias); \
  |  |  |  | 2566|  2.83M|         __m128i abiased_h = _mm_add_epi32(a##_h, bias); \
  |  |  |  | 2567|  2.83M|         dct_wadd(sum, abiased, b); \
  |  |  |  |  ------------------
  |  |  |  |  |  | 2554|  2.83M|      __m128i out##_l = _mm_add_epi32(a##_l, b##_l); \
  |  |  |  |  |  | 2555|  2.83M|      __m128i out##_h = _mm_add_epi32(a##_h, b##_h)
  |  |  |  |  ------------------
  |  |  |  | 2568|  2.83M|         dct_wsub(dif, abiased, b); \
  |  |  |  |  ------------------
  |  |  |  |  |  | 2559|  2.83M|      __m128i out##_l = _mm_sub_epi32(a##_l, b##_l); \
  |  |  |  |  |  | 2560|  2.83M|      __m128i out##_h = _mm_sub_epi32(a##_h, b##_h)
  |  |  |  |  ------------------
  |  |  |  | 2569|  2.83M|         out0 = _mm_packs_epi32(_mm_srai_epi32(sum_l, s), _mm_srai_epi32(sum_h, s)); \
  |  |  |  | 2570|  2.83M|         out1 = _mm_packs_epi32(_mm_srai_epi32(dif_l, s), _mm_srai_epi32(dif_h, s)); \
  |  |  |  | 2571|  2.83M|      }
  |  |  ------------------
  |  | 2610|  2.83M|         dct_bfly32o(row3,row4, x3,x4,bias,shift); \
  |  |  ------------------
  |  |  |  | 2564|  2.83M|      { \
  |  |  |  | 2565|  2.83M|         __m128i abiased_l = _mm_add_epi32(a##_l, bias); \
  |  |  |  | 2566|  2.83M|         __m128i abiased_h = _mm_add_epi32(a##_h, bias); \
  |  |  |  | 2567|  2.83M|         dct_wadd(sum, abiased, b); \
  |  |  |  |  ------------------
  |  |  |  |  |  | 2554|  2.83M|      __m128i out##_l = _mm_add_epi32(a##_l, b##_l); \
  |  |  |  |  |  | 2555|  2.83M|      __m128i out##_h = _mm_add_epi32(a##_h, b##_h)
  |  |  |  |  ------------------
  |  |  |  | 2568|  2.83M|         dct_wsub(dif, abiased, b); \
  |  |  |  |  ------------------
  |  |  |  |  |  | 2559|  2.83M|      __m128i out##_l = _mm_sub_epi32(a##_l, b##_l); \
  |  |  |  |  |  | 2560|  2.83M|      __m128i out##_h = _mm_sub_epi32(a##_h, b##_h)
  |  |  |  |  ------------------
  |  |  |  | 2569|  2.83M|         out0 = _mm_packs_epi32(_mm_srai_epi32(sum_l, s), _mm_srai_epi32(sum_h, s)); \
  |  |  |  | 2570|  2.83M|         out1 = _mm_packs_epi32(_mm_srai_epi32(dif_l, s), _mm_srai_epi32(dif_h, s)); \
  |  |  |  | 2571|  2.83M|      }
  |  |  ------------------
  |  | 2611|  2.83M|      }
  ------------------
 2661|       |
 2662|  2.83M|   {
 2663|       |      // pack
 2664|  2.83M|      __m128i p0 = _mm_packus_epi16(row0, row1); // a0a1a2a3...a7b0b1b2b3...b7
 2665|  2.83M|      __m128i p1 = _mm_packus_epi16(row2, row3);
 2666|  2.83M|      __m128i p2 = _mm_packus_epi16(row4, row5);
 2667|  2.83M|      __m128i p3 = _mm_packus_epi16(row6, row7);
 2668|       |
 2669|       |      // 8bit 8x8 transpose pass 1
 2670|  2.83M|      dct_interleave8(p0, p2); // a0e0a1e1...
  ------------------
  |  | 2575|  2.83M|      tmp = a; \
  |  | 2576|  2.83M|      a = _mm_unpacklo_epi8(a, b); \
  |  | 2577|  2.83M|      b = _mm_unpackhi_epi8(tmp, b)
  ------------------
 2671|  2.83M|      dct_interleave8(p1, p3); // c0g0c1g1...
  ------------------
  |  | 2575|  2.83M|      tmp = a; \
  |  | 2576|  2.83M|      a = _mm_unpacklo_epi8(a, b); \
  |  | 2577|  2.83M|      b = _mm_unpackhi_epi8(tmp, b)
  ------------------
 2672|       |
 2673|       |      // transpose pass 2
 2674|  2.83M|      dct_interleave8(p0, p1); // a0c0e0g0...
  ------------------
  |  | 2575|  2.83M|      tmp = a; \
  |  | 2576|  2.83M|      a = _mm_unpacklo_epi8(a, b); \
  |  | 2577|  2.83M|      b = _mm_unpackhi_epi8(tmp, b)
  ------------------
 2675|  2.83M|      dct_interleave8(p2, p3); // b0d0f0h0...
  ------------------
  |  | 2575|  2.83M|      tmp = a; \
  |  | 2576|  2.83M|      a = _mm_unpacklo_epi8(a, b); \
  |  | 2577|  2.83M|      b = _mm_unpackhi_epi8(tmp, b)
  ------------------
 2676|       |
 2677|       |      // transpose pass 3
 2678|  2.83M|      dct_interleave8(p0, p2); // a0b0c0d0...
  ------------------
  |  | 2575|  2.83M|      tmp = a; \
  |  | 2576|  2.83M|      a = _mm_unpacklo_epi8(a, b); \
  |  | 2577|  2.83M|      b = _mm_unpackhi_epi8(tmp, b)
  ------------------
 2679|  2.83M|      dct_interleave8(p1, p3); // a4b4c4d4...
  ------------------
  |  | 2575|  2.83M|      tmp = a; \
  |  | 2576|  2.83M|      a = _mm_unpacklo_epi8(a, b); \
  |  | 2577|  2.83M|      b = _mm_unpackhi_epi8(tmp, b)
  ------------------
 2680|       |
 2681|       |      // store
 2682|  2.83M|      _mm_storel_epi64((__m128i *) out, p0); out += out_stride;
 2683|  2.83M|      _mm_storel_epi64((__m128i *) out, _mm_shuffle_epi32(p0, 0x4e)); out += out_stride;
 2684|  2.83M|      _mm_storel_epi64((__m128i *) out, p2); out += out_stride;
 2685|  2.83M|      _mm_storel_epi64((__m128i *) out, _mm_shuffle_epi32(p2, 0x4e)); out += out_stride;
 2686|  2.83M|      _mm_storel_epi64((__m128i *) out, p1); out += out_stride;
 2687|  2.83M|      _mm_storel_epi64((__m128i *) out, _mm_shuffle_epi32(p1, 0x4e)); out += out_stride;
 2688|  2.83M|      _mm_storel_epi64((__m128i *) out, p3); out += out_stride;
 2689|  2.83M|      _mm_storel_epi64((__m128i *) out, _mm_shuffle_epi32(p3, 0x4e));
 2690|  2.83M|   }
 2691|       |
 2692|  2.83M|#undef dct_const
 2693|  2.83M|#undef dct_rot
 2694|  2.83M|#undef dct_widen
 2695|  2.83M|#undef dct_wadd
 2696|  2.83M|#undef dct_wsub
 2697|  2.83M|#undef dct_bfly32o
 2698|  2.83M|#undef dct_interleave8
 2699|  2.83M|#undef dct_interleave16
 2700|  2.83M|#undef dct_pass
 2701|  2.83M|}
fuzz_gltf.cc:_ZL23stbi__YCbCr_to_RGB_simdPhPKhS1_S1_ii:
 3685|  10.8M|{
 3686|  10.8M|   int i = 0;
 3687|       |
 3688|  10.8M|#ifdef STBI_SSE2
 3689|       |   // step == 3 is pretty ugly on the final interleave, and i'm not convinced
 3690|       |   // it's useful in practice (you wouldn't use it for textures, for example).
 3691|       |   // so just accelerate step == 4 case.
 3692|  10.8M|   if (step == 4) {
  ------------------
  |  Branch (3692:8): [True: 10.8M, False: 0]
  ------------------
 3693|       |      // this is a fairly straightforward implementation and not super-optimized.
 3694|  10.8M|      __m128i signflip  = _mm_set1_epi8(-0x80);
 3695|  10.8M|      __m128i cr_const0 = _mm_set1_epi16(   (short) ( 1.40200f*4096.0f+0.5f));
 3696|  10.8M|      __m128i cr_const1 = _mm_set1_epi16( - (short) ( 0.71414f*4096.0f+0.5f));
 3697|  10.8M|      __m128i cb_const0 = _mm_set1_epi16( - (short) ( 0.34414f*4096.0f+0.5f));
 3698|  10.8M|      __m128i cb_const1 = _mm_set1_epi16(   (short) ( 1.77200f*4096.0f+0.5f));
 3699|  10.8M|      __m128i y_bias = _mm_set1_epi8((char) (unsigned char) 128);
 3700|  10.8M|      __m128i xw = _mm_set1_epi16(255); // alpha channel
 3701|       |
 3702|   244M|      for (; i+7 < count; i += 8) {
  ------------------
  |  Branch (3702:14): [True: 233M, False: 10.8M]
  ------------------
 3703|       |         // load
 3704|   233M|         __m128i y_bytes = _mm_loadl_epi64((__m128i *) (y+i));
 3705|   233M|         __m128i cr_bytes = _mm_loadl_epi64((__m128i *) (pcr+i));
 3706|   233M|         __m128i cb_bytes = _mm_loadl_epi64((__m128i *) (pcb+i));
 3707|   233M|         __m128i cr_biased = _mm_xor_si128(cr_bytes, signflip); // -128
 3708|   233M|         __m128i cb_biased = _mm_xor_si128(cb_bytes, signflip); // -128
 3709|       |
 3710|       |         // unpack to short (and left-shift cr, cb by 8)
 3711|   233M|         __m128i yw  = _mm_unpacklo_epi8(y_bias, y_bytes);
 3712|   233M|         __m128i crw = _mm_unpacklo_epi8(_mm_setzero_si128(), cr_biased);
 3713|   233M|         __m128i cbw = _mm_unpacklo_epi8(_mm_setzero_si128(), cb_biased);
 3714|       |
 3715|       |         // color transform
 3716|   233M|         __m128i yws = _mm_srli_epi16(yw, 4);
 3717|   233M|         __m128i cr0 = _mm_mulhi_epi16(cr_const0, crw);
 3718|   233M|         __m128i cb0 = _mm_mulhi_epi16(cb_const0, cbw);
 3719|   233M|         __m128i cb1 = _mm_mulhi_epi16(cbw, cb_const1);
 3720|   233M|         __m128i cr1 = _mm_mulhi_epi16(crw, cr_const1);
 3721|   233M|         __m128i rws = _mm_add_epi16(cr0, yws);
 3722|   233M|         __m128i gwt = _mm_add_epi16(cb0, yws);
 3723|   233M|         __m128i bws = _mm_add_epi16(yws, cb1);
 3724|   233M|         __m128i gws = _mm_add_epi16(gwt, cr1);
 3725|       |
 3726|       |         // descale
 3727|   233M|         __m128i rw = _mm_srai_epi16(rws, 4);
 3728|   233M|         __m128i bw = _mm_srai_epi16(bws, 4);
 3729|   233M|         __m128i gw = _mm_srai_epi16(gws, 4);
 3730|       |
 3731|       |         // back to byte, set up for transpose
 3732|   233M|         __m128i brb = _mm_packus_epi16(rw, bw);
 3733|   233M|         __m128i gxb = _mm_packus_epi16(gw, xw);
 3734|       |
 3735|       |         // transpose to interleave channels
 3736|   233M|         __m128i t0 = _mm_unpacklo_epi8(brb, gxb);
 3737|   233M|         __m128i t1 = _mm_unpackhi_epi8(brb, gxb);
 3738|   233M|         __m128i o0 = _mm_unpacklo_epi16(t0, t1);
 3739|   233M|         __m128i o1 = _mm_unpackhi_epi16(t0, t1);
 3740|       |
 3741|       |         // store
 3742|   233M|         _mm_storeu_si128((__m128i *) (out + 0), o0);
 3743|   233M|         _mm_storeu_si128((__m128i *) (out + 16), o1);
 3744|   233M|         out += 32;
 3745|   233M|      }
 3746|  10.8M|   }
 3747|  10.8M|#endif
 3748|       |
 3749|       |#ifdef STBI_NEON
 3750|       |   // in this version, step=3 support would be easy to add. but is there demand?
 3751|       |   if (step == 4) {
 3752|       |      // this is a fairly straightforward implementation and not super-optimized.
 3753|       |      uint8x8_t signflip = vdup_n_u8(0x80);
 3754|       |      int16x8_t cr_const0 = vdupq_n_s16(   (short) ( 1.40200f*4096.0f+0.5f));
 3755|       |      int16x8_t cr_const1 = vdupq_n_s16( - (short) ( 0.71414f*4096.0f+0.5f));
 3756|       |      int16x8_t cb_const0 = vdupq_n_s16( - (short) ( 0.34414f*4096.0f+0.5f));
 3757|       |      int16x8_t cb_const1 = vdupq_n_s16(   (short) ( 1.77200f*4096.0f+0.5f));
 3758|       |
 3759|       |      for (; i+7 < count; i += 8) {
 3760|       |         // load
 3761|       |         uint8x8_t y_bytes  = vld1_u8(y + i);
 3762|       |         uint8x8_t cr_bytes = vld1_u8(pcr + i);
 3763|       |         uint8x8_t cb_bytes = vld1_u8(pcb + i);
 3764|       |         int8x8_t cr_biased = vreinterpret_s8_u8(vsub_u8(cr_bytes, signflip));
 3765|       |         int8x8_t cb_biased = vreinterpret_s8_u8(vsub_u8(cb_bytes, signflip));
 3766|       |
 3767|       |         // expand to s16
 3768|       |         int16x8_t yws = vreinterpretq_s16_u16(vshll_n_u8(y_bytes, 4));
 3769|       |         int16x8_t crw = vshll_n_s8(cr_biased, 7);
 3770|       |         int16x8_t cbw = vshll_n_s8(cb_biased, 7);
 3771|       |
 3772|       |         // color transform
 3773|       |         int16x8_t cr0 = vqdmulhq_s16(crw, cr_const0);
 3774|       |         int16x8_t cb0 = vqdmulhq_s16(cbw, cb_const0);
 3775|       |         int16x8_t cr1 = vqdmulhq_s16(crw, cr_const1);
 3776|       |         int16x8_t cb1 = vqdmulhq_s16(cbw, cb_const1);
 3777|       |         int16x8_t rws = vaddq_s16(yws, cr0);
 3778|       |         int16x8_t gws = vaddq_s16(vaddq_s16(yws, cb0), cr1);
 3779|       |         int16x8_t bws = vaddq_s16(yws, cb1);
 3780|       |
 3781|       |         // undo scaling, round, convert to byte
 3782|       |         uint8x8x4_t o;
 3783|       |         o.val[0] = vqrshrun_n_s16(rws, 4);
 3784|       |         o.val[1] = vqrshrun_n_s16(gws, 4);
 3785|       |         o.val[2] = vqrshrun_n_s16(bws, 4);
 3786|       |         o.val[3] = vdup_n_u8(255);
 3787|       |
 3788|       |         // store, interleaving r/g/b/a
 3789|       |         vst4_u8(out, o);
 3790|       |         out += 8*4;
 3791|       |      }
 3792|       |   }
 3793|       |#endif
 3794|       |
 3795|  48.9M|   for (; i < count; ++i) {
  ------------------
  |  Branch (3795:11): [True: 38.1M, False: 10.8M]
  ------------------
 3796|  38.1M|      int y_fixed = (y[i] << 20) + (1<<19); // rounding
 3797|  38.1M|      int r,g,b;
 3798|  38.1M|      int cr = pcr[i] - 128;
 3799|  38.1M|      int cb = pcb[i] - 128;
 3800|  38.1M|      r = y_fixed + cr* stbi__float2fixed(1.40200f);
  ------------------
  |  | 3657|  38.1M|#define stbi__float2fixed(x)  (((int) ((x) * 4096.0f + 0.5f)) << 8)
  ------------------
 3801|  38.1M|      g = y_fixed + cr*-stbi__float2fixed(0.71414f) + ((cb*-stbi__float2fixed(0.34414f)) & 0xffff0000);
  ------------------
  |  | 3657|  38.1M|#define stbi__float2fixed(x)  (((int) ((x) * 4096.0f + 0.5f)) << 8)
  ------------------
                    g = y_fixed + cr*-stbi__float2fixed(0.71414f) + ((cb*-stbi__float2fixed(0.34414f)) & 0xffff0000);
  ------------------
  |  | 3657|  38.1M|#define stbi__float2fixed(x)  (((int) ((x) * 4096.0f + 0.5f)) << 8)
  ------------------
 3802|  38.1M|      b = y_fixed                                   +   cb* stbi__float2fixed(1.77200f);
  ------------------
  |  | 3657|  38.1M|#define stbi__float2fixed(x)  (((int) ((x) * 4096.0f + 0.5f)) << 8)
  ------------------
 3803|  38.1M|      r >>= 20;
 3804|  38.1M|      g >>= 20;
 3805|  38.1M|      b >>= 20;
 3806|  38.1M|      if ((unsigned) r > 255) { if (r < 0) r = 0; else r = 255; }
  ------------------
  |  Branch (3806:11): [True: 31.5M, False: 6.59M]
  |  Branch (3806:37): [True: 22.9M, False: 8.53M]
  ------------------
 3807|  38.1M|      if ((unsigned) g > 255) { if (g < 0) g = 0; else g = 255; }
  ------------------
  |  Branch (3807:11): [True: 3.85M, False: 34.2M]
  |  Branch (3807:37): [True: 1.08M, False: 2.76M]
  ------------------
 3808|  38.1M|      if ((unsigned) b > 255) { if (b < 0) b = 0; else b = 255; }
  ------------------
  |  Branch (3808:11): [True: 30.8M, False: 7.30M]
  |  Branch (3808:37): [True: 21.1M, False: 9.69M]
  ------------------
 3809|  38.1M|      out[0] = (stbi_uc)r;
 3810|  38.1M|      out[1] = (stbi_uc)g;
 3811|  38.1M|      out[2] = (stbi_uc)b;
 3812|  38.1M|      out[3] = 255;
 3813|  38.1M|      out += step;
 3814|  38.1M|   }
 3815|  10.8M|}
fuzz_gltf.cc:_ZL28stbi__resample_row_hv_2_simdPhS_S_ii:
 3529|  3.24M|{
 3530|       |   // need to generate 2x2 samples for every one in input
 3531|  3.24M|   int i=0,t0,t1;
 3532|       |
 3533|  3.24M|   if (w == 1) {
  ------------------
  |  Branch (3533:8): [True: 1.13M, False: 2.10M]
  ------------------
 3534|  1.13M|      out[0] = out[1] = stbi__div4(3*in_near[0] + in_far[0] + 2);
  ------------------
  |  | 3452|  1.13M|#define stbi__div4(x) ((stbi_uc) ((x) >> 2))
  ------------------
 3535|  1.13M|      return out;
 3536|  1.13M|   }
 3537|       |
 3538|  2.10M|   t1 = 3*in_near[0] + in_far[0];
 3539|       |   // process groups of 8 pixels for as long as we can.
 3540|       |   // note we can't handle the last pixel in a row in this loop
 3541|       |   // because we need to handle the filter boundary conditions.
 3542|  27.8M|   for (; i < ((w-1) & ~7); i += 8) {
  ------------------
  |  Branch (3542:11): [True: 25.7M, False: 2.10M]
  ------------------
 3543|  25.7M|#if defined(STBI_SSE2)
 3544|       |      // load and perform the vertical filtering pass
 3545|       |      // this uses 3*x + y = 4*x + (y - x)
 3546|  25.7M|      __m128i zero  = _mm_setzero_si128();
 3547|  25.7M|      __m128i farb  = _mm_loadl_epi64((__m128i *) (in_far + i));
 3548|  25.7M|      __m128i nearb = _mm_loadl_epi64((__m128i *) (in_near + i));
 3549|  25.7M|      __m128i farw  = _mm_unpacklo_epi8(farb, zero);
 3550|  25.7M|      __m128i nearw = _mm_unpacklo_epi8(nearb, zero);
 3551|  25.7M|      __m128i diff  = _mm_sub_epi16(farw, nearw);
 3552|  25.7M|      __m128i nears = _mm_slli_epi16(nearw, 2);
 3553|  25.7M|      __m128i curr  = _mm_add_epi16(nears, diff); // current row
 3554|       |
 3555|       |      // horizontal filter works the same based on shifted vers of current
 3556|       |      // row. "prev" is current row shifted right by 1 pixel; we need to
 3557|       |      // insert the previous pixel value (from t1).
 3558|       |      // "next" is current row shifted left by 1 pixel, with first pixel
 3559|       |      // of next block of 8 pixels added in.
 3560|  25.7M|      __m128i prv0 = _mm_slli_si128(curr, 2);
 3561|  25.7M|      __m128i nxt0 = _mm_srli_si128(curr, 2);
 3562|  25.7M|      __m128i prev = _mm_insert_epi16(prv0, t1, 0);
 3563|  25.7M|      __m128i next = _mm_insert_epi16(nxt0, 3*in_near[i+8] + in_far[i+8], 7);
 3564|       |
 3565|       |      // horizontal filter, polyphase implementation since it's convenient:
 3566|       |      // even pixels = 3*cur + prev = cur*4 + (prev - cur)
 3567|       |      // odd  pixels = 3*cur + next = cur*4 + (next - cur)
 3568|       |      // note the shared term.
 3569|  25.7M|      __m128i bias  = _mm_set1_epi16(8);
 3570|  25.7M|      __m128i curs = _mm_slli_epi16(curr, 2);
 3571|  25.7M|      __m128i prvd = _mm_sub_epi16(prev, curr);
 3572|  25.7M|      __m128i nxtd = _mm_sub_epi16(next, curr);
 3573|  25.7M|      __m128i curb = _mm_add_epi16(curs, bias);
 3574|  25.7M|      __m128i even = _mm_add_epi16(prvd, curb);
 3575|  25.7M|      __m128i odd  = _mm_add_epi16(nxtd, curb);
 3576|       |
 3577|       |      // interleave even and odd pixels, then undo scaling.
 3578|  25.7M|      __m128i int0 = _mm_unpacklo_epi16(even, odd);
 3579|  25.7M|      __m128i int1 = _mm_unpackhi_epi16(even, odd);
 3580|  25.7M|      __m128i de0  = _mm_srli_epi16(int0, 4);
 3581|  25.7M|      __m128i de1  = _mm_srli_epi16(int1, 4);
 3582|       |
 3583|       |      // pack and write output
 3584|  25.7M|      __m128i outv = _mm_packus_epi16(de0, de1);
 3585|  25.7M|      _mm_storeu_si128((__m128i *) (out + i*2), outv);
 3586|       |#elif defined(STBI_NEON)
 3587|       |      // load and perform the vertical filtering pass
 3588|       |      // this uses 3*x + y = 4*x + (y - x)
 3589|       |      uint8x8_t farb  = vld1_u8(in_far + i);
 3590|       |      uint8x8_t nearb = vld1_u8(in_near + i);
 3591|       |      int16x8_t diff  = vreinterpretq_s16_u16(vsubl_u8(farb, nearb));
 3592|       |      int16x8_t nears = vreinterpretq_s16_u16(vshll_n_u8(nearb, 2));
 3593|       |      int16x8_t curr  = vaddq_s16(nears, diff); // current row
 3594|       |
 3595|       |      // horizontal filter works the same based on shifted vers of current
 3596|       |      // row. "prev" is current row shifted right by 1 pixel; we need to
 3597|       |      // insert the previous pixel value (from t1).
 3598|       |      // "next" is current row shifted left by 1 pixel, with first pixel
 3599|       |      // of next block of 8 pixels added in.
 3600|       |      int16x8_t prv0 = vextq_s16(curr, curr, 7);
 3601|       |      int16x8_t nxt0 = vextq_s16(curr, curr, 1);
 3602|       |      int16x8_t prev = vsetq_lane_s16(t1, prv0, 0);
 3603|       |      int16x8_t next = vsetq_lane_s16(3*in_near[i+8] + in_far[i+8], nxt0, 7);
 3604|       |
 3605|       |      // horizontal filter, polyphase implementation since it's convenient:
 3606|       |      // even pixels = 3*cur + prev = cur*4 + (prev - cur)
 3607|       |      // odd  pixels = 3*cur + next = cur*4 + (next - cur)
 3608|       |      // note the shared term.
 3609|       |      int16x8_t curs = vshlq_n_s16(curr, 2);
 3610|       |      int16x8_t prvd = vsubq_s16(prev, curr);
 3611|       |      int16x8_t nxtd = vsubq_s16(next, curr);
 3612|       |      int16x8_t even = vaddq_s16(curs, prvd);
 3613|       |      int16x8_t odd  = vaddq_s16(curs, nxtd);
 3614|       |
 3615|       |      // undo scaling and round, then store with even/odd phases interleaved
 3616|       |      uint8x8x2_t o;
 3617|       |      o.val[0] = vqrshrun_n_s16(even, 4);
 3618|       |      o.val[1] = vqrshrun_n_s16(odd,  4);
 3619|       |      vst2_u8(out + i*2, o);
 3620|       |#endif
 3621|       |
 3622|       |      // "previous" value for next iter
 3623|  25.7M|      t1 = 3*in_near[i+7] + in_far[i+7];
 3624|  25.7M|   }
 3625|       |
 3626|  2.10M|   t0 = t1;
 3627|  2.10M|   t1 = 3*in_near[i] + in_far[i];
 3628|  2.10M|   out[i*2] = stbi__div16(3*t1 + t0 + 8);
  ------------------
  |  | 3501|  2.10M|#define stbi__div16(x) ((stbi_uc) ((x) >> 4))
  ------------------
 3629|       |
 3630|  11.6M|   for (++i; i < w; ++i) {
  ------------------
  |  Branch (3630:14): [True: 9.50M, False: 2.10M]
  ------------------
 3631|  9.50M|      t0 = t1;
 3632|  9.50M|      t1 = 3*in_near[i]+in_far[i];
 3633|  9.50M|      out[i*2-1] = stbi__div16(3*t0 + t1 + 8);
  ------------------
  |  | 3501|  9.50M|#define stbi__div16(x) ((stbi_uc) ((x) >> 4))
  ------------------
 3634|  9.50M|      out[i*2  ] = stbi__div16(3*t1 + t0 + 8);
  ------------------
  |  | 3501|  9.50M|#define stbi__div16(x) ((stbi_uc) ((x) >> 4))
  ------------------
 3635|  9.50M|   }
 3636|  2.10M|   out[w*2-1] = stbi__div4(t1+2);
  ------------------
  |  | 3452|  2.10M|#define stbi__div4(x) ((stbi_uc) ((x) >> 2))
  ------------------
 3637|       |
 3638|  2.10M|   STBI_NOTUSED(hs);
  ------------------
  |  |  658|  2.10M|#define STBI_NOTUSED(v)  (void)sizeof(v)
  ------------------
 3639|       |
 3640|  2.10M|   return out;
 3641|  3.24M|}
fuzz_gltf.cc:_ZL24stbi__decode_jpeg_headerP10stbi__jpegi:
 3364|  28.6k|{
 3365|  28.6k|   int m;
 3366|  28.6k|   z->jfif = 0;
 3367|  28.6k|   z->app14_color_transform = -1; // valid values are 0,1,2
 3368|  28.6k|   z->marker = STBI__MARKER_none; // initialize cached marker to empty
  ------------------
  |  | 2913|  28.6k|#define STBI__MARKER_none  0xff
  ------------------
 3369|  28.6k|   m = stbi__get_marker(z);
 3370|  28.6k|   if (!stbi__SOI(m)) return stbi__err("no SOI","Corrupt JPEG");
  ------------------
  |  | 3356|  28.6k|#define stbi__SOI(x)         ((x) == 0xd8)
  ------------------
                 if (!stbi__SOI(m)) return stbi__err("no SOI","Corrupt JPEG");
  ------------------
  |  | 1093|  12.7k|   #define stbi__err(x,y)  stbi__err(x)
  ------------------
  |  Branch (3370:8): [True: 12.7k, False: 15.9k]
  ------------------
 3371|  15.9k|   if (scan == STBI__SCAN_type) return 1;
  ------------------
  |  Branch (3371:8): [True: 7.96k, False: 7.96k]
  ------------------
 3372|  7.96k|   m = stbi__get_marker(z);
 3373|  10.9k|   while (!stbi__SOF(m)) {
  ------------------
  |  | 3358|  10.9k|#define stbi__SOF(x)         ((x) == 0xc0 || (x) == 0xc1 || (x) == 0xc2)
  |  |  ------------------
  |  |  |  Branch (3358:31): [True: 3.46k, False: 7.48k]
  |  |  |  Branch (3358:46): [True: 2.91k, False: 4.57k]
  |  |  |  Branch (3358:61): [True: 1.53k, False: 3.03k]
  |  |  ------------------
  ------------------
 3374|  3.03k|      if (!stbi__process_marker(z,m)) return 0;
  ------------------
  |  Branch (3374:11): [True: 36, False: 3.00k]
  ------------------
 3375|  3.00k|      m = stbi__get_marker(z);
 3376|  6.64k|      while (m == STBI__MARKER_none) {
  ------------------
  |  | 2913|  6.64k|#define STBI__MARKER_none  0xff
  ------------------
  |  Branch (3376:14): [True: 3.66k, False: 2.98k]
  ------------------
 3377|       |         // some files have extra padding after their blocks, so ok, we'll scan
 3378|  3.66k|         if (stbi__at_eof(z->s)) return stbi__err("no SOF", "Corrupt JPEG");
  ------------------
  |  | 1093|     16|   #define stbi__err(x,y)  stbi__err(x)
  ------------------
  |  Branch (3378:14): [True: 16, False: 3.64k]
  ------------------
 3379|  3.64k|         m = stbi__get_marker(z);
 3380|  3.64k|      }
 3381|  3.00k|   }
 3382|  7.91k|   z->progressive = stbi__SOF_progressive(m);
  ------------------
  |  | 3361|  7.91k|#define stbi__SOF_progressive(x)   ((x) == 0xc2)
  ------------------
 3383|  7.91k|   if (!stbi__process_frame_header(z, scan)) return 0;
  ------------------
  |  Branch (3383:8): [True: 28, False: 7.88k]
  ------------------
 3384|  7.88k|   return 1;
 3385|  7.91k|}
fuzz_gltf.cc:_ZL16stbi__get_markerP10stbi__jpeg:
 2918|  51.6k|{
 2919|  51.6k|   stbi_uc x;
 2920|  51.6k|   if (j->marker != STBI__MARKER_none) { x = j->marker; j->marker = STBI__MARKER_none; return x; }
  ------------------
  |  | 2913|  51.6k|#define STBI__MARKER_none  0xff
  ------------------
                 if (j->marker != STBI__MARKER_none) { x = j->marker; j->marker = STBI__MARKER_none; return x; }
  ------------------
  |  | 2913|      0|#define STBI__MARKER_none  0xff
  ------------------
  |  Branch (2920:8): [True: 0, False: 51.6k]
  ------------------
 2921|  51.6k|   x = stbi__get8(j->s);
 2922|  51.6k|   if (x != 0xff) return STBI__MARKER_none;
  ------------------
  |  | 2913|  19.2k|#define STBI__MARKER_none  0xff
  ------------------
  |  Branch (2922:8): [True: 19.2k, False: 32.3k]
  ------------------
 2923|  92.9k|   while (x == 0xff)
  ------------------
  |  Branch (2923:11): [True: 60.6k, False: 32.3k]
  ------------------
 2924|  60.6k|      x = stbi__get8(j->s); // consume repeated 0xff fill bytes
 2925|  32.3k|   return x;
 2926|  51.6k|}
fuzz_gltf.cc:_ZL20stbi__process_markerP10stbi__jpegi:
 3098|  10.4k|{
 3099|  10.4k|   int L;
 3100|  10.4k|   switch (m) {
  ------------------
  |  Branch (3100:12): [True: 4.47k, False: 5.99k]
  ------------------
 3101|  2.89k|      case STBI__MARKER_none: // no marker found
  ------------------
  |  | 2913|  2.89k|#define STBI__MARKER_none  0xff
  ------------------
  |  Branch (3101:7): [True: 2.89k, False: 7.57k]
  ------------------
 3102|  2.89k|         return stbi__err("expected marker","Corrupt JPEG");
  ------------------
  |  | 1093|  2.89k|   #define stbi__err(x,y)  stbi__err(x)
  ------------------
 3103|       |
 3104|    176|      case 0xDD: // DRI - specify restart interval
  ------------------
  |  Branch (3104:7): [True: 176, False: 10.2k]
  ------------------
 3105|    176|         if (stbi__get16be(z->s) != 4) return stbi__err("bad DRI len","Corrupt JPEG");
  ------------------
  |  | 1093|    176|   #define stbi__err(x,y)  stbi__err(x)
  ------------------
  |  Branch (3105:14): [True: 176, False: 0]
  ------------------
 3106|      0|         z->restart_interval = stbi__get16be(z->s);
 3107|      0|         return 1;
 3108|       |
 3109|    868|      case 0xDB: // DQT - define quantization table
  ------------------
  |  Branch (3109:7): [True: 868, False: 9.60k]
  ------------------
 3110|    868|         L = stbi__get16be(z->s)-2;
 3111|   289k|         while (L > 0) {
  ------------------
  |  Branch (3111:17): [True: 289k, False: 463]
  ------------------
 3112|   289k|            int q = stbi__get8(z->s);
 3113|   289k|            int p = q >> 4, sixteen = (p != 0);
 3114|   289k|            int t = q & 15,i;
 3115|   289k|            if (p != 0 && p != 1) return stbi__err("bad DQT type","Corrupt JPEG");
  ------------------
  |  | 1093|    229|   #define stbi__err(x,y)  stbi__err(x)
  ------------------
  |  Branch (3115:17): [True: 445, False: 288k]
  |  Branch (3115:27): [True: 229, False: 216]
  ------------------
 3116|   288k|            if (t > 3) return stbi__err("bad DQT table","Corrupt JPEG");
  ------------------
  |  | 1093|    176|   #define stbi__err(x,y)  stbi__err(x)
  ------------------
  |  Branch (3116:17): [True: 176, False: 288k]
  ------------------
 3117|       |
 3118|  18.7M|            for (i=0; i < 64; ++i)
  ------------------
  |  Branch (3118:23): [True: 18.4M, False: 288k]
  ------------------
 3119|  18.4M|               z->dequant[t][stbi__jpeg_dezigzag[i]] = (stbi__uint16)(sixteen ? stbi__get16be(z->s) : stbi__get8(z->s));
  ------------------
  |  Branch (3119:71): [True: 13.8k, False: 18.4M]
  ------------------
 3120|   288k|            L -= (sixteen ? 129 : 65);
  ------------------
  |  Branch (3120:19): [True: 216, False: 288k]
  ------------------
 3121|   288k|         }
 3122|    463|         return L==0;
 3123|       |
 3124|  2.04k|      case 0xC4: // DHT - define huffman table
  ------------------
  |  Branch (3124:7): [True: 2.04k, False: 8.42k]
  ------------------
 3125|  2.04k|         L = stbi__get16be(z->s)-2;
 3126|  47.0k|         while (L > 0) {
  ------------------
  |  Branch (3126:17): [True: 46.8k, False: 153]
  ------------------
 3127|  46.8k|            stbi_uc *v;
 3128|  46.8k|            int sizes[16],i,n=0;
 3129|  46.8k|            int q = stbi__get8(z->s);
 3130|  46.8k|            int tc = q >> 4;
 3131|  46.8k|            int th = q & 15;
 3132|  46.8k|            if (tc > 1 || th > 3) return stbi__err("bad DHT header","Corrupt JPEG");
  ------------------
  |  | 1093|    546|   #define stbi__err(x,y)  stbi__err(x)
  ------------------
  |  Branch (3132:17): [True: 361, False: 46.4k]
  |  Branch (3132:27): [True: 185, False: 46.3k]
  ------------------
 3133|   787k|            for (i=0; i < 16; ++i) {
  ------------------
  |  Branch (3133:23): [True: 740k, False: 46.3k]
  ------------------
 3134|   740k|               sizes[i] = stbi__get8(z->s);
 3135|   740k|               n += sizes[i];
 3136|   740k|            }
 3137|  46.3k|            if(n > 256) return stbi__err("bad DHT header","Corrupt JPEG"); // Loop over i < n would write past end of values!
  ------------------
  |  | 1093|    313|   #define stbi__err(x,y)  stbi__err(x)
  ------------------
  |  Branch (3137:16): [True: 313, False: 45.9k]
  ------------------
 3138|  45.9k|            L -= 17;
 3139|  45.9k|            if (tc == 0) {
  ------------------
  |  Branch (3139:17): [True: 43.8k, False: 2.16k]
  ------------------
 3140|  43.8k|               if (!stbi__build_huffman(z->huff_dc+th, sizes)) return 0;
  ------------------
  |  Branch (3140:20): [True: 650, False: 43.1k]
  ------------------
 3141|  43.1k|               v = z->huff_dc[th].values;
 3142|  43.1k|            } else {
 3143|  2.16k|               if (!stbi__build_huffman(z->huff_ac+th, sizes)) return 0;
  ------------------
  |  Branch (3143:20): [True: 386, False: 1.78k]
  ------------------
 3144|  1.78k|               v = z->huff_ac[th].values;
 3145|  1.78k|            }
 3146|  53.6k|            for (i=0; i < n; ++i)
  ------------------
  |  Branch (3146:23): [True: 8.69k, False: 44.9k]
  ------------------
 3147|  8.69k|               v[i] = stbi__get8(z->s);
 3148|  44.9k|            if (tc != 0)
  ------------------
  |  Branch (3148:17): [True: 1.78k, False: 43.1k]
  ------------------
 3149|  1.78k|               stbi__build_fast_ac(z->fast_ac[th], z->huff_ac + th);
 3150|  44.9k|            L -= n;
 3151|  44.9k|         }
 3152|    153|         return L==0;
 3153|  10.4k|   }
 3154|       |
 3155|       |   // check for comment block or APP blocks
 3156|  4.47k|   if ((m >= 0xE0 && m <= 0xEF) || m == 0xFE) {
  ------------------
  |  Branch (3156:9): [True: 3.81k, False: 664]
  |  Branch (3156:22): [True: 3.39k, False: 422]
  |  Branch (3156:36): [True: 262, False: 824]
  ------------------
 3157|  3.65k|      L = stbi__get16be(z->s);
 3158|  3.65k|      if (L < 2) {
  ------------------
  |  Branch (3158:11): [True: 381, False: 3.27k]
  ------------------
 3159|    381|         if (m == 0xFE)
  ------------------
  |  Branch (3159:14): [True: 185, False: 196]
  ------------------
 3160|    185|            return stbi__err("bad COM len","Corrupt JPEG");
  ------------------
  |  | 1093|    185|   #define stbi__err(x,y)  stbi__err(x)
  ------------------
 3161|    196|         else
 3162|    196|            return stbi__err("bad APP len","Corrupt JPEG");
  ------------------
  |  | 1093|    196|   #define stbi__err(x,y)  stbi__err(x)
  ------------------
 3163|    381|      }
 3164|  3.27k|      L -= 2;
 3165|       |
 3166|  3.27k|      if (m == 0xE0 && L >= 5) { // JFIF APP0 segment
  ------------------
  |  Branch (3166:11): [True: 1.87k, False: 1.40k]
  |  Branch (3166:24): [True: 454, False: 1.41k]
  ------------------
 3167|    454|         static const unsigned char tag[5] = {'J','F','I','F','\0'};
 3168|    454|         int ok = 1;
 3169|    454|         int i;
 3170|  2.72k|         for (i=0; i < 5; ++i)
  ------------------
  |  Branch (3170:20): [True: 2.27k, False: 454]
  ------------------
 3171|  2.27k|            if (stbi__get8(z->s) != tag[i])
  ------------------
  |  Branch (3171:17): [True: 1.94k, False: 325]
  ------------------
 3172|  1.94k|               ok = 0;
 3173|    454|         L -= 5;
 3174|    454|         if (ok)
  ------------------
  |  Branch (3174:14): [True: 0, False: 454]
  ------------------
 3175|      0|            z->jfif = 1;
 3176|  2.81k|      } else if (m == 0xEE && L >= 12) { // Adobe APP14 segment
  ------------------
  |  Branch (3176:18): [True: 1.05k, False: 1.76k]
  |  Branch (3176:31): [True: 1.05k, False: 0]
  ------------------
 3177|  1.05k|         static const unsigned char tag[6] = {'A','d','o','b','e','\0'};
 3178|  1.05k|         int ok = 1;
 3179|  1.05k|         int i;
 3180|  7.40k|         for (i=0; i < 6; ++i)
  ------------------
  |  Branch (3180:20): [True: 6.34k, False: 1.05k]
  ------------------
 3181|  6.34k|            if (stbi__get8(z->s) != tag[i])
  ------------------
  |  Branch (3181:17): [True: 5.78k, False: 567]
  ------------------
 3182|  5.78k|               ok = 0;
 3183|  1.05k|         L -= 6;
 3184|  1.05k|         if (ok) {
  ------------------
  |  Branch (3184:14): [True: 0, False: 1.05k]
  ------------------
 3185|      0|            stbi__get8(z->s); // version
 3186|      0|            stbi__get16be(z->s); // flags0
 3187|      0|            stbi__get16be(z->s); // flags1
 3188|      0|            z->app14_color_transform = stbi__get8(z->s); // color transform
 3189|      0|            L -= 6;
 3190|      0|         }
 3191|  1.05k|      }
 3192|       |
 3193|  3.27k|      stbi__skip(z->s, L);
 3194|  3.27k|      return 1;
 3195|  3.65k|   }
 3196|       |
 3197|    824|   return stbi__err("unknown marker","Corrupt JPEG");
  ------------------
  |  | 1093|    824|   #define stbi__err(x,y)  stbi__err(x)
  ------------------
 3198|  4.47k|}
fuzz_gltf.cc:_ZL19stbi__build_huffmanP13stbi__huffmanPi:
 2002|  45.9k|{
 2003|  45.9k|   int i,j,k=0;
 2004|  45.9k|   unsigned int code;
 2005|       |   // build size list for each symbol (from JPEG spec)
 2006|   781k|   for (i=0; i < 16; ++i) {
  ------------------
  |  Branch (2006:14): [True: 735k, False: 45.9k]
  ------------------
 2007|   823k|      for (j=0; j < count[i]; ++j) {
  ------------------
  |  Branch (2007:17): [True: 87.1k, False: 735k]
  ------------------
 2008|  87.1k|         h->size[k++] = (stbi_uc) (i+1);
 2009|  87.1k|         if(k >= 257) return stbi__err("bad size list","Corrupt JPEG");
  ------------------
  |  | 1093|      0|   #define stbi__err(x,y)  stbi__err(x)
  ------------------
  |  Branch (2009:13): [True: 0, False: 87.1k]
  ------------------
 2010|  87.1k|      }
 2011|   735k|   }
 2012|  45.9k|   h->size[k] = 0;
 2013|       |
 2014|       |   // compute actual symbols (from jpeg spec)
 2015|  45.9k|   code = 0;
 2016|  45.9k|   k = 0;
 2017|   765k|   for(j=1; j <= 16; ++j) {
  ------------------
  |  Branch (2017:13): [True: 720k, False: 44.9k]
  ------------------
 2018|       |      // compute delta to add to code to compute symbol id
 2019|   720k|      h->delta[j] = k - code;
 2020|   720k|      if (h->size[k] == j) {
  ------------------
  |  Branch (2020:11): [True: 3.55k, False: 716k]
  ------------------
 2021|  57.4k|         while (h->size[k] == j)
  ------------------
  |  Branch (2021:17): [True: 53.8k, False: 3.55k]
  ------------------
 2022|  53.8k|            h->code[k++] = (stbi__uint16) (code++);
 2023|  3.55k|         if (code-1 >= (1u << j)) return stbi__err("bad code lengths","Corrupt JPEG");
  ------------------
  |  | 1093|  1.03k|   #define stbi__err(x,y)  stbi__err(x)
  ------------------
  |  Branch (2023:14): [True: 1.03k, False: 2.52k]
  ------------------
 2024|  3.55k|      }
 2025|       |      // compute largest code + 1 for this size, preshifted as needed later
 2026|   719k|      h->maxcode[j] = code << (16-j);
 2027|   719k|      code <<= 1;
 2028|   719k|   }
 2029|  44.9k|   h->maxcode[j] = 0xffffffff;
 2030|       |
 2031|       |   // build non-spec acceleration table; 255 is flag for not-accelerated
 2032|  44.9k|   memset(h->fast, 255, 1 << FAST_BITS);
  ------------------
  |  | 1934|  44.9k|#define FAST_BITS   9  // larger handles more cases; smaller stomps less cache
  ------------------
 2033|  53.6k|   for (i=0; i < k; ++i) {
  ------------------
  |  Branch (2033:14): [True: 8.69k, False: 44.9k]
  ------------------
 2034|  8.69k|      int s = h->size[i];
 2035|  8.69k|      if (s <= FAST_BITS) {
  ------------------
  |  | 1934|  8.69k|#define FAST_BITS   9  // larger handles more cases; smaller stomps less cache
  ------------------
  |  Branch (2035:11): [True: 2.57k, False: 6.11k]
  ------------------
 2036|  2.57k|         int c = h->code[i] << (FAST_BITS-s);
  ------------------
  |  | 1934|  2.57k|#define FAST_BITS   9  // larger handles more cases; smaller stomps less cache
  ------------------
 2037|  2.57k|         int m = 1 << (FAST_BITS-s);
  ------------------
  |  | 1934|  2.57k|#define FAST_BITS   9  // larger handles more cases; smaller stomps less cache
  ------------------
 2038|  30.0k|         for (j=0; j < m; ++j) {
  ------------------
  |  Branch (2038:20): [True: 27.4k, False: 2.57k]
  ------------------
 2039|  27.4k|            h->fast[c+j] = (stbi_uc) i;
 2040|  27.4k|         }
 2041|  2.57k|      }
 2042|  8.69k|   }
 2043|  44.9k|   return 1;
 2044|  45.9k|}
fuzz_gltf.cc:_ZL19stbi__build_fast_acPsP13stbi__huffman:
 2049|  1.78k|{
 2050|  1.78k|   int i;
 2051|   913k|   for (i=0; i < (1 << FAST_BITS); ++i) {
  ------------------
  |  | 1934|   913k|#define FAST_BITS   9  // larger handles more cases; smaller stomps less cache
  ------------------
  |  Branch (2051:14): [True: 911k, False: 1.78k]
  ------------------
 2052|   911k|      stbi_uc fast = h->fast[i];
 2053|   911k|      fast_ac[i] = 0;
 2054|   911k|      if (fast < 255) {
  ------------------
  |  Branch (2054:11): [True: 10.0k, False: 901k]
  ------------------
 2055|  10.0k|         int rs = h->values[fast];
 2056|  10.0k|         int run = (rs >> 4) & 15;
 2057|  10.0k|         int magbits = rs & 15;
 2058|  10.0k|         int len = h->size[fast];
 2059|       |
 2060|  10.0k|         if (magbits && len + magbits <= FAST_BITS) {
  ------------------
  |  | 1934|  2.62k|#define FAST_BITS   9  // larger handles more cases; smaller stomps less cache
  ------------------
  |  Branch (2060:14): [True: 2.62k, False: 7.47k]
  |  Branch (2060:25): [True: 1.24k, False: 1.37k]
  ------------------
 2061|       |            // magnitude code followed by receive_extend code
 2062|  1.24k|            int k = ((i << len) & ((1 << FAST_BITS) - 1)) >> (FAST_BITS - magbits);
  ------------------
  |  | 1934|  1.24k|#define FAST_BITS   9  // larger handles more cases; smaller stomps less cache
  ------------------
                          int k = ((i << len) & ((1 << FAST_BITS) - 1)) >> (FAST_BITS - magbits);
  ------------------
  |  | 1934|  1.24k|#define FAST_BITS   9  // larger handles more cases; smaller stomps less cache
  ------------------
 2063|  1.24k|            int m = 1 << (magbits - 1);
 2064|  1.24k|            if (k < m) k += (~0U << magbits) + 1;
  ------------------
  |  Branch (2064:17): [True: 624, False: 624]
  ------------------
 2065|       |            // if the result is small enough, we can fit it in fast_ac table
 2066|  1.24k|            if (k >= -128 && k <= 127)
  ------------------
  |  Branch (2066:17): [True: 1.24k, False: 0]
  |  Branch (2066:30): [True: 1.24k, False: 0]
  ------------------
 2067|  1.24k|               fast_ac[i] = (stbi__int16) ((k * 256) + (run * 16) + (len + magbits));
 2068|  1.24k|         }
 2069|  10.0k|      }
 2070|   911k|   }
 2071|  1.78k|}
fuzz_gltf.cc:_ZL26stbi__process_frame_headerP10stbi__jpegi:
 3263|  7.91k|{
 3264|  7.91k|   stbi__context *s = z->s;
 3265|  7.91k|   int Lf,p,i,q, h_max=1,v_max=1,c;
 3266|  7.91k|   Lf = stbi__get16be(s);         if (Lf < 11) return stbi__err("bad SOF len","Corrupt JPEG"); // JPEG
  ------------------
  |  | 1093|      0|   #define stbi__err(x,y)  stbi__err(x)
  ------------------
  |  Branch (3266:39): [True: 0, False: 7.91k]
  ------------------
 3267|  7.91k|   p  = stbi__get8(s);            if (p != 8) return stbi__err("only 8-bit","JPEG format not supported: 8-bit only"); // JPEG baseline
  ------------------
  |  | 1093|      0|   #define stbi__err(x,y)  stbi__err(x)
  ------------------
  |  Branch (3267:39): [True: 0, False: 7.91k]
  ------------------
 3268|  7.91k|   s->img_y = stbi__get16be(s);   if (s->img_y == 0) return stbi__err("no header height", "JPEG format not supported: delayed height"); // Legal, but we don't handle it--but neither does IJG
  ------------------
  |  | 1093|      3|   #define stbi__err(x,y)  stbi__err(x)
  ------------------
  |  Branch (3268:39): [True: 3, False: 7.90k]
  ------------------
 3269|  7.90k|   s->img_x = stbi__get16be(s);   if (s->img_x == 0) return stbi__err("0 width","Corrupt JPEG"); // JPEG requires
  ------------------
  |  | 1093|      1|   #define stbi__err(x,y)  stbi__err(x)
  ------------------
  |  Branch (3269:39): [True: 1, False: 7.90k]
  ------------------
 3270|  7.90k|   if (s->img_y > STBI_MAX_DIMENSIONS) return stbi__err("too large","Very large image (corrupt?)");
  ------------------
  |  |  794|  7.90k|#define STBI_MAX_DIMENSIONS (1 << 24)
  ------------------
                 if (s->img_y > STBI_MAX_DIMENSIONS) return stbi__err("too large","Very large image (corrupt?)");
  ------------------
  |  | 1093|      0|   #define stbi__err(x,y)  stbi__err(x)
  ------------------
  |  Branch (3270:8): [True: 0, False: 7.90k]
  ------------------
 3271|  7.90k|   if (s->img_x > STBI_MAX_DIMENSIONS) return stbi__err("too large","Very large image (corrupt?)");
  ------------------
  |  |  794|  7.90k|#define STBI_MAX_DIMENSIONS (1 << 24)
  ------------------
                 if (s->img_x > STBI_MAX_DIMENSIONS) return stbi__err("too large","Very large image (corrupt?)");
  ------------------
  |  | 1093|      0|   #define stbi__err(x,y)  stbi__err(x)
  ------------------
  |  Branch (3271:8): [True: 0, False: 7.90k]
  ------------------
 3272|  7.90k|   c = stbi__get8(s);
 3273|  7.90k|   if (c != 3 && c != 1 && c != 4) return stbi__err("bad component count","Corrupt JPEG");
  ------------------
  |  | 1093|      5|   #define stbi__err(x,y)  stbi__err(x)
  ------------------
  |  Branch (3273:8): [True: 7.90k, False: 2]
  |  Branch (3273:18): [True: 7.90k, False: 1]
  |  Branch (3273:28): [True: 5, False: 7.90k]
  ------------------
 3274|  7.90k|   s->img_n = c;
 3275|  39.5k|   for (i=0; i < c; ++i) {
  ------------------
  |  Branch (3275:14): [True: 31.6k, False: 7.90k]
  ------------------
 3276|  31.6k|      z->img_comp[i].data = NULL;
 3277|  31.6k|      z->img_comp[i].linebuf = NULL;
 3278|  31.6k|   }
 3279|       |
 3280|  7.90k|   if (Lf != 8+3*s->img_n) return stbi__err("bad SOF len","Corrupt JPEG");
  ------------------
  |  | 1093|      2|   #define stbi__err(x,y)  stbi__err(x)
  ------------------
  |  Branch (3280:8): [True: 2, False: 7.90k]
  ------------------
 3281|       |
 3282|  7.90k|   z->rgb = 0;
 3283|  39.4k|   for (i=0; i < s->img_n; ++i) {
  ------------------
  |  Branch (3283:14): [True: 31.5k, False: 7.88k]
  ------------------
 3284|  31.5k|      static const unsigned char rgb[3] = { 'R', 'G', 'B' };
 3285|  31.5k|      z->img_comp[i].id = stbi__get8(s);
 3286|  31.5k|      if (s->img_n == 3 && z->img_comp[i].id == rgb[i])
  ------------------
  |  Branch (3286:11): [True: 1, False: 31.5k]
  |  Branch (3286:28): [True: 0, False: 1]
  ------------------
 3287|      0|         ++z->rgb;
 3288|  31.5k|      q = stbi__get8(s);
 3289|  31.5k|      z->img_comp[i].h = (q >> 4);  if (!z->img_comp[i].h || z->img_comp[i].h > 4) return stbi__err("bad H","Corrupt JPEG");
  ------------------
  |  | 1093|     11|   #define stbi__err(x,y)  stbi__err(x)
  ------------------
  |  Branch (3289:41): [True: 8, False: 31.5k]
  |  Branch (3289:62): [True: 3, False: 31.5k]
  ------------------
 3290|  31.5k|      z->img_comp[i].v = q & 15;    if (!z->img_comp[i].v || z->img_comp[i].v > 4) return stbi__err("bad V","Corrupt JPEG");
  ------------------
  |  | 1093|      5|   #define stbi__err(x,y)  stbi__err(x)
  ------------------
  |  Branch (3290:41): [True: 3, False: 31.5k]
  |  Branch (3290:62): [True: 2, False: 31.5k]
  ------------------
 3291|  31.5k|      z->img_comp[i].tq = stbi__get8(s);  if (z->img_comp[i].tq > 3) return stbi__err("bad TQ","Corrupt JPEG");
  ------------------
  |  | 1093|      1|   #define stbi__err(x,y)  stbi__err(x)
  ------------------
  |  Branch (3291:47): [True: 1, False: 31.5k]
  ------------------
 3292|  31.5k|   }
 3293|       |
 3294|  7.88k|   if (scan != STBI__SCAN_load) return 1;
  ------------------
  |  Branch (3294:8): [True: 0, False: 7.88k]
  ------------------
 3295|       |
 3296|  7.88k|   if (!stbi__mad3sizes_valid(s->img_x, s->img_y, s->img_n, 0)) return stbi__err("too large", "Image too large to decode");
  ------------------
  |  | 1093|      0|   #define stbi__err(x,y)  stbi__err(x)
  ------------------
  |  Branch (3296:8): [True: 0, False: 7.88k]
  ------------------
 3297|       |
 3298|  39.4k|   for (i=0; i < s->img_n; ++i) {
  ------------------
  |  Branch (3298:14): [True: 31.5k, False: 7.88k]
  ------------------
 3299|  31.5k|      if (z->img_comp[i].h > h_max) h_max = z->img_comp[i].h;
  ------------------
  |  Branch (3299:11): [True: 4.95k, False: 26.5k]
  ------------------
 3300|  31.5k|      if (z->img_comp[i].v > v_max) v_max = z->img_comp[i].v;
  ------------------
  |  Branch (3300:11): [True: 8.05k, False: 23.4k]
  ------------------
 3301|  31.5k|   }
 3302|       |
 3303|       |   // check that plane subsampling factors are integer ratios; our resamplers can't deal with fractional ratios
 3304|       |   // and I've never seen a non-corrupted JPEG file actually use them
 3305|  39.4k|   for (i=0; i < s->img_n; ++i) {
  ------------------
  |  Branch (3305:14): [True: 31.5k, False: 7.88k]
  ------------------
 3306|  31.5k|      if (h_max % z->img_comp[i].h != 0) return stbi__err("bad H","Corrupt JPEG");
  ------------------
  |  | 1093|      0|   #define stbi__err(x,y)  stbi__err(x)
  ------------------
  |  Branch (3306:11): [True: 0, False: 31.5k]
  ------------------
 3307|  31.5k|      if (v_max % z->img_comp[i].v != 0) return stbi__err("bad V","Corrupt JPEG");
  ------------------
  |  | 1093|      0|   #define stbi__err(x,y)  stbi__err(x)
  ------------------
  |  Branch (3307:11): [True: 0, False: 31.5k]
  ------------------
 3308|  31.5k|   }
 3309|       |
 3310|       |   // compute interleaved mcu info
 3311|  7.88k|   z->img_h_max = h_max;
 3312|  7.88k|   z->img_v_max = v_max;
 3313|  7.88k|   z->img_mcu_w = h_max * 8;
 3314|  7.88k|   z->img_mcu_h = v_max * 8;
 3315|       |   // these sizes can't be more than 17 bits
 3316|  7.88k|   z->img_mcu_x = (s->img_x + z->img_mcu_w-1) / z->img_mcu_w;
 3317|  7.88k|   z->img_mcu_y = (s->img_y + z->img_mcu_h-1) / z->img_mcu_h;
 3318|       |
 3319|  39.4k|   for (i=0; i < s->img_n; ++i) {
  ------------------
  |  Branch (3319:14): [True: 31.5k, False: 7.88k]
  ------------------
 3320|       |      // number of effective pixels (e.g. for non-interleaved MCU)
 3321|  31.5k|      z->img_comp[i].x = (s->img_x * z->img_comp[i].h + h_max-1) / h_max;
 3322|  31.5k|      z->img_comp[i].y = (s->img_y * z->img_comp[i].v + v_max-1) / v_max;
 3323|       |      // to simplify generation, we'll allocate enough memory to decode
 3324|       |      // the bogus oversized data from using interleaved MCUs and their
 3325|       |      // big blocks (e.g. a 16x16 iMCU on an image of width 33); we won't
 3326|       |      // discard the extra data until colorspace conversion
 3327|       |      //
 3328|       |      // img_mcu_x, img_mcu_y: <=17 bits; comp[i].h and .v are <=4 (checked earlier)
 3329|       |      // so these muls can't overflow with 32-bit ints (which we require)
 3330|  31.5k|      z->img_comp[i].w2 = z->img_mcu_x * z->img_comp[i].h * 8;
 3331|  31.5k|      z->img_comp[i].h2 = z->img_mcu_y * z->img_comp[i].v * 8;
 3332|  31.5k|      z->img_comp[i].coeff = 0;
 3333|  31.5k|      z->img_comp[i].raw_coeff = 0;
 3334|  31.5k|      z->img_comp[i].linebuf = NULL;
 3335|  31.5k|      z->img_comp[i].raw_data = stbi__malloc_mad2(z->img_comp[i].w2, z->img_comp[i].h2, 15);
 3336|  31.5k|      if (z->img_comp[i].raw_data == NULL)
  ------------------
  |  Branch (3336:11): [True: 0, False: 31.5k]
  ------------------
 3337|      0|         return stbi__free_jpeg_components(z, i+1, stbi__err("outofmem", "Out of memory"));
  ------------------
  |  | 1093|      0|   #define stbi__err(x,y)  stbi__err(x)
  ------------------
 3338|       |      // align blocks for idct using mmx/sse
 3339|  31.5k|      z->img_comp[i].data = (stbi_uc*) (((size_t) z->img_comp[i].raw_data + 15) & ~15);
 3340|  31.5k|      if (z->progressive) {
  ------------------
  |  Branch (3340:11): [True: 6.14k, False: 25.3k]
  ------------------
 3341|       |         // w2, h2 are multiples of 8 (see above)
 3342|  6.14k|         z->img_comp[i].coeff_w = z->img_comp[i].w2 / 8;
 3343|  6.14k|         z->img_comp[i].coeff_h = z->img_comp[i].h2 / 8;
 3344|  6.14k|         z->img_comp[i].raw_coeff = stbi__malloc_mad3(z->img_comp[i].w2, z->img_comp[i].h2, sizeof(short), 15);
 3345|  6.14k|         if (z->img_comp[i].raw_coeff == NULL)
  ------------------
  |  Branch (3345:14): [True: 0, False: 6.14k]
  ------------------
 3346|      0|            return stbi__free_jpeg_components(z, i+1, stbi__err("outofmem", "Out of memory"));
  ------------------
  |  | 1093|      0|   #define stbi__err(x,y)  stbi__err(x)
  ------------------
 3347|  6.14k|         z->img_comp[i].coeff = (short*) (((size_t) z->img_comp[i].raw_coeff + 15) & ~15);
 3348|  6.14k|      }
 3349|  31.5k|   }
 3350|       |
 3351|  7.88k|   return 1;
 3352|  7.88k|}
fuzz_gltf.cc:_ZL26stbi__free_jpeg_componentsP10stbi__jpegii:
 3241|  7.96k|{
 3242|  7.96k|   int i;
 3243|  39.5k|   for (i=0; i < ncomp; ++i) {
  ------------------
  |  Branch (3243:14): [True: 31.6k, False: 7.96k]
  ------------------
 3244|  31.6k|      if (z->img_comp[i].raw_data) {
  ------------------
  |  Branch (3244:11): [True: 31.5k, False: 71]
  ------------------
 3245|  31.5k|         STBI_FREE(z->img_comp[i].raw_data);
  ------------------
  |  |  682|  31.5k|#define STBI_FREE(p)              free(p)
  ------------------
 3246|  31.5k|         z->img_comp[i].raw_data = NULL;
 3247|  31.5k|         z->img_comp[i].data = NULL;
 3248|  31.5k|      }
 3249|  31.6k|      if (z->img_comp[i].raw_coeff) {
  ------------------
  |  Branch (3249:11): [True: 6.14k, False: 25.4k]
  ------------------
 3250|  6.14k|         STBI_FREE(z->img_comp[i].raw_coeff);
  ------------------
  |  |  682|  6.14k|#define STBI_FREE(p)              free(p)
  ------------------
 3251|  6.14k|         z->img_comp[i].raw_coeff = 0;
 3252|  6.14k|         z->img_comp[i].coeff = 0;
 3253|  6.14k|      }
 3254|  31.6k|      if (z->img_comp[i].linebuf) {
  ------------------
  |  Branch (3254:11): [True: 31.5k, False: 71]
  ------------------
 3255|  31.5k|         STBI_FREE(z->img_comp[i].linebuf);
  ------------------
  |  |  682|  31.5k|#define STBI_FREE(p)              free(p)
  ------------------
 3256|  31.5k|         z->img_comp[i].linebuf = NULL;
 3257|  31.5k|      }
 3258|  31.6k|   }
 3259|  7.96k|   return why;
 3260|  7.96k|}
fuzz_gltf.cc:_ZL15stbi__jpeg_loadP13stbi__contextPiS1_S1_iP17stbi__result_info:
 4027|  7.96k|{
 4028|  7.96k|   unsigned char* result;
 4029|  7.96k|   stbi__jpeg* j = (stbi__jpeg*) stbi__malloc(sizeof(stbi__jpeg));
 4030|  7.96k|   if (!j) return stbi__errpuc("outofmem", "Out of memory");
  ------------------
  |  | 1097|      0|#define stbi__errpuc(x,y)  ((unsigned char *)(size_t) (stbi__err(x,y)?NULL:NULL))
  |  |  ------------------
  |  |  |  | 1093|      0|   #define stbi__err(x,y)  stbi__err(x)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1093:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (4030:8): [True: 0, False: 7.96k]
  ------------------
 4031|  7.96k|   memset(j, 0, sizeof(stbi__jpeg));
 4032|  7.96k|   STBI_NOTUSED(ri);
  ------------------
  |  |  658|  7.96k|#define STBI_NOTUSED(v)  (void)sizeof(v)
  ------------------
 4033|  7.96k|   j->s = s;
 4034|  7.96k|   stbi__setup_jpeg(j);
 4035|  7.96k|   result = load_jpeg_image(j, x,y,comp,req_comp);
 4036|  7.96k|   STBI_FREE(j);
  ------------------
  |  |  682|  7.96k|#define STBI_FREE(p)              free(p)
  ------------------
 4037|  7.96k|   return result;
 4038|  7.96k|}
fuzz_gltf.cc:_ZL15load_jpeg_imageP10stbi__jpegPiS1_S1_i:
 3864|  7.96k|{
 3865|  7.96k|   int n, decode_n, is_rgb;
 3866|  7.96k|   z->s->img_n = 0; // make stbi__cleanup_jpeg safe
 3867|       |
 3868|       |   // validate req_comp
 3869|  7.96k|   if (req_comp < 0 || req_comp > 4) return stbi__errpuc("bad req_comp", "Internal error");
  ------------------
  |  | 1097|      0|#define stbi__errpuc(x,y)  ((unsigned char *)(size_t) (stbi__err(x,y)?NULL:NULL))
  |  |  ------------------
  |  |  |  | 1093|      0|   #define stbi__err(x,y)  stbi__err(x)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1093:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (3869:8): [True: 0, False: 7.96k]
  |  Branch (3869:24): [True: 0, False: 7.96k]
  ------------------
 3870|       |
 3871|       |   // load a jpeg image from whichever source, but leave in YCbCr format
 3872|  7.96k|   if (!stbi__decode_jpeg_image(z)) { stbi__cleanup_jpeg(z); return NULL; }
  ------------------
  |  Branch (3872:8): [True: 80, False: 7.88k]
  ------------------
 3873|       |
 3874|       |   // determine actual number of components to generate
 3875|  7.88k|   n = req_comp ? req_comp : z->s->img_n >= 3 ? 3 : 1;
  ------------------
  |  Branch (3875:8): [True: 7.88k, False: 0]
  |  Branch (3875:30): [True: 0, False: 0]
  ------------------
 3876|       |
 3877|  7.88k|   is_rgb = z->s->img_n == 3 && (z->rgb == 3 || (z->app14_color_transform == 0 && !z->jfif));
  ------------------
  |  Branch (3877:13): [True: 0, False: 7.88k]
  |  Branch (3877:34): [True: 0, False: 0]
  |  Branch (3877:50): [True: 0, False: 0]
  |  Branch (3877:83): [True: 0, False: 0]
  ------------------
 3878|       |
 3879|  7.88k|   if (z->s->img_n == 3 && n < 3 && !is_rgb)
  ------------------
  |  Branch (3879:8): [True: 0, False: 7.88k]
  |  Branch (3879:28): [True: 0, False: 0]
  |  Branch (3879:37): [True: 0, False: 0]
  ------------------
 3880|      0|      decode_n = 1;
 3881|  7.88k|   else
 3882|  7.88k|      decode_n = z->s->img_n;
 3883|       |
 3884|       |   // nothing to do if no components requested; check this now to avoid
 3885|       |   // accessing uninitialized coutput[0] later
 3886|  7.88k|   if (decode_n <= 0) { stbi__cleanup_jpeg(z); return NULL; }
  ------------------
  |  Branch (3886:8): [True: 0, False: 7.88k]
  ------------------
 3887|       |
 3888|       |   // resample and color-convert
 3889|  7.88k|   {
 3890|  7.88k|      int k;
 3891|  7.88k|      unsigned int i,j;
 3892|  7.88k|      stbi_uc *output;
 3893|  7.88k|      stbi_uc *coutput[4] = { NULL, NULL, NULL, NULL };
 3894|       |
 3895|  7.88k|      stbi__resample res_comp[4];
 3896|       |
 3897|  39.4k|      for (k=0; k < decode_n; ++k) {
  ------------------
  |  Branch (3897:17): [True: 31.5k, False: 7.88k]
  ------------------
 3898|  31.5k|         stbi__resample *r = &res_comp[k];
 3899|       |
 3900|       |         // allocate line buffer big enough for upsampling off the edges
 3901|       |         // with upsample factor of 4
 3902|  31.5k|         z->img_comp[k].linebuf = (stbi_uc *) stbi__malloc(z->s->img_x + 3);
 3903|  31.5k|         if (!z->img_comp[k].linebuf) { stbi__cleanup_jpeg(z); return stbi__errpuc("outofmem", "Out of memory"); }
  ------------------
  |  | 1097|      0|#define stbi__errpuc(x,y)  ((unsigned char *)(size_t) (stbi__err(x,y)?NULL:NULL))
  |  |  ------------------
  |  |  |  | 1093|      0|   #define stbi__err(x,y)  stbi__err(x)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1093:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (3903:14): [True: 0, False: 31.5k]
  ------------------
 3904|       |
 3905|  31.5k|         r->hs      = z->img_h_max / z->img_comp[k].h;
 3906|  31.5k|         r->vs      = z->img_v_max / z->img_comp[k].v;
 3907|  31.5k|         r->ystep   = r->vs >> 1;
 3908|  31.5k|         r->w_lores = (z->s->img_x + r->hs-1) / r->hs;
 3909|  31.5k|         r->ypos    = 0;
 3910|  31.5k|         r->line0   = r->line1 = z->img_comp[k].data;
 3911|       |
 3912|  31.5k|         if      (r->hs == 1 && r->vs == 1) r->resample = resample_row_1;
  ------------------
  |  Branch (3912:19): [True: 16.6k, False: 14.8k]
  |  Branch (3912:33): [True: 7.95k, False: 8.72k]
  ------------------
 3913|  23.5k|         else if (r->hs == 1 && r->vs == 2) r->resample = stbi__resample_row_v_2;
  ------------------
  |  Branch (3913:19): [True: 8.72k, False: 14.8k]
  |  Branch (3913:33): [True: 8.43k, False: 291]
  ------------------
 3914|  15.1k|         else if (r->hs == 2 && r->vs == 1) r->resample = stbi__resample_row_h_2;
  ------------------
  |  Branch (3914:19): [True: 6.93k, False: 8.21k]
  |  Branch (3914:33): [True: 4.27k, False: 2.66k]
  ------------------
 3915|  10.8k|         else if (r->hs == 2 && r->vs == 2) r->resample = z->resample_row_hv_2_kernel;
  ------------------
  |  Branch (3915:19): [True: 2.66k, False: 8.21k]
  |  Branch (3915:33): [True: 2.36k, False: 296]
  ------------------
 3916|  8.51k|         else                               r->resample = stbi__resample_row_generic;
 3917|  31.5k|      }
 3918|       |
 3919|       |      // can't error after this so, this is safe
 3920|  7.88k|      output = (stbi_uc *) stbi__malloc_mad3(n, z->s->img_x, z->s->img_y, 1);
 3921|  7.88k|      if (!output) { stbi__cleanup_jpeg(z); return stbi__errpuc("outofmem", "Out of memory"); }
  ------------------
  |  | 1097|      0|#define stbi__errpuc(x,y)  ((unsigned char *)(size_t) (stbi__err(x,y)?NULL:NULL))
  |  |  ------------------
  |  |  |  | 1093|      0|   #define stbi__err(x,y)  stbi__err(x)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1093:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (3921:11): [True: 0, False: 7.88k]
  ------------------
 3922|       |
 3923|       |      // now go ahead and resample
 3924|  10.8M|      for (j=0; j < z->s->img_y; ++j) {
  ------------------
  |  Branch (3924:17): [True: 10.8M, False: 7.88k]
  ------------------
 3925|  10.8M|         stbi_uc *out = output + n * z->s->img_x * j;
 3926|  54.3M|         for (k=0; k < decode_n; ++k) {
  ------------------
  |  Branch (3926:20): [True: 43.4M, False: 10.8M]
  ------------------
 3927|  43.4M|            stbi__resample *r = &res_comp[k];
 3928|  43.4M|            int y_bot = r->ystep >= (r->vs >> 1);
 3929|  43.4M|            coutput[k] = r->resample(z->img_comp[k].linebuf,
 3930|  43.4M|                                     y_bot ? r->line1 : r->line0,
  ------------------
  |  Branch (3930:38): [True: 33.8M, False: 9.65M]
  ------------------
 3931|  43.4M|                                     y_bot ? r->line0 : r->line1,
  ------------------
  |  Branch (3931:38): [True: 33.8M, False: 9.65M]
  ------------------
 3932|  43.4M|                                     r->w_lores, r->hs);
 3933|  43.4M|            if (++r->ystep >= r->vs) {
  ------------------
  |  Branch (3933:17): [True: 33.4M, False: 9.98M]
  ------------------
 3934|  33.4M|               r->ystep = 0;
 3935|  33.4M|               r->line0 = r->line1;
 3936|  33.4M|               if (++r->ypos < z->img_comp[k].y)
  ------------------
  |  Branch (3936:20): [True: 33.4M, False: 31.0k]
  ------------------
 3937|  33.4M|                  r->line1 += z->img_comp[k].w2;
 3938|  33.4M|            }
 3939|  43.4M|         }
 3940|  10.8M|         if (n >= 3) {
  ------------------
  |  Branch (3940:14): [True: 10.8M, False: 0]
  ------------------
 3941|  10.8M|            stbi_uc *y = coutput[0];
 3942|  10.8M|            if (z->s->img_n == 3) {
  ------------------
  |  Branch (3942:17): [True: 0, False: 10.8M]
  ------------------
 3943|      0|               if (is_rgb) {
  ------------------
  |  Branch (3943:20): [True: 0, False: 0]
  ------------------
 3944|      0|                  for (i=0; i < z->s->img_x; ++i) {
  ------------------
  |  Branch (3944:29): [True: 0, False: 0]
  ------------------
 3945|      0|                     out[0] = y[i];
 3946|      0|                     out[1] = coutput[1][i];
 3947|      0|                     out[2] = coutput[2][i];
 3948|      0|                     out[3] = 255;
 3949|      0|                     out += n;
 3950|      0|                  }
 3951|      0|               } else {
 3952|      0|                  z->YCbCr_to_RGB_kernel(out, y, coutput[1], coutput[2], z->s->img_x, n);
 3953|      0|               }
 3954|  10.8M|            } else if (z->s->img_n == 4) {
  ------------------
  |  Branch (3954:24): [True: 10.8M, False: 0]
  ------------------
 3955|  10.8M|               if (z->app14_color_transform == 0) { // CMYK
  ------------------
  |  Branch (3955:20): [True: 0, False: 10.8M]
  ------------------
 3956|      0|                  for (i=0; i < z->s->img_x; ++i) {
  ------------------
  |  Branch (3956:29): [True: 0, False: 0]
  ------------------
 3957|      0|                     stbi_uc m = coutput[3][i];
 3958|      0|                     out[0] = stbi__blinn_8x8(coutput[0][i], m);
 3959|      0|                     out[1] = stbi__blinn_8x8(coutput[1][i], m);
 3960|      0|                     out[2] = stbi__blinn_8x8(coutput[2][i], m);
 3961|      0|                     out[3] = 255;
 3962|      0|                     out += n;
 3963|      0|                  }
 3964|  10.8M|               } else if (z->app14_color_transform == 2) { // YCCK
  ------------------
  |  Branch (3964:27): [True: 0, False: 10.8M]
  ------------------
 3965|      0|                  z->YCbCr_to_RGB_kernel(out, y, coutput[1], coutput[2], z->s->img_x, n);
 3966|      0|                  for (i=0; i < z->s->img_x; ++i) {
  ------------------
  |  Branch (3966:29): [True: 0, False: 0]
  ------------------
 3967|      0|                     stbi_uc m = coutput[3][i];
 3968|      0|                     out[0] = stbi__blinn_8x8(255 - out[0], m);
 3969|      0|                     out[1] = stbi__blinn_8x8(255 - out[1], m);
 3970|      0|                     out[2] = stbi__blinn_8x8(255 - out[2], m);
 3971|      0|                     out += n;
 3972|      0|                  }
 3973|  10.8M|               } else { // YCbCr + alpha?  Ignore the fourth channel for now
 3974|  10.8M|                  z->YCbCr_to_RGB_kernel(out, y, coutput[1], coutput[2], z->s->img_x, n);
 3975|  10.8M|               }
 3976|  10.8M|            } else
 3977|      0|               for (i=0; i < z->s->img_x; ++i) {
  ------------------
  |  Branch (3977:26): [True: 0, False: 0]
  ------------------
 3978|      0|                  out[0] = out[1] = out[2] = y[i];
 3979|      0|                  out[3] = 255; // not used if n==3
 3980|      0|                  out += n;
 3981|      0|               }
 3982|  10.8M|         } else {
 3983|      0|            if (is_rgb) {
  ------------------
  |  Branch (3983:17): [True: 0, False: 0]
  ------------------
 3984|      0|               if (n == 1)
  ------------------
  |  Branch (3984:20): [True: 0, False: 0]
  ------------------
 3985|      0|                  for (i=0; i < z->s->img_x; ++i)
  ------------------
  |  Branch (3985:29): [True: 0, False: 0]
  ------------------
 3986|      0|                     *out++ = stbi__compute_y(coutput[0][i], coutput[1][i], coutput[2][i]);
 3987|      0|               else {
 3988|      0|                  for (i=0; i < z->s->img_x; ++i, out += 2) {
  ------------------
  |  Branch (3988:29): [True: 0, False: 0]
  ------------------
 3989|      0|                     out[0] = stbi__compute_y(coutput[0][i], coutput[1][i], coutput[2][i]);
 3990|      0|                     out[1] = 255;
 3991|      0|                  }
 3992|      0|               }
 3993|      0|            } else if (z->s->img_n == 4 && z->app14_color_transform == 0) {
  ------------------
  |  Branch (3993:24): [True: 0, False: 0]
  |  Branch (3993:44): [True: 0, False: 0]
  ------------------
 3994|      0|               for (i=0; i < z->s->img_x; ++i) {
  ------------------
  |  Branch (3994:26): [True: 0, False: 0]
  ------------------
 3995|      0|                  stbi_uc m = coutput[3][i];
 3996|      0|                  stbi_uc r = stbi__blinn_8x8(coutput[0][i], m);
 3997|      0|                  stbi_uc g = stbi__blinn_8x8(coutput[1][i], m);
 3998|      0|                  stbi_uc b = stbi__blinn_8x8(coutput[2][i], m);
 3999|      0|                  out[0] = stbi__compute_y(r, g, b);
 4000|      0|                  out[1] = 255;
 4001|      0|                  out += n;
 4002|      0|               }
 4003|      0|            } else if (z->s->img_n == 4 && z->app14_color_transform == 2) {
  ------------------
  |  Branch (4003:24): [True: 0, False: 0]
  |  Branch (4003:44): [True: 0, False: 0]
  ------------------
 4004|      0|               for (i=0; i < z->s->img_x; ++i) {
  ------------------
  |  Branch (4004:26): [True: 0, False: 0]
  ------------------
 4005|      0|                  out[0] = stbi__blinn_8x8(255 - coutput[0][i], coutput[3][i]);
 4006|      0|                  out[1] = 255;
 4007|      0|                  out += n;
 4008|      0|               }
 4009|      0|            } else {
 4010|      0|               stbi_uc *y = coutput[0];
 4011|      0|               if (n == 1)
  ------------------
  |  Branch (4011:20): [True: 0, False: 0]
  ------------------
 4012|      0|                  for (i=0; i < z->s->img_x; ++i) out[i] = y[i];
  ------------------
  |  Branch (4012:29): [True: 0, False: 0]
  ------------------
 4013|      0|               else
 4014|      0|                  for (i=0; i < z->s->img_x; ++i) { *out++ = y[i]; *out++ = 255; }
  ------------------
  |  Branch (4014:29): [True: 0, False: 0]
  ------------------
 4015|      0|            }
 4016|      0|         }
 4017|  10.8M|      }
 4018|  7.88k|      stbi__cleanup_jpeg(z);
 4019|  7.88k|      *out_x = z->s->img_x;
 4020|  7.88k|      *out_y = z->s->img_y;
 4021|  7.88k|      if (comp) *comp = z->s->img_n >= 3 ? 3 : 1; // report original components, not output
  ------------------
  |  Branch (4021:11): [True: 7.88k, False: 0]
  |  Branch (4021:25): [True: 7.88k, False: 0]
  ------------------
 4022|  7.88k|      return output;
 4023|  7.88k|   }
 4024|  7.88k|}
fuzz_gltf.cc:_ZL23stbi__decode_jpeg_imageP10stbi__jpeg:
 3411|  7.96k|{
 3412|  7.96k|   int m;
 3413|  39.8k|   for (m = 0; m < 4; m++) {
  ------------------
  |  Branch (3413:16): [True: 31.8k, False: 7.96k]
  ------------------
 3414|  31.8k|      j->img_comp[m].raw_data = NULL;
 3415|  31.8k|      j->img_comp[m].raw_coeff = NULL;
 3416|  31.8k|   }
 3417|  7.96k|   j->restart_interval = 0;
 3418|  7.96k|   if (!stbi__decode_jpeg_header(j, STBI__SCAN_load)) return 0;
  ------------------
  |  Branch (3418:8): [True: 80, False: 7.88k]
  ------------------
 3419|  7.88k|   m = stbi__get_marker(j);
 3420|  8.37k|   while (!stbi__EOI(m)) {
  ------------------
  |  | 3357|  8.37k|#define stbi__EOI(x)         ((x) == 0xd9)
  ------------------
  |  Branch (3420:11): [True: 7.43k, False: 944]
  ------------------
 3421|  7.43k|      if (stbi__SOS(m)) {
  ------------------
  |  | 3359|  7.43k|#define stbi__SOS(x)         ((x) == 0xda)
  |  |  ------------------
  |  |  |  Branch (3359:30): [True: 0, False: 7.43k]
  |  |  ------------------
  ------------------
 3422|      0|         if (!stbi__process_scan_header(j)) return 0;
  ------------------
  |  Branch (3422:14): [True: 0, False: 0]
  ------------------
 3423|      0|         if (!stbi__parse_entropy_coded_data(j)) return 0;
  ------------------
  |  Branch (3423:14): [True: 0, False: 0]
  ------------------
 3424|      0|         if (j->marker == STBI__MARKER_none ) {
  ------------------
  |  | 2913|      0|#define STBI__MARKER_none  0xff
  ------------------
  |  Branch (3424:14): [True: 0, False: 0]
  ------------------
 3425|      0|         j->marker = stbi__skip_jpeg_junk_at_end(j);
 3426|       |            // if we reach eof without hitting a marker, stbi__get_marker() below will fail and we'll eventually return 0
 3427|      0|         }
 3428|      0|         m = stbi__get_marker(j);
 3429|      0|         if (STBI__RESTART(m))
  ------------------
  |  | 2930|      0|#define STBI__RESTART(x)     ((x) >= 0xd0 && (x) <= 0xd7)
  |  |  ------------------
  |  |  |  Branch (2930:31): [True: 0, False: 0]
  |  |  |  Branch (2930:46): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 3430|      0|            m = stbi__get_marker(j);
 3431|  7.43k|      } else if (stbi__DNL(m)) {
  ------------------
  |  | 3355|  7.43k|#define stbi__DNL(x)         ((x) == 0xdc)
  |  |  ------------------
  |  |  |  Branch (3355:30): [True: 0, False: 7.43k]
  |  |  ------------------
  ------------------
 3432|      0|         int Ld = stbi__get16be(j->s);
 3433|      0|         stbi__uint32 NL = stbi__get16be(j->s);
 3434|      0|         if (Ld != 4) return stbi__err("bad DNL len", "Corrupt JPEG");
  ------------------
  |  | 1093|      0|   #define stbi__err(x,y)  stbi__err(x)
  ------------------
  |  Branch (3434:14): [True: 0, False: 0]
  ------------------
 3435|      0|         if (NL != j->s->img_y) return stbi__err("bad DNL height", "Corrupt JPEG");
  ------------------
  |  | 1093|      0|   #define stbi__err(x,y)  stbi__err(x)
  ------------------
  |  Branch (3435:14): [True: 0, False: 0]
  ------------------
 3436|      0|         m = stbi__get_marker(j);
 3437|  7.43k|      } else {
 3438|  7.43k|         if (!stbi__process_marker(j, m)) return 1;
  ------------------
  |  Branch (3438:14): [True: 6.94k, False: 491]
  ------------------
 3439|    491|         m = stbi__get_marker(j);
 3440|    491|      }
 3441|  7.43k|   }
 3442|    944|   if (j->progressive)
  ------------------
  |  Branch (3442:8): [True: 579, False: 365]
  ------------------
 3443|    579|      stbi__jpeg_finish(j);
 3444|    944|   return 1;
 3445|  7.88k|}
fuzz_gltf.cc:_ZL17stbi__jpeg_finishP10stbi__jpeg:
 3079|    579|{
 3080|    579|   if (z->progressive) {
  ------------------
  |  Branch (3080:8): [True: 579, False: 0]
  ------------------
 3081|       |      // dequantize and idct the data
 3082|    579|      int i,j,n;
 3083|  2.89k|      for (n=0; n < z->s->img_n; ++n) {
  ------------------
  |  Branch (3083:17): [True: 2.31k, False: 579]
  ------------------
 3084|  2.31k|         int w = (z->img_comp[n].x+7) >> 3;
 3085|  2.31k|         int h = (z->img_comp[n].y+7) >> 3;
 3086|   204k|         for (j=0; j < h; ++j) {
  ------------------
  |  Branch (3086:20): [True: 202k, False: 2.31k]
  ------------------
 3087|  3.03M|            for (i=0; i < w; ++i) {
  ------------------
  |  Branch (3087:23): [True: 2.83M, False: 202k]
  ------------------
 3088|  2.83M|               short *data = z->img_comp[n].coeff + 64 * (i + j * z->img_comp[n].coeff_w);
 3089|  2.83M|               stbi__jpeg_dequantize(data, z->dequant[z->img_comp[n].tq]);
 3090|  2.83M|               z->idct_block_kernel(z->img_comp[n].data+z->img_comp[n].w2*j*8+i*8, z->img_comp[n].w2, data);
 3091|  2.83M|            }
 3092|   202k|         }
 3093|  2.31k|      }
 3094|    579|   }
 3095|    579|}
fuzz_gltf.cc:_ZL21stbi__jpeg_dequantizePsPt:
 3072|  2.83M|{
 3073|  2.83M|   int i;
 3074|   184M|   for (i=0; i < 64; ++i)
  ------------------
  |  Branch (3074:14): [True: 181M, False: 2.83M]
  ------------------
 3075|   181M|      data[i] *= dequant[i];
 3076|  2.83M|}
fuzz_gltf.cc:_ZL18stbi__cleanup_jpegP10stbi__jpeg:
 3842|  7.96k|{
 3843|  7.96k|   stbi__free_jpeg_components(j, j->s->img_n, 0);
 3844|  7.96k|}
fuzz_gltf.cc:_ZL14resample_row_1PhS_S_ii:
 3455|  13.3M|{
 3456|  13.3M|   STBI_NOTUSED(out);
  ------------------
  |  |  658|  13.3M|#define STBI_NOTUSED(v)  (void)sizeof(v)
  ------------------
 3457|  13.3M|   STBI_NOTUSED(in_far);
  ------------------
  |  |  658|  13.3M|#define STBI_NOTUSED(v)  (void)sizeof(v)
  ------------------
 3458|  13.3M|   STBI_NOTUSED(w);
  ------------------
  |  |  658|  13.3M|#define STBI_NOTUSED(v)  (void)sizeof(v)
  ------------------
 3459|  13.3M|   STBI_NOTUSED(hs);
  ------------------
  |  |  658|  13.3M|#define STBI_NOTUSED(v)  (void)sizeof(v)
  ------------------
 3460|  13.3M|   return in_near;
 3461|  13.3M|}
fuzz_gltf.cc:_ZL22stbi__resample_row_v_2PhS_S_ii:
 3464|  13.0M|{
 3465|       |   // need to generate two samples vertically for every one in input
 3466|  13.0M|   int i;
 3467|  13.0M|   STBI_NOTUSED(hs);
  ------------------
  |  |  658|  13.0M|#define STBI_NOTUSED(v)  (void)sizeof(v)
  ------------------
 3468|  2.30G|   for (i=0; i < w; ++i)
  ------------------
  |  Branch (3468:14): [True: 2.29G, False: 13.0M]
  ------------------
 3469|  2.29G|      out[i] = stbi__div4(3*in_near[i] + in_far[i] + 2);
  ------------------
  |  | 3452|  2.29G|#define stbi__div4(x) ((stbi_uc) ((x) >> 2))
  ------------------
 3470|  13.0M|   return out;
 3471|  13.0M|}
fuzz_gltf.cc:_ZL22stbi__resample_row_h_2PhS_S_ii:
 3474|  6.26M|{
 3475|       |   // need to generate two samples horizontally for every one in input
 3476|  6.26M|   int i;
 3477|  6.26M|   stbi_uc *input = in_near;
 3478|       |
 3479|  6.26M|   if (w == 1) {
  ------------------
  |  Branch (3479:8): [True: 1.82M, False: 4.43M]
  ------------------
 3480|       |      // if only one sample, can't do any interpolation
 3481|  1.82M|      out[0] = out[1] = input[0];
 3482|  1.82M|      return out;
 3483|  1.82M|   }
 3484|       |
 3485|  4.43M|   out[0] = input[0];
 3486|  4.43M|   out[1] = stbi__div4(input[0]*3 + input[1] + 2);
  ------------------
  |  | 3452|  4.43M|#define stbi__div4(x) ((stbi_uc) ((x) >> 2))
  ------------------
 3487|   431M|   for (i=1; i < w-1; ++i) {
  ------------------
  |  Branch (3487:14): [True: 427M, False: 4.43M]
  ------------------
 3488|   427M|      int n = 3*input[i]+2;
 3489|   427M|      out[i*2+0] = stbi__div4(n+input[i-1]);
  ------------------
  |  | 3452|   427M|#define stbi__div4(x) ((stbi_uc) ((x) >> 2))
  ------------------
 3490|   427M|      out[i*2+1] = stbi__div4(n+input[i+1]);
  ------------------
  |  | 3452|   427M|#define stbi__div4(x) ((stbi_uc) ((x) >> 2))
  ------------------
 3491|   427M|   }
 3492|  4.43M|   out[i*2+0] = stbi__div4(input[w-2]*3 + input[w-1] + 2);
  ------------------
  |  | 3452|  4.43M|#define stbi__div4(x) ((stbi_uc) ((x) >> 2))
  ------------------
 3493|  4.43M|   out[i*2+1] = input[w-1];
 3494|       |
 3495|  4.43M|   STBI_NOTUSED(in_far);
  ------------------
  |  |  658|  4.43M|#define STBI_NOTUSED(v)  (void)sizeof(v)
  ------------------
 3496|  4.43M|   STBI_NOTUSED(hs);
  ------------------
  |  |  658|  4.43M|#define STBI_NOTUSED(v)  (void)sizeof(v)
  ------------------
 3497|       |
 3498|  4.43M|   return out;
 3499|  6.26M|}
fuzz_gltf.cc:_ZL26stbi__resample_row_genericPhS_S_ii:
 3645|  7.57M|{
 3646|       |   // resample with nearest-neighbor
 3647|  7.57M|   int i,j;
 3648|  7.57M|   STBI_NOTUSED(in_far);
  ------------------
  |  |  658|  7.57M|#define STBI_NOTUSED(v)  (void)sizeof(v)
  ------------------
 3649|   666M|   for (i=0; i < w; ++i)
  ------------------
  |  Branch (3649:14): [True: 659M, False: 7.57M]
  ------------------
 3650|  2.66G|      for (j=0; j < hs; ++j)
  ------------------
  |  Branch (3650:17): [True: 2.00G, False: 659M]
  ------------------
 3651|  2.00G|         out[i*hs+j] = in_near[i];
 3652|  7.57M|   return out;
 3653|  7.57M|}
fuzz_gltf.cc:_ZL14stbi__pnm_testP13stbi__context:
 7514|  12.7k|{
 7515|  12.7k|   char p, t;
 7516|  12.7k|   p = (char) stbi__get8(s);
 7517|  12.7k|   t = (char) stbi__get8(s);
 7518|  12.7k|   if (p != 'P' || (t != '5' && t != '6')) {
  ------------------
  |  Branch (7518:8): [True: 2.67k, False: 10.0k]
  |  Branch (7518:21): [True: 1.70k, False: 8.32k]
  |  Branch (7518:33): [True: 953, False: 749]
  ------------------
 7519|  3.62k|       stbi__rewind( s );
 7520|  3.62k|       return 0;
 7521|  3.62k|   }
 7522|  9.07k|   return 1;
 7523|  12.7k|}
fuzz_gltf.cc:_ZL14stbi__pnm_loadP13stbi__contextPiS1_S1_iP17stbi__result_info:
 7526|  9.07k|{
 7527|  9.07k|   stbi_uc *out;
 7528|  9.07k|   STBI_NOTUSED(ri);
  ------------------
  |  |  658|  9.07k|#define STBI_NOTUSED(v)  (void)sizeof(v)
  ------------------
 7529|       |
 7530|  9.07k|   ri->bits_per_channel = stbi__pnm_info(s, (int *)&s->img_x, (int *)&s->img_y, (int *)&s->img_n);
 7531|  9.07k|   if (ri->bits_per_channel == 0)
  ------------------
  |  Branch (7531:8): [True: 18, False: 9.06k]
  ------------------
 7532|     18|      return 0;
 7533|       |
 7534|  9.06k|   if (s->img_y > STBI_MAX_DIMENSIONS) return stbi__errpuc("too large","Very large image (corrupt?)");
  ------------------
  |  |  794|  9.06k|#define STBI_MAX_DIMENSIONS (1 << 24)
  ------------------
                 if (s->img_y > STBI_MAX_DIMENSIONS) return stbi__errpuc("too large","Very large image (corrupt?)");
  ------------------
  |  | 1097|      0|#define stbi__errpuc(x,y)  ((unsigned char *)(size_t) (stbi__err(x,y)?NULL:NULL))
  |  |  ------------------
  |  |  |  | 1093|      0|   #define stbi__err(x,y)  stbi__err(x)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1093:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (7534:8): [True: 0, False: 9.06k]
  ------------------
 7535|  9.06k|   if (s->img_x > STBI_MAX_DIMENSIONS) return stbi__errpuc("too large","Very large image (corrupt?)");
  ------------------
  |  |  794|  9.06k|#define STBI_MAX_DIMENSIONS (1 << 24)
  ------------------
                 if (s->img_x > STBI_MAX_DIMENSIONS) return stbi__errpuc("too large","Very large image (corrupt?)");
  ------------------
  |  | 1097|      0|#define stbi__errpuc(x,y)  ((unsigned char *)(size_t) (stbi__err(x,y)?NULL:NULL))
  |  |  ------------------
  |  |  |  | 1093|      0|   #define stbi__err(x,y)  stbi__err(x)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1093:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (7535:8): [True: 0, False: 9.06k]
  ------------------
 7536|       |
 7537|  9.06k|   *x = s->img_x;
 7538|  9.06k|   *y = s->img_y;
 7539|  9.06k|   if (comp) *comp = s->img_n;
  ------------------
  |  Branch (7539:8): [True: 9.06k, False: 0]
  ------------------
 7540|       |
 7541|  9.06k|   if (!stbi__mad4sizes_valid(s->img_n, s->img_x, s->img_y, ri->bits_per_channel / 8, 0))
  ------------------
  |  Branch (7541:8): [True: 0, False: 9.06k]
  ------------------
 7542|      0|      return stbi__errpuc("too large", "PNM too large");
  ------------------
  |  | 1097|      0|#define stbi__errpuc(x,y)  ((unsigned char *)(size_t) (stbi__err(x,y)?NULL:NULL))
  |  |  ------------------
  |  |  |  | 1093|      0|   #define stbi__err(x,y)  stbi__err(x)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1093:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 7543|       |
 7544|  9.06k|   out = (stbi_uc *) stbi__malloc_mad4(s->img_n, s->img_x, s->img_y, ri->bits_per_channel / 8, 0);
 7545|  9.06k|   if (!out) return stbi__errpuc("outofmem", "Out of memory");
  ------------------
  |  | 1097|      0|#define stbi__errpuc(x,y)  ((unsigned char *)(size_t) (stbi__err(x,y)?NULL:NULL))
  |  |  ------------------
  |  |  |  | 1093|      0|   #define stbi__err(x,y)  stbi__err(x)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1093:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (7545:8): [True: 0, False: 9.06k]
  ------------------
 7546|  9.06k|   if (!stbi__getn(s, out, s->img_n * s->img_x * s->img_y * (ri->bits_per_channel / 8))) {
  ------------------
  |  Branch (7546:8): [True: 57, False: 9.00k]
  ------------------
 7547|     57|      STBI_FREE(out);
  ------------------
  |  |  682|     57|#define STBI_FREE(p)              free(p)
  ------------------
 7548|     57|      return stbi__errpuc("bad PNM", "PNM file truncated");
  ------------------
  |  | 1097|     57|#define stbi__errpuc(x,y)  ((unsigned char *)(size_t) (stbi__err(x,y)?NULL:NULL))
  |  |  ------------------
  |  |  |  | 1093|     57|   #define stbi__err(x,y)  stbi__err(x)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1093:28): [True: 0, False: 57]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 7549|     57|   }
 7550|       |
 7551|  9.00k|   if (req_comp && req_comp != s->img_n) {
  ------------------
  |  Branch (7551:8): [True: 9.00k, False: 0]
  |  Branch (7551:20): [True: 9.00k, False: 0]
  ------------------
 7552|  9.00k|      if (ri->bits_per_channel == 16) {
  ------------------
  |  Branch (7552:11): [True: 1.20k, False: 7.80k]
  ------------------
 7553|  1.20k|         out = (stbi_uc *) stbi__convert_format16((stbi__uint16 *) out, s->img_n, req_comp, s->img_x, s->img_y);
 7554|  7.80k|      } else {
 7555|  7.80k|         out = stbi__convert_format(out, s->img_n, req_comp, s->img_x, s->img_y);
 7556|  7.80k|      }
 7557|  9.00k|      if (out == NULL) return out; // stbi__convert_format frees input on failure
  ------------------
  |  Branch (7557:11): [True: 0, False: 9.00k]
  ------------------
 7558|  9.00k|   }
 7559|  9.00k|   return out;
 7560|  9.00k|}
fuzz_gltf.cc:_ZL14stbi__pnm_infoP13stbi__contextPiS1_S1_:
 7601|  30.5k|{
 7602|  30.5k|   int maxv, dummy;
 7603|  30.5k|   char c, p, t;
 7604|       |
 7605|  30.5k|   if (!x) x = &dummy;
  ------------------
  |  Branch (7605:8): [True: 21.4k, False: 9.07k]
  ------------------
 7606|  30.5k|   if (!y) y = &dummy;
  ------------------
  |  Branch (7606:8): [True: 21.4k, False: 9.07k]
  ------------------
 7607|  30.5k|   if (!comp) comp = &dummy;
  ------------------
  |  Branch (7607:8): [True: 21.4k, False: 9.07k]
  ------------------
 7608|       |
 7609|  30.5k|   stbi__rewind(s);
 7610|       |
 7611|       |   // Get identifier
 7612|  30.5k|   p = (char) stbi__get8(s);
 7613|  30.5k|   t = (char) stbi__get8(s);
 7614|  30.5k|   if (p != 'P' || (t != '5' && t != '6')) {
  ------------------
  |  Branch (7614:8): [True: 11.4k, False: 19.0k]
  |  Branch (7614:21): [True: 2.44k, False: 16.6k]
  |  Branch (7614:33): [True: 953, False: 1.49k]
  ------------------
 7615|  12.3k|       stbi__rewind(s);
 7616|  12.3k|       return 0;
 7617|  12.3k|   }
 7618|       |
 7619|  18.1k|   *comp = (t == '6') ? 3 : 1;  // '5' is 1-component .pgm; '6' is 3-component .ppm
  ------------------
  |  Branch (7619:12): [True: 1.49k, False: 16.6k]
  ------------------
 7620|       |
 7621|  18.1k|   c = (char) stbi__get8(s);
 7622|  18.1k|   stbi__pnm_skip_whitespace(s, &c);
 7623|       |
 7624|  18.1k|   *x = stbi__pnm_getinteger(s, &c); // read width
 7625|  18.1k|   if(*x == 0)
  ------------------
  |  Branch (7625:7): [True: 20, False: 18.1k]
  ------------------
 7626|     20|       return stbi__err("invalid width", "PPM image header had zero or overflowing width");
  ------------------
  |  | 1093|     20|   #define stbi__err(x,y)  stbi__err(x)
  ------------------
 7627|  18.1k|   stbi__pnm_skip_whitespace(s, &c);
 7628|       |
 7629|  18.1k|   *y = stbi__pnm_getinteger(s, &c); // read height
 7630|  18.1k|   if (*y == 0)
  ------------------
  |  Branch (7630:8): [True: 16, False: 18.0k]
  ------------------
 7631|     16|       return stbi__err("invalid width", "PPM image header had zero or overflowing width");
  ------------------
  |  | 1093|     16|   #define stbi__err(x,y)  stbi__err(x)
  ------------------
 7632|  18.0k|   stbi__pnm_skip_whitespace(s, &c);
 7633|       |
 7634|  18.0k|   maxv = stbi__pnm_getinteger(s, &c);  // read max value
 7635|  18.0k|   if (maxv > 65535)
  ------------------
  |  Branch (7635:8): [True: 0, False: 18.0k]
  ------------------
 7636|      0|      return stbi__err("max value > 65535", "PPM image supports only 8-bit and 16-bit images");
  ------------------
  |  | 1093|      0|   #define stbi__err(x,y)  stbi__err(x)
  ------------------
 7637|  18.0k|   else if (maxv > 255)
  ------------------
  |  Branch (7637:13): [True: 2.47k, False: 15.6k]
  ------------------
 7638|  2.47k|      return 16;
 7639|  15.6k|   else
 7640|  15.6k|      return 8;
 7641|  18.0k|}
fuzz_gltf.cc:_ZL25stbi__pnm_skip_whitespaceP13stbi__contextPc:
 7568|  54.3k|{
 7569|  60.8k|   for (;;) {
 7570|   127k|      while (!stbi__at_eof(s) && stbi__pnm_isspace(*c))
  ------------------
  |  Branch (7570:14): [True: 127k, False: 18]
  |  Branch (7570:34): [True: 66.7k, False: 60.8k]
  ------------------
 7571|  66.7k|         *c = (char) stbi__get8(s);
 7572|       |
 7573|  60.8k|      if (stbi__at_eof(s) || *c != '#')
  ------------------
  |  Branch (7573:11): [True: 18, False: 60.8k]
  |  Branch (7573:30): [True: 54.3k, False: 6.49k]
  ------------------
 7574|  54.3k|         break;
 7575|       |
 7576|  19.4k|      while (!stbi__at_eof(s) && *c != '\n' && *c != '\r' )
  ------------------
  |  Branch (7576:14): [True: 19.4k, False: 0]
  |  Branch (7576:34): [True: 19.4k, False: 0]
  |  Branch (7576:48): [True: 12.9k, False: 6.49k]
  ------------------
 7577|  12.9k|         *c = (char) stbi__get8(s);
 7578|  6.49k|   }
 7579|  54.3k|}
fuzz_gltf.cc:_ZL17stbi__pnm_isspacec:
 7563|   127k|{
 7564|   127k|   return c == ' ' || c == '\t' || c == '\n' || c == '\v' || c == '\f' || c == '\r';
  ------------------
  |  Branch (7564:11): [True: 23.2k, False: 104k]
  |  Branch (7564:23): [True: 726, False: 103k]
  |  Branch (7564:36): [True: 8.21k, False: 95.3k]
  |  Branch (7564:49): [True: 18.2k, False: 77.1k]
  |  Branch (7564:62): [True: 9.79k, False: 67.3k]
  |  Branch (7564:75): [True: 6.49k, False: 60.8k]
  ------------------
 7565|   127k|}
fuzz_gltf.cc:_ZL20stbi__pnm_getintegerP13stbi__contextPc:
 7587|  54.3k|{
 7588|  54.3k|   int value = 0;
 7589|       |
 7590|   108k|   while (!stbi__at_eof(s) && stbi__pnm_isdigit(*c)) {
  ------------------
  |  Branch (7590:11): [True: 108k, False: 33]
  |  Branch (7590:31): [True: 54.4k, False: 54.1k]
  ------------------
 7591|  54.4k|      value = value*10 + (*c - '0');
 7592|  54.4k|      *c = (char) stbi__get8(s);
 7593|  54.4k|      if((value > 214748364) || (value == 214748364 && *c > '7'))
  ------------------
  |  Branch (7593:10): [True: 178, False: 54.2k]
  |  Branch (7593:34): [True: 0, False: 54.2k]
  |  Branch (7593:56): [True: 0, False: 0]
  ------------------
 7594|    178|          return stbi__err("integer parse overflow", "Parsing an integer in the PPM header overflowed a 32-bit int");
  ------------------
  |  | 1093|    178|   #define stbi__err(x,y)  stbi__err(x)
  ------------------
 7595|  54.4k|   }
 7596|       |
 7597|  54.1k|   return value;
 7598|  54.3k|}
fuzz_gltf.cc:_ZL17stbi__pnm_isdigitc:
 7582|   108k|{
 7583|   108k|   return c >= '0' && c <= '9';
  ------------------
  |  Branch (7583:11): [True: 70.7k, False: 37.8k]
  |  Branch (7583:23): [True: 54.4k, False: 16.2k]
  ------------------
 7584|   108k|}
fuzz_gltf.cc:_ZL21stbi__mad4sizes_validiiiii:
 1038|  18.1k|{
 1039|  18.1k|   return stbi__mul2sizes_valid(a, b) && stbi__mul2sizes_valid(a*b, c) &&
  ------------------
  |  Branch (1039:11): [True: 18.1k, False: 0]
  |  Branch (1039:42): [True: 18.1k, False: 0]
  ------------------
 1040|  18.1k|      stbi__mul2sizes_valid(a*b*c, d) && stbi__addsizes_valid(a*b*c*d, add);
  ------------------
  |  Branch (1040:7): [True: 18.1k, False: 0]
  |  Branch (1040:42): [True: 18.1k, False: 0]
  ------------------
 1041|  18.1k|}
fuzz_gltf.cc:_ZL17stbi__malloc_mad4iiiii:
 1061|  9.06k|{
 1062|  9.06k|   if (!stbi__mad4sizes_valid(a, b, c, d, add)) return NULL;
  ------------------
  |  Branch (1062:8): [True: 0, False: 9.06k]
  ------------------
 1063|  9.06k|   return stbi__malloc(a*b*c*d + add);
 1064|  9.06k|}
fuzz_gltf.cc:_ZL14stbi__tga_testP13stbi__context:
 5840|  3.62k|{
 5841|  3.62k|   int res = 0;
 5842|  3.62k|   int sz, tga_color_type;
 5843|  3.62k|   stbi__get8(s);      //   discard Offset
 5844|  3.62k|   tga_color_type = stbi__get8(s);   //   color type
 5845|  3.62k|   if ( tga_color_type > 1 ) goto errorEnd;   //   only RGB or indexed allowed
  ------------------
  |  Branch (5845:9): [True: 82, False: 3.54k]
  ------------------
 5846|  3.54k|   sz = stbi__get8(s);   //   image type
 5847|  3.54k|   if ( tga_color_type == 1 ) { // colormapped (paletted) image
  ------------------
  |  Branch (5847:9): [True: 1.10k, False: 2.44k]
  ------------------
 5848|  1.10k|      if (sz != 1 && sz != 9) goto errorEnd; // colortype 1 demands image type 1 or 9
  ------------------
  |  Branch (5848:11): [True: 628, False: 473]
  |  Branch (5848:22): [True: 0, False: 628]
  ------------------
 5849|  1.10k|      stbi__skip(s,4);       // skip index of first colormap entry and number of entries
 5850|  1.10k|      sz = stbi__get8(s);    //   check bits per palette color entry
 5851|  1.10k|      if ( (sz != 8) && (sz != 15) && (sz != 16) && (sz != 24) && (sz != 32) ) goto errorEnd;
  ------------------
  |  Branch (5851:12): [True: 895, False: 206]
  |  Branch (5851:25): [True: 668, False: 227]
  |  Branch (5851:39): [True: 196, False: 472]
  |  Branch (5851:53): [True: 1, False: 195]
  |  Branch (5851:67): [True: 1, False: 0]
  ------------------
 5852|  1.10k|      stbi__skip(s,4);       // skip image x and y origin
 5853|  2.44k|   } else { // "normal" image w/o colormap
 5854|  2.44k|      if ( (sz != 2) && (sz != 3) && (sz != 10) && (sz != 11) ) goto errorEnd; // only RGB or grey allowed, +/- RLE
  ------------------
  |  Branch (5854:12): [True: 2.29k, False: 149]
  |  Branch (5854:25): [True: 1.14k, False: 1.14k]
  |  Branch (5854:38): [True: 984, False: 162]
  |  Branch (5854:52): [True: 42, False: 942]
  ------------------
 5855|  2.40k|      stbi__skip(s,9); // skip colormap specification and image x/y origin
 5856|  2.40k|   }
 5857|  3.50k|   if ( stbi__get16le(s) < 1 ) goto errorEnd;      //   test width
  ------------------
  |  Branch (5857:9): [True: 5, False: 3.49k]
  ------------------
 5858|  3.49k|   if ( stbi__get16le(s) < 1 ) goto errorEnd;      //   test height
  ------------------
  |  Branch (5858:9): [True: 1, False: 3.49k]
  ------------------
 5859|  3.49k|   sz = stbi__get8(s);   //   bits per pixel
 5860|  3.49k|   if ( (tga_color_type == 1) && (sz != 8) && (sz != 16) ) goto errorEnd; // for colormapped images, bpp is size of an index
  ------------------
  |  Branch (5860:9): [True: 1.10k, False: 2.39k]
  |  Branch (5860:34): [True: 633, False: 467]
  |  Branch (5860:47): [True: 5, False: 628]
  ------------------
 5861|  3.49k|   if ( (sz != 8) && (sz != 15) && (sz != 16) && (sz != 24) && (sz != 32) ) goto errorEnd;
  ------------------
  |  Branch (5861:9): [True: 2.43k, False: 1.05k]
  |  Branch (5861:22): [True: 2.25k, False: 177]
  |  Branch (5861:36): [True: 564, False: 1.69k]
  |  Branch (5861:50): [True: 183, False: 381]
  |  Branch (5861:64): [True: 3, False: 180]
  ------------------
 5862|       |
 5863|  3.48k|   res = 1; // if we got this far, everything's good and we can return 1 instead of 0
 5864|       |
 5865|  3.62k|errorEnd:
 5866|  3.62k|   stbi__rewind(s);
 5867|  3.62k|   return res;
 5868|  3.48k|}
fuzz_gltf.cc:_ZL14stbi__tga_loadP13stbi__contextPiS1_S1_iP17stbi__result_info:
 5891|  3.48k|{
 5892|       |   //   read in the TGA header stuff
 5893|  3.48k|   int tga_offset = stbi__get8(s);
 5894|  3.48k|   int tga_indexed = stbi__get8(s);
 5895|  3.48k|   int tga_image_type = stbi__get8(s);
 5896|  3.48k|   int tga_is_RLE = 0;
 5897|  3.48k|   int tga_palette_start = stbi__get16le(s);
 5898|  3.48k|   int tga_palette_len = stbi__get16le(s);
 5899|  3.48k|   int tga_palette_bits = stbi__get8(s);
 5900|  3.48k|   int tga_x_origin = stbi__get16le(s);
 5901|  3.48k|   int tga_y_origin = stbi__get16le(s);
 5902|  3.48k|   int tga_width = stbi__get16le(s);
 5903|  3.48k|   int tga_height = stbi__get16le(s);
 5904|  3.48k|   int tga_bits_per_pixel = stbi__get8(s);
 5905|  3.48k|   int tga_comp, tga_rgb16=0;
 5906|  3.48k|   int tga_inverted = stbi__get8(s);
 5907|       |   // int tga_alpha_bits = tga_inverted & 15; // the 4 lowest bits - unused (useless?)
 5908|       |   //   image data
 5909|  3.48k|   unsigned char *tga_data;
 5910|  3.48k|   unsigned char *tga_palette = NULL;
 5911|  3.48k|   int i, j;
 5912|  3.48k|   unsigned char raw_data[4] = {0};
 5913|  3.48k|   int RLE_count = 0;
 5914|  3.48k|   int RLE_repeating = 0;
 5915|  3.48k|   int read_next_pixel = 1;
 5916|  3.48k|   STBI_NOTUSED(ri);
  ------------------
  |  |  658|  3.48k|#define STBI_NOTUSED(v)  (void)sizeof(v)
  ------------------
 5917|  3.48k|   STBI_NOTUSED(tga_x_origin); // @TODO
  ------------------
  |  |  658|  3.48k|#define STBI_NOTUSED(v)  (void)sizeof(v)
  ------------------
 5918|  3.48k|   STBI_NOTUSED(tga_y_origin); // @TODO
  ------------------
  |  |  658|  3.48k|#define STBI_NOTUSED(v)  (void)sizeof(v)
  ------------------
 5919|       |
 5920|  3.48k|   if (tga_height > STBI_MAX_DIMENSIONS) return stbi__errpuc("too large","Very large image (corrupt?)");
  ------------------
  |  |  794|  3.48k|#define STBI_MAX_DIMENSIONS (1 << 24)
  ------------------
                 if (tga_height > STBI_MAX_DIMENSIONS) return stbi__errpuc("too large","Very large image (corrupt?)");
  ------------------
  |  | 1097|      0|#define stbi__errpuc(x,y)  ((unsigned char *)(size_t) (stbi__err(x,y)?NULL:NULL))
  |  |  ------------------
  |  |  |  | 1093|      0|   #define stbi__err(x,y)  stbi__err(x)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1093:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (5920:8): [True: 0, False: 3.48k]
  ------------------
 5921|  3.48k|   if (tga_width > STBI_MAX_DIMENSIONS) return stbi__errpuc("too large","Very large image (corrupt?)");
  ------------------
  |  |  794|  3.48k|#define STBI_MAX_DIMENSIONS (1 << 24)
  ------------------
                 if (tga_width > STBI_MAX_DIMENSIONS) return stbi__errpuc("too large","Very large image (corrupt?)");
  ------------------
  |  | 1097|      0|#define stbi__errpuc(x,y)  ((unsigned char *)(size_t) (stbi__err(x,y)?NULL:NULL))
  |  |  ------------------
  |  |  |  | 1093|      0|   #define stbi__err(x,y)  stbi__err(x)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1093:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (5921:8): [True: 0, False: 3.48k]
  ------------------
 5922|       |
 5923|       |   //   do a tiny bit of precessing
 5924|  3.48k|   if ( tga_image_type >= 8 )
  ------------------
  |  Branch (5924:9): [True: 1.72k, False: 1.75k]
  ------------------
 5925|  1.72k|   {
 5926|  1.72k|      tga_image_type -= 8;
 5927|  1.72k|      tga_is_RLE = 1;
 5928|  1.72k|   }
 5929|  3.48k|   tga_inverted = 1 - ((tga_inverted >> 5) & 1);
 5930|       |
 5931|       |   //   If I'm paletted, then I'll use the number of bits from the palette
 5932|  3.48k|   if ( tga_indexed ) tga_comp = stbi__tga_get_comp(tga_palette_bits, 0, &tga_rgb16);
  ------------------
  |  Branch (5932:9): [True: 1.09k, False: 2.39k]
  ------------------
 5933|  2.39k|   else tga_comp = stbi__tga_get_comp(tga_bits_per_pixel, (tga_image_type == 3), &tga_rgb16);
 5934|       |
 5935|  3.48k|   if(!tga_comp) // shouldn't really happen, stbi__tga_test() should have ensured basic consistency
  ------------------
  |  Branch (5935:7): [True: 0, False: 3.48k]
  ------------------
 5936|      0|      return stbi__errpuc("bad format", "Can't find out TGA pixelformat");
  ------------------
  |  | 1097|      0|#define stbi__errpuc(x,y)  ((unsigned char *)(size_t) (stbi__err(x,y)?NULL:NULL))
  |  |  ------------------
  |  |  |  | 1093|      0|   #define stbi__err(x,y)  stbi__err(x)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1093:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5937|       |
 5938|       |   //   tga info
 5939|  3.48k|   *x = tga_width;
 5940|  3.48k|   *y = tga_height;
 5941|  3.48k|   if (comp) *comp = tga_comp;
  ------------------
  |  Branch (5941:8): [True: 3.48k, False: 0]
  ------------------
 5942|       |
 5943|  3.48k|   if (!stbi__mad3sizes_valid(tga_width, tga_height, tga_comp, 0))
  ------------------
  |  Branch (5943:8): [True: 1, False: 3.48k]
  ------------------
 5944|      1|      return stbi__errpuc("too large", "Corrupt TGA");
  ------------------
  |  | 1097|      1|#define stbi__errpuc(x,y)  ((unsigned char *)(size_t) (stbi__err(x,y)?NULL:NULL))
  |  |  ------------------
  |  |  |  | 1093|      1|   #define stbi__err(x,y)  stbi__err(x)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1093:28): [True: 0, False: 1]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5945|       |
 5946|  3.48k|   tga_data = (unsigned char*)stbi__malloc_mad3(tga_width, tga_height, tga_comp, 0);
 5947|  3.48k|   if (!tga_data) return stbi__errpuc("outofmem", "Out of memory");
  ------------------
  |  | 1097|      0|#define stbi__errpuc(x,y)  ((unsigned char *)(size_t) (stbi__err(x,y)?NULL:NULL))
  |  |  ------------------
  |  |  |  | 1093|      0|   #define stbi__err(x,y)  stbi__err(x)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1093:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (5947:8): [True: 0, False: 3.48k]
  ------------------
 5948|       |
 5949|       |   // skip to the data's starting position (offset usually = 0)
 5950|  3.48k|   stbi__skip(s, tga_offset );
 5951|       |
 5952|  3.48k|   if ( !tga_indexed && !tga_is_RLE && !tga_rgb16 ) {
  ------------------
  |  Branch (5952:9): [True: 2.39k, False: 1.09k]
  |  Branch (5952:25): [True: 1.28k, False: 1.10k]
  |  Branch (5952:40): [True: 1.14k, False: 144]
  ------------------
 5953|  56.6k|      for (i=0; i < tga_height; ++i) {
  ------------------
  |  Branch (5953:17): [True: 55.5k, False: 1.14k]
  ------------------
 5954|  55.5k|         int row = tga_inverted ? tga_height -i - 1 : i;
  ------------------
  |  Branch (5954:20): [True: 23.1k, False: 32.4k]
  ------------------
 5955|  55.5k|         stbi_uc *tga_row = tga_data + row*tga_width*tga_comp;
 5956|  55.5k|         stbi__getn(s, tga_row, tga_width * tga_comp);
 5957|  55.5k|      }
 5958|  2.34k|   } else  {
 5959|       |      //   do I need to load a palette?
 5960|  2.34k|      if ( tga_indexed)
  ------------------
  |  Branch (5960:12): [True: 1.09k, False: 1.24k]
  ------------------
 5961|  1.09k|      {
 5962|  1.09k|         if (tga_palette_len == 0) {  /* you have to have at least one entry! */
  ------------------
  |  Branch (5962:14): [True: 0, False: 1.09k]
  ------------------
 5963|      0|            STBI_FREE(tga_data);
  ------------------
  |  |  682|      0|#define STBI_FREE(p)              free(p)
  ------------------
 5964|      0|            return stbi__errpuc("bad palette", "Corrupt TGA");
  ------------------
  |  | 1097|      0|#define stbi__errpuc(x,y)  ((unsigned char *)(size_t) (stbi__err(x,y)?NULL:NULL))
  |  |  ------------------
  |  |  |  | 1093|      0|   #define stbi__err(x,y)  stbi__err(x)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1093:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5965|      0|         }
 5966|       |
 5967|       |         //   any data to skip? (offset usually = 0)
 5968|  1.09k|         stbi__skip(s, tga_palette_start );
 5969|       |         //   load the palette
 5970|  1.09k|         tga_palette = (unsigned char*)stbi__malloc_mad2(tga_palette_len, tga_comp, 0);
 5971|  1.09k|         if (!tga_palette) {
  ------------------
  |  Branch (5971:14): [True: 0, False: 1.09k]
  ------------------
 5972|      0|            STBI_FREE(tga_data);
  ------------------
  |  |  682|      0|#define STBI_FREE(p)              free(p)
  ------------------
 5973|      0|            return stbi__errpuc("outofmem", "Out of memory");
  ------------------
  |  | 1097|      0|#define stbi__errpuc(x,y)  ((unsigned char *)(size_t) (stbi__err(x,y)?NULL:NULL))
  |  |  ------------------
  |  |  |  | 1093|      0|   #define stbi__err(x,y)  stbi__err(x)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1093:28): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5974|      0|         }
 5975|  1.09k|         if (tga_rgb16) {
  ------------------
  |  Branch (5975:14): [True: 694, False: 401]
  ------------------
 5976|    694|            stbi_uc *pal_entry = tga_palette;
 5977|    694|            STBI_ASSERT(tga_comp == STBI_rgb);
  ------------------
  |  |  601|    694|#define STBI_ASSERT(x) assert(x)
  ------------------
 5978|  9.25M|            for (i=0; i < tga_palette_len; ++i) {
  ------------------
  |  Branch (5978:23): [True: 9.25M, False: 694]
  ------------------
 5979|  9.25M|               stbi__tga_read_rgb16(s, pal_entry);
 5980|  9.25M|               pal_entry += tga_comp;
 5981|  9.25M|            }
 5982|    694|         } else if (!stbi__getn(s, tga_palette, tga_palette_len * tga_comp)) {
  ------------------
  |  Branch (5982:21): [True: 2, False: 399]
  ------------------
 5983|      2|               STBI_FREE(tga_data);
  ------------------
  |  |  682|      2|#define STBI_FREE(p)              free(p)
  ------------------
 5984|      2|               STBI_FREE(tga_palette);
  ------------------
  |  |  682|      2|#define STBI_FREE(p)              free(p)
  ------------------
 5985|      2|               return stbi__errpuc("bad palette", "Corrupt TGA");
  ------------------
  |  | 1097|      2|#define stbi__errpuc(x,y)  ((unsigned char *)(size_t) (stbi__err(x,y)?NULL:NULL))
  |  |  ------------------
  |  |  |  | 1093|      2|   #define stbi__err(x,y)  stbi__err(x)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1093:28): [True: 0, False: 2]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 5986|      2|         }
 5987|  1.09k|      }
 5988|       |      //   load the data
 5989|  1.19G|      for (i=0; i < tga_width * tga_height; ++i)
  ------------------
  |  Branch (5989:17): [True: 1.19G, False: 2.34k]
  ------------------
 5990|  1.19G|      {
 5991|       |         //   if I'm in RLE mode, do I need to get a RLE stbi__pngchunk?
 5992|  1.19G|         if ( tga_is_RLE )
  ------------------
  |  Branch (5992:15): [True: 921M, False: 277M]
  ------------------
 5993|   921M|         {
 5994|   921M|            if ( RLE_count == 0 )
  ------------------
  |  Branch (5994:18): [True: 921M, False: 58.3k]
  ------------------
 5995|   921M|            {
 5996|       |               //   yep, get the next byte as a RLE command
 5997|   921M|               int RLE_cmd = stbi__get8(s);
 5998|   921M|               RLE_count = 1 + (RLE_cmd & 127);
 5999|   921M|               RLE_repeating = RLE_cmd >> 7;
 6000|   921M|               read_next_pixel = 1;
 6001|   921M|            } else if ( !RLE_repeating )
  ------------------
  |  Branch (6001:25): [True: 14.7k, False: 43.5k]
  ------------------
 6002|  14.7k|            {
 6003|  14.7k|               read_next_pixel = 1;
 6004|  14.7k|            }
 6005|   921M|         } else
 6006|   277M|         {
 6007|   277M|            read_next_pixel = 1;
 6008|   277M|         }
 6009|       |         //   OK, if I need to read a pixel, do it now
 6010|  1.19G|         if ( read_next_pixel )
  ------------------
  |  Branch (6010:15): [True: 1.19G, False: 43.5k]
  ------------------
 6011|  1.19G|         {
 6012|       |            //   load however much data we did have
 6013|  1.19G|            if ( tga_indexed )
  ------------------
  |  Branch (6013:18): [True: 519M, False: 679M]
  ------------------
 6014|   519M|            {
 6015|       |               // read in index, then perform the lookup
 6016|   519M|               int pal_idx = (tga_bits_per_pixel == 8) ? stbi__get8(s) : stbi__get16le(s);
  ------------------
  |  Branch (6016:30): [True: 174M, False: 344M]
  ------------------
 6017|   519M|               if ( pal_idx >= tga_palette_len ) {
  ------------------
  |  Branch (6017:21): [True: 1.19k, False: 519M]
  ------------------
 6018|       |                  // invalid index
 6019|  1.19k|                  pal_idx = 0;
 6020|  1.19k|               }
 6021|   519M|               pal_idx *= tga_comp;
 6022|  1.95G|               for (j = 0; j < tga_comp; ++j) {
  ------------------
  |  Branch (6022:28): [True: 1.43G, False: 519M]
  ------------------
 6023|  1.43G|                  raw_data[j] = tga_palette[pal_idx+j];
 6024|  1.43G|               }
 6025|   679M|            } else if(tga_rgb16) {
  ------------------
  |  Branch (6025:23): [True: 159M, False: 519M]
  ------------------
 6026|   159M|               STBI_ASSERT(tga_comp == STBI_rgb);
  ------------------
  |  |  601|   159M|#define STBI_ASSERT(x) assert(x)
  ------------------
 6027|      0|               stbi__tga_read_rgb16(s, raw_data);
 6028|   519M|            } else {
 6029|       |               //   read in the data raw
 6030|  1.29G|               for (j = 0; j < tga_comp; ++j) {
  ------------------
  |  Branch (6030:28): [True: 775M, False: 519M]
  ------------------
 6031|   775M|                  raw_data[j] = stbi__get8(s);
 6032|   775M|               }
 6033|   519M|            }
 6034|       |            //   clear the reading flag for the next pixel
 6035|      0|            read_next_pixel = 0;
 6036|  1.19G|         } // end of reading a pixel
 6037|       |
 6038|       |         // copy data
 6039|  3.89G|         for (j = 0; j < tga_comp; ++j)
  ------------------
  |  Branch (6039:22): [True: 2.69G, False: 1.19G]
  ------------------
 6040|  2.69G|           tga_data[i*tga_comp+j] = raw_data[j];
 6041|       |
 6042|       |         //   in case we're in RLE mode, keep counting down
 6043|  1.19G|         --RLE_count;
 6044|  1.19G|      }
 6045|       |      //   do I need to invert the image?
 6046|  2.34k|      if ( tga_inverted )
  ------------------
  |  Branch (6046:12): [True: 757, False: 1.58k]
  ------------------
 6047|    757|      {
 6048|   779k|         for (j = 0; j*2 < tga_height; ++j)
  ------------------
  |  Branch (6048:22): [True: 778k, False: 757]
  ------------------
 6049|   778k|         {
 6050|   778k|            int index1 = j * tga_width * tga_comp;
 6051|   778k|            int index2 = (tga_height - 1 - j) * tga_width * tga_comp;
 6052|   718M|            for (i = tga_width * tga_comp; i > 0; --i)
  ------------------
  |  Branch (6052:44): [True: 717M, False: 778k]
  ------------------
 6053|   717M|            {
 6054|   717M|               unsigned char temp = tga_data[index1];
 6055|   717M|               tga_data[index1] = tga_data[index2];
 6056|   717M|               tga_data[index2] = temp;
 6057|   717M|               ++index1;
 6058|   717M|               ++index2;
 6059|   717M|            }
 6060|   778k|         }
 6061|    757|      }
 6062|       |      //   clear my palette, if I had one
 6063|  2.34k|      if ( tga_palette != NULL )
  ------------------
  |  Branch (6063:12): [True: 1.09k, False: 1.24k]
  ------------------
 6064|  1.09k|      {
 6065|  1.09k|         STBI_FREE( tga_palette );
  ------------------
  |  |  682|  1.09k|#define STBI_FREE(p)              free(p)
  ------------------
 6066|  1.09k|      }
 6067|  2.34k|   }
 6068|       |
 6069|       |   // swap RGB - if the source data was RGB16, it already is in the right order
 6070|  3.48k|   if (tga_comp >= 3 && !tga_rgb16)
  ------------------
  |  Branch (6070:8): [True: 1.77k, False: 1.71k]
  |  Branch (6070:25): [True: 754, False: 1.01k]
  ------------------
 6071|    754|   {
 6072|    754|      unsigned char* tga_pixel = tga_data;
 6073|   175M|      for (i=0; i < tga_width * tga_height; ++i)
  ------------------
  |  Branch (6073:17): [True: 175M, False: 754]
  ------------------
 6074|   175M|      {
 6075|   175M|         unsigned char temp = tga_pixel[0];
 6076|   175M|         tga_pixel[0] = tga_pixel[2];
 6077|   175M|         tga_pixel[2] = temp;
 6078|   175M|         tga_pixel += tga_comp;
 6079|   175M|      }
 6080|    754|   }
 6081|       |
 6082|       |   // convert to target component count
 6083|  3.48k|   if (req_comp && req_comp != tga_comp)
  ------------------
  |  Branch (6083:8): [True: 3.48k, False: 0]
  |  Branch (6083:20): [True: 3.30k, False: 180]
  ------------------
 6084|  3.30k|      tga_data = stbi__convert_format(tga_data, tga_comp, req_comp, tga_width, tga_height);
 6085|       |
 6086|       |   //   the things I do to get rid of an error message, and yet keep
 6087|       |   //   Microsoft's C compilers happy... [8^(
 6088|  3.48k|   tga_palette_start = tga_palette_len = tga_palette_bits =
 6089|  3.48k|         tga_x_origin = tga_y_origin = 0;
 6090|  3.48k|   STBI_NOTUSED(tga_palette_start);
  ------------------
  |  |  658|  3.48k|#define STBI_NOTUSED(v)  (void)sizeof(v)
  ------------------
 6091|       |   //   OK, done
 6092|  3.48k|   return tga_data;
 6093|  3.48k|}
fuzz_gltf.cc:_ZL18stbi__tga_get_compiiPi:
 5759|  3.48k|{
 5760|       |   // only RGB or RGBA (incl. 16bit) or grey allowed
 5761|  3.48k|   if (is_rgb16) *is_rgb16 = 0;
  ------------------
  |  Branch (5761:8): [True: 3.48k, False: 0]
  ------------------
 5762|  3.48k|   switch(bits_per_pixel) {
 5763|    793|      case 8:  return STBI_grey;
  ------------------
  |  Branch (5763:7): [True: 793, False: 2.69k]
  ------------------
 5764|  1.53k|      case 16: if(is_grey) return STBI_grey_alpha;
  ------------------
  |  Branch (5764:7): [True: 1.53k, False: 1.95k]
  |  Branch (5764:19): [True: 921, False: 616]
  ------------------
 5765|       |               // fallthrough
 5766|  1.01k|      case 15: if(is_rgb16) *is_rgb16 = 1;
  ------------------
  |  Branch (5766:7): [True: 401, False: 3.08k]
  |  Branch (5766:19): [True: 1.01k, False: 0]
  ------------------
 5767|  1.01k|               return STBI_rgb;
 5768|    576|      case 24: // fallthrough
  ------------------
  |  Branch (5768:7): [True: 576, False: 2.91k]
  ------------------
 5769|    756|      case 32: return bits_per_pixel/8;
  ------------------
  |  Branch (5769:7): [True: 180, False: 3.30k]
  ------------------
 5770|      0|      default: return 0;
  ------------------
  |  Branch (5770:7): [True: 0, False: 3.48k]
  ------------------
 5771|  3.48k|   }
 5772|  3.48k|}
fuzz_gltf.cc:_ZL20stbi__tga_read_rgb16P13stbi__contextPh:
 5872|   168M|{
 5873|   168M|   stbi__uint16 px = (stbi__uint16)stbi__get16le(s);
 5874|   168M|   stbi__uint16 fiveBitMask = 31;
 5875|       |   // we have 3 channels with 5bits each
 5876|   168M|   int r = (px >> 10) & fiveBitMask;
 5877|   168M|   int g = (px >> 5) & fiveBitMask;
 5878|   168M|   int b = px & fiveBitMask;
 5879|       |   // Note that this saves the data in RGB(A) order, so it doesn't need to be swapped later
 5880|   168M|   out[0] = (stbi_uc)((r * 255)/31);
 5881|   168M|   out[1] = (stbi_uc)((g * 255)/31);
 5882|   168M|   out[2] = (stbi_uc)((b * 255)/31);
 5883|       |
 5884|       |   // some people claim that the most significant bit might be used for alpha
 5885|       |   // (possibly if an alpha-bit is set in the "image descriptor byte")
 5886|       |   // but that only made 16bit test images completely translucent..
 5887|       |   // so let's treat all 15 and 16bit TGAs as RGB with no alpha.
 5888|   168M|}
fuzz_gltf.cc:_ZL32stbi__load_and_postprocess_16bitP13stbi__contextPiS1_S1_i:
 1285|  1.22k|{
 1286|  1.22k|   stbi__result_info ri;
 1287|  1.22k|   void *result = stbi__load_main(s, x, y, comp, req_comp, &ri, 16);
 1288|       |
 1289|  1.22k|   if (result == NULL)
  ------------------
  |  Branch (1289:8): [True: 22, False: 1.20k]
  ------------------
 1290|     22|      return NULL;
 1291|       |
 1292|       |   // it is the responsibility of the loaders to make sure we get either 8 or 16 bit.
 1293|  1.20k|   STBI_ASSERT(ri.bits_per_channel == 8 || ri.bits_per_channel == 16);
  ------------------
  |  |  601|  1.20k|#define STBI_ASSERT(x) assert(x)
  ------------------
 1294|       |
 1295|  1.20k|   if (ri.bits_per_channel != 16) {
  ------------------
  |  Branch (1295:8): [True: 0, False: 1.20k]
  ------------------
 1296|      0|      result = stbi__convert_8_to_16((stbi_uc *) result, *x, *y, req_comp == 0 ? *comp : req_comp);
  ------------------
  |  Branch (1296:66): [True: 0, False: 0]
  ------------------
 1297|      0|      ri.bits_per_channel = 16;
 1298|      0|   }
 1299|       |
 1300|       |   // @TODO: move stbi__convert_format16 to here
 1301|       |   // @TODO: special case RGB-to-Y (and RGBA-to-YA) for 8-bit-to-16-bit case to keep more precision
 1302|       |
 1303|  1.20k|   if (stbi__vertically_flip_on_load) {
  ------------------
  |  | 1130|  1.20k|#define stbi__vertically_flip_on_load  (stbi__vertically_flip_on_load_set       \
  |  |  ------------------
  |  |  |  Branch (1130:40): [True: 0, False: 1.20k]
  |  |  |  Branch (1130:41): [True: 0, False: 1.20k]
  |  |  ------------------
  |  | 1131|  1.20k|                                         ? stbi__vertically_flip_on_load_local  \
  |  | 1132|  1.20k|                                         : stbi__vertically_flip_on_load_global)
  ------------------
 1304|      0|      int channels = req_comp ? req_comp : *comp;
  ------------------
  |  Branch (1304:22): [True: 0, False: 0]
  ------------------
 1305|      0|      stbi__vertical_flip(result, *x, *y, channels * sizeof(stbi__uint16));
 1306|      0|   }
 1307|       |
 1308|  1.20k|   return (stbi__uint16 *) result;
 1309|  1.22k|}
fuzz_gltf.cc:_ZL15stbi__start_memP13stbi__contextPKhi:
  825|  42.8k|{
  826|  42.8k|   s->io.read = NULL;
  827|  42.8k|   s->read_from_callbacks = 0;
  828|  42.8k|   s->callback_already_read = 0;
  829|  42.8k|   s->img_buffer = s->img_buffer_original = (stbi_uc *) buffer;
  830|  42.8k|   s->img_buffer_end = s->img_buffer_original_end = (stbi_uc *) buffer+len;
  831|  42.8k|}
fuzz_gltf.cc:_ZL12stbi__mallocm:
  984|   132k|{
  985|   132k|    return STBI_MALLOC(size);
  ------------------
  |  |  680|   132k|#define STBI_MALLOC(sz)           malloc(sz)
  ------------------
  986|   132k|}
fuzz_gltf.cc:_ZL14stbi__hdr_testP13stbi__context:
 7117|  3.62k|{
 7118|  3.62k|   int r = stbi__hdr_test_core(s, "#?RADIANCE\n");
 7119|  3.62k|   stbi__rewind(s);
 7120|  3.62k|   if(!r) {
  ------------------
  |  Branch (7120:7): [True: 3.62k, False: 0]
  ------------------
 7121|  3.62k|       r = stbi__hdr_test_core(s, "#?RGBE\n");
 7122|  3.62k|       stbi__rewind(s);
 7123|  3.62k|   }
 7124|  3.62k|   return r;
 7125|  3.62k|}
fuzz_gltf.cc:_ZL19stbi__hdr_test_coreP13stbi__contextPKc:
 7107|  7.25k|{
 7108|  7.25k|   int i;
 7109|  7.25k|   for (i=0; signature[i]; ++i)
  ------------------
  |  Branch (7109:14): [True: 7.25k, False: 0]
  ------------------
 7110|  7.25k|      if (stbi__get8(s) != signature[i])
  ------------------
  |  Branch (7110:11): [True: 7.25k, False: 0]
  ------------------
 7111|  7.25k|          return 0;
 7112|      0|   stbi__rewind(s);
 7113|      0|   return 1;
 7114|  7.25k|}
fuzz_gltf.cc:_ZL18stbi__png_info_rawP9stbi__pngPiS1_S1_:
 5330|  21.4k|{
 5331|  21.4k|   if (!stbi__parse_png_file(p, STBI__SCAN_header, 0)) {
  ------------------
  |  Branch (5331:8): [True: 21.4k, False: 0]
  ------------------
 5332|  21.4k|      stbi__rewind( p->s );
 5333|  21.4k|      return 0;
 5334|  21.4k|   }
 5335|      0|   if (x) *x = p->s->img_x;
  ------------------
  |  Branch (5335:8): [True: 0, False: 0]
  ------------------
 5336|      0|   if (y) *y = p->s->img_y;
  ------------------
  |  Branch (5336:8): [True: 0, False: 0]
  ------------------
 5337|      0|   if (comp) *comp = p->s->img_n;
  ------------------
  |  Branch (5337:8): [True: 0, False: 0]
  ------------------
 5338|      0|   return 1;
 5339|  21.4k|}
fuzz_gltf.cc:_ZL16stbi__is_16_mainP13stbi__context:
 7694|  21.4k|{
 7695|  21.4k|   #ifndef STBI_NO_PNG
 7696|  21.4k|   if (stbi__png_is16(s))  return 1;
  ------------------
  |  Branch (7696:8): [True: 0, False: 21.4k]
  ------------------
 7697|  21.4k|   #endif
 7698|       |
 7699|  21.4k|   #ifndef STBI_NO_PSD
 7700|  21.4k|   if (stbi__psd_is16(s))  return 1;
  ------------------
  |  Branch (7700:8): [True: 0, False: 21.4k]
  ------------------
 7701|  21.4k|   #endif
 7702|       |
 7703|  21.4k|   #ifndef STBI_NO_PNM
 7704|  21.4k|   if (stbi__pnm_is16(s))  return 1;
  ------------------
  |  Branch (7704:8): [True: 1.22k, False: 20.2k]
  ------------------
 7705|  20.2k|   #endif
 7706|  20.2k|   return 0;
 7707|  21.4k|}
fuzz_gltf.cc:_ZL14stbi__png_is16P13stbi__context:
 5349|  21.4k|{
 5350|  21.4k|   stbi__png p;
 5351|  21.4k|   p.s = s;
 5352|  21.4k|   if (!stbi__png_info_raw(&p, NULL, NULL, NULL))
  ------------------
  |  Branch (5352:8): [True: 21.4k, False: 0]
  ------------------
 5353|  21.4k|	   return 0;
 5354|      0|   if (p.depth != 16) {
  ------------------
  |  Branch (5354:8): [True: 0, False: 0]
  ------------------
 5355|      0|      stbi__rewind(p.s);
 5356|      0|      return 0;
 5357|      0|   }
 5358|      0|   return 1;
 5359|      0|}
fuzz_gltf.cc:_ZL14stbi__psd_is16P13stbi__context:
 7414|  21.4k|{
 7415|  21.4k|   int channelCount, depth;
 7416|  21.4k|   if (stbi__get32be(s) != 0x38425053) {
  ------------------
  |  Branch (7416:8): [True: 21.4k, False: 0]
  ------------------
 7417|  21.4k|       stbi__rewind( s );
 7418|  21.4k|       return 0;
 7419|  21.4k|   }
 7420|      0|   if (stbi__get16be(s) != 1) {
  ------------------
  |  Branch (7420:8): [True: 0, False: 0]
  ------------------
 7421|      0|       stbi__rewind( s );
 7422|      0|       return 0;
 7423|      0|   }
 7424|      0|   stbi__skip(s, 6);
 7425|      0|   channelCount = stbi__get16be(s);
 7426|      0|   if (channelCount < 0 || channelCount > 16) {
  ------------------
  |  Branch (7426:8): [True: 0, False: 0]
  |  Branch (7426:28): [True: 0, False: 0]
  ------------------
 7427|      0|       stbi__rewind( s );
 7428|      0|       return 0;
 7429|      0|   }
 7430|      0|   STBI_NOTUSED(stbi__get32be(s));
  ------------------
  |  |  658|      0|#define STBI_NOTUSED(v)  (void)sizeof(v)
  ------------------
 7431|      0|   STBI_NOTUSED(stbi__get32be(s));
  ------------------
  |  |  658|      0|#define STBI_NOTUSED(v)  (void)sizeof(v)
  ------------------
 7432|      0|   depth = stbi__get16be(s);
 7433|      0|   if (depth != 16) {
  ------------------
  |  Branch (7433:8): [True: 0, False: 0]
  ------------------
 7434|      0|       stbi__rewind( s );
 7435|      0|       return 0;
 7436|      0|   }
 7437|      0|   return 1;
 7438|      0|}
fuzz_gltf.cc:_ZL14stbi__pnm_is16P13stbi__context:
 7644|  21.4k|{
 7645|  21.4k|   if (stbi__pnm_info(s, NULL, NULL, NULL) == 16)
  ------------------
  |  Branch (7645:8): [True: 1.22k, False: 20.2k]
  ------------------
 7646|  1.22k|	   return 1;
 7647|  20.2k|   return 0;
 7648|  21.4k|}

_ZN8tinygltf6detail9JsonParseERN8nlohmann10basic_jsonINSt3__13mapENS3_6vectorENS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEblmdS9_NS1_14adl_serializerENS5_IhNS9_IhEEEEEEPKcmb:
 1802|  1.57k|               bool throwExc = false) {
 1803|       |#ifdef TINYGLTF_USE_RAPIDJSON
 1804|       |  (void)throwExc;
 1805|       |  doc.Parse(str, length);
 1806|       |#else
 1807|  1.57k|  doc = detail::json::parse(str, str + length, nullptr, throwExc);
 1808|  1.57k|#endif
 1809|  1.57k|}
_ZN8tinygltf13base64_decodeERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE:
 2256|  21.4k|std::string base64_decode(std::string const &encoded_string) {
 2257|  21.4k|  int in_len = static_cast<int>(encoded_string.size());
 2258|  21.4k|  int i = 0;
 2259|  21.4k|  int j = 0;
 2260|  21.4k|  int in_ = 0;
 2261|  21.4k|  unsigned char char_array_4[4], char_array_3[3];
 2262|  21.4k|  std::string ret;
 2263|       |
 2264|  21.4k|  const std::string base64_chars =
 2265|  21.4k|      "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
 2266|  21.4k|      "abcdefghijklmnopqrstuvwxyz"
 2267|  21.4k|      "0123456789+/";
 2268|       |
 2269|  2.24M|  while (in_len-- && (encoded_string[in_] != '=') &&
  ------------------
  |  Branch (2269:10): [True: 2.23M, False: 10.5k]
  |  Branch (2269:22): [True: 2.23M, False: 1.55k]
  ------------------
 2270|  2.24M|         is_base64(encoded_string[in_])) {
  ------------------
  |  Branch (2270:10): [True: 2.22M, False: 9.40k]
  ------------------
 2271|  2.22M|    char_array_4[i++] = encoded_string[in_];
 2272|  2.22M|    in_++;
 2273|  2.22M|    if (i == 4) {
  ------------------
  |  Branch (2273:9): [True: 548k, False: 1.67M]
  ------------------
 2274|  2.74M|      for (i = 0; i < 4; i++)
  ------------------
  |  Branch (2274:19): [True: 2.19M, False: 548k]
  ------------------
 2275|  2.19M|        char_array_4[i] =
 2276|  2.19M|            static_cast<unsigned char>(base64_chars.find(char_array_4[i]));
 2277|       |
 2278|   548k|      char_array_3[0] =
 2279|   548k|          (char_array_4[0] << 2) + ((char_array_4[1] & 0x30) >> 4);
 2280|   548k|      char_array_3[1] =
 2281|   548k|          ((char_array_4[1] & 0xf) << 4) + ((char_array_4[2] & 0x3c) >> 2);
 2282|   548k|      char_array_3[2] = ((char_array_4[2] & 0x3) << 6) + char_array_4[3];
 2283|       |
 2284|  2.19M|      for (i = 0; (i < 3); i++) ret += char_array_3[i];
  ------------------
  |  Branch (2284:19): [True: 1.64M, False: 548k]
  ------------------
 2285|   548k|      i = 0;
 2286|   548k|    }
 2287|  2.22M|  }
 2288|       |
 2289|  21.4k|  if (i) {
  ------------------
  |  Branch (2289:7): [True: 14.9k, False: 6.57k]
  ------------------
 2290|  43.2k|    for (j = i; j < 4; j++) char_array_4[j] = 0;
  ------------------
  |  Branch (2290:17): [True: 28.3k, False: 14.9k]
  ------------------
 2291|       |
 2292|  74.5k|    for (j = 0; j < 4; j++)
  ------------------
  |  Branch (2292:17): [True: 59.6k, False: 14.9k]
  ------------------
 2293|  59.6k|      char_array_4[j] =
 2294|  59.6k|          static_cast<unsigned char>(base64_chars.find(char_array_4[j]));
 2295|       |
 2296|  14.9k|    char_array_3[0] = (char_array_4[0] << 2) + ((char_array_4[1] & 0x30) >> 4);
 2297|  14.9k|    char_array_3[1] =
 2298|  14.9k|        ((char_array_4[1] & 0xf) << 4) + ((char_array_4[2] & 0x3c) >> 2);
 2299|  14.9k|    char_array_3[2] = ((char_array_4[2] & 0x3) << 6) + char_array_4[3];
 2300|       |
 2301|  31.3k|    for (j = 0; (j < i - 1); j++) ret += char_array_3[j];
  ------------------
  |  Branch (2301:17): [True: 16.4k, False: 14.9k]
  ------------------
 2302|  14.9k|  }
 2303|       |
 2304|  21.4k|  return ret;
 2305|  21.4k|}
_ZN8tinygltf9URIDecodeERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEEPS6_Pv:
 2381|  44.5k|               void *user_data) {
 2382|  44.5k|  (void)user_data;
 2383|  44.5k|  *out_uri = dlib::urldecode(in_uri);
 2384|  44.5k|  return true;
 2385|  44.5k|}
_ZN8tinygltf13LoadImageDataEPNS_5ImageEiPNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEES9_iiPKhiPv:
 2499|  21.4k|                   const unsigned char *bytes, int size, void *user_data) {
 2500|  21.4k|  (void)warn;
 2501|       |
 2502|  21.4k|  LoadImageDataOption option;
 2503|  21.4k|  if (user_data) {
  ------------------
  |  Branch (2503:7): [True: 21.4k, False: 0]
  ------------------
 2504|  21.4k|    option = *reinterpret_cast<LoadImageDataOption *>(user_data);
 2505|  21.4k|  }
 2506|       |
 2507|  21.4k|  int w = 0, h = 0, comp = 0, req_comp = 0;
 2508|       |
 2509|  21.4k|  unsigned char *data = nullptr;
 2510|       |
 2511|       |  // preserve_channels true: Use channels stored in the image file.
 2512|       |  // false: force 32-bit textures for common Vulkan compatibility. It appears
 2513|       |  // that some GPU drivers do not support 24-bit images for Vulkan
 2514|  21.4k|  req_comp = option.preserve_channels ? 0 : 4;
  ------------------
  |  Branch (2514:14): [True: 0, False: 21.4k]
  ------------------
 2515|  21.4k|  int bits = 8;
 2516|  21.4k|  int pixel_type = TINYGLTF_COMPONENT_TYPE_UNSIGNED_BYTE;
  ------------------
  |  |   94|  21.4k|#define TINYGLTF_COMPONENT_TYPE_UNSIGNED_BYTE (5121)
  ------------------
 2517|       |
 2518|       |  // It is possible that the image we want to load is a 16bit per channel image
 2519|       |  // We are going to attempt to load it as 16bit per channel, and if it worked,
 2520|       |  // set the image data accordingly. We are casting the returned pointer into
 2521|       |  // unsigned char, because we are representing "bytes". But we are updating
 2522|       |  // the Image metadata to signal that this image uses 2 bytes (16bits) per
 2523|       |  // channel:
 2524|  21.4k|  if (stbi_is_16_bit_from_memory(bytes, size)) {
  ------------------
  |  Branch (2524:7): [True: 1.22k, False: 20.2k]
  ------------------
 2525|  1.22k|    data = reinterpret_cast<unsigned char *>(
 2526|  1.22k|        stbi_load_16_from_memory(bytes, size, &w, &h, &comp, req_comp));
 2527|  1.22k|    if (data) {
  ------------------
  |  Branch (2527:9): [True: 1.20k, False: 22]
  ------------------
 2528|  1.20k|      bits = 16;
 2529|  1.20k|      pixel_type = TINYGLTF_COMPONENT_TYPE_UNSIGNED_SHORT;
  ------------------
  |  |   96|  1.20k|#define TINYGLTF_COMPONENT_TYPE_UNSIGNED_SHORT (5123)
  ------------------
 2530|  1.20k|    }
 2531|  1.22k|  }
 2532|       |
 2533|       |  // at this point, if data is still NULL, it means that the image wasn't
 2534|       |  // 16bit per channel, we are going to load it as a normal 8bit per channel
 2535|       |  // image as we used to do:
 2536|       |  // if image cannot be decoded, ignore parsing and keep it by its path
 2537|       |  // don't break in this case
 2538|       |  // FIXME we should only enter this function if the image is embedded. If
 2539|       |  // image->uri references
 2540|       |  // an image file, it should be left as it is. Image loading should not be
 2541|       |  // mandatory (to support other formats)
 2542|  21.4k|  if (!data) data = stbi_load_from_memory(bytes, size, &w, &h, &comp, req_comp);
  ------------------
  |  Branch (2542:7): [True: 20.2k, False: 1.20k]
  ------------------
 2543|  21.4k|  if (!data) {
  ------------------
  |  Branch (2543:7): [True: 283, False: 21.1k]
  ------------------
 2544|       |    // NOTE: you can use `warn` instead of `err`
 2545|    283|    if (err) {
  ------------------
  |  Branch (2545:9): [True: 283, False: 0]
  ------------------
 2546|    283|      (*err) +=
 2547|    283|          "Unknown image format. STB cannot decode image data for image[" +
 2548|    283|          std::to_string(image_idx) + "] name = \"" + image->name + "\".\n";
 2549|    283|    }
 2550|    283|    return false;
 2551|    283|  }
 2552|       |
 2553|  21.1k|  if ((w < 1) || (h < 1)) {
  ------------------
  |  Branch (2553:7): [True: 0, False: 21.1k]
  |  Branch (2553:18): [True: 0, False: 21.1k]
  ------------------
 2554|      0|    stbi_image_free(data);
 2555|      0|    if (err) {
  ------------------
  |  Branch (2555:9): [True: 0, False: 0]
  ------------------
 2556|      0|      (*err) += "Invalid image data for image[" + std::to_string(image_idx) +
 2557|      0|                "] name = \"" + image->name + "\"\n";
 2558|      0|    }
 2559|      0|    return false;
 2560|      0|  }
 2561|       |
 2562|  21.1k|  if (req_width > 0) {
  ------------------
  |  Branch (2562:7): [True: 0, False: 21.1k]
  ------------------
 2563|      0|    if (req_width != w) {
  ------------------
  |  Branch (2563:9): [True: 0, False: 0]
  ------------------
 2564|      0|      stbi_image_free(data);
 2565|      0|      if (err) {
  ------------------
  |  Branch (2565:11): [True: 0, False: 0]
  ------------------
 2566|      0|        (*err) += "Image width mismatch for image[" +
 2567|      0|                  std::to_string(image_idx) + "] name = \"" + image->name +
 2568|      0|                  "\"\n";
 2569|      0|      }
 2570|      0|      return false;
 2571|      0|    }
 2572|      0|  }
 2573|       |
 2574|  21.1k|  if (req_height > 0) {
  ------------------
  |  Branch (2574:7): [True: 0, False: 21.1k]
  ------------------
 2575|      0|    if (req_height != h) {
  ------------------
  |  Branch (2575:9): [True: 0, False: 0]
  ------------------
 2576|      0|      stbi_image_free(data);
 2577|      0|      if (err) {
  ------------------
  |  Branch (2577:11): [True: 0, False: 0]
  ------------------
 2578|      0|        (*err) += "Image height mismatch. for image[" +
 2579|      0|                  std::to_string(image_idx) + "] name = \"" + image->name +
 2580|      0|                  "\"\n";
 2581|      0|      }
 2582|      0|      return false;
 2583|      0|    }
 2584|      0|  }
 2585|       |
 2586|  21.1k|  if (req_comp != 0) {
  ------------------
  |  Branch (2586:7): [True: 21.1k, False: 0]
  ------------------
 2587|       |    // loaded data has `req_comp` channels(components)
 2588|  21.1k|    comp = req_comp;
 2589|  21.1k|  }
 2590|       |
 2591|  21.1k|  image->width = w;
 2592|  21.1k|  image->height = h;
 2593|  21.1k|  image->component = comp;
 2594|  21.1k|  image->bits = bits;
 2595|  21.1k|  image->pixel_type = pixel_type;
 2596|  21.1k|  image->image.resize(static_cast<size_t>(w * h * comp) * size_t(bits / 8));
 2597|  21.1k|  std::copy(data, data + w * h * comp * (bits / 8), image->image.begin());
 2598|  21.1k|  stbi_image_free(data);
 2599|       |
 2600|  21.1k|  return true;
 2601|  21.1k|}
_ZN8tinygltf10FileExistsERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEEPv:
 2728|  87.6k|bool FileExists(const std::string &abs_filename, void *) {
 2729|  87.6k|  bool ret;
 2730|       |#ifdef TINYGLTF_ANDROID_LOAD_FROM_ASSETS
 2731|       |  if (asset_manager) {
 2732|       |    AAsset *asset = AAssetManager_open(asset_manager, abs_filename.c_str(),
 2733|       |                                       AASSET_MODE_STREAMING);
 2734|       |    if (!asset) {
 2735|       |      return false;
 2736|       |    }
 2737|       |    AAsset_close(asset);
 2738|       |    ret = true;
 2739|       |  } else {
 2740|       |    return false;
 2741|       |  }
 2742|       |#else
 2743|       |#ifdef _WIN32
 2744|       |#if defined(_MSC_VER) || defined(__GLIBCXX__) || defined(_LIBCPP_VERSION)
 2745|       |
 2746|       |  // First check if a file is a directory.
 2747|       |  DWORD result = GetFileAttributesW(UTF8ToWchar(abs_filename).c_str());
 2748|       |  if (result == INVALID_FILE_ATTRIBUTES) {
 2749|       |    return false;
 2750|       |  }
 2751|       |  if (result & FILE_ATTRIBUTE_DIRECTORY) {
 2752|       |    return false;
 2753|       |  }
 2754|       |
 2755|       |  FILE *fp = nullptr;
 2756|       |  errno_t err = _wfopen_s(&fp, UTF8ToWchar(abs_filename).c_str(), L"rb");
 2757|       |  if (err != 0) {
 2758|       |    return false;
 2759|       |  }
 2760|       |#else
 2761|       |  // TODO: is_directory check
 2762|       |  FILE *fp = nullptr;
 2763|       |  errno_t err = fopen_s(&fp, abs_filename.c_str(), "rb");
 2764|       |  if (err != 0) {
 2765|       |    return false;
 2766|       |  }
 2767|       |#endif
 2768|       |
 2769|       |#else
 2770|  87.6k|  struct stat sb;
 2771|  87.6k|  if (stat(abs_filename.c_str(), &sb)) {
  ------------------
  |  Branch (2771:7): [True: 34.8k, False: 52.8k]
  ------------------
 2772|  34.8k|    return false;
 2773|  34.8k|  }
 2774|  52.8k|  if (S_ISDIR(sb.st_mode)) {
 2775|  52.8k|    return false;
 2776|  52.8k|  }
 2777|       |
 2778|      0|  FILE *fp = fopen(abs_filename.c_str(), "rb");
 2779|      0|#endif
 2780|      0|  if (fp) {
  ------------------
  |  Branch (2780:7): [True: 0, False: 0]
  ------------------
 2781|      0|    ret = true;
 2782|      0|    fclose(fp);
 2783|      0|  } else {
 2784|      0|    ret = false;
 2785|      0|  }
 2786|      0|#endif
 2787|       |
 2788|      0|  return ret;
 2789|  52.8k|}
_ZN8tinygltf14ExpandFilePathERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEEPv:
 2791|  87.6k|std::string ExpandFilePath(const std::string &filepath, void *) {
 2792|       |  // https://github.com/syoyo/tinygltf/issues/368
 2793|       |  //
 2794|       |  // No file path expansion in built-in FS function anymore, since glTF URI
 2795|       |  // should not contain tilde('~') and environment variables, and for security
 2796|       |  // reason(`wordexp`).
 2797|       |  //
 2798|       |  // Users need to supply `base_dir`(in `LoadASCIIFromString`,
 2799|       |  // `LoadBinaryFromMemory`) in expanded absolute path.
 2800|       |
 2801|  87.6k|  return filepath;
 2802|       |
 2803|       |#if 0
 2804|       |#ifdef _WIN32
 2805|       |  // Assume input `filepath` is encoded in UTF-8
 2806|       |  std::wstring wfilepath = UTF8ToWchar(filepath);
 2807|       |  DWORD wlen = ExpandEnvironmentStringsW(wfilepath.c_str(), nullptr, 0);
 2808|       |  wchar_t *wstr = new wchar_t[wlen];
 2809|       |  ExpandEnvironmentStringsW(wfilepath.c_str(), wstr, wlen);
 2810|       |
 2811|       |  std::wstring ws(wstr);
 2812|       |  delete[] wstr;
 2813|       |  return WcharToUTF8(ws);
 2814|       |
 2815|       |#else
 2816|       |
 2817|       |#if defined(TARGET_OS_IPHONE) || defined(TARGET_IPHONE_SIMULATOR) || \
 2818|       |    defined(__ANDROID__) || defined(__EMSCRIPTEN__) || defined(__OpenBSD__)
 2819|       |  // no expansion
 2820|       |  std::string s = filepath;
 2821|       |#else
 2822|       |  std::string s;
 2823|       |  wordexp_t p;
 2824|       |
 2825|       |  if (filepath.empty()) {
 2826|       |    return "";
 2827|       |  }
 2828|       |
 2829|       |  // Quote the string to keep any spaces in filepath intact.
 2830|       |  std::string quoted_path = "\"" + filepath + "\"";
 2831|       |  // char** w;
 2832|       |  int ret = wordexp(quoted_path.c_str(), &p, 0);
 2833|       |  if (ret) {
 2834|       |    // err
 2835|       |    s = filepath;
 2836|       |    return s;
 2837|       |  }
 2838|       |
 2839|       |  // Use first element only.
 2840|       |  if (p.we_wordv) {
 2841|       |    s = std::string(p.we_wordv[0]);
 2842|       |    wordfree(&p);
 2843|       |  } else {
 2844|       |    s = filepath;
 2845|       |  }
 2846|       |
 2847|       |#endif
 2848|       |
 2849|       |  return s;
 2850|       |#endif
 2851|       |#endif
 2852|  87.6k|}
_ZN8tinygltf9IsDataURIERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE:
 3145|  66.0k|bool IsDataURI(const std::string &in) {
 3146|  66.0k|  std::string header = "data:application/octet-stream;base64,";
 3147|  66.0k|  if (in.find(header) == 0) {
  ------------------
  |  Branch (3147:7): [True: 529, False: 65.4k]
  ------------------
 3148|    529|    return true;
 3149|    529|  }
 3150|       |
 3151|  65.4k|  header = "data:image/jpeg;base64,";
 3152|  65.4k|  if (in.find(header) == 0) {
  ------------------
  |  Branch (3152:7): [True: 11.6k, False: 53.8k]
  ------------------
 3153|  11.6k|    return true;
 3154|  11.6k|  }
 3155|       |
 3156|  53.8k|  header = "data:image/png;base64,";
 3157|  53.8k|  if (in.find(header) == 0) {
  ------------------
  |  Branch (3157:7): [True: 991, False: 52.8k]
  ------------------
 3158|    991|    return true;
 3159|    991|  }
 3160|       |
 3161|  52.8k|  header = "data:image/bmp;base64,";
 3162|  52.8k|  if (in.find(header) == 0) {
  ------------------
  |  Branch (3162:7): [True: 3.29k, False: 49.5k]
  ------------------
 3163|  3.29k|    return true;
 3164|  3.29k|  }
 3165|       |
 3166|  49.5k|  header = "data:image/gif;base64,";
 3167|  49.5k|  if (in.find(header) == 0) {
  ------------------
  |  Branch (3167:7): [True: 724, False: 48.8k]
  ------------------
 3168|    724|    return true;
 3169|    724|  }
 3170|       |
 3171|  48.8k|  header = "data:text/plain;base64,";
 3172|  48.8k|  if (in.find(header) == 0) {
  ------------------
  |  Branch (3172:7): [True: 611, False: 48.1k]
  ------------------
 3173|    611|    return true;
 3174|    611|  }
 3175|       |
 3176|  48.1k|  header = "data:application/gltf-buffer;base64,";
 3177|  48.1k|  if (in.find(header) == 0) {
  ------------------
  |  Branch (3177:7): [True: 3.67k, False: 44.5k]
  ------------------
 3178|  3.67k|    return true;
 3179|  3.67k|  }
 3180|       |
 3181|  44.5k|  return false;
 3182|  48.1k|}
_ZN8tinygltf13DecodeDataURIEPNSt3__16vectorIhNS0_9allocatorIhEEEERNS0_12basic_stringIcNS0_11char_traitsIcEENS2_IcEEEERKSA_mb:
 3185|  21.4k|                   const std::string &in, size_t reqBytes, bool checkSize) {
 3186|  21.4k|  std::string header = "data:application/octet-stream;base64,";
 3187|  21.4k|  std::string data;
 3188|  21.4k|  if (in.find(header) == 0) {
  ------------------
  |  Branch (3188:7): [True: 529, False: 20.9k]
  ------------------
 3189|    529|    data = base64_decode(in.substr(header.size()));  // cut mime string.
 3190|    529|  }
 3191|       |
 3192|  21.4k|  if (data.empty()) {
  ------------------
  |  Branch (3192:7): [True: 20.9k, False: 529]
  ------------------
 3193|  20.9k|    header = "data:image/jpeg;base64,";
 3194|  20.9k|    if (in.find(header) == 0) {
  ------------------
  |  Branch (3194:9): [True: 11.6k, False: 9.29k]
  ------------------
 3195|  11.6k|      mime_type = "image/jpeg";
 3196|  11.6k|      data = base64_decode(in.substr(header.size()));  // cut mime string.
 3197|  11.6k|    }
 3198|  20.9k|  }
 3199|       |
 3200|  21.4k|  if (data.empty()) {
  ------------------
  |  Branch (3200:7): [True: 9.29k, False: 12.1k]
  ------------------
 3201|  9.29k|    header = "data:image/png;base64,";
 3202|  9.29k|    if (in.find(header) == 0) {
  ------------------
  |  Branch (3202:9): [True: 991, False: 8.30k]
  ------------------
 3203|    991|      mime_type = "image/png";
 3204|    991|      data = base64_decode(in.substr(header.size()));  // cut mime string.
 3205|    991|    }
 3206|  9.29k|  }
 3207|       |
 3208|  21.4k|  if (data.empty()) {
  ------------------
  |  Branch (3208:7): [True: 8.31k, False: 13.1k]
  ------------------
 3209|  8.31k|    header = "data:image/bmp;base64,";
 3210|  8.31k|    if (in.find(header) == 0) {
  ------------------
  |  Branch (3210:9): [True: 3.29k, False: 5.02k]
  ------------------
 3211|  3.29k|      mime_type = "image/bmp";
 3212|  3.29k|      data = base64_decode(in.substr(header.size()));  // cut mime string.
 3213|  3.29k|    }
 3214|  8.31k|  }
 3215|       |
 3216|  21.4k|  if (data.empty()) {
  ------------------
  |  Branch (3216:7): [True: 5.03k, False: 16.4k]
  ------------------
 3217|  5.03k|    header = "data:image/gif;base64,";
 3218|  5.03k|    if (in.find(header) == 0) {
  ------------------
  |  Branch (3218:9): [True: 724, False: 4.31k]
  ------------------
 3219|    724|      mime_type = "image/gif";
 3220|    724|      data = base64_decode(in.substr(header.size()));  // cut mime string.
 3221|    724|    }
 3222|  5.03k|  }
 3223|       |
 3224|  21.4k|  if (data.empty()) {
  ------------------
  |  Branch (3224:7): [True: 4.32k, False: 17.1k]
  ------------------
 3225|  4.32k|    header = "data:text/plain;base64,";
 3226|  4.32k|    if (in.find(header) == 0) {
  ------------------
  |  Branch (3226:9): [True: 611, False: 3.71k]
  ------------------
 3227|    611|      mime_type = "text/plain";
 3228|    611|      data = base64_decode(in.substr(header.size()));
 3229|    611|    }
 3230|  4.32k|  }
 3231|       |
 3232|  21.4k|  if (data.empty()) {
  ------------------
  |  Branch (3232:7): [True: 3.71k, False: 17.7k]
  ------------------
 3233|  3.71k|    header = "data:application/gltf-buffer;base64,";
 3234|  3.71k|    if (in.find(header) == 0) {
  ------------------
  |  Branch (3234:9): [True: 3.67k, False: 45]
  ------------------
 3235|  3.67k|      data = base64_decode(in.substr(header.size()));
 3236|  3.67k|    }
 3237|  3.71k|  }
 3238|       |
 3239|       |  // TODO(syoyo): Allow empty buffer? #229
 3240|  21.4k|  if (data.empty()) {
  ------------------
  |  Branch (3240:7): [True: 57, False: 21.4k]
  ------------------
 3241|     57|    return false;
 3242|     57|  }
 3243|       |
 3244|  21.4k|  if (checkSize) {
  ------------------
  |  Branch (3244:7): [True: 0, False: 21.4k]
  ------------------
 3245|      0|    if (data.size() != reqBytes) {
  ------------------
  |  Branch (3245:9): [True: 0, False: 0]
  ------------------
 3246|      0|      return false;
 3247|      0|    }
 3248|      0|    out->resize(reqBytes);
 3249|  21.4k|  } else {
 3250|  21.4k|    out->resize(data.size());
 3251|  21.4k|  }
 3252|  21.4k|  std::copy(data.begin(), data.end(), out->begin());
 3253|  21.4k|  return true;
 3254|  21.4k|}
_ZN8tinygltf6detail6GetIntERKN8nlohmann10basic_jsonINSt3__13mapENS3_6vectorENS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEblmdS9_NS1_14adl_serializerENS5_IhNS9_IhEEEEEERi:
 3257|  51.1k|bool GetInt(const detail::json &o, int &val) {
 3258|       |#ifdef TINYGLTF_USE_RAPIDJSON
 3259|       |  if (!o.IsDouble()) {
 3260|       |    if (o.IsInt()) {
 3261|       |      val = o.GetInt();
 3262|       |      return true;
 3263|       |    } else if (o.IsUint()) {
 3264|       |      val = static_cast<int>(o.GetUint());
 3265|       |      return true;
 3266|       |    } else if (o.IsInt64()) {
 3267|       |      val = static_cast<int>(o.GetInt64());
 3268|       |      return true;
 3269|       |    } else if (o.IsUint64()) {
 3270|       |      val = static_cast<int>(o.GetUint64());
 3271|       |      return true;
 3272|       |    }
 3273|       |  }
 3274|       |
 3275|       |  return false;
 3276|       |#else
 3277|  51.1k|  auto type = o.type();
 3278|       |
 3279|  51.1k|  if ((type == detail::json::value_t::number_integer) ||
  ------------------
  |  Branch (3279:7): [True: 1.77k, False: 49.3k]
  ------------------
 3280|  51.1k|      (type == detail::json::value_t::number_unsigned)) {
  ------------------
  |  Branch (3280:7): [True: 48.2k, False: 1.04k]
  ------------------
 3281|  50.0k|    val = static_cast<int>(o.get<int64_t>());
 3282|  50.0k|    return true;
 3283|  50.0k|  }
 3284|       |
 3285|  1.04k|  return false;
 3286|  51.1k|#endif
 3287|  51.1k|}
_ZN8tinygltf6detail9GetNumberERKN8nlohmann10basic_jsonINSt3__13mapENS3_6vectorENS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEblmdS9_NS1_14adl_serializerENS5_IhNS9_IhEEEEEERd:
 3300|  1.23M|bool GetNumber(const detail::json &o, double &val) {
 3301|       |#ifdef TINYGLTF_USE_RAPIDJSON
 3302|       |  if (o.IsNumber()) {
 3303|       |    val = o.GetDouble();
 3304|       |    return true;
 3305|       |  }
 3306|       |
 3307|       |  return false;
 3308|       |#else
 3309|  1.23M|  if (o.is_number()) {
  ------------------
  |  Branch (3309:7): [True: 1.22M, False: 9.09k]
  ------------------
 3310|  1.22M|    val = o.get<double>();
 3311|  1.22M|    return true;
 3312|  1.22M|  }
 3313|       |
 3314|  9.09k|  return false;
 3315|  1.23M|#endif
 3316|  1.23M|}
_ZN8tinygltf6detail9GetStringERKN8nlohmann10basic_jsonINSt3__13mapENS3_6vectorENS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEblmdS9_NS1_14adl_serializerENS5_IhNS9_IhEEEEEERSB_:
 3318|   637k|bool GetString(const detail::json &o, std::string &val) {
 3319|       |#ifdef TINYGLTF_USE_RAPIDJSON
 3320|       |  if (o.IsString()) {
 3321|       |    val = o.GetString();
 3322|       |    return true;
 3323|       |  }
 3324|       |
 3325|       |  return false;
 3326|       |#else
 3327|   637k|  if (o.type() == detail::json::value_t::string) {
  ------------------
  |  Branch (3327:7): [True: 71.8k, False: 565k]
  ------------------
 3328|  71.8k|    val = o.get<std::string>();
 3329|  71.8k|    return true;
 3330|  71.8k|  }
 3331|       |
 3332|   565k|  return false;
 3333|   637k|#endif
 3334|   637k|}
_ZN8tinygltf6detail7IsArrayERKN8nlohmann10basic_jsonINSt3__13mapENS3_6vectorENS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEblmdS9_NS1_14adl_serializerENS5_IhNS9_IhEEEEEE:
 3336|  38.6k|bool IsArray(const detail::json &o) {
 3337|       |#ifdef TINYGLTF_USE_RAPIDJSON
 3338|       |  return o.IsArray();
 3339|       |#else
 3340|  38.6k|  return o.is_array();
 3341|  38.6k|#endif
 3342|  38.6k|}
_ZN8tinygltf6detail10ArrayBeginERKN8nlohmann10basic_jsonINSt3__13mapENS3_6vectorENS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEblmdS9_NS1_14adl_serializerENS5_IhNS9_IhEEEEEE:
 3344|  23.6k|detail::json_const_array_iterator ArrayBegin(const detail::json &o) {
 3345|       |#ifdef TINYGLTF_USE_RAPIDJSON
 3346|       |  return o.Begin();
 3347|       |#else
 3348|  23.6k|  return o.begin();
 3349|  23.6k|#endif
 3350|  23.6k|}
_ZN8tinygltf6detail8ArrayEndERKN8nlohmann10basic_jsonINSt3__13mapENS3_6vectorENS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEblmdS9_NS1_14adl_serializerENS5_IhNS9_IhEEEEEE:
 3352|  23.6k|detail::json_const_array_iterator ArrayEnd(const detail::json &o) {
 3353|       |#ifdef TINYGLTF_USE_RAPIDJSON
 3354|       |  return o.End();
 3355|       |#else
 3356|  23.6k|  return o.end();
 3357|  23.6k|#endif
 3358|  23.6k|}
_ZN8tinygltf6detail8IsObjectERKN8nlohmann10basic_jsonINSt3__13mapENS3_6vectorENS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEblmdS9_NS1_14adl_serializerENS5_IhNS9_IhEEEEEE:
 3360|  1.03M|bool IsObject(const detail::json &o) {
 3361|       |#ifdef TINYGLTF_USE_RAPIDJSON
 3362|       |  return o.IsObject();
 3363|       |#else
 3364|  1.03M|  return o.is_object();
 3365|  1.03M|#endif
 3366|  1.03M|}
_ZN8tinygltf6detail11ObjectBeginERKN8nlohmann10basic_jsonINSt3__13mapENS3_6vectorENS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEblmdS9_NS1_14adl_serializerENS5_IhNS9_IhEEEEEE:
 3368|   255k|detail::json_const_iterator ObjectBegin(const detail::json &o) {
 3369|       |#ifdef TINYGLTF_USE_RAPIDJSON
 3370|       |  return o.MemberBegin();
 3371|       |#else
 3372|   255k|  return o.begin();
 3373|   255k|#endif
 3374|   255k|}
_ZN8tinygltf6detail9ObjectEndERKN8nlohmann10basic_jsonINSt3__13mapENS3_6vectorENS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEblmdS9_NS1_14adl_serializerENS5_IhNS9_IhEEEEEE:
 3376|   255k|detail::json_const_iterator ObjectEnd(const detail::json &o) {
 3377|       |#ifdef TINYGLTF_USE_RAPIDJSON
 3378|       |  return o.MemberEnd();
 3379|       |#else
 3380|   255k|  return o.end();
 3381|   255k|#endif
 3382|   255k|}
_ZN8tinygltf6detail6GetKeyERN8nlohmann6detail9iter_implIKNS1_10basic_jsonINSt3__13mapENS5_6vectorENS5_12basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEEblmdSB_NS1_14adl_serializerENS7_IhNSB_IhEEEEEEEE:
 3386|  47.8k|std::string GetKey(detail::json_const_iterator &it) {
 3387|       |#ifdef TINYGLTF_USE_RAPIDJSON
 3388|       |  return it->name.GetString();
 3389|       |#else
 3390|  47.8k|  return it.key().c_str();
 3391|  47.8k|#endif
 3392|  47.8k|}
_ZN8tinygltf6detail10FindMemberERKN8nlohmann10basic_jsonINSt3__13mapENS3_6vectorENS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEblmdS9_NS1_14adl_serializerENS5_IhNS9_IhEEEEEEPKcRNS1_6detail9iter_implISG_EE:
 3394|  5.35M|bool FindMember(const detail::json &o, const char *member, detail::json_const_iterator &it) {
 3395|       |#ifdef TINYGLTF_USE_RAPIDJSON
 3396|       |  if (!o.IsObject()) {
 3397|       |    return false;
 3398|       |  }
 3399|       |  it = o.FindMember(member);
 3400|       |  return it != o.MemberEnd();
 3401|       |#else
 3402|  5.35M|  it = o.find(member);
 3403|  5.35M|  return it != o.end();
 3404|  5.35M|#endif
 3405|  5.35M|}
_ZN8tinygltf6detail8GetValueERN8nlohmann6detail9iter_implIKNS1_10basic_jsonINSt3__13mapENS5_6vectorENS5_12basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEEblmdSB_NS1_14adl_serializerENS7_IhNSB_IhEEEEEEEE:
 3407|   269k|const detail::json &GetValue(detail::json_const_iterator &it) {
 3408|       |#ifdef TINYGLTF_USE_RAPIDJSON
 3409|       |  return it->value;
 3410|       |#else
 3411|   269k|  return it.value();
 3412|   269k|#endif
 3413|   269k|}
_ZN8tinygltf8TinyGLTF14LoadFromStringEPNS_5ModelEPNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEESA_PKcjRKS9_j:
 5490|  1.57k|                              unsigned int check_sections) {
 5491|  1.57k|  if (json_str_length < 4) {
  ------------------
  |  Branch (5491:7): [True: 0, False: 1.57k]
  ------------------
 5492|      0|    if (err) {
  ------------------
  |  Branch (5492:9): [True: 0, False: 0]
  ------------------
 5493|      0|      (*err) = "JSON string too short.\n";
 5494|      0|    }
 5495|      0|    return false;
 5496|      0|  }
 5497|       |
 5498|  1.57k|  detail::JsonDocument v;
 5499|       |
 5500|  1.57k|#if (defined(__cpp_exceptions) || defined(__EXCEPTIONS) || \
 5501|  1.57k|     defined(_CPPUNWIND)) &&                               \
 5502|  1.57k|    !defined(TINYGLTF_NOEXCEPTION)
 5503|  1.57k|  try {
 5504|  1.57k|    detail::JsonParse(v, json_str, json_str_length, true);
 5505|       |
 5506|  1.57k|  } catch (const std::exception &e) {
 5507|    180|    if (err) {
  ------------------
  |  Branch (5507:9): [True: 180, False: 0]
  ------------------
 5508|    180|      (*err) = e.what();
 5509|    180|    }
 5510|    180|    return false;
 5511|    180|  }
 5512|       |#else
 5513|       |  {
 5514|       |    detail::JsonParse(v, json_str, json_str_length);
 5515|       |
 5516|       |    if (!detail::IsObject(v)) {
 5517|       |      // Assume parsing was failed.
 5518|       |      if (err) {
 5519|       |        (*err) = "Failed to parse JSON object\n";
 5520|       |      }
 5521|       |      return false;
 5522|       |    }
 5523|       |  }
 5524|       |#endif
 5525|       |
 5526|  1.39k|  if (!detail::IsObject(v)) {
  ------------------
  |  Branch (5526:7): [True: 0, False: 1.39k]
  ------------------
 5527|       |    // root is not an object.
 5528|      0|    if (err) {
  ------------------
  |  Branch (5528:9): [True: 0, False: 0]
  ------------------
 5529|      0|      (*err) = "Root element is not a JSON object\n";
 5530|      0|    }
 5531|      0|    return false;
 5532|      0|  }
 5533|       |
 5534|  1.39k|  {
 5535|  1.39k|    bool version_found = false;
 5536|  1.39k|    detail::json_const_iterator it;
 5537|  1.39k|    if (detail::FindMember(v, "asset", it) && detail::IsObject(detail::GetValue(it))) {
  ------------------
  |  Branch (5537:9): [True: 1.39k, False: 7]
  |  Branch (5537:47): [True: 1.39k, False: 0]
  ------------------
 5538|  1.39k|      auto &itObj = detail::GetValue(it);
 5539|  1.39k|      detail::json_const_iterator version_it;
 5540|  1.39k|      std::string versionStr;
 5541|  1.39k|      if (detail::FindMember(itObj, "version", version_it) &&
  ------------------
  |  Branch (5541:11): [True: 1.39k, False: 0]
  ------------------
 5542|  1.39k|          detail::GetString(detail::GetValue(version_it), versionStr)) {
  ------------------
  |  Branch (5542:11): [True: 1.39k, False: 0]
  ------------------
 5543|  1.39k|        version_found = true;
 5544|  1.39k|      }
 5545|  1.39k|    }
 5546|  1.39k|    if (version_found) {
  ------------------
  |  Branch (5546:9): [True: 1.39k, False: 7]
  ------------------
 5547|       |      // OK
 5548|  1.39k|    } else if (check_sections & REQUIRE_VERSION) {
  ------------------
  |  Branch (5548:16): [True: 7, False: 0]
  ------------------
 5549|      7|      if (err) {
  ------------------
  |  Branch (5549:11): [True: 7, False: 0]
  ------------------
 5550|      7|        (*err) += "\"asset\" object not found in .gltf or not an object type\n";
 5551|      7|      }
 5552|      7|      return false;
 5553|      7|    }
 5554|  1.39k|  }
 5555|       |
 5556|       |  // scene is not mandatory.
 5557|       |  // FIXME Maybe a better way to handle it than removing the code
 5558|       |
 5559|  1.39k|  auto IsArrayMemberPresent = [](const detail::json &_v, const char *name) -> bool {
 5560|  1.39k|    detail::json_const_iterator it;
 5561|  1.39k|    return detail::FindMember(_v, name, it) && detail::IsArray(detail::GetValue(it));
 5562|  1.39k|  };
 5563|       |
 5564|  1.39k|  {
 5565|  1.39k|    if ((check_sections & REQUIRE_SCENES) &&
  ------------------
  |  Branch (5565:9): [True: 0, False: 1.39k]
  ------------------
 5566|  1.39k|        !IsArrayMemberPresent(v, "scenes")) {
  ------------------
  |  Branch (5566:9): [True: 0, False: 0]
  ------------------
 5567|      0|      if (err) {
  ------------------
  |  Branch (5567:11): [True: 0, False: 0]
  ------------------
 5568|      0|        (*err) += "\"scenes\" object not found in .gltf or not an array type\n";
 5569|      0|      }
 5570|      0|      return false;
 5571|      0|    }
 5572|  1.39k|  }
 5573|       |
 5574|  1.39k|  {
 5575|  1.39k|    if ((check_sections & REQUIRE_NODES) && !IsArrayMemberPresent(v, "nodes")) {
  ------------------
  |  Branch (5575:9): [True: 0, False: 1.39k]
  |  Branch (5575:45): [True: 0, False: 0]
  ------------------
 5576|      0|      if (err) {
  ------------------
  |  Branch (5576:11): [True: 0, False: 0]
  ------------------
 5577|      0|        (*err) += "\"nodes\" object not found in .gltf\n";
 5578|      0|      }
 5579|      0|      return false;
 5580|      0|    }
 5581|  1.39k|  }
 5582|       |
 5583|  1.39k|  {
 5584|  1.39k|    if ((check_sections & REQUIRE_ACCESSORS) &&
  ------------------
  |  Branch (5584:9): [True: 0, False: 1.39k]
  ------------------
 5585|  1.39k|        !IsArrayMemberPresent(v, "accessors")) {
  ------------------
  |  Branch (5585:9): [True: 0, False: 0]
  ------------------
 5586|      0|      if (err) {
  ------------------
  |  Branch (5586:11): [True: 0, False: 0]
  ------------------
 5587|      0|        (*err) += "\"accessors\" object not found in .gltf\n";
 5588|      0|      }
 5589|      0|      return false;
 5590|      0|    }
 5591|  1.39k|  }
 5592|       |
 5593|  1.39k|  {
 5594|  1.39k|    if ((check_sections & REQUIRE_BUFFERS) &&
  ------------------
  |  Branch (5594:9): [True: 0, False: 1.39k]
  ------------------
 5595|  1.39k|        !IsArrayMemberPresent(v, "buffers")) {
  ------------------
  |  Branch (5595:9): [True: 0, False: 0]
  ------------------
 5596|      0|      if (err) {
  ------------------
  |  Branch (5596:11): [True: 0, False: 0]
  ------------------
 5597|      0|        (*err) += "\"buffers\" object not found in .gltf\n";
 5598|      0|      }
 5599|      0|      return false;
 5600|      0|    }
 5601|  1.39k|  }
 5602|       |
 5603|  1.39k|  {
 5604|  1.39k|    if ((check_sections & REQUIRE_BUFFER_VIEWS) &&
  ------------------
  |  Branch (5604:9): [True: 0, False: 1.39k]
  ------------------
 5605|  1.39k|        !IsArrayMemberPresent(v, "bufferViews")) {
  ------------------
  |  Branch (5605:9): [True: 0, False: 0]
  ------------------
 5606|      0|      if (err) {
  ------------------
  |  Branch (5606:11): [True: 0, False: 0]
  ------------------
 5607|      0|        (*err) += "\"bufferViews\" object not found in .gltf\n";
 5608|      0|      }
 5609|      0|      return false;
 5610|      0|    }
 5611|  1.39k|  }
 5612|       |
 5613|  1.39k|  model->buffers.clear();
 5614|  1.39k|  model->bufferViews.clear();
 5615|  1.39k|  model->accessors.clear();
 5616|  1.39k|  model->meshes.clear();
 5617|  1.39k|  model->cameras.clear();
 5618|  1.39k|  model->nodes.clear();
 5619|  1.39k|  model->extensionsUsed.clear();
 5620|  1.39k|  model->extensionsRequired.clear();
 5621|  1.39k|  model->extensions.clear();
 5622|  1.39k|  model->defaultScene = -1;
 5623|       |
 5624|       |  // 1. Parse Asset
 5625|  1.39k|  {
 5626|  1.39k|    detail::json_const_iterator it;
 5627|  1.39k|    if (detail::FindMember(v, "asset", it) && detail::IsObject(detail::GetValue(it))) {
  ------------------
  |  Branch (5627:9): [True: 1.39k, False: 0]
  |  Branch (5627:47): [True: 1.39k, False: 0]
  ------------------
 5628|  1.39k|      const detail::json &root = detail::GetValue(it);
 5629|       |
 5630|  1.39k|      ParseAsset(&model->asset, err, root,
 5631|  1.39k|                 store_original_json_for_extras_and_extensions_);
 5632|  1.39k|    }
 5633|  1.39k|  }
 5634|       |
 5635|  1.39k|  using detail::ForEachInArray;
 5636|       |
 5637|       |  // 2. Parse extensionUsed
 5638|  1.39k|  {
 5639|  1.39k|    ForEachInArray(v, "extensionsUsed", [&](const detail::json &o) {
 5640|  1.39k|      std::string str;
 5641|  1.39k|      detail::GetString(o, str);
 5642|  1.39k|      model->extensionsUsed.emplace_back(std::move(str));
 5643|  1.39k|      return true;
 5644|  1.39k|    });
 5645|  1.39k|  }
 5646|       |
 5647|  1.39k|  {
 5648|  1.39k|    ForEachInArray(v, "extensionsRequired", [&](const detail::json &o) {
 5649|  1.39k|      std::string str;
 5650|  1.39k|      detail::GetString(o, str);
 5651|  1.39k|      model->extensionsRequired.emplace_back(std::move(str));
 5652|  1.39k|      return true;
 5653|  1.39k|    });
 5654|  1.39k|  }
 5655|       |
 5656|       |  // 3. Parse Buffer
 5657|  1.39k|  {
 5658|  1.39k|    bool success = ForEachInArray(v, "buffers", [&](const detail::json &o) {
 5659|  1.39k|      if (!detail::IsObject(o)) {
 5660|  1.39k|        if (err) {
 5661|  1.39k|          (*err) += "`buffers' does not contain an JSON object.";
 5662|  1.39k|        }
 5663|  1.39k|        return false;
 5664|  1.39k|      }
 5665|  1.39k|      Buffer buffer;
 5666|  1.39k|      if (!ParseBuffer(&buffer, err, o,
 5667|  1.39k|                       store_original_json_for_extras_and_extensions_, &fs,
 5668|  1.39k|                       &uri_cb, base_dir, max_external_file_size_, is_binary_, bin_data_, bin_size_)) {
 5669|  1.39k|        return false;
 5670|  1.39k|      }
 5671|       |
 5672|  1.39k|      model->buffers.emplace_back(std::move(buffer));
 5673|  1.39k|      return true;
 5674|  1.39k|    });
 5675|       |
 5676|  1.39k|    if (!success) {
  ------------------
  |  Branch (5676:9): [True: 0, False: 1.39k]
  ------------------
 5677|      0|      return false;
 5678|      0|    }
 5679|  1.39k|  }
 5680|       |  // 4. Parse BufferView
 5681|  1.39k|  {
 5682|  1.39k|    bool success = ForEachInArray(v, "bufferViews", [&](const detail::json &o) {
 5683|  1.39k|      if (!detail::IsObject(o)) {
 5684|  1.39k|        if (err) {
 5685|  1.39k|          (*err) += "`bufferViews' does not contain an JSON object.";
 5686|  1.39k|        }
 5687|  1.39k|        return false;
 5688|  1.39k|      }
 5689|  1.39k|      BufferView bufferView;
 5690|  1.39k|      if (!ParseBufferView(&bufferView, err, o,
 5691|  1.39k|                           store_original_json_for_extras_and_extensions_)) {
 5692|  1.39k|        return false;
 5693|  1.39k|      }
 5694|       |
 5695|  1.39k|      model->bufferViews.emplace_back(std::move(bufferView));
 5696|  1.39k|      return true;
 5697|  1.39k|    });
 5698|       |
 5699|  1.39k|    if (!success) {
  ------------------
  |  Branch (5699:9): [True: 0, False: 1.39k]
  ------------------
 5700|      0|      return false;
 5701|      0|    }
 5702|  1.39k|  }
 5703|       |
 5704|       |  // 5. Parse Accessor
 5705|  1.39k|  {
 5706|  1.39k|    bool success = ForEachInArray(v, "accessors", [&](const detail::json &o) {
 5707|  1.39k|      if (!detail::IsObject(o)) {
 5708|  1.39k|        if (err) {
 5709|  1.39k|          (*err) += "`accessors' does not contain an JSON object.";
 5710|  1.39k|        }
 5711|  1.39k|        return false;
 5712|  1.39k|      }
 5713|  1.39k|      Accessor accessor;
 5714|  1.39k|      if (!ParseAccessor(&accessor, err, o,
 5715|  1.39k|                         store_original_json_for_extras_and_extensions_)) {
 5716|  1.39k|        return false;
 5717|  1.39k|      }
 5718|       |
 5719|  1.39k|      model->accessors.emplace_back(std::move(accessor));
 5720|  1.39k|      return true;
 5721|  1.39k|    });
 5722|       |
 5723|  1.39k|    if (!success) {
  ------------------
  |  Branch (5723:9): [True: 0, False: 1.39k]
  ------------------
 5724|      0|      return false;
 5725|      0|    }
 5726|  1.39k|  }
 5727|       |
 5728|       |  // 6. Parse Mesh
 5729|  1.39k|  {
 5730|  1.39k|    bool success = ForEachInArray(v, "meshes", [&](const detail::json &o) {
 5731|  1.39k|      if (!detail::IsObject(o)) {
 5732|  1.39k|        if (err) {
 5733|  1.39k|          (*err) += "`meshes' does not contain an JSON object.";
 5734|  1.39k|        }
 5735|  1.39k|        return false;
 5736|  1.39k|      }
 5737|  1.39k|      Mesh mesh;
 5738|  1.39k|      if (!ParseMesh(&mesh, model, err, o,
 5739|  1.39k|                     store_original_json_for_extras_and_extensions_)) {
 5740|  1.39k|        return false;
 5741|  1.39k|      }
 5742|       |
 5743|  1.39k|      model->meshes.emplace_back(std::move(mesh));
 5744|  1.39k|      return true;
 5745|  1.39k|    });
 5746|       |
 5747|  1.39k|    if (!success) {
  ------------------
  |  Branch (5747:9): [True: 0, False: 1.39k]
  ------------------
 5748|      0|      return false;
 5749|      0|    }
 5750|  1.39k|  }
 5751|       |
 5752|       |  // Assign missing bufferView target types
 5753|       |  // - Look for missing Mesh indices
 5754|       |  // - Look for missing Mesh attributes
 5755|   139k|  for (auto &mesh : model->meshes) {
  ------------------
  |  Branch (5755:19): [True: 139k, False: 1.39k]
  ------------------
 5756|   139k|    for (auto &primitive : mesh.primitives) {
  ------------------
  |  Branch (5756:26): [True: 35.7k, False: 139k]
  ------------------
 5757|  35.7k|      if (primitive.indices >
  ------------------
  |  Branch (5757:11): [True: 0, False: 35.7k]
  ------------------
 5758|  35.7k|          -1)  // has indices from parsing step, must be Element Array Buffer
 5759|      0|      {
 5760|      0|        if (size_t(primitive.indices) >= model->accessors.size()) {
  ------------------
  |  Branch (5760:13): [True: 0, False: 0]
  ------------------
 5761|      0|          if (err) {
  ------------------
  |  Branch (5761:15): [True: 0, False: 0]
  ------------------
 5762|      0|            (*err) += "primitive indices accessor out of bounds";
 5763|      0|          }
 5764|      0|          return false;
 5765|      0|        }
 5766|       |
 5767|      0|        auto bufferView =
 5768|      0|            model->accessors[size_t(primitive.indices)].bufferView;
 5769|      0|        if (bufferView < 0 || size_t(bufferView) >= model->bufferViews.size()) {
  ------------------
  |  Branch (5769:13): [True: 0, False: 0]
  |  Branch (5769:31): [True: 0, False: 0]
  ------------------
 5770|      0|          if (err) {
  ------------------
  |  Branch (5770:15): [True: 0, False: 0]
  ------------------
 5771|      0|            (*err) += "accessor[" + std::to_string(primitive.indices) +
 5772|      0|                      "] invalid bufferView";
 5773|      0|          }
 5774|      0|          return false;
 5775|      0|        }
 5776|       |
 5777|      0|        model->bufferViews[size_t(bufferView)].target =
 5778|      0|            TINYGLTF_TARGET_ELEMENT_ARRAY_BUFFER;
  ------------------
  |  |  172|      0|#define TINYGLTF_TARGET_ELEMENT_ARRAY_BUFFER (34963)
  ------------------
 5779|       |        // we could optionally check if accessors' bufferView type is Scalar, as
 5780|       |        // it should be
 5781|      0|      }
 5782|       |
 5783|  35.7k|      for (auto &attribute : primitive.attributes) {
  ------------------
  |  Branch (5783:28): [True: 3.74k, False: 35.7k]
  ------------------
 5784|  3.74k|        const auto accessorsIndex = size_t(attribute.second);
 5785|  3.74k|        if (accessorsIndex < model->accessors.size()) {
  ------------------
  |  Branch (5785:13): [True: 0, False: 3.74k]
  ------------------
 5786|      0|          const auto bufferView = model->accessors[accessorsIndex].bufferView;
 5787|       |          // bufferView could be null(-1) for sparse morph target
 5788|      0|          if (bufferView >= 0 && bufferView < (int)model->bufferViews.size()) {
  ------------------
  |  Branch (5788:15): [True: 0, False: 0]
  |  Branch (5788:34): [True: 0, False: 0]
  ------------------
 5789|      0|            model->bufferViews[size_t(bufferView)].target =
 5790|      0|                TINYGLTF_TARGET_ARRAY_BUFFER;
  ------------------
  |  |  171|      0|#define TINYGLTF_TARGET_ARRAY_BUFFER (34962)
  ------------------
 5791|      0|          }
 5792|      0|        }
 5793|  3.74k|      }
 5794|       |
 5795|   135k|      for (auto &target : primitive.targets) {
  ------------------
  |  Branch (5795:25): [True: 135k, False: 35.7k]
  ------------------
 5796|   135k|        for (auto &attribute : target) {
  ------------------
  |  Branch (5796:30): [True: 5.06k, False: 135k]
  ------------------
 5797|  5.06k|          const auto accessorsIndex = size_t(attribute.second);
 5798|  5.06k|          if (accessorsIndex < model->accessors.size()) {
  ------------------
  |  Branch (5798:15): [True: 0, False: 5.06k]
  ------------------
 5799|      0|            const auto bufferView = model->accessors[accessorsIndex].bufferView;
 5800|       |            // bufferView could be null(-1) for sparse morph target
 5801|      0|            if (bufferView >= 0 && bufferView < (int)model->bufferViews.size()) {
  ------------------
  |  Branch (5801:17): [True: 0, False: 0]
  |  Branch (5801:36): [True: 0, False: 0]
  ------------------
 5802|      0|              model->bufferViews[size_t(bufferView)].target =
 5803|      0|                  TINYGLTF_TARGET_ARRAY_BUFFER;
  ------------------
  |  |  171|      0|#define TINYGLTF_TARGET_ARRAY_BUFFER (34962)
  ------------------
 5804|      0|            }
 5805|      0|          }
 5806|  5.06k|        }
 5807|   135k|      }
 5808|  35.7k|    }
 5809|   139k|  }
 5810|       |
 5811|       |  // 7. Parse Node
 5812|  1.39k|  {
 5813|  1.39k|    bool success = ForEachInArray(v, "nodes", [&](const detail::json &o) {
 5814|  1.39k|      if (!detail::IsObject(o)) {
 5815|  1.39k|        if (err) {
 5816|  1.39k|          (*err) += "`nodes' does not contain an JSON object.";
 5817|  1.39k|        }
 5818|  1.39k|        return false;
 5819|  1.39k|      }
 5820|  1.39k|      Node node;
 5821|  1.39k|      if (!ParseNode(&node, err, o,
 5822|  1.39k|                     store_original_json_for_extras_and_extensions_)) {
 5823|  1.39k|        return false;
 5824|  1.39k|      }
 5825|       |
 5826|  1.39k|      model->nodes.emplace_back(std::move(node));
 5827|  1.39k|      return true;
 5828|  1.39k|    });
 5829|       |
 5830|  1.39k|    if (!success) {
  ------------------
  |  Branch (5830:9): [True: 0, False: 1.39k]
  ------------------
 5831|      0|      return false;
 5832|      0|    }
 5833|  1.39k|  }
 5834|       |
 5835|       |  // 8. Parse scenes.
 5836|  1.39k|  {
 5837|  1.39k|    bool success = ForEachInArray(v, "scenes", [&](const detail::json &o) {
 5838|  1.39k|      if (!detail::IsObject(o)) {
 5839|  1.39k|        if (err) {
 5840|  1.39k|          (*err) += "`scenes' does not contain an JSON object.";
 5841|  1.39k|        }
 5842|  1.39k|        return false;
 5843|  1.39k|      }
 5844|  1.39k|      std::vector<int> nodes;
 5845|  1.39k|      ParseIntegerArrayProperty(&nodes, err, o, "nodes", false);
 5846|       |
 5847|  1.39k|      Scene scene;
 5848|  1.39k|      scene.nodes = std::move(nodes);
 5849|       |
 5850|  1.39k|      ParseStringProperty(&scene.name, err, o, "name", false);
 5851|       |
 5852|  1.39k|      ParseExtrasAndExtensions(&scene, err, o, store_original_json_for_extras_and_extensions_);
 5853|  1.39k|      model->scenes.emplace_back(std::move(scene));
 5854|  1.39k|      return true;
 5855|  1.39k|    });
 5856|       |
 5857|  1.39k|    if (!success) {
  ------------------
  |  Branch (5857:9): [True: 0, False: 1.39k]
  ------------------
 5858|      0|      return false;
 5859|      0|    }
 5860|  1.39k|  }
 5861|       |
 5862|       |  // 9. Parse default scenes.
 5863|  1.39k|  {
 5864|  1.39k|    detail::json_const_iterator rootIt;
 5865|  1.39k|    int iVal;
 5866|  1.39k|    if (detail::FindMember(v, "scene", rootIt) && detail::GetInt(detail::GetValue(rootIt), iVal)) {
  ------------------
  |  Branch (5866:9): [True: 0, False: 1.39k]
  |  Branch (5866:51): [True: 0, False: 0]
  ------------------
 5867|      0|      model->defaultScene = iVal;
 5868|      0|    }
 5869|  1.39k|  }
 5870|       |
 5871|       |  // 10. Parse Material
 5872|  1.39k|  {
 5873|  1.39k|    bool success = ForEachInArray(v, "materials", [&](const detail::json &o) {
 5874|  1.39k|      if (!detail::IsObject(o)) {
 5875|  1.39k|        if (err) {
 5876|  1.39k|          (*err) += "`materials' does not contain an JSON object.";
 5877|  1.39k|        }
 5878|  1.39k|        return false;
 5879|  1.39k|      }
 5880|  1.39k|      Material material;
 5881|  1.39k|      ParseStringProperty(&material.name, err, o, "name", false);
 5882|       |
 5883|  1.39k|      if (!ParseMaterial(&material, err, o,
 5884|  1.39k|                         store_original_json_for_extras_and_extensions_)) {
 5885|  1.39k|        return false;
 5886|  1.39k|      }
 5887|       |
 5888|  1.39k|      model->materials.emplace_back(std::move(material));
 5889|  1.39k|      return true;
 5890|  1.39k|    });
 5891|       |
 5892|  1.39k|    if (!success) {
  ------------------
  |  Branch (5892:9): [True: 23, False: 1.36k]
  ------------------
 5893|     23|      return false;
 5894|     23|    }
 5895|  1.39k|  }
 5896|       |
 5897|       |  // 11. Parse Image
 5898|  1.36k|  void *load_image_user_data{nullptr};
 5899|       |
 5900|  1.36k|  LoadImageDataOption load_image_option;
 5901|       |
 5902|  1.36k|  if (user_image_loader_) {
  ------------------
  |  Branch (5902:7): [True: 0, False: 1.36k]
  ------------------
 5903|       |    // Use user supplied pointer
 5904|      0|    load_image_user_data = load_image_user_data_;
 5905|  1.36k|  } else {
 5906|  1.36k|    load_image_option.preserve_channels = preserve_image_channels_;
 5907|  1.36k|    load_image_user_data = reinterpret_cast<void *>(&load_image_option);
 5908|  1.36k|  }
 5909|       |
 5910|  1.36k|  {
 5911|  1.36k|    int idx = 0;
 5912|  1.36k|    bool success = ForEachInArray(v, "images", [&](const detail::json &o) {
 5913|  1.36k|      if (!detail::IsObject(o)) {
 5914|  1.36k|        if (err) {
 5915|  1.36k|          (*err) += "image[" + std::to_string(idx) + "] is not a JSON object.";
 5916|  1.36k|        }
 5917|  1.36k|        return false;
 5918|  1.36k|      }
 5919|  1.36k|      Image image;
 5920|  1.36k|      if (!ParseImage(&image, idx, err, warn, o,
 5921|  1.36k|                      store_original_json_for_extras_and_extensions_, base_dir,
 5922|  1.36k|                      max_external_file_size_, &fs, &uri_cb, &this->LoadImageData,
 5923|  1.36k|                      load_image_user_data)) {
 5924|  1.36k|        return false;
 5925|  1.36k|      }
 5926|       |
 5927|  1.36k|      if (image.bufferView != -1) {
 5928|       |        // Load image from the buffer view.
 5929|  1.36k|        if (size_t(image.bufferView) >= model->bufferViews.size()) {
 5930|  1.36k|          if (err) {
 5931|  1.36k|            std::stringstream ss;
 5932|  1.36k|            ss << "image[" << idx << "] bufferView \"" << image.bufferView
 5933|  1.36k|               << "\" not found in the scene." << std::endl;
 5934|  1.36k|            (*err) += ss.str();
 5935|  1.36k|          }
 5936|  1.36k|          return false;
 5937|  1.36k|        }
 5938|       |
 5939|  1.36k|        const BufferView &bufferView =
 5940|  1.36k|            model->bufferViews[size_t(image.bufferView)];
 5941|  1.36k|        if (size_t(bufferView.buffer) >= model->buffers.size()) {
 5942|  1.36k|          if (err) {
 5943|  1.36k|            std::stringstream ss;
 5944|  1.36k|            ss << "image[" << idx << "] buffer \"" << bufferView.buffer
 5945|  1.36k|               << "\" not found in the scene." << std::endl;
 5946|  1.36k|            (*err) += ss.str();
 5947|  1.36k|          }
 5948|  1.36k|          return false;
 5949|  1.36k|        }
 5950|  1.36k|        const Buffer &buffer = model->buffers[size_t(bufferView.buffer)];
 5951|       |
 5952|  1.36k|        if (*LoadImageData == nullptr) {
 5953|  1.36k|          if (err) {
 5954|  1.36k|            (*err) += "No LoadImageData callback specified.\n";
 5955|  1.36k|          }
 5956|  1.36k|          return false;
 5957|  1.36k|        }
 5958|  1.36k|        bool ret = LoadImageData(
 5959|  1.36k|            &image, idx, err, warn, image.width, image.height,
 5960|  1.36k|            &buffer.data[bufferView.byteOffset],
 5961|  1.36k|            static_cast<int>(bufferView.byteLength), load_image_user_data);
 5962|  1.36k|        if (!ret) {
 5963|  1.36k|          return false;
 5964|  1.36k|        }
 5965|  1.36k|      }
 5966|       |
 5967|  1.36k|      model->images.emplace_back(std::move(image));
 5968|  1.36k|      ++idx;
 5969|  1.36k|      return true;
 5970|  1.36k|    });
 5971|       |
 5972|  1.36k|    if (!success) {
  ------------------
  |  Branch (5972:9): [True: 351, False: 1.01k]
  ------------------
 5973|    351|      return false;
 5974|    351|    }
 5975|  1.36k|  }
 5976|       |
 5977|       |  // 12. Parse Texture
 5978|  1.01k|  {
 5979|  1.01k|    bool success = ForEachInArray(v, "textures", [&](const detail::json &o) {
 5980|  1.01k|      if (!detail::IsObject(o)) {
 5981|  1.01k|        if (err) {
 5982|  1.01k|          (*err) += "`textures' does not contain an JSON object.";
 5983|  1.01k|        }
 5984|  1.01k|        return false;
 5985|  1.01k|      }
 5986|  1.01k|      Texture texture;
 5987|  1.01k|      if (!ParseTexture(&texture, err, o,
 5988|  1.01k|                        store_original_json_for_extras_and_extensions_,
 5989|  1.01k|                        base_dir)) {
 5990|  1.01k|        return false;
 5991|  1.01k|      }
 5992|       |
 5993|  1.01k|      model->textures.emplace_back(std::move(texture));
 5994|  1.01k|      return true;
 5995|  1.01k|    });
 5996|       |
 5997|  1.01k|    if (!success) {
  ------------------
  |  Branch (5997:9): [True: 0, False: 1.01k]
  ------------------
 5998|      0|      return false;
 5999|      0|    }
 6000|  1.01k|  }
 6001|       |
 6002|       |  // 13. Parse Animation
 6003|  1.01k|  {
 6004|  1.01k|    bool success = ForEachInArray(v, "animations", [&](const detail::json &o) {
 6005|  1.01k|      if (!detail::IsObject(o)) {
 6006|  1.01k|        if (err) {
 6007|  1.01k|          (*err) += "`animations' does not contain an JSON object.";
 6008|  1.01k|        }
 6009|  1.01k|        return false;
 6010|  1.01k|      }
 6011|  1.01k|      Animation animation;
 6012|  1.01k|      if (!ParseAnimation(&animation, err, o,
 6013|  1.01k|                          store_original_json_for_extras_and_extensions_)) {
 6014|  1.01k|        return false;
 6015|  1.01k|      }
 6016|       |
 6017|  1.01k|      model->animations.emplace_back(std::move(animation));
 6018|  1.01k|      return true;
 6019|  1.01k|    });
 6020|       |
 6021|  1.01k|    if (!success) {
  ------------------
  |  Branch (6021:9): [True: 1, False: 1.01k]
  ------------------
 6022|      1|      return false;
 6023|      1|    }
 6024|  1.01k|  }
 6025|       |
 6026|       |  // 14. Parse Skin
 6027|  1.01k|  {
 6028|  1.01k|    bool success = ForEachInArray(v, "skins", [&](const detail::json &o) {
 6029|  1.01k|      if (!detail::IsObject(o)) {
 6030|  1.01k|        if (err) {
 6031|  1.01k|          (*err) += "`skins' does not contain an JSON object.";
 6032|  1.01k|        }
 6033|  1.01k|        return false;
 6034|  1.01k|      }
 6035|  1.01k|      Skin skin;
 6036|  1.01k|      if (!ParseSkin(&skin, err, o,
 6037|  1.01k|                     store_original_json_for_extras_and_extensions_)) {
 6038|  1.01k|        return false;
 6039|  1.01k|      }
 6040|       |
 6041|  1.01k|      model->skins.emplace_back(std::move(skin));
 6042|  1.01k|      return true;
 6043|  1.01k|    });
 6044|       |
 6045|  1.01k|    if (!success) {
  ------------------
  |  Branch (6045:9): [True: 0, False: 1.01k]
  ------------------
 6046|      0|      return false;
 6047|      0|    }
 6048|  1.01k|  }
 6049|       |
 6050|       |  // 15. Parse Sampler
 6051|  1.01k|  {
 6052|  1.01k|    bool success = ForEachInArray(v, "samplers", [&](const detail::json &o) {
 6053|  1.01k|      if (!detail::IsObject(o)) {
 6054|  1.01k|        if (err) {
 6055|  1.01k|          (*err) += "`samplers' does not contain an JSON object.";
 6056|  1.01k|        }
 6057|  1.01k|        return false;
 6058|  1.01k|      }
 6059|  1.01k|      Sampler sampler;
 6060|  1.01k|      if (!ParseSampler(&sampler, err, o,
 6061|  1.01k|                        store_original_json_for_extras_and_extensions_)) {
 6062|  1.01k|        return false;
 6063|  1.01k|      }
 6064|       |
 6065|  1.01k|      model->samplers.emplace_back(std::move(sampler));
 6066|  1.01k|      return true;
 6067|  1.01k|    });
 6068|       |
 6069|  1.01k|    if (!success) {
  ------------------
  |  Branch (6069:9): [True: 0, False: 1.01k]
  ------------------
 6070|      0|      return false;
 6071|      0|    }
 6072|  1.01k|  }
 6073|       |
 6074|       |  // 16. Parse Camera
 6075|  1.01k|  {
 6076|  1.01k|    bool success = ForEachInArray(v, "cameras", [&](const detail::json &o) {
 6077|  1.01k|      if (!detail::IsObject(o)) {
 6078|  1.01k|        if (err) {
 6079|  1.01k|          (*err) += "`cameras' does not contain an JSON object.";
 6080|  1.01k|        }
 6081|  1.01k|        return false;
 6082|  1.01k|      }
 6083|  1.01k|      Camera camera;
 6084|  1.01k|      if (!ParseCamera(&camera, err, o,
 6085|  1.01k|                       store_original_json_for_extras_and_extensions_)) {
 6086|  1.01k|        return false;
 6087|  1.01k|      }
 6088|       |
 6089|  1.01k|      model->cameras.emplace_back(std::move(camera));
 6090|  1.01k|      return true;
 6091|  1.01k|    });
 6092|       |
 6093|  1.01k|    if (!success) {
  ------------------
  |  Branch (6093:9): [True: 25, False: 991]
  ------------------
 6094|     25|      return false;
 6095|     25|    }
 6096|  1.01k|  }
 6097|       |
 6098|       |  // 17. Parse Extras & Extensions
 6099|    991|  ParseExtrasAndExtensions(model, err, v, store_original_json_for_extras_and_extensions_);
 6100|       |
 6101|       |  // 18. Specific extension implementations
 6102|    991|  {
 6103|    991|    detail::json_const_iterator rootIt;
 6104|    991|    if (detail::FindMember(v, "extensions", rootIt) && detail::IsObject(detail::GetValue(rootIt))) {
  ------------------
  |  Branch (6104:9): [True: 80, False: 911]
  |  Branch (6104:56): [True: 80, False: 0]
  ------------------
 6105|     80|      const detail::json &root = detail::GetValue(rootIt);
 6106|       |
 6107|     80|      detail::json_const_iterator it(detail::ObjectBegin(root));
 6108|     80|      detail::json_const_iterator itEnd(detail::ObjectEnd(root));
 6109|  2.84k|      for (; it != itEnd; ++it) {
  ------------------
  |  Branch (6109:14): [True: 2.76k, False: 80]
  ------------------
 6110|       |        // parse KHR_lights_punctual extension
 6111|  2.76k|        std::string key(detail::GetKey(it));
 6112|  2.76k|        if ((key == "KHR_lights_punctual") && detail::IsObject(detail::GetValue(it))) {
  ------------------
  |  Branch (6112:13): [True: 254, False: 2.50k]
  |  Branch (6112:47): [True: 206, False: 48]
  ------------------
 6113|    206|          const detail::json &object = detail::GetValue(it);
 6114|    206|          detail::json_const_iterator itLight;
 6115|    206|          if (detail::FindMember(object, "lights", itLight)) {
  ------------------
  |  Branch (6115:15): [True: 56, False: 150]
  ------------------
 6116|     56|            const detail::json &lights = detail::GetValue(itLight);
 6117|     56|            if (!detail::IsArray(lights)) {
  ------------------
  |  Branch (6117:17): [True: 56, False: 0]
  ------------------
 6118|     56|              continue;
 6119|     56|            }
 6120|       |
 6121|      0|            auto arrayIt(detail::ArrayBegin(lights));
 6122|      0|            auto arrayItEnd(detail::ArrayEnd(lights));
 6123|      0|            for (; arrayIt != arrayItEnd; ++arrayIt) {
  ------------------
  |  Branch (6123:20): [True: 0, False: 0]
  ------------------
 6124|      0|              Light light;
 6125|      0|              if (!ParseLight(&light, err, *arrayIt,
  ------------------
  |  Branch (6125:19): [True: 0, False: 0]
  ------------------
 6126|      0|                              store_original_json_for_extras_and_extensions_)) {
 6127|      0|                return false;
 6128|      0|              }
 6129|      0|              model->lights.emplace_back(std::move(light));
 6130|      0|            }
 6131|      0|          }
 6132|    206|        }
 6133|  2.76k|      }
 6134|     80|    }
 6135|    991|  }
 6136|       |
 6137|    991|  return true;
 6138|    991|}
_ZN8tinygltf8TinyGLTF19LoadASCIIFromStringEPNS_5ModelEPNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEESA_PKcjRKS9_j:
 6144|  1.57k|                                   unsigned int check_sections) {
 6145|  1.57k|  is_binary_ = false;
 6146|  1.57k|  bin_data_ = nullptr;
 6147|  1.57k|  bin_size_ = 0;
 6148|       |
 6149|  1.57k|  return LoadFromString(model, err, warn, str, length, base_dir,
 6150|  1.57k|                        check_sections);
 6151|  1.57k|}
_ZNK8tinygltf5Value4TypeEv:
  300|   459k|  char Type() const { return static_cast<char>(type_); }
_ZN8tinygltf5ValueD2Ev:
   77|  6.19M|  ~x() = default;                      \
_ZN8tinygltf5ValueC2Ev:
  267|  1.82M|        boolean_value_(false) {}
fuzz_gltf.cc:_ZN8tinygltfL9is_base64Eh:
 2207|  2.23M|static inline bool is_base64(unsigned char c) {
 2208|  2.23M|  return (isalnum(c) || (c == '+') || (c == '/'));
  ------------------
  |  Branch (2208:11): [True: 2.12M, False: 111k]
  |  Branch (2208:25): [True: 11.8k, False: 99.9k]
  |  Branch (2208:39): [True: 90.5k, False: 9.40k]
  ------------------
 2209|  2.23M|}
fuzz_gltf.cc:_ZN8tinygltf4dlibL9urldecodeERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
 2355|  44.5k|static const std::string urldecode(const std::string &str) {
 2356|  44.5k|  using namespace std;
 2357|  44.5k|  string result;
 2358|  44.5k|  string::size_type i;
 2359|  7.41M|  for (i = 0; i < str.size(); ++i) {
  ------------------
  |  Branch (2359:15): [True: 7.36M, False: 44.5k]
  ------------------
 2360|  7.36M|    if (str[i] == '+') {
  ------------------
  |  Branch (2360:9): [True: 40.8k, False: 7.32M]
  ------------------
 2361|  40.8k|      result += ' ';
 2362|  7.32M|    } else if (str[i] == '%' && str.size() > i + 2) {
  ------------------
  |  Branch (2362:16): [True: 85.6k, False: 7.24M]
  |  Branch (2362:33): [True: 84.6k, False: 1.00k]
  ------------------
 2363|  84.6k|      const unsigned char ch1 =
 2364|  84.6k|          from_hex(static_cast<unsigned char>(str[i + 1]));
 2365|  84.6k|      const unsigned char ch2 =
 2366|  84.6k|          from_hex(static_cast<unsigned char>(str[i + 2]));
 2367|  84.6k|      const unsigned char ch = static_cast<unsigned char>((ch1 << 4) | ch2);
 2368|  84.6k|      result += static_cast<char>(ch);
 2369|  84.6k|      i += 2;
 2370|  7.24M|    } else {
 2371|  7.24M|      result += str[i];
 2372|  7.24M|    }
 2373|  7.36M|  }
 2374|  44.5k|  return result;
 2375|  44.5k|}
_ZN8tinygltf4dlib8from_hexEh:
 2343|   169k|inline unsigned char from_hex(unsigned char ch) {
 2344|   169k|  if (ch <= '9' && ch >= '0')
  ------------------
  |  Branch (2344:7): [True: 28.1k, False: 141k]
  |  Branch (2344:20): [True: 10.1k, False: 18.0k]
  ------------------
 2345|  10.1k|    ch -= '0';
 2346|   159k|  else if (ch <= 'f' && ch >= 'a')
  ------------------
  |  Branch (2346:12): [True: 152k, False: 6.39k]
  |  Branch (2346:25): [True: 103k, False: 49.6k]
  ------------------
 2347|   103k|    ch -= 'a' - 10;
 2348|  56.0k|  else if (ch <= 'F' && ch >= 'A')
  ------------------
  |  Branch (2348:12): [True: 46.1k, False: 9.89k]
  |  Branch (2348:25): [True: 16.2k, False: 29.9k]
  ------------------
 2349|  16.2k|    ch -= 'A' - 10;
 2350|  39.8k|  else
 2351|  39.8k|    ch = 0;
 2352|   169k|  return ch;
 2353|   169k|}
fuzz_gltf.cc:_ZN8tinygltfL8JoinPathERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEES8_:
 2110|  87.6k|                            const std::string &path1) {
 2111|  87.6k|  if (path0.empty()) {
  ------------------
  |  Branch (2111:7): [True: 43.8k, False: 43.8k]
  ------------------
 2112|  43.8k|    return path1;
 2113|  43.8k|  } else {
 2114|       |    // check '/'
 2115|  43.8k|    char lastChar = *path0.rbegin();
 2116|  43.8k|    if (lastChar != '/') {
  ------------------
  |  Branch (2116:9): [True: 43.8k, False: 0]
  ------------------
 2117|  43.8k|      return path0 + std::string("/") + path1;
 2118|  43.8k|    } else {
 2119|      0|      return path0 + path1;
 2120|      0|    }
 2121|  43.8k|  }
 2122|  87.6k|}
fuzz_gltf.cc:_ZN8tinygltfL10ParseAssetEPNS_5AssetEPNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEERKN8nlohmann10basic_jsonINS2_3mapENS2_6vectorES8_blmdS6_NSA_14adl_serializerENSD_IhNS6_IhEEEEEEb:
 4052|  1.39k|                       bool store_original_json_for_extras_and_extensions) {
 4053|  1.39k|  ParseStringProperty(&asset->version, err, o, "version", true, "Asset");
 4054|  1.39k|  ParseStringProperty(&asset->generator, err, o, "generator", false, "Asset");
 4055|  1.39k|  ParseStringProperty(&asset->minVersion, err, o, "minVersion", false, "Asset");
 4056|  1.39k|  ParseStringProperty(&asset->copyright, err, o, "copyright", false, "Asset");
 4057|       |
 4058|  1.39k|  ParseExtrasAndExtensions(asset, err, o, store_original_json_for_extras_and_extensions);
 4059|  1.39k|  return true;
 4060|  1.39k|}
fuzz_gltf.cc:_ZN8tinygltfL19ParseStringPropertyEPNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEES7_RKN8nlohmann10basic_jsonINS0_3mapENS0_6vectorES6_blmdS4_NS8_14adl_serializerENSB_IhNS4_IhEEEEEERKS6_bSJ_:
 3836|  1.07M|    const std::string &parent_node = std::string()) {
 3837|  1.07M|  detail::json_const_iterator it;
 3838|  1.07M|  if (!detail::FindMember(o, property.c_str(), it)) {
  ------------------
  |  Branch (3838:7): [True: 987k, False: 86.7k]
  ------------------
 3839|   987k|    if (required) {
  ------------------
  |  Branch (3839:9): [True: 129, False: 987k]
  ------------------
 3840|    129|      if (err) {
  ------------------
  |  Branch (3840:11): [True: 129, False: 0]
  ------------------
 3841|    129|        (*err) += "'" + property + "' property is missing";
 3842|    129|        if (parent_node.empty()) {
  ------------------
  |  Branch (3842:13): [True: 129, False: 0]
  ------------------
 3843|    129|          (*err) += ".\n";
 3844|    129|        } else {
 3845|      0|          (*err) += " in `" + parent_node + "'.\n";
 3846|      0|        }
 3847|    129|      }
 3848|    129|    }
 3849|   987k|    return false;
 3850|   987k|  }
 3851|       |
 3852|  86.7k|  std::string strValue;
 3853|  86.7k|  if (!detail::GetString(detail::GetValue(it), strValue)) {
  ------------------
  |  Branch (3853:7): [True: 16.5k, False: 70.1k]
  ------------------
 3854|  16.5k|    if (required) {
  ------------------
  |  Branch (3854:9): [True: 0, False: 16.5k]
  ------------------
 3855|      0|      if (err) {
  ------------------
  |  Branch (3855:11): [True: 0, False: 0]
  ------------------
 3856|      0|        (*err) += "'" + property + "' property is not a string type.\n";
 3857|      0|      }
 3858|      0|    }
 3859|  16.5k|    return false;
 3860|  16.5k|  }
 3861|       |
 3862|  70.1k|  if (ret) {
  ------------------
  |  Branch (3862:7): [True: 70.1k, False: 0]
  ------------------
 3863|  70.1k|    (*ret) = std::move(strValue);
 3864|  70.1k|  }
 3865|       |
 3866|  70.1k|  return true;
 3867|  86.7k|}
fuzz_gltf.cc:_ZN8tinygltfL24ParseExtrasAndExtensionsINS_5AssetEEEbPT_PNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEERKN8nlohmann10basic_jsonINS4_3mapENS4_6vectorESA_blmdS8_NSC_14adl_serializerENSF_IhNS8_IhEEEEEEb:
 4029|  1.39k|    const detail::json & o, bool store_json_strings) {
 4030|       |  
 4031|  1.39k|  ParseExtensionsProperty(&target->extensions, err, o);
 4032|  1.39k|  ParseExtrasProperty(&target->extras, o);
 4033|       |
 4034|  1.39k|  if (store_json_strings) {
  ------------------
  |  Branch (4034:7): [True: 0, False: 1.39k]
  ------------------
 4035|      0|    {
 4036|      0|      detail::json_const_iterator it;
 4037|      0|      if (detail::FindMember(o, "extensions", it)) {
  ------------------
  |  Branch (4037:11): [True: 0, False: 0]
  ------------------
 4038|      0|        target->extensions_json_string = detail::JsonToString(detail::GetValue(it));
 4039|      0|      }
 4040|      0|    }
 4041|      0|    {
 4042|      0|      detail::json_const_iterator it;
 4043|      0|      if (detail::FindMember(o, "extras", it)) {
  ------------------
  |  Branch (4043:11): [True: 0, False: 0]
  ------------------
 4044|      0|        target->extras_json_string = detail::JsonToString(detail::GetValue(it));
 4045|      0|      }
 4046|      0|    }
 4047|      0|  }
 4048|  1.39k|  return true;
 4049|  1.39k|}
fuzz_gltf.cc:_ZN8tinygltfL23ParseExtensionsPropertyEPNSt3__13mapINS0_12basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEENS_5ValueENS0_4lessIS7_EENS5_INS0_4pairIKS7_S8_EEEEEEPS7_RKN8nlohmann10basic_jsonIS1_NS0_6vectorES7_blmdS5_NSI_14adl_serializerENSK_IhNS5_IhEEEEEE:
 3994|   892k|                                    const detail::json &o) {
 3995|   892k|  (void)err;
 3996|       |
 3997|   892k|  detail::json_const_iterator it;
 3998|   892k|  if (!detail::FindMember(o, "extensions", it)) {
  ------------------
  |  Branch (3998:7): [True: 890k, False: 2.77k]
  ------------------
 3999|   890k|    return false;
 4000|   890k|  }
 4001|       |
 4002|  2.77k|  auto &obj = detail::GetValue(it);
 4003|  2.77k|  if (!detail::IsObject(obj)) {
  ------------------
  |  Branch (4003:7): [True: 228, False: 2.54k]
  ------------------
 4004|    228|    return false;
 4005|    228|  }
 4006|  2.54k|  ExtensionMap extensions;
 4007|  2.54k|  detail::json_const_iterator extIt = detail::ObjectBegin(obj);  // it.value().begin();
 4008|  2.54k|  detail::json_const_iterator extEnd = detail::ObjectEnd(obj);
 4009|  10.5k|  for (; extIt != extEnd; ++extIt) {
  ------------------
  |  Branch (4009:10): [True: 8.05k, False: 2.54k]
  ------------------
 4010|  8.05k|    auto &itObj = detail::GetValue(extIt);
 4011|  8.05k|    if (!detail::IsObject(itObj)) continue;
  ------------------
  |  Branch (4011:9): [True: 1.95k, False: 6.09k]
  ------------------
 4012|  6.09k|    std::string key(detail::GetKey(extIt));
 4013|  6.09k|    if (!ParseJsonAsValue(&extensions[key], itObj)) {
  ------------------
  |  Branch (4013:9): [True: 5.87k, False: 228]
  ------------------
 4014|  5.87k|      if (!key.empty()) {
  ------------------
  |  Branch (4014:11): [True: 4.68k, False: 1.18k]
  ------------------
 4015|       |        // create empty object so that an extension object is still of type
 4016|       |        // object
 4017|  4.68k|        extensions[key] = Value{Value::Object{}};
 4018|  4.68k|      }
 4019|  5.87k|    }
 4020|  6.09k|  }
 4021|  2.54k|  if (ret) {
  ------------------
  |  Branch (4021:7): [True: 2.54k, False: 0]
  ------------------
 4022|  2.54k|    (*ret) = std::move(extensions);
 4023|  2.54k|  }
 4024|  2.54k|  return true;
 4025|  2.77k|}
fuzz_gltf.cc:_ZN8tinygltfL16ParseJsonAsValueEPNS_5ValueERKN8nlohmann10basic_jsonINSt3__13mapENS4_6vectorENS4_12basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEblmdSA_NS2_14adl_serializerENS6_IhNSA_IhEEEEEE:
 3441|   233k|static bool ParseJsonAsValue(Value *ret, const detail::json &o) {
 3442|   233k|  Value val{};
 3443|       |#ifdef TINYGLTF_USE_RAPIDJSON
 3444|       |  using rapidjson::Type;
 3445|       |  switch (o.GetType()) {
 3446|       |    case Type::kObjectType: {
 3447|       |      Value::Object value_object;
 3448|       |      for (auto it = o.MemberBegin(); it != o.MemberEnd(); ++it) {
 3449|       |        Value entry;
 3450|       |        ParseJsonAsValue(&entry, it->value);
 3451|       |        if (entry.Type() != NULL_TYPE)
 3452|       |          value_object.emplace(detail::GetKey(it), std::move(entry));
 3453|       |      }
 3454|       |      if (value_object.size() > 0) val = Value(std::move(value_object));
 3455|       |    } break;
 3456|       |    case Type::kArrayType: {
 3457|       |      Value::Array value_array;
 3458|       |      value_array.reserve(o.Size());
 3459|       |      for (auto it = o.Begin(); it != o.End(); ++it) {
 3460|       |        Value entry;
 3461|       |        ParseJsonAsValue(&entry, *it);
 3462|       |        if (entry.Type() != NULL_TYPE)
 3463|       |          value_array.emplace_back(std::move(entry));
 3464|       |      }
 3465|       |      if (value_array.size() > 0) val = Value(std::move(value_array));
 3466|       |    } break;
 3467|       |    case Type::kStringType:
 3468|       |      val = Value(std::string(o.GetString()));
 3469|       |      break;
 3470|       |    case Type::kFalseType:
 3471|       |    case Type::kTrueType:
 3472|       |      val = Value(o.GetBool());
 3473|       |      break;
 3474|       |    case Type::kNumberType:
 3475|       |      if (!o.IsDouble()) {
 3476|       |        int i = 0;
 3477|       |        detail::GetInt(o, i);
 3478|       |        val = Value(i);
 3479|       |      } else {
 3480|       |        double d = 0.0;
 3481|       |        detail::GetDouble(o, d);
 3482|       |        val = Value(d);
 3483|       |      }
 3484|       |      break;
 3485|       |    case Type::kNullType:
 3486|       |      break;
 3487|       |      // all types are covered, so no `case default`
 3488|       |  }
 3489|       |#else
 3490|   233k|  switch (o.type()) {
  ------------------
  |  Branch (3490:11): [True: 0, False: 233k]
  ------------------
 3491|  9.27k|    case detail::json::value_t::object: {
  ------------------
  |  Branch (3491:5): [True: 9.27k, False: 224k]
  ------------------
 3492|  9.27k|      Value::Object value_object;
 3493|  14.9k|      for (auto it = o.begin(); it != o.end(); it++) {
  ------------------
  |  Branch (3493:33): [True: 5.63k, False: 9.27k]
  ------------------
 3494|  5.63k|        Value entry;
 3495|  5.63k|        ParseJsonAsValue(&entry, it.value());
 3496|  5.63k|        if (entry.Type() != NULL_TYPE)
  ------------------
  |  Branch (3496:13): [True: 5.42k, False: 212]
  ------------------
 3497|  5.42k|          value_object.emplace(it.key(), std::move(entry));
 3498|  5.63k|      }
 3499|  9.27k|      if (value_object.size() > 0) val = Value(std::move(value_object));
  ------------------
  |  Branch (3499:11): [True: 2.90k, False: 6.36k]
  ------------------
 3500|  9.27k|    } break;
 3501|  26.6k|    case detail::json::value_t::array: {
  ------------------
  |  Branch (3501:5): [True: 26.6k, False: 207k]
  ------------------
 3502|  26.6k|      Value::Array value_array;
 3503|  26.6k|      value_array.reserve(o.size());
 3504|   246k|      for (auto it = o.begin(); it != o.end(); it++) {
  ------------------
  |  Branch (3504:33): [True: 219k, False: 26.6k]
  ------------------
 3505|   219k|        Value entry;
 3506|   219k|        ParseJsonAsValue(&entry, it.value());
 3507|   219k|        if (entry.Type() != NULL_TYPE)
  ------------------
  |  Branch (3507:13): [True: 196k, False: 23.4k]
  ------------------
 3508|   196k|          value_array.emplace_back(std::move(entry));
 3509|   219k|      }
 3510|  26.6k|      if (value_array.size() > 0) val = Value(std::move(value_array));
  ------------------
  |  Branch (3510:11): [True: 3.23k, False: 23.4k]
  ------------------
 3511|  26.6k|    } break;
 3512|  1.44k|    case detail::json::value_t::string:
  ------------------
  |  Branch (3512:5): [True: 1.44k, False: 232k]
  ------------------
 3513|  1.44k|      val = Value(o.get<std::string>());
 3514|  1.44k|      break;
 3515|    442|    case detail::json::value_t::boolean:
  ------------------
  |  Branch (3515:5): [True: 442, False: 233k]
  ------------------
 3516|    442|      val = Value(o.get<bool>());
 3517|    442|      break;
 3518|    236|    case detail::json::value_t::number_integer:
  ------------------
  |  Branch (3518:5): [True: 236, False: 233k]
  ------------------
 3519|   195k|    case detail::json::value_t::number_unsigned:
  ------------------
  |  Branch (3519:5): [True: 195k, False: 38.1k]
  ------------------
 3520|   195k|      val = Value(static_cast<int>(o.get<int64_t>()));
 3521|   195k|      break;
 3522|    114|    case detail::json::value_t::number_float:
  ------------------
  |  Branch (3522:5): [True: 114, False: 233k]
  ------------------
 3523|    114|      val = Value(o.get<double>());
 3524|    114|      break;
 3525|      0|    case detail::json::value_t::null:
  ------------------
  |  Branch (3525:5): [True: 0, False: 233k]
  ------------------
 3526|      0|    case detail::json::value_t::discarded:
  ------------------
  |  Branch (3526:5): [True: 0, False: 233k]
  ------------------
 3527|      0|    case detail::json::value_t::binary:
  ------------------
  |  Branch (3527:5): [True: 0, False: 233k]
  ------------------
 3528|       |      // default:
 3529|      0|      break;
 3530|   233k|  }
 3531|   233k|#endif
 3532|   233k|  const bool isNotNull = val.Type() != NULL_TYPE;
 3533|       |
 3534|   233k|  if (ret) *ret = std::move(val);
  ------------------
  |  Branch (3534:7): [True: 233k, False: 0]
  ------------------
 3535|       |
 3536|   233k|  return isNotNull;
 3537|   233k|}
_ZN8tinygltf5ValueC2EOS0_:
   79|  4.15M|  x(x &&) TINYGLTF_NOEXCEPT = default; \
_ZN8tinygltf5ValueC2EONSt3__16vectorIS0_NS1_9allocatorIS0_EEEE:
  292|  3.23k|                                       array_value_(std::move(a)) {}
_ZN8tinygltf5ValueC2EONSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
  279|  1.44k|      : type_(STRING_TYPE), string_value_(std::move(s)) {}
_ZN8tinygltf5ValueC2Eb:
  269|    442|  explicit Value(bool b) : type_(BOOL_TYPE) { boolean_value_ = b; }
_ZN8tinygltf5ValueC2Ei:
  270|   195k|  explicit Value(int i) : type_(INT_TYPE) {
  271|   195k|    int_value_ = i;
  272|   195k|    real_value_ = i;
  273|   195k|  }
_ZN8tinygltf5ValueC2Ed:
  274|    114|  explicit Value(double n) : type_(REAL_TYPE) { real_value_ = n; }
_ZN8tinygltf5ValueC2EONSt3__13mapINS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEES0_NS1_4lessIS8_EENS6_INS1_4pairIKS8_S0_EEEEEE:
  296|  7.59k|                                        object_value_(std::move(o)) {}
_ZN8tinygltf5ValueaSEOS0_:
   81|   442k|  x &operator=(x &&) TINYGLTF_NOEXCEPT = default;
fuzz_gltf.cc:_ZN8tinygltfL19ParseExtrasPropertyEPNS_5ValueERKN8nlohmann10basic_jsonINSt3__13mapENS4_6vectorENS4_12basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEblmdSA_NS2_14adl_serializerENS6_IhNSA_IhEEEEEE:
 3539|   892k|static bool ParseExtrasProperty(Value *ret, const detail::json &o) {
 3540|   892k|  detail::json_const_iterator it;
 3541|   892k|  if (!detail::FindMember(o, "extras", it)) {
  ------------------
  |  Branch (3541:7): [True: 890k, False: 2.04k]
  ------------------
 3542|   890k|    return false;
 3543|   890k|  }
 3544|       |
 3545|  2.04k|  return ParseJsonAsValue(ret, detail::GetValue(it));
 3546|   892k|}
fuzz_gltf.cc:_ZN8tinygltfL24ParseNumberArrayPropertyEPNSt3__16vectorIdNS0_9allocatorIdEEEEPNS0_12basic_stringIcNS0_11char_traitsIcEENS2_IcEEEERKN8nlohmann10basic_jsonINS0_3mapES1_SA_blmdS2_NSC_14adl_serializerENS1_IhNS2_IhEEEEEERKSA_bSM_:
 3727|   321k|                                     const std::string &parent_node = "") {
 3728|   321k|  detail::json_const_iterator it;
 3729|   321k|  if (!detail::FindMember(o, property.c_str(), it)) {
  ------------------
  |  Branch (3729:7): [True: 304k, False: 17.4k]
  ------------------
 3730|   304k|    if (required) {
  ------------------
  |  Branch (3730:9): [True: 0, False: 304k]
  ------------------
 3731|      0|      if (err) {
  ------------------
  |  Branch (3731:11): [True: 0, False: 0]
  ------------------
 3732|      0|        (*err) += "'" + property + "' property is missing";
 3733|      0|        if (!parent_node.empty()) {
  ------------------
  |  Branch (3733:13): [True: 0, False: 0]
  ------------------
 3734|      0|          (*err) += " in " + parent_node;
 3735|      0|        }
 3736|      0|        (*err) += ".\n";
 3737|      0|      }
 3738|      0|    }
 3739|   304k|    return false;
 3740|   304k|  }
 3741|       |
 3742|  17.4k|  if (!detail::IsArray(detail::GetValue(it))) {
  ------------------
  |  Branch (3742:7): [True: 14.4k, False: 2.92k]
  ------------------
 3743|  14.4k|    if (required) {
  ------------------
  |  Branch (3743:9): [True: 0, False: 14.4k]
  ------------------
 3744|      0|      if (err) {
  ------------------
  |  Branch (3744:11): [True: 0, False: 0]
  ------------------
 3745|      0|        (*err) += "'" + property + "' property is not an array";
 3746|      0|        if (!parent_node.empty()) {
  ------------------
  |  Branch (3746:13): [True: 0, False: 0]
  ------------------
 3747|      0|          (*err) += " in " + parent_node;
 3748|      0|        }
 3749|      0|        (*err) += ".\n";
 3750|      0|      }
 3751|      0|    }
 3752|  14.4k|    return false;
 3753|  14.4k|  }
 3754|       |
 3755|  2.92k|  ret->clear();
 3756|  2.92k|  auto end = detail::ArrayEnd(detail::GetValue(it));
 3757|  1.22M|  for (auto i = detail::ArrayBegin(detail::GetValue(it)); i != end; ++i) {
  ------------------
  |  Branch (3757:59): [True: 1.22M, False: 1.70k]
  ------------------
 3758|  1.22M|    double numberValue;
 3759|  1.22M|    const bool isNumber = detail::GetNumber(*i, numberValue);
 3760|  1.22M|    if (!isNumber) {
  ------------------
  |  Branch (3760:9): [True: 1.22k, False: 1.22M]
  ------------------
 3761|  1.22k|      if (required) {
  ------------------
  |  Branch (3761:11): [True: 0, False: 1.22k]
  ------------------
 3762|      0|        if (err) {
  ------------------
  |  Branch (3762:13): [True: 0, False: 0]
  ------------------
 3763|      0|          (*err) += "'" + property + "' property is not a number.\n";
 3764|      0|          if (!parent_node.empty()) {
  ------------------
  |  Branch (3764:15): [True: 0, False: 0]
  ------------------
 3765|      0|            (*err) += " in " + parent_node;
 3766|      0|          }
 3767|      0|          (*err) += ".\n";
 3768|      0|        }
 3769|      0|      }
 3770|  1.22k|      return false;
 3771|  1.22k|    }
 3772|  1.22M|    ret->push_back(numberValue);
 3773|  1.22M|  }
 3774|       |
 3775|  1.70k|  return true;
 3776|  2.92k|}
fuzz_gltf.cc:_ZN8tinygltfL19ParseNumberPropertyEPdPNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEERKN8nlohmann10basic_jsonINS1_3mapENS1_6vectorES7_blmdS5_NS9_14adl_serializerENSC_IhNS5_IhEEEEEERKS7_bSK_:
 3689|  92.6k|                                const std::string &parent_node = "") {
 3690|  92.6k|  detail::json_const_iterator it;
 3691|       |
 3692|  92.6k|  if (!detail::FindMember(o, property.c_str(), it)) {
  ------------------
  |  Branch (3692:7): [True: 77.3k, False: 15.3k]
  ------------------
 3693|  77.3k|    if (required) {
  ------------------
  |  Branch (3693:9): [True: 0, False: 77.3k]
  ------------------
 3694|      0|      if (err) {
  ------------------
  |  Branch (3694:11): [True: 0, False: 0]
  ------------------
 3695|      0|        (*err) += "'" + property + "' property is missing";
 3696|      0|        if (!parent_node.empty()) {
  ------------------
  |  Branch (3696:13): [True: 0, False: 0]
  ------------------
 3697|      0|          (*err) += " in " + parent_node;
 3698|      0|        }
 3699|      0|        (*err) += ".\n";
 3700|      0|      }
 3701|      0|    }
 3702|  77.3k|    return false;
 3703|  77.3k|  }
 3704|       |
 3705|  15.3k|  double numberValue;
 3706|  15.3k|  bool isNumber = detail::GetNumber(detail::GetValue(it), numberValue);
 3707|       |
 3708|  15.3k|  if (!isNumber) {
  ------------------
  |  Branch (3708:7): [True: 7.24k, False: 8.06k]
  ------------------
 3709|  7.24k|    if (required) {
  ------------------
  |  Branch (3709:9): [True: 0, False: 7.24k]
  ------------------
 3710|      0|      if (err) {
  ------------------
  |  Branch (3710:11): [True: 0, False: 0]
  ------------------
 3711|      0|        (*err) += "'" + property + "' property is not a number type.\n";
 3712|      0|      }
 3713|      0|    }
 3714|  7.24k|    return false;
 3715|  7.24k|  }
 3716|       |
 3717|  8.06k|  if (ret) {
  ------------------
  |  Branch (3717:7): [True: 8.06k, False: 0]
  ------------------
 3718|  8.06k|    (*ret) = numberValue;
 3719|  8.06k|  }
 3720|       |
 3721|  8.06k|  return true;
 3722|  15.3k|}
_ZN8tinygltf16AnimationChannelD2Ev:
   77|  57.8k|  ~x() = default;                      \
_ZN8tinygltf5ModelC2Ev:
 1163|  1.57k|  Model() = default;
_ZN8tinygltf5AssetC2Ev:
 1103|  1.57k|  Asset() = default;
_ZN8tinygltf5AssetD2Ev:
   77|  1.57k|  ~x() = default;                      \
_ZN8tinygltf5SceneD2Ev:
   77|  1.05M|  ~x() = default;                      \
_ZN8tinygltf6CameraD2Ev:
   77|     25|  ~x() = default;                      \
_ZN8tinygltf18OrthographicCameraD2Ev:
   77|     25|  ~x() = default;                      \
_ZN8tinygltf17PerspectiveCameraD2Ev:
   77|     25|  ~x() = default;                      \
_ZN8tinygltf7SamplerD2Ev:
   77|   526k|  ~x() = default;                      \
_ZN8tinygltf5ImageD2Ev:
   77|   245k|  ~x() = default;                      \
_ZN8tinygltf7TextureD2Ev:
   77|   265k|  ~x() = default;                      \
_ZN8tinygltf4NodeD2Ev:
   77|  71.7k|  ~x() = default;                      \
_ZN8tinygltf4MeshD2Ev:
   77|   543k|  ~x() = default;                      \
_ZN8tinygltf9PrimitiveD2Ev:
   77|   149k|  ~x() = default;                      \
_ZN8tinygltf8MaterialD2Ev:
   77|   290k|  ~x() = default;                      \
_ZN8tinygltf9ParameterD2Ev:
   77|  32.2k|  ~x() = default;                      \
_ZN8tinygltf11TextureInfoD2Ev:
   77|   872k|  ~x() = default;                      \
_ZN8tinygltf20OcclusionTextureInfoD2Ev:
   77|   290k|  ~x() = default;                      \
_ZN8tinygltf17NormalTextureInfoD2Ev:
   77|   290k|  ~x() = default;                      \
_ZN8tinygltf20PbrMetallicRoughnessD2Ev:
   77|   290k|  ~x() = default;                      \
_ZN8tinygltf9AnimationD2Ev:
   77|   305k|  ~x() = default;                      \
_ZN8tinygltf8TinyGLTFC2Ev:
 1354|  1.57k|  TinyGLTF() : bin_data_(nullptr), bin_size_(0), is_binary_(false) {}
_ZN8tinygltf8TinyGLTFD2Ev:
 1360|  1.57k|  ~TinyGLTF() {}
_ZN8tinygltf5ModelD2Ev:
   77|  1.57k|  ~x() = default;                      \
fuzz_gltf.cc:_ZN8tinygltf6detail14ForEachInArrayIZNS_8TinyGLTF14LoadFromStringEPNS_5ModelEPNSt3__112basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEESC_PKcjRKSB_jE3$_1EEbRKN8nlohmann10basic_jsonINS5_3mapENS5_6vectorESB_blmdS9_NSI_14adl_serializerENSL_IhNS9_IhEEEEEESE_OT_:
 5471|  1.39k|bool ForEachInArray(const detail::json &_v, const char *member, Callback && cb) {
 5472|  1.39k|  detail::json_const_iterator itm;
 5473|  1.39k|  if (detail::FindMember(_v, member, itm) && detail::IsArray(detail::GetValue(itm))) {
  ------------------
  |  Branch (5473:7): [True: 4, False: 1.38k]
  |  Branch (5473:46): [True: 4, False: 0]
  ------------------
 5474|      4|    const detail::json &root = detail::GetValue(itm);
 5475|      4|    auto it = detail::ArrayBegin(root);
 5476|      4|    auto end = detail::ArrayEnd(root);
 5477|  19.1k|    for (; it != end; ++it) {
  ------------------
  |  Branch (5477:12): [True: 19.1k, False: 4]
  ------------------
 5478|  19.1k|      if (!cb(*it)) return false;
  ------------------
  |  Branch (5478:11): [True: 0, False: 19.1k]
  ------------------
 5479|  19.1k|    }
 5480|      4|  }
 5481|  1.39k|  return true;
 5482|  1.39k|};
fuzz_gltf.cc:_ZZN8tinygltf8TinyGLTF14LoadFromStringEPNS_5ModelEPNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEESA_PKcjRKS9_jENK3$_1clERKN8nlohmann10basic_jsonINS3_3mapENS3_6vectorES9_blmdS7_NSG_14adl_serializerENSJ_IhNS7_IhEEEEEE:
 5639|  19.1k|    ForEachInArray(v, "extensionsUsed", [&](const detail::json &o) {
 5640|  19.1k|      std::string str;
 5641|  19.1k|      detail::GetString(o, str);
 5642|  19.1k|      model->extensionsUsed.emplace_back(std::move(str));
 5643|  19.1k|      return true;
 5644|  19.1k|    });
fuzz_gltf.cc:_ZN8tinygltf6detail14ForEachInArrayIZNS_8TinyGLTF14LoadFromStringEPNS_5ModelEPNSt3__112basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEESC_PKcjRKSB_jE3$_2EEbRKN8nlohmann10basic_jsonINS5_3mapENS5_6vectorESB_blmdS9_NSI_14adl_serializerENSL_IhNS9_IhEEEEEESE_OT_:
 5471|  1.39k|bool ForEachInArray(const detail::json &_v, const char *member, Callback && cb) {
 5472|  1.39k|  detail::json_const_iterator itm;
 5473|  1.39k|  if (detail::FindMember(_v, member, itm) && detail::IsArray(detail::GetValue(itm))) {
  ------------------
  |  Branch (5473:7): [True: 11, False: 1.38k]
  |  Branch (5473:46): [True: 11, False: 0]
  ------------------
 5474|     11|    const detail::json &root = detail::GetValue(itm);
 5475|     11|    auto it = detail::ArrayBegin(root);
 5476|     11|    auto end = detail::ArrayEnd(root);
 5477|   530k|    for (; it != end; ++it) {
  ------------------
  |  Branch (5477:12): [True: 530k, False: 11]
  ------------------
 5478|   530k|      if (!cb(*it)) return false;
  ------------------
  |  Branch (5478:11): [True: 0, False: 530k]
  ------------------
 5479|   530k|    }
 5480|     11|  }
 5481|  1.39k|  return true;
 5482|  1.39k|};
fuzz_gltf.cc:_ZZN8tinygltf8TinyGLTF14LoadFromStringEPNS_5ModelEPNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEESA_PKcjRKS9_jENK3$_2clERKN8nlohmann10basic_jsonINS3_3mapENS3_6vectorES9_blmdS7_NSG_14adl_serializerENSJ_IhNS7_IhEEEEEE:
 5648|   530k|    ForEachInArray(v, "extensionsRequired", [&](const detail::json &o) {
 5649|   530k|      std::string str;
 5650|   530k|      detail::GetString(o, str);
 5651|   530k|      model->extensionsRequired.emplace_back(std::move(str));
 5652|   530k|      return true;
 5653|   530k|    });
fuzz_gltf.cc:_ZN8tinygltf6detail14ForEachInArrayIZNS_8TinyGLTF14LoadFromStringEPNS_5ModelEPNSt3__112basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEESC_PKcjRKSB_jE3$_3EEbRKN8nlohmann10basic_jsonINS5_3mapENS5_6vectorESB_blmdS9_NSI_14adl_serializerENSL_IhNS9_IhEEEEEESE_OT_:
 5471|  1.39k|bool ForEachInArray(const detail::json &_v, const char *member, Callback && cb) {
 5472|  1.39k|  detail::json_const_iterator itm;
 5473|  1.39k|  if (detail::FindMember(_v, member, itm) && detail::IsArray(detail::GetValue(itm))) {
  ------------------
  |  Branch (5473:7): [True: 0, False: 1.39k]
  |  Branch (5473:46): [True: 0, False: 0]
  ------------------
 5474|      0|    const detail::json &root = detail::GetValue(itm);
 5475|      0|    auto it = detail::ArrayBegin(root);
 5476|      0|    auto end = detail::ArrayEnd(root);
 5477|      0|    for (; it != end; ++it) {
  ------------------
  |  Branch (5477:12): [True: 0, False: 0]
  ------------------
 5478|      0|      if (!cb(*it)) return false;
  ------------------
  |  Branch (5478:11): [True: 0, False: 0]
  ------------------
 5479|      0|    }
 5480|      0|  }
 5481|  1.39k|  return true;
 5482|  1.39k|};
fuzz_gltf.cc:_ZN8tinygltfL16LoadExternalFileEPNSt3__16vectorIhNS0_9allocatorIhEEEEPNS0_12basic_stringIcNS0_11char_traitsIcEENS2_IcEEEESB_RKSA_SD_bmbmPNS_11FsCallbacksE:
 2390|  44.5k|                             size_t reqBytes, bool checkSize, size_t maxFileSize, FsCallbacks *fs) {
 2391|  44.5k|  if (fs == nullptr || fs->FileExists == nullptr ||
  ------------------
  |  Branch (2391:7): [True: 0, False: 44.5k]
  |  Branch (2391:24): [True: 0, False: 44.5k]
  ------------------
 2392|  44.5k|      fs->ExpandFilePath == nullptr || fs->ReadWholeFile == nullptr) {
  ------------------
  |  Branch (2392:7): [True: 0, False: 44.5k]
  |  Branch (2392:40): [True: 0, False: 44.5k]
  ------------------
 2393|       |    // This is a developer error, assert() ?
 2394|      0|    if (err) {
  ------------------
  |  Branch (2394:9): [True: 0, False: 0]
  ------------------
 2395|      0|      (*err) += "FS callback[s] not set\n";
 2396|      0|    }
 2397|      0|    return false;
 2398|      0|  }
 2399|       |
 2400|  44.5k|  std::string *failMsgOut = required ? err : warn;
  ------------------
  |  Branch (2400:29): [True: 0, False: 44.5k]
  ------------------
 2401|       |
 2402|  44.5k|  out->clear();
 2403|       |
 2404|  44.5k|  std::vector<std::string> paths;
 2405|  44.5k|  paths.push_back(basedir);
 2406|  44.5k|  paths.push_back(".");
 2407|       |
 2408|  44.5k|  std::string filepath = FindFile(paths, filename, fs);
 2409|  44.5k|  if (filepath.empty() || filename.empty()) {
  ------------------
  |  Branch (2409:7): [True: 44.5k, False: 0]
  |  Branch (2409:27): [True: 0, False: 0]
  ------------------
 2410|  44.5k|    if (failMsgOut) {
  ------------------
  |  Branch (2410:9): [True: 44.5k, False: 0]
  ------------------
 2411|  44.5k|      (*failMsgOut) += "File not found : " + filename + "\n";
 2412|  44.5k|    }
 2413|  44.5k|    return false;
 2414|  44.5k|  }
 2415|       |
 2416|       |  // Check file size
 2417|      0|  if (fs->GetFileSizeInBytes) {
  ------------------
  |  Branch (2417:7): [True: 0, False: 0]
  ------------------
 2418|       |
 2419|      0|    size_t file_size{0};
 2420|      0|    std::string _err;
 2421|      0|    bool ok = fs->GetFileSizeInBytes(&file_size, &_err, filepath, fs->user_data);
 2422|      0|    if (!ok) {
  ------------------
  |  Branch (2422:9): [True: 0, False: 0]
  ------------------
 2423|      0|      if (_err.size()) {
  ------------------
  |  Branch (2423:11): [True: 0, False: 0]
  ------------------
 2424|      0|        if (failMsgOut) {
  ------------------
  |  Branch (2424:13): [True: 0, False: 0]
  ------------------
 2425|      0|          (*failMsgOut) += "Getting file size failed : " + filename + ", err = " + _err + "\n";
 2426|      0|        }
 2427|      0|      }
 2428|      0|      return false;
 2429|      0|    }
 2430|       |
 2431|      0|    if (file_size > maxFileSize) {
  ------------------
  |  Branch (2431:9): [True: 0, False: 0]
  ------------------
 2432|      0|      if (failMsgOut) {
  ------------------
  |  Branch (2432:11): [True: 0, False: 0]
  ------------------
 2433|      0|        (*failMsgOut) += "File size " + std::to_string(file_size) + " exceeds maximum allowed file size " + std::to_string(maxFileSize) + " : " + filepath + "\n";
 2434|      0|      }
 2435|      0|      return false;
 2436|      0|    }
 2437|      0|  }
 2438|       |
 2439|      0|  std::vector<unsigned char> buf;
 2440|      0|  std::string fileReadErr;
 2441|      0|  bool fileRead =
 2442|      0|      fs->ReadWholeFile(&buf, &fileReadErr, filepath, fs->user_data);
 2443|      0|  if (!fileRead) {
  ------------------
  |  Branch (2443:7): [True: 0, False: 0]
  ------------------
 2444|      0|    if (failMsgOut) {
  ------------------
  |  Branch (2444:9): [True: 0, False: 0]
  ------------------
 2445|      0|      (*failMsgOut) +=
 2446|      0|          "File read error : " + filepath + " : " + fileReadErr + "\n";
 2447|      0|    }
 2448|      0|    return false;
 2449|      0|  }
 2450|       |
 2451|      0|  size_t sz = buf.size();
 2452|      0|  if (sz == 0) {
  ------------------
  |  Branch (2452:7): [True: 0, False: 0]
  ------------------
 2453|      0|    if (failMsgOut) {
  ------------------
  |  Branch (2453:9): [True: 0, False: 0]
  ------------------
 2454|      0|      (*failMsgOut) += "File is empty : " + filepath + "\n";
 2455|      0|    }
 2456|      0|    return false;
 2457|      0|  }
 2458|       |
 2459|      0|  if (checkSize) {
  ------------------
  |  Branch (2459:7): [True: 0, False: 0]
  ------------------
 2460|      0|    if (reqBytes == sz) {
  ------------------
  |  Branch (2460:9): [True: 0, False: 0]
  ------------------
 2461|      0|      out->swap(buf);
 2462|      0|      return true;
 2463|      0|    } else {
 2464|      0|      std::stringstream ss;
 2465|      0|      ss << "File size mismatch : " << filepath << ", requestedBytes "
 2466|      0|         << reqBytes << ", but got " << sz << std::endl;
 2467|      0|      if (failMsgOut) {
  ------------------
  |  Branch (2467:11): [True: 0, False: 0]
  ------------------
 2468|      0|        (*failMsgOut) += ss.str();
 2469|      0|      }
 2470|      0|      return false;
 2471|      0|    }
 2472|      0|  }
 2473|       |
 2474|      0|  out->swap(buf);
 2475|      0|  return true;
 2476|      0|}
fuzz_gltf.cc:_ZN8tinygltfL8FindFileERKNSt3__16vectorINS0_12basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEENS5_IS7_EEEERKS7_PNS_11FsCallbacksE:
 2125|  44.5k|                            const std::string &filepath, FsCallbacks *fs) {
 2126|  44.5k|  if (fs == nullptr || fs->ExpandFilePath == nullptr ||
  ------------------
  |  Branch (2126:7): [True: 0, False: 44.5k]
  |  Branch (2126:24): [True: 0, False: 44.5k]
  ------------------
 2127|  44.5k|      fs->FileExists == nullptr) {
  ------------------
  |  Branch (2127:7): [True: 0, False: 44.5k]
  ------------------
 2128|       |    // Error, fs callback[s] missing
 2129|      0|    return std::string();
 2130|      0|  }
 2131|       |
 2132|       |  // https://github.com/syoyo/tinygltf/issues/416
 2133|       |  // Use strlen() since std::string's size/length reports the number of elements in the buffer, not the length of string(null-terminated)
 2134|       |  // strip null-character in the middle of string.
 2135|  44.5k|  size_t slength = strlen(filepath.c_str());
 2136|  44.5k|  if (slength == 0) {
  ------------------
  |  Branch (2136:7): [True: 681, False: 43.8k]
  ------------------
 2137|    681|    return std::string();
 2138|    681|  }
 2139|       |
 2140|  43.8k|  std::string cleaned_filepath = std::string(filepath.c_str());
 2141|       |
 2142|   131k|  for (size_t i = 0; i < paths.size(); i++) {
  ------------------
  |  Branch (2142:22): [True: 87.6k, False: 43.8k]
  ------------------
 2143|  87.6k|    std::string absPath =
 2144|  87.6k|        fs->ExpandFilePath(JoinPath(paths[i], cleaned_filepath), fs->user_data);
 2145|  87.6k|    if (fs->FileExists(absPath, fs->user_data)) {
  ------------------
  |  Branch (2145:9): [True: 0, False: 87.6k]
  ------------------
 2146|      0|      return absPath;
 2147|      0|    }
 2148|  87.6k|  }
 2149|       |
 2150|  43.8k|  return std::string();
 2151|  43.8k|}
fuzz_gltf.cc:_ZN8tinygltf6detail14ForEachInArrayIZNS_8TinyGLTF14LoadFromStringEPNS_5ModelEPNSt3__112basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEESC_PKcjRKSB_jE3$_4EEbRKN8nlohmann10basic_jsonINS5_3mapENS5_6vectorESB_blmdS9_NSI_14adl_serializerENSL_IhNS9_IhEEEEEESE_OT_:
 5471|  1.39k|bool ForEachInArray(const detail::json &_v, const char *member, Callback && cb) {
 5472|  1.39k|  detail::json_const_iterator itm;
 5473|  1.39k|  if (detail::FindMember(_v, member, itm) && detail::IsArray(detail::GetValue(itm))) {
  ------------------
  |  Branch (5473:7): [True: 0, False: 1.39k]
  |  Branch (5473:46): [True: 0, False: 0]
  ------------------
 5474|      0|    const detail::json &root = detail::GetValue(itm);
 5475|      0|    auto it = detail::ArrayBegin(root);
 5476|      0|    auto end = detail::ArrayEnd(root);
 5477|      0|    for (; it != end; ++it) {
  ------------------
  |  Branch (5477:12): [True: 0, False: 0]
  ------------------
 5478|      0|      if (!cb(*it)) return false;
  ------------------
  |  Branch (5478:11): [True: 0, False: 0]
  ------------------
 5479|      0|    }
 5480|      0|  }
 5481|  1.39k|  return true;
 5482|  1.39k|};
fuzz_gltf.cc:_ZN8tinygltfL20ParseIntegerPropertyEPiPNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEERKN8nlohmann10basic_jsonINS1_3mapENS1_6vectorES7_blmdS5_NS9_14adl_serializerENSC_IhNS5_IhEEEEEERKS7_bSK_:
 3600|   869k|                                 const std::string &parent_node = "") {
 3601|   869k|  detail::json_const_iterator it;
 3602|   869k|  if (!detail::FindMember(o, property.c_str(), it)) {
  ------------------
  |  Branch (3602:7): [True: 854k, False: 15.2k]
  ------------------
 3603|   854k|    if (required) {
  ------------------
  |  Branch (3603:9): [True: 2.42k, False: 852k]
  ------------------
 3604|  2.42k|      if (err) {
  ------------------
  |  Branch (3604:11): [True: 2.42k, False: 0]
  ------------------
 3605|  2.42k|        (*err) += "'" + property + "' property is missing";
 3606|  2.42k|        if (!parent_node.empty()) {
  ------------------
  |  Branch (3606:13): [True: 2.42k, False: 0]
  ------------------
 3607|  2.42k|          (*err) += " in " + parent_node;
 3608|  2.42k|        }
 3609|  2.42k|        (*err) += ".\n";
 3610|  2.42k|      }
 3611|  2.42k|    }
 3612|   854k|    return false;
 3613|   854k|  }
 3614|       |
 3615|  15.2k|  int intValue;
 3616|  15.2k|  bool isInt = detail::GetInt(detail::GetValue(it), intValue);
 3617|  15.2k|  if (!isInt) {
  ------------------
  |  Branch (3617:7): [True: 136, False: 15.1k]
  ------------------
 3618|    136|    if (required) {
  ------------------
  |  Branch (3618:9): [True: 136, False: 0]
  ------------------
 3619|    136|      if (err) {
  ------------------
  |  Branch (3619:11): [True: 136, False: 0]
  ------------------
 3620|    136|        (*err) += "'" + property + "' property is not an integer type.\n";
 3621|    136|      }
 3622|    136|    }
 3623|    136|    return false;
 3624|    136|  }
 3625|       |
 3626|  15.1k|  if (ret) {
  ------------------
  |  Branch (3626:7): [True: 15.1k, False: 0]
  ------------------
 3627|  15.1k|    (*ret) = intValue;
 3628|  15.1k|  }
 3629|       |
 3630|  15.1k|  return true;
 3631|  15.2k|}
fuzz_gltf.cc:_ZN8tinygltf6detail14ForEachInArrayIZNS_8TinyGLTF14LoadFromStringEPNS_5ModelEPNSt3__112basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEESC_PKcjRKSB_jE3$_5EEbRKN8nlohmann10basic_jsonINS5_3mapENS5_6vectorESB_blmdS9_NSI_14adl_serializerENSL_IhNS9_IhEEEEEESE_OT_:
 5471|  1.39k|bool ForEachInArray(const detail::json &_v, const char *member, Callback && cb) {
 5472|  1.39k|  detail::json_const_iterator itm;
 5473|  1.39k|  if (detail::FindMember(_v, member, itm) && detail::IsArray(detail::GetValue(itm))) {
  ------------------
  |  Branch (5473:7): [True: 0, False: 1.39k]
  |  Branch (5473:46): [True: 0, False: 0]
  ------------------
 5474|      0|    const detail::json &root = detail::GetValue(itm);
 5475|      0|    auto it = detail::ArrayBegin(root);
 5476|      0|    auto end = detail::ArrayEnd(root);
 5477|      0|    for (; it != end; ++it) {
  ------------------
  |  Branch (5477:12): [True: 0, False: 0]
  ------------------
 5478|      0|      if (!cb(*it)) return false;
  ------------------
  |  Branch (5478:11): [True: 0, False: 0]
  ------------------
 5479|      0|    }
 5480|      0|  }
 5481|  1.39k|  return true;
 5482|  1.39k|};
fuzz_gltf.cc:_ZN8tinygltfL20ParseBooleanPropertyEPbPNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEERKN8nlohmann10basic_jsonINS1_3mapENS1_6vectorES7_blmdS5_NS9_14adl_serializerENSC_IhNS5_IhEEEEEERKS7_bSK_:
 3551|  75.1k|                                 const std::string &parent_node = "") {
 3552|  75.1k|  detail::json_const_iterator it;
 3553|  75.1k|  if (!detail::FindMember(o, property.c_str(), it)) {
  ------------------
  |  Branch (3553:7): [True: 74.0k, False: 1.09k]
  ------------------
 3554|  74.0k|    if (required) {
  ------------------
  |  Branch (3554:9): [True: 0, False: 74.0k]
  ------------------
 3555|      0|      if (err) {
  ------------------
  |  Branch (3555:11): [True: 0, False: 0]
  ------------------
 3556|      0|        (*err) += "'" + property + "' property is missing";
 3557|      0|        if (!parent_node.empty()) {
  ------------------
  |  Branch (3557:13): [True: 0, False: 0]
  ------------------
 3558|      0|          (*err) += " in " + parent_node;
 3559|      0|        }
 3560|      0|        (*err) += ".\n";
 3561|      0|      }
 3562|      0|    }
 3563|  74.0k|    return false;
 3564|  74.0k|  }
 3565|       |
 3566|  1.09k|  auto &value = detail::GetValue(it);
 3567|       |
 3568|  1.09k|  bool isBoolean;
 3569|  1.09k|  bool boolValue = false;
 3570|       |#ifdef TINYGLTF_USE_RAPIDJSON
 3571|       |  isBoolean = value.IsBool();
 3572|       |  if (isBoolean) {
 3573|       |    boolValue = value.GetBool();
 3574|       |  }
 3575|       |#else
 3576|  1.09k|  isBoolean = value.is_boolean();
 3577|  1.09k|  if (isBoolean) {
  ------------------
  |  Branch (3577:7): [True: 260, False: 839]
  ------------------
 3578|    260|    boolValue = value.get<bool>();
 3579|    260|  }
 3580|  1.09k|#endif
 3581|  1.09k|  if (!isBoolean) {
  ------------------
  |  Branch (3581:7): [True: 839, False: 260]
  ------------------
 3582|    839|    if (required) {
  ------------------
  |  Branch (3582:9): [True: 0, False: 839]
  ------------------
 3583|      0|      if (err) {
  ------------------
  |  Branch (3583:11): [True: 0, False: 0]
  ------------------
 3584|      0|        (*err) += "'" + property + "' property is not a bool type.\n";
 3585|      0|      }
 3586|      0|    }
 3587|    839|    return false;
 3588|    839|  }
 3589|       |
 3590|    260|  if (ret) {
  ------------------
  |  Branch (3590:7): [True: 260, False: 0]
  ------------------
 3591|    260|    (*ret) = boolValue;
 3592|    260|  }
 3593|       |
 3594|    260|  return true;
 3595|  1.09k|}
fuzz_gltf.cc:_ZN8tinygltf6detail14ForEachInArrayIZNS_8TinyGLTF14LoadFromStringEPNS_5ModelEPNSt3__112basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEESC_PKcjRKSB_jE3$_6EEbRKN8nlohmann10basic_jsonINS5_3mapENS5_6vectorESB_blmdS9_NSI_14adl_serializerENSL_IhNS9_IhEEEEEESE_OT_:
 5471|  1.39k|bool ForEachInArray(const detail::json &_v, const char *member, Callback && cb) {
 5472|  1.39k|  detail::json_const_iterator itm;
 5473|  1.39k|  if (detail::FindMember(_v, member, itm) && detail::IsArray(detail::GetValue(itm))) {
  ------------------
  |  Branch (5473:7): [True: 136, False: 1.25k]
  |  Branch (5473:46): [True: 136, False: 0]
  ------------------
 5474|    136|    const detail::json &root = detail::GetValue(itm);
 5475|    136|    auto it = detail::ArrayBegin(root);
 5476|    136|    auto end = detail::ArrayEnd(root);
 5477|   139k|    for (; it != end; ++it) {
  ------------------
  |  Branch (5477:12): [True: 139k, False: 136]
  ------------------
 5478|   139k|      if (!cb(*it)) return false;
  ------------------
  |  Branch (5478:11): [True: 0, False: 139k]
  ------------------
 5479|   139k|    }
 5480|    136|  }
 5481|  1.39k|  return true;
 5482|  1.39k|};
fuzz_gltf.cc:_ZZN8tinygltf8TinyGLTF14LoadFromStringEPNS_5ModelEPNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEESA_PKcjRKS9_jENK3$_6clERKN8nlohmann10basic_jsonINS3_3mapENS3_6vectorES9_blmdS7_NSG_14adl_serializerENSJ_IhNS7_IhEEEEEE:
 5730|   139k|    bool success = ForEachInArray(v, "meshes", [&](const detail::json &o) {
 5731|   139k|      if (!detail::IsObject(o)) {
  ------------------
  |  Branch (5731:11): [True: 0, False: 139k]
  ------------------
 5732|      0|        if (err) {
  ------------------
  |  Branch (5732:13): [True: 0, False: 0]
  ------------------
 5733|      0|          (*err) += "`meshes' does not contain an JSON object.";
 5734|      0|        }
 5735|      0|        return false;
 5736|      0|      }
 5737|   139k|      Mesh mesh;
 5738|   139k|      if (!ParseMesh(&mesh, model, err, o,
  ------------------
  |  Branch (5738:11): [True: 0, False: 139k]
  ------------------
 5739|   139k|                     store_original_json_for_extras_and_extensions_)) {
 5740|      0|        return false;
 5741|      0|      }
 5742|       |
 5743|   139k|      model->meshes.emplace_back(std::move(mesh));
 5744|   139k|      return true;
 5745|   139k|    });
_ZN8tinygltf4MeshC2Ev:
 1039|   139k|  Mesh() = default;
fuzz_gltf.cc:_ZN8tinygltfL9ParseMeshEPNS_4MeshEPNS_5ModelEPNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEERKN8nlohmann10basic_jsonINS4_3mapENS4_6vectorESA_blmdS8_NSC_14adl_serializerENSF_IhNS8_IhEEEEEEb:
 4867|   139k|                      bool store_original_json_for_extras_and_extensions) {
 4868|   139k|  ParseStringProperty(&mesh->name, err, o, "name", false);
 4869|       |
 4870|   139k|  mesh->primitives.clear();
 4871|   139k|  detail::json_const_iterator primObject;
 4872|   139k|  if (detail::FindMember(o, "primitives", primObject) &&
  ------------------
  |  Branch (4872:7): [True: 719, False: 138k]
  ------------------
 4873|   139k|      detail::IsArray(detail::GetValue(primObject))) {
  ------------------
  |  Branch (4873:7): [True: 719, False: 0]
  ------------------
 4874|    719|    detail::json_const_array_iterator primEnd = detail::ArrayEnd(detail::GetValue(primObject));
 4875|    719|    for (detail::json_const_array_iterator i = detail::ArrayBegin(detail::GetValue(primObject));
 4876|  45.6k|         i != primEnd; ++i) {
  ------------------
  |  Branch (4876:10): [True: 44.9k, False: 719]
  ------------------
 4877|  44.9k|      Primitive primitive;
 4878|  44.9k|      if (ParsePrimitive(&primitive, model, err, *i,
  ------------------
  |  Branch (4878:11): [True: 35.7k, False: 9.17k]
  ------------------
 4879|  44.9k|                         store_original_json_for_extras_and_extensions)) {
 4880|       |        // Only add the primitive if the parsing succeeds.
 4881|  35.7k|        mesh->primitives.emplace_back(std::move(primitive));
 4882|  35.7k|      }
 4883|  44.9k|    }
 4884|    719|  }
 4885|       |
 4886|       |  // Should probably check if has targets and if dimensions fit
 4887|   139k|  ParseNumberArrayProperty(&mesh->weights, err, o, "weights", false);
 4888|       |
 4889|   139k|  ParseExtrasAndExtensions(mesh, err, o, store_original_json_for_extras_and_extensions);
 4890|       |
 4891|   139k|  return true;
 4892|   139k|}
_ZN8tinygltf9PrimitiveC2Ev:
 1019|  44.9k|  Primitive() {
 1020|  44.9k|    material = -1;
 1021|  44.9k|    indices = -1;
 1022|  44.9k|    mode = -1;
 1023|  44.9k|  }
fuzz_gltf.cc:_ZN8tinygltfL14ParsePrimitiveEPNS_9PrimitiveEPNS_5ModelEPNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEERKN8nlohmann10basic_jsonINS4_3mapENS4_6vectorESA_blmdS8_NSC_14adl_serializerENSF_IhNS8_IhEEEEEEb:
 4810|  44.9k|                           bool store_original_json_for_extras_and_extensions) {
 4811|  44.9k|  int material = -1;
 4812|  44.9k|  ParseIntegerProperty(&material, err, o, "material", false);
 4813|  44.9k|  primitive->material = material;
 4814|       |
 4815|  44.9k|  int mode = TINYGLTF_MODE_TRIANGLES;
  ------------------
  |  |   89|  44.9k|#define TINYGLTF_MODE_TRIANGLES (4)
  ------------------
 4816|  44.9k|  ParseIntegerProperty(&mode, err, o, "mode", false);
 4817|  44.9k|  primitive->mode = mode;  // Why only triangles were supported ?
 4818|       |
 4819|  44.9k|  int indices = -1;
 4820|  44.9k|  ParseIntegerProperty(&indices, err, o, "indices", false);
 4821|  44.9k|  primitive->indices = indices;
 4822|  44.9k|  if (!ParseStringIntegerProperty(&primitive->attributes, err, o, "attributes",
  ------------------
  |  Branch (4822:7): [True: 9.17k, False: 35.7k]
  ------------------
 4823|  44.9k|                                  true, "Primitive")) {
 4824|  9.17k|    return false;
 4825|  9.17k|  }
 4826|       |
 4827|       |  // Look for morph targets
 4828|  35.7k|  detail::json_const_iterator targetsObject;
 4829|  35.7k|  if (detail::FindMember(o, "targets", targetsObject) &&
  ------------------
  |  Branch (4829:7): [True: 656, False: 35.0k]
  ------------------
 4830|  35.7k|      detail::IsArray(detail::GetValue(targetsObject))) {
  ------------------
  |  Branch (4830:7): [True: 622, False: 34]
  ------------------
 4831|    622|    auto targetsObjectEnd = detail::ArrayEnd(detail::GetValue(targetsObject));
 4832|    622|    for (detail::json_const_array_iterator i = detail::ArrayBegin(detail::GetValue(targetsObject));
 4833|   136k|         i != targetsObjectEnd; ++i) {
  ------------------
  |  Branch (4833:10): [True: 135k, False: 622]
  ------------------
 4834|   135k|      std::map<std::string, int> targetAttribues;
 4835|       |
 4836|   135k|      const detail::json &dict = *i;
 4837|   135k|      if (detail::IsObject(dict)) {
  ------------------
  |  Branch (4837:11): [True: 135k, False: 62]
  ------------------
 4838|   135k|        detail::json_const_iterator dictIt(detail::ObjectBegin(dict));
 4839|   135k|        detail::json_const_iterator dictItEnd(detail::ObjectEnd(dict));
 4840|       |
 4841|   141k|        for (; dictIt != dictItEnd; ++dictIt) {
  ------------------
  |  Branch (4841:16): [True: 6.04k, False: 135k]
  ------------------
 4842|  6.04k|          int iVal;
 4843|  6.04k|          if (detail::GetInt(detail::GetValue(dictIt), iVal))
  ------------------
  |  Branch (4843:15): [True: 5.51k, False: 536]
  ------------------
 4844|  5.51k|            targetAttribues[detail::GetKey(dictIt)] = iVal;
 4845|  6.04k|        }
 4846|   135k|        primitive->targets.emplace_back(std::move(targetAttribues));
 4847|   135k|      }
 4848|   135k|    }
 4849|    622|  }
 4850|       |
 4851|  35.7k|  ParseExtrasAndExtensions(primitive, err, o, store_original_json_for_extras_and_extensions);
 4852|       |
 4853|       |#ifdef TINYGLTF_ENABLE_DRACO
 4854|       |  auto dracoExtension =
 4855|       |      primitive->extensions.find("KHR_draco_mesh_compression");
 4856|       |  if (dracoExtension != primitive->extensions.end()) {
 4857|       |    ParseDracoExtension(primitive, model, err, dracoExtension->second);
 4858|       |  }
 4859|       |#else
 4860|  35.7k|  (void)model;
 4861|  35.7k|#endif
 4862|       |
 4863|  35.7k|  return true;
 4864|  44.9k|}
fuzz_gltf.cc:_ZN8tinygltfL26ParseStringIntegerPropertyEPNSt3__13mapINS0_12basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEEiNS0_4lessIS7_EENS5_INS0_4pairIKS7_iEEEEEEPS7_RKN8nlohmann10basic_jsonIS1_NS0_6vectorES7_blmdS5_NSH_14adl_serializerENSJ_IhNS5_IhEEEEEERSB_bSQ_:
 3873|  44.9k|                                       const std::string &parent = "") {
 3874|  44.9k|  detail::json_const_iterator it;
 3875|  44.9k|  if (!detail::FindMember(o, property.c_str(), it)) {
  ------------------
  |  Branch (3875:7): [True: 8.93k, False: 35.9k]
  ------------------
 3876|  8.93k|    if (required) {
  ------------------
  |  Branch (3876:9): [True: 8.93k, False: 0]
  ------------------
 3877|  8.93k|      if (err) {
  ------------------
  |  Branch (3877:11): [True: 8.93k, False: 0]
  ------------------
 3878|  8.93k|        if (!parent.empty()) {
  ------------------
  |  Branch (3878:13): [True: 8.93k, False: 0]
  ------------------
 3879|  8.93k|          (*err) +=
 3880|  8.93k|              "'" + property + "' property is missing in " + parent + ".\n";
 3881|  8.93k|        } else {
 3882|      0|          (*err) += "'" + property + "' property is missing.\n";
 3883|      0|        }
 3884|  8.93k|      }
 3885|  8.93k|    }
 3886|  8.93k|    return false;
 3887|  8.93k|  }
 3888|       |
 3889|  35.9k|  const detail::json &dict = detail::GetValue(it);
 3890|       |
 3891|       |  // Make sure we are dealing with an object / dictionary.
 3892|  35.9k|  if (!detail::IsObject(dict)) {
  ------------------
  |  Branch (3892:7): [True: 0, False: 35.9k]
  ------------------
 3893|      0|    if (required) {
  ------------------
  |  Branch (3893:9): [True: 0, False: 0]
  ------------------
 3894|      0|      if (err) {
  ------------------
  |  Branch (3894:11): [True: 0, False: 0]
  ------------------
 3895|      0|        (*err) += "'" + property + "' property is not an object.\n";
 3896|      0|      }
 3897|      0|    }
 3898|      0|    return false;
 3899|      0|  }
 3900|       |
 3901|  35.9k|  ret->clear();
 3902|       |
 3903|  35.9k|  detail::json_const_iterator dictIt(detail::ObjectBegin(dict));
 3904|  35.9k|  detail::json_const_iterator dictItEnd(detail::ObjectEnd(dict));
 3905|       |
 3906|  40.4k|  for (; dictIt != dictItEnd; ++dictIt) {
  ------------------
  |  Branch (3906:10): [True: 4.69k, False: 35.7k]
  ------------------
 3907|  4.69k|    int intVal;
 3908|  4.69k|    if (!detail::GetInt(detail::GetValue(dictIt), intVal)) {
  ------------------
  |  Branch (3908:9): [True: 240, False: 4.45k]
  ------------------
 3909|    240|      if (required) {
  ------------------
  |  Branch (3909:11): [True: 240, False: 0]
  ------------------
 3910|    240|        if (err) {
  ------------------
  |  Branch (3910:13): [True: 240, False: 0]
  ------------------
 3911|    240|          (*err) += "'" + property + "' value is not an integer type.\n";
 3912|    240|        }
 3913|    240|      }
 3914|    240|      return false;
 3915|    240|    }
 3916|       |
 3917|       |    // Insert into the list.
 3918|  4.45k|    (*ret)[detail::GetKey(dictIt)] = intVal;
 3919|  4.45k|  }
 3920|  35.7k|  return true;
 3921|  35.9k|}
fuzz_gltf.cc:_ZN8tinygltfL24ParseExtrasAndExtensionsINS_9PrimitiveEEEbPT_PNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEERKN8nlohmann10basic_jsonINS4_3mapENS4_6vectorESA_blmdS8_NSC_14adl_serializerENSF_IhNS8_IhEEEEEEb:
 4029|  35.7k|    const detail::json & o, bool store_json_strings) {
 4030|       |  
 4031|  35.7k|  ParseExtensionsProperty(&target->extensions, err, o);
 4032|  35.7k|  ParseExtrasProperty(&target->extras, o);
 4033|       |
 4034|  35.7k|  if (store_json_strings) {
  ------------------
  |  Branch (4034:7): [True: 0, False: 35.7k]
  ------------------
 4035|      0|    {
 4036|      0|      detail::json_const_iterator it;
 4037|      0|      if (detail::FindMember(o, "extensions", it)) {
  ------------------
  |  Branch (4037:11): [True: 0, False: 0]
  ------------------
 4038|      0|        target->extensions_json_string = detail::JsonToString(detail::GetValue(it));
 4039|      0|      }
 4040|      0|    }
 4041|      0|    {
 4042|      0|      detail::json_const_iterator it;
 4043|      0|      if (detail::FindMember(o, "extras", it)) {
  ------------------
  |  Branch (4043:11): [True: 0, False: 0]
  ------------------
 4044|      0|        target->extras_json_string = detail::JsonToString(detail::GetValue(it));
 4045|      0|      }
 4046|      0|    }
 4047|      0|  }
 4048|  35.7k|  return true;
 4049|  35.7k|}
_ZN8tinygltf9PrimitiveC2EOS0_:
   79|   104k|  x(x &&) TINYGLTF_NOEXCEPT = default; \
fuzz_gltf.cc:_ZN8tinygltfL24ParseExtrasAndExtensionsINS_4MeshEEEbPT_PNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEERKN8nlohmann10basic_jsonINS4_3mapENS4_6vectorESA_blmdS8_NSC_14adl_serializerENSF_IhNS8_IhEEEEEEb:
 4029|   139k|    const detail::json & o, bool store_json_strings) {
 4030|       |  
 4031|   139k|  ParseExtensionsProperty(&target->extensions, err, o);
 4032|   139k|  ParseExtrasProperty(&target->extras, o);
 4033|       |
 4034|   139k|  if (store_json_strings) {
  ------------------
  |  Branch (4034:7): [True: 0, False: 139k]
  ------------------
 4035|      0|    {
 4036|      0|      detail::json_const_iterator it;
 4037|      0|      if (detail::FindMember(o, "extensions", it)) {
  ------------------
  |  Branch (4037:11): [True: 0, False: 0]
  ------------------
 4038|      0|        target->extensions_json_string = detail::JsonToString(detail::GetValue(it));
 4039|      0|      }
 4040|      0|    }
 4041|      0|    {
 4042|      0|      detail::json_const_iterator it;
 4043|      0|      if (detail::FindMember(o, "extras", it)) {
  ------------------
  |  Branch (4043:11): [True: 0, False: 0]
  ------------------
 4044|      0|        target->extras_json_string = detail::JsonToString(detail::GetValue(it));
 4045|      0|      }
 4046|      0|    }
 4047|      0|  }
 4048|   139k|  return true;
 4049|   139k|}
_ZN8tinygltf4MeshC2EOS0_:
   79|   404k|  x(x &&) TINYGLTF_NOEXCEPT = default; \
fuzz_gltf.cc:_ZN8tinygltf6detail14ForEachInArrayIZNS_8TinyGLTF14LoadFromStringEPNS_5ModelEPNSt3__112basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEESC_PKcjRKSB_jE3$_7EEbRKN8nlohmann10basic_jsonINS5_3mapENS5_6vectorESB_blmdS9_NSI_14adl_serializerENSL_IhNS9_IhEEEEEESE_OT_:
 5471|  1.39k|bool ForEachInArray(const detail::json &_v, const char *member, Callback && cb) {
 5472|  1.39k|  detail::json_const_iterator itm;
 5473|  1.39k|  if (detail::FindMember(_v, member, itm) && detail::IsArray(detail::GetValue(itm))) {
  ------------------
  |  Branch (5473:7): [True: 14, False: 1.37k]
  |  Branch (5473:46): [True: 14, False: 0]
  ------------------
 5474|     14|    const detail::json &root = detail::GetValue(itm);
 5475|     14|    auto it = detail::ArrayBegin(root);
 5476|     14|    auto end = detail::ArrayEnd(root);
 5477|  18.2k|    for (; it != end; ++it) {
  ------------------
  |  Branch (5477:12): [True: 18.1k, False: 14]
  ------------------
 5478|  18.1k|      if (!cb(*it)) return false;
  ------------------
  |  Branch (5478:11): [True: 0, False: 18.1k]
  ------------------
 5479|  18.1k|    }
 5480|     14|  }
 5481|  1.39k|  return true;
 5482|  1.39k|};
fuzz_gltf.cc:_ZZN8tinygltf8TinyGLTF14LoadFromStringEPNS_5ModelEPNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEESA_PKcjRKS9_jENK3$_7clERKN8nlohmann10basic_jsonINS3_3mapENS3_6vectorES9_blmdS7_NSG_14adl_serializerENSJ_IhNS7_IhEEEEEE:
 5813|  18.1k|    bool success = ForEachInArray(v, "nodes", [&](const detail::json &o) {
 5814|  18.1k|      if (!detail::IsObject(o)) {
  ------------------
  |  Branch (5814:11): [True: 0, False: 18.1k]
  ------------------
 5815|      0|        if (err) {
  ------------------
  |  Branch (5815:13): [True: 0, False: 0]
  ------------------
 5816|      0|          (*err) += "`nodes' does not contain an JSON object.";
 5817|      0|        }
 5818|      0|        return false;
 5819|      0|      }
 5820|  18.1k|      Node node;
 5821|  18.1k|      if (!ParseNode(&node, err, o,
  ------------------
  |  Branch (5821:11): [True: 0, False: 18.1k]
  ------------------
 5822|  18.1k|                     store_original_json_for_extras_and_extensions_)) {
 5823|      0|        return false;
 5824|      0|      }
 5825|       |
 5826|  18.1k|      model->nodes.emplace_back(std::move(node));
 5827|  18.1k|      return true;
 5828|  18.1k|    });
_ZN8tinygltf4NodeC2Ev:
 1046|  18.1k|  Node() : camera(-1), skin(-1), mesh(-1) {}
fuzz_gltf.cc:_ZN8tinygltfL9ParseNodeEPNS_4NodeEPNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEERKN8nlohmann10basic_jsonINS2_3mapENS2_6vectorES8_blmdS6_NSA_14adl_serializerENSD_IhNS6_IhEEEEEEb:
 4895|  18.1k|                      bool store_original_json_for_extras_and_extensions) {
 4896|  18.1k|  ParseStringProperty(&node->name, err, o, "name", false);
 4897|       |
 4898|  18.1k|  int skin = -1;
 4899|  18.1k|  ParseIntegerProperty(&skin, err, o, "skin", false);
 4900|  18.1k|  node->skin = skin;
 4901|       |
 4902|       |  // Matrix and T/R/S are exclusive
 4903|  18.1k|  if (!ParseNumberArrayProperty(&node->matrix, err, o, "matrix", false)) {
  ------------------
  |  Branch (4903:7): [True: 18.0k, False: 129]
  ------------------
 4904|  18.0k|    ParseNumberArrayProperty(&node->rotation, err, o, "rotation", false);
 4905|  18.0k|    ParseNumberArrayProperty(&node->scale, err, o, "scale", false);
 4906|  18.0k|    ParseNumberArrayProperty(&node->translation, err, o, "translation", false);
 4907|  18.0k|  }
 4908|       |
 4909|  18.1k|  int camera = -1;
 4910|  18.1k|  ParseIntegerProperty(&camera, err, o, "camera", false);
 4911|  18.1k|  node->camera = camera;
 4912|       |
 4913|  18.1k|  int mesh = -1;
 4914|  18.1k|  ParseIntegerProperty(&mesh, err, o, "mesh", false);
 4915|  18.1k|  node->mesh = mesh;
 4916|       |
 4917|  18.1k|  node->children.clear();
 4918|  18.1k|  ParseIntegerArrayProperty(&node->children, err, o, "children", false);
 4919|       |
 4920|  18.1k|  ParseNumberArrayProperty(&node->weights, err, o, "weights", false);
 4921|       |
 4922|  18.1k|  ParseExtrasAndExtensions(node, err, o, store_original_json_for_extras_and_extensions);
 4923|       |
 4924|       |  // KHR_lights_punctual: parse light source reference
 4925|  18.1k|  int light = -1;
 4926|  18.1k|  if (node->extensions.count("KHR_lights_punctual") != 0) {
  ------------------
  |  Branch (4926:7): [True: 0, False: 18.1k]
  ------------------
 4927|      0|    auto const& light_ext = node->extensions["KHR_lights_punctual"];
 4928|      0|    if (light_ext.Has("light")) {
  ------------------
  |  Branch (4928:9): [True: 0, False: 0]
  ------------------
 4929|      0|      light = light_ext.Get("light").GetNumberAsInt();
 4930|      0|    } else {
 4931|      0|      if (err) {
  ------------------
  |  Branch (4931:11): [True: 0, False: 0]
  ------------------
 4932|      0|        *err += "Node has extension KHR_lights_punctual, but does not reference "
 4933|      0|          "a light source.\n";
 4934|      0|      }
 4935|      0|      return false;
 4936|      0|    }
 4937|      0|  }
 4938|  18.1k|  node->light = light;
 4939|       |  
 4940|  18.1k|  return true;
 4941|  18.1k|}
fuzz_gltf.cc:_ZN8tinygltfL25ParseIntegerArrayPropertyEPNSt3__16vectorIiNS0_9allocatorIiEEEEPNS0_12basic_stringIcNS0_11char_traitsIcEENS2_IcEEEERKN8nlohmann10basic_jsonINS0_3mapES1_SA_blmdS2_NSC_14adl_serializerENS1_IhNS2_IhEEEEEERKSA_bSM_:
 3782|   282k|                                      const std::string &parent_node = "") {
 3783|   282k|  detail::json_const_iterator it;
 3784|   282k|  if (!detail::FindMember(o, property.c_str(), it)) {
  ------------------
  |  Branch (3784:7): [True: 281k, False: 872]
  ------------------
 3785|   281k|    if (required) {
  ------------------
  |  Branch (3785:9): [True: 0, False: 281k]
  ------------------
 3786|      0|      if (err) {
  ------------------
  |  Branch (3786:11): [True: 0, False: 0]
  ------------------
 3787|      0|        (*err) += "'" + property + "' property is missing";
 3788|      0|        if (!parent_node.empty()) {
  ------------------
  |  Branch (3788:13): [True: 0, False: 0]
  ------------------
 3789|      0|          (*err) += " in " + parent_node;
 3790|      0|        }
 3791|      0|        (*err) += ".\n";
 3792|      0|      }
 3793|      0|    }
 3794|   281k|    return false;
 3795|   281k|  }
 3796|       |
 3797|    872|  if (!detail::IsArray(detail::GetValue(it))) {
  ------------------
  |  Branch (3797:7): [True: 160, False: 712]
  ------------------
 3798|    160|    if (required) {
  ------------------
  |  Branch (3798:9): [True: 0, False: 160]
  ------------------
 3799|      0|      if (err) {
  ------------------
  |  Branch (3799:11): [True: 0, False: 0]
  ------------------
 3800|      0|        (*err) += "'" + property + "' property is not an array";
 3801|      0|        if (!parent_node.empty()) {
  ------------------
  |  Branch (3801:13): [True: 0, False: 0]
  ------------------
 3802|      0|          (*err) += " in " + parent_node;
 3803|      0|        }
 3804|      0|        (*err) += ".\n";
 3805|      0|      }
 3806|      0|    }
 3807|    160|    return false;
 3808|    160|  }
 3809|       |
 3810|    712|  ret->clear();
 3811|    712|  auto end = detail::ArrayEnd(detail::GetValue(it));
 3812|  25.6k|  for (auto i = detail::ArrayBegin(detail::GetValue(it)); i != end; ++i) {
  ------------------
  |  Branch (3812:59): [True: 25.0k, False: 584]
  ------------------
 3813|  25.0k|    int numberValue;
 3814|  25.0k|    bool isNumber = detail::GetInt(*i, numberValue);
 3815|  25.0k|    if (!isNumber) {
  ------------------
  |  Branch (3815:9): [True: 128, False: 24.9k]
  ------------------
 3816|    128|      if (required) {
  ------------------
  |  Branch (3816:11): [True: 0, False: 128]
  ------------------
 3817|      0|        if (err) {
  ------------------
  |  Branch (3817:13): [True: 0, False: 0]
  ------------------
 3818|      0|          (*err) += "'" + property + "' property is not an integer type.\n";
 3819|      0|          if (!parent_node.empty()) {
  ------------------
  |  Branch (3819:15): [True: 0, False: 0]
  ------------------
 3820|      0|            (*err) += " in " + parent_node;
 3821|      0|          }
 3822|      0|          (*err) += ".\n";
 3823|      0|        }
 3824|      0|      }
 3825|    128|      return false;
 3826|    128|    }
 3827|  24.9k|    ret->push_back(numberValue);
 3828|  24.9k|  }
 3829|       |
 3830|    584|  return true;
 3831|    712|}
fuzz_gltf.cc:_ZN8tinygltfL24ParseExtrasAndExtensionsINS_4NodeEEEbPT_PNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEERKN8nlohmann10basic_jsonINS4_3mapENS4_6vectorESA_blmdS8_NSC_14adl_serializerENSF_IhNS8_IhEEEEEEb:
 4029|  18.1k|    const detail::json & o, bool store_json_strings) {
 4030|       |  
 4031|  18.1k|  ParseExtensionsProperty(&target->extensions, err, o);
 4032|  18.1k|  ParseExtrasProperty(&target->extras, o);
 4033|       |
 4034|  18.1k|  if (store_json_strings) {
  ------------------
  |  Branch (4034:7): [True: 0, False: 18.1k]
  ------------------
 4035|      0|    {
 4036|      0|      detail::json_const_iterator it;
 4037|      0|      if (detail::FindMember(o, "extensions", it)) {
  ------------------
  |  Branch (4037:11): [True: 0, False: 0]
  ------------------
 4038|      0|        target->extensions_json_string = detail::JsonToString(detail::GetValue(it));
 4039|      0|      }
 4040|      0|    }
 4041|      0|    {
 4042|      0|      detail::json_const_iterator it;
 4043|      0|      if (detail::FindMember(o, "extras", it)) {
  ------------------
  |  Branch (4043:11): [True: 0, False: 0]
  ------------------
 4044|      0|        target->extras_json_string = detail::JsonToString(detail::GetValue(it));
 4045|      0|      }
 4046|      0|    }
 4047|      0|  }
 4048|  18.1k|  return true;
 4049|  18.1k|}
_ZN8tinygltf4NodeC2EOS0_:
   79|  53.5k|  x(x &&) TINYGLTF_NOEXCEPT = default; \
fuzz_gltf.cc:_ZN8tinygltf6detail14ForEachInArrayIZNS_8TinyGLTF14LoadFromStringEPNS_5ModelEPNSt3__112basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEESC_PKcjRKSB_jE3$_8EEbRKN8nlohmann10basic_jsonINS5_3mapENS5_6vectorESB_blmdS9_NSI_14adl_serializerENSL_IhNS9_IhEEEEEESE_OT_:
 5471|  1.39k|bool ForEachInArray(const detail::json &_v, const char *member, Callback && cb) {
 5472|  1.39k|  detail::json_const_iterator itm;
 5473|  1.39k|  if (detail::FindMember(_v, member, itm) && detail::IsArray(detail::GetValue(itm))) {
  ------------------
  |  Branch (5473:7): [True: 29, False: 1.36k]
  |  Branch (5473:46): [True: 29, False: 0]
  ------------------
 5474|     29|    const detail::json &root = detail::GetValue(itm);
 5475|     29|    auto it = detail::ArrayBegin(root);
 5476|     29|    auto end = detail::ArrayEnd(root);
 5477|   263k|    for (; it != end; ++it) {
  ------------------
  |  Branch (5477:12): [True: 263k, False: 29]
  ------------------
 5478|   263k|      if (!cb(*it)) return false;
  ------------------
  |  Branch (5478:11): [True: 0, False: 263k]
  ------------------
 5479|   263k|    }
 5480|     29|  }
 5481|  1.39k|  return true;
 5482|  1.39k|};
fuzz_gltf.cc:_ZZN8tinygltf8TinyGLTF14LoadFromStringEPNS_5ModelEPNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEESA_PKcjRKS9_jENK3$_8clERKN8nlohmann10basic_jsonINS3_3mapENS3_6vectorES9_blmdS7_NSG_14adl_serializerENSJ_IhNS7_IhEEEEEE:
 5837|   263k|    bool success = ForEachInArray(v, "scenes", [&](const detail::json &o) {
 5838|   263k|      if (!detail::IsObject(o)) {
  ------------------
  |  Branch (5838:11): [True: 0, False: 263k]
  ------------------
 5839|      0|        if (err) {
  ------------------
  |  Branch (5839:13): [True: 0, False: 0]
  ------------------
 5840|      0|          (*err) += "`scenes' does not contain an JSON object.";
 5841|      0|        }
 5842|      0|        return false;
 5843|      0|      }
 5844|   263k|      std::vector<int> nodes;
 5845|   263k|      ParseIntegerArrayProperty(&nodes, err, o, "nodes", false);
 5846|       |
 5847|   263k|      Scene scene;
 5848|   263k|      scene.nodes = std::move(nodes);
 5849|       |
 5850|   263k|      ParseStringProperty(&scene.name, err, o, "name", false);
 5851|       |
 5852|   263k|      ParseExtrasAndExtensions(&scene, err, o, store_original_json_for_extras_and_extensions_);
 5853|   263k|      model->scenes.emplace_back(std::move(scene));
 5854|   263k|      return true;
 5855|   263k|    });
_ZN8tinygltf5SceneC2Ev:
 1119|   263k|  Scene() = default;
fuzz_gltf.cc:_ZN8tinygltfL24ParseExtrasAndExtensionsINS_5SceneEEEbPT_PNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEERKN8nlohmann10basic_jsonINS4_3mapENS4_6vectorESA_blmdS8_NSC_14adl_serializerENSF_IhNS8_IhEEEEEEb:
 4029|   263k|    const detail::json & o, bool store_json_strings) {
 4030|       |  
 4031|   263k|  ParseExtensionsProperty(&target->extensions, err, o);
 4032|   263k|  ParseExtrasProperty(&target->extras, o);
 4033|       |
 4034|   263k|  if (store_json_strings) {
  ------------------
  |  Branch (4034:7): [True: 0, False: 263k]
  ------------------
 4035|      0|    {
 4036|      0|      detail::json_const_iterator it;
 4037|      0|      if (detail::FindMember(o, "extensions", it)) {
  ------------------
  |  Branch (4037:11): [True: 0, False: 0]
  ------------------
 4038|      0|        target->extensions_json_string = detail::JsonToString(detail::GetValue(it));
 4039|      0|      }
 4040|      0|    }
 4041|      0|    {
 4042|      0|      detail::json_const_iterator it;
 4043|      0|      if (detail::FindMember(o, "extras", it)) {
  ------------------
  |  Branch (4043:11): [True: 0, False: 0]
  ------------------
 4044|      0|        target->extras_json_string = detail::JsonToString(detail::GetValue(it));
 4045|      0|      }
 4046|      0|    }
 4047|      0|  }
 4048|   263k|  return true;
 4049|   263k|}
_ZN8tinygltf5SceneC2EOS0_:
   79|   789k|  x(x &&) TINYGLTF_NOEXCEPT = default; \
fuzz_gltf.cc:_ZN8tinygltf6detail14ForEachInArrayIZNS_8TinyGLTF14LoadFromStringEPNS_5ModelEPNSt3__112basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEESC_PKcjRKSB_jE3$_9EEbRKN8nlohmann10basic_jsonINS5_3mapENS5_6vectorESB_blmdS9_NSI_14adl_serializerENSL_IhNS9_IhEEEEEESE_OT_:
 5471|  1.39k|bool ForEachInArray(const detail::json &_v, const char *member, Callback && cb) {
 5472|  1.39k|  detail::json_const_iterator itm;
 5473|  1.39k|  if (detail::FindMember(_v, member, itm) && detail::IsArray(detail::GetValue(itm))) {
  ------------------
  |  Branch (5473:7): [True: 322, False: 1.06k]
  |  Branch (5473:46): [True: 322, False: 0]
  ------------------
 5474|    322|    const detail::json &root = detail::GetValue(itm);
 5475|    322|    auto it = detail::ArrayBegin(root);
 5476|    322|    auto end = detail::ArrayEnd(root);
 5477|  74.0k|    for (; it != end; ++it) {
  ------------------
  |  Branch (5477:12): [True: 73.7k, False: 299]
  ------------------
 5478|  73.7k|      if (!cb(*it)) return false;
  ------------------
  |  Branch (5478:11): [True: 23, False: 73.7k]
  ------------------
 5479|  73.7k|    }
 5480|    322|  }
 5481|  1.36k|  return true;
 5482|  1.39k|};
fuzz_gltf.cc:_ZZN8tinygltf8TinyGLTF14LoadFromStringEPNS_5ModelEPNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEESA_PKcjRKS9_jENK3$_9clERKN8nlohmann10basic_jsonINS3_3mapENS3_6vectorES9_blmdS7_NSG_14adl_serializerENSJ_IhNS7_IhEEEEEE:
 5873|  73.7k|    bool success = ForEachInArray(v, "materials", [&](const detail::json &o) {
 5874|  73.7k|      if (!detail::IsObject(o)) {
  ------------------
  |  Branch (5874:11): [True: 4, False: 73.7k]
  ------------------
 5875|      4|        if (err) {
  ------------------
  |  Branch (5875:13): [True: 4, False: 0]
  ------------------
 5876|      4|          (*err) += "`materials' does not contain an JSON object.";
 5877|      4|        }
 5878|      4|        return false;
 5879|      4|      }
 5880|  73.7k|      Material material;
 5881|  73.7k|      ParseStringProperty(&material.name, err, o, "name", false);
 5882|       |
 5883|  73.7k|      if (!ParseMaterial(&material, err, o,
  ------------------
  |  Branch (5883:11): [True: 19, False: 73.7k]
  ------------------
 5884|  73.7k|                         store_original_json_for_extras_and_extensions_)) {
 5885|     19|        return false;
 5886|     19|      }
 5887|       |
 5888|  73.7k|      model->materials.emplace_back(std::move(material));
 5889|  73.7k|      return true;
 5890|  73.7k|    });
_ZN8tinygltf8MaterialC2Ev:
  805|  73.7k|  Material() : alphaMode("OPAQUE"), alphaCutoff(0.5), doubleSided(false) {}
_ZN8tinygltf20PbrMetallicRoughnessC2Ev:
  771|  73.7k|        roughnessFactor(1.0) {}
_ZN8tinygltf17NormalTextureInfoC2Ev:
  729|  73.7k|  NormalTextureInfo() : index(-1), texCoord(0), scale(1.0) {}
_ZN8tinygltf20OcclusionTextureInfoC2Ev:
  748|  73.7k|  OcclusionTextureInfo() : index(-1), texCoord(0), strength(1.0) {}
_ZN8tinygltf11TextureInfoC2Ev:
  710|   221k|  TextureInfo() : index(-1), texCoord(0) {}
fuzz_gltf.cc:_ZN8tinygltfL13ParseMaterialEPNS_8MaterialEPNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEERKN8nlohmann10basic_jsonINS2_3mapENS2_6vectorES8_blmdS6_NSA_14adl_serializerENSD_IhNS6_IhEEEEEEb:
 4990|  73.7k|                          bool store_original_json_for_extras_and_extensions) {
 4991|  73.7k|  ParseStringProperty(&material->name, err, o, "name", /* required */ false);
 4992|       |
 4993|  73.7k|  if (ParseNumberArrayProperty(&material->emissiveFactor, err, o,
  ------------------
  |  Branch (4993:7): [True: 209, False: 73.5k]
  ------------------
 4994|  73.7k|                               "emissiveFactor",
 4995|  73.7k|                               /* required */ false)) {
 4996|    209|    if (material->emissiveFactor.size() != 3) {
  ------------------
  |  Branch (4996:9): [True: 19, False: 190]
  ------------------
 4997|     19|      if (err) {
  ------------------
  |  Branch (4997:11): [True: 19, False: 0]
  ------------------
 4998|     19|        (*err) +=
 4999|     19|            "Array length of `emissiveFactor` parameter in "
 5000|     19|            "material must be 3, but got " +
 5001|     19|            std::to_string(material->emissiveFactor.size()) + "\n";
 5002|     19|      }
 5003|     19|      return false;
 5004|     19|    }
 5005|  73.5k|  } else {
 5006|       |    // fill with default values
 5007|  73.5k|    material->emissiveFactor = {0.0, 0.0, 0.0};
 5008|  73.5k|  }
 5009|       |
 5010|  73.7k|  ParseStringProperty(&material->alphaMode, err, o, "alphaMode",
 5011|  73.7k|                      /* required */ false);
 5012|  73.7k|  ParseNumberProperty(&material->alphaCutoff, err, o, "alphaCutoff",
 5013|  73.7k|                      /* required */ false);
 5014|  73.7k|  ParseBooleanProperty(&material->doubleSided, err, o, "doubleSided",
 5015|  73.7k|                       /* required */ false);
 5016|       |
 5017|  73.7k|  {
 5018|  73.7k|    detail::json_const_iterator it;
 5019|  73.7k|    if (detail::FindMember(o, "pbrMetallicRoughness", it)) {
  ------------------
  |  Branch (5019:9): [True: 1.55k, False: 72.1k]
  ------------------
 5020|  1.55k|      ParsePbrMetallicRoughness(&material->pbrMetallicRoughness, err,
 5021|  1.55k|                                detail::GetValue(it),
 5022|  1.55k|                                store_original_json_for_extras_and_extensions);
 5023|  1.55k|    }
 5024|  73.7k|  }
 5025|       |
 5026|  73.7k|  {
 5027|  73.7k|    detail::json_const_iterator it;
 5028|  73.7k|    if (detail::FindMember(o, "normalTexture", it)) {
  ------------------
  |  Branch (5028:9): [True: 299, False: 73.4k]
  ------------------
 5029|    299|      ParseNormalTextureInfo(&material->normalTexture, err, detail::GetValue(it),
 5030|    299|                             store_original_json_for_extras_and_extensions);
 5031|    299|    }
 5032|  73.7k|  }
 5033|       |
 5034|  73.7k|  {
 5035|  73.7k|    detail::json_const_iterator it;
 5036|  73.7k|    if (detail::FindMember(o, "occlusionTexture", it)) {
  ------------------
  |  Branch (5036:9): [True: 168, False: 73.5k]
  ------------------
 5037|    168|      ParseOcclusionTextureInfo(&material->occlusionTexture, err, detail::GetValue(it),
 5038|    168|                                store_original_json_for_extras_and_extensions);
 5039|    168|    }
 5040|  73.7k|  }
 5041|       |
 5042|  73.7k|  {
 5043|  73.7k|    detail::json_const_iterator it;
 5044|  73.7k|    if (detail::FindMember(o, "emissiveTexture", it)) {
  ------------------
  |  Branch (5044:9): [True: 626, False: 73.1k]
  ------------------
 5045|    626|      ParseTextureInfo(&material->emissiveTexture, err, detail::GetValue(it),
 5046|    626|                       store_original_json_for_extras_and_extensions);
 5047|    626|    }
 5048|  73.7k|  }
 5049|       |
 5050|       |  // Old code path. For backward compatibility, we still store material values
 5051|       |  // as Parameter. This will create duplicated information for
 5052|       |  // example(pbrMetallicRoughness), but should be negligible in terms of memory
 5053|       |  // consumption.
 5054|       |  // TODO(syoyo): Remove in the next major release.
 5055|  73.7k|  material->values.clear();
 5056|  73.7k|  material->additionalValues.clear();
 5057|       |
 5058|  73.7k|  detail::json_const_iterator it(detail::ObjectBegin(o));
 5059|  73.7k|  detail::json_const_iterator itEnd(detail::ObjectEnd(o));
 5060|       |
 5061|  85.7k|  for (; it != itEnd; ++it) {
  ------------------
  |  Branch (5061:10): [True: 11.9k, False: 73.7k]
  ------------------
 5062|  11.9k|    std::string key(detail::GetKey(it));
 5063|  11.9k|    if (key == "pbrMetallicRoughness") {
  ------------------
  |  Branch (5063:9): [True: 1.73k, False: 10.2k]
  ------------------
 5064|  1.73k|      if (detail::IsObject(detail::GetValue(it))) {
  ------------------
  |  Branch (5064:11): [True: 1.22k, False: 510]
  ------------------
 5065|  1.22k|        const detail::json &values_object = detail::GetValue(it);
 5066|       |
 5067|  1.22k|        detail::json_const_iterator itVal(detail::ObjectBegin(values_object));
 5068|  1.22k|        detail::json_const_iterator itValEnd(detail::ObjectEnd(values_object));
 5069|       |
 5070|  9.13k|        for (; itVal != itValEnd; ++itVal) {
  ------------------
  |  Branch (5070:16): [True: 7.90k, False: 1.22k]
  ------------------
 5071|  7.90k|          Parameter param;
 5072|  7.90k|          if (ParseParameterProperty(&param, err, values_object, detail::GetKey(itVal),
  ------------------
  |  Branch (5072:15): [True: 7.74k, False: 166]
  ------------------
 5073|  7.90k|                                     false)) {
 5074|  7.74k|            material->values.emplace(detail::GetKey(itVal), std::move(param));
 5075|  7.74k|          }
 5076|  7.90k|        }
 5077|  1.22k|      }
 5078|  10.2k|    } else if (key == "extensions" || key == "extras") {
  ------------------
  |  Branch (5078:16): [True: 610, False: 9.62k]
  |  Branch (5078:39): [True: 290, False: 9.33k]
  ------------------
 5079|       |      // done later, skip, otherwise poorly parsed contents will be saved in the
 5080|       |      // parametermap and serialized again later
 5081|  9.33k|    } else {
 5082|  9.33k|      Parameter param;
 5083|  9.33k|      if (ParseParameterProperty(&param, err, o, key, false)) {
  ------------------
  |  Branch (5083:11): [True: 8.34k, False: 996]
  ------------------
 5084|       |        // names of materials have already been parsed. Putting it in this map
 5085|       |        // doesn't correctly reflect the glTF specification
 5086|  8.34k|        if (key != "name")
  ------------------
  |  Branch (5086:13): [True: 7.84k, False: 495]
  ------------------
 5087|  7.84k|          material->additionalValues.emplace(std::move(key), std::move(param));
 5088|  8.34k|      }
 5089|  9.33k|    }
 5090|  11.9k|  }
 5091|       |
 5092|  73.7k|  material->extensions.clear(); // Note(agnat): Why?
 5093|  73.7k|  ParseExtrasAndExtensions(material, err, o, store_original_json_for_extras_and_extensions);
 5094|       |
 5095|  73.7k|  return true;
 5096|  73.7k|}
fuzz_gltf.cc:_ZN8tinygltfL25ParsePbrMetallicRoughnessEPNS_20PbrMetallicRoughnessEPNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEERKN8nlohmann10basic_jsonINS2_3mapENS2_6vectorES8_blmdS6_NSA_14adl_serializerENSD_IhNS6_IhEEEEEEb:
 4945|  1.55k|    bool store_original_json_for_extras_and_extensions) {
 4946|  1.55k|  if (pbr == nullptr) {
  ------------------
  |  Branch (4946:7): [True: 0, False: 1.55k]
  ------------------
 4947|      0|    return false;
 4948|      0|  }
 4949|       |
 4950|  1.55k|  std::vector<double> baseColorFactor;
 4951|  1.55k|  if (ParseNumberArrayProperty(&baseColorFactor, err, o, "baseColorFactor",
  ------------------
  |  Branch (4951:7): [True: 0, False: 1.55k]
  ------------------
 4952|  1.55k|                               /* required */ false)) {
 4953|      0|    if (baseColorFactor.size() != 4) {
  ------------------
  |  Branch (4953:9): [True: 0, False: 0]
  ------------------
 4954|      0|      if (err) {
  ------------------
  |  Branch (4954:11): [True: 0, False: 0]
  ------------------
 4955|      0|        (*err) +=
 4956|      0|            "Array length of `baseColorFactor` parameter in "
 4957|      0|            "pbrMetallicRoughness must be 4, but got " +
 4958|      0|            std::to_string(baseColorFactor.size()) + "\n";
 4959|      0|      }
 4960|      0|      return false;
 4961|      0|    }
 4962|      0|    pbr->baseColorFactor = baseColorFactor;
 4963|      0|  }
 4964|       |
 4965|  1.55k|  {
 4966|  1.55k|    detail::json_const_iterator it;
 4967|  1.55k|    if (detail::FindMember(o, "baseColorTexture", it)) {
  ------------------
  |  Branch (4967:9): [True: 181, False: 1.37k]
  ------------------
 4968|    181|      ParseTextureInfo(&pbr->baseColorTexture, err, detail::GetValue(it),
 4969|    181|                       store_original_json_for_extras_and_extensions);
 4970|    181|    }
 4971|  1.55k|  }
 4972|       |
 4973|  1.55k|  {
 4974|  1.55k|    detail::json_const_iterator it;
 4975|  1.55k|    if (detail::FindMember(o, "metallicRoughnessTexture", it)) {
  ------------------
  |  Branch (4975:9): [True: 176, False: 1.37k]
  ------------------
 4976|    176|      ParseTextureInfo(&pbr->metallicRoughnessTexture, err, detail::GetValue(it),
 4977|    176|                       store_original_json_for_extras_and_extensions);
 4978|    176|    }
 4979|  1.55k|  }
 4980|       |
 4981|  1.55k|  ParseNumberProperty(&pbr->metallicFactor, err, o, "metallicFactor", false);
 4982|  1.55k|  ParseNumberProperty(&pbr->roughnessFactor, err, o, "roughnessFactor", false);
 4983|       |
 4984|  1.55k|  ParseExtrasAndExtensions(pbr, err, o, store_original_json_for_extras_and_extensions);
 4985|       |
 4986|  1.55k|  return true;
 4987|  1.55k|}
fuzz_gltf.cc:_ZN8tinygltfL24ParseExtrasAndExtensionsINS_20PbrMetallicRoughnessEEEbPT_PNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEERKN8nlohmann10basic_jsonINS4_3mapENS4_6vectorESA_blmdS8_NSC_14adl_serializerENSF_IhNS8_IhEEEEEEb:
 4029|  1.55k|    const detail::json & o, bool store_json_strings) {
 4030|       |  
 4031|  1.55k|  ParseExtensionsProperty(&target->extensions, err, o);
 4032|  1.55k|  ParseExtrasProperty(&target->extras, o);
 4033|       |
 4034|  1.55k|  if (store_json_strings) {
  ------------------
  |  Branch (4034:7): [True: 0, False: 1.55k]
  ------------------
 4035|      0|    {
 4036|      0|      detail::json_const_iterator it;
 4037|      0|      if (detail::FindMember(o, "extensions", it)) {
  ------------------
  |  Branch (4037:11): [True: 0, False: 0]
  ------------------
 4038|      0|        target->extensions_json_string = detail::JsonToString(detail::GetValue(it));
 4039|      0|      }
 4040|      0|    }
 4041|      0|    {
 4042|      0|      detail::json_const_iterator it;
 4043|      0|      if (detail::FindMember(o, "extras", it)) {
  ------------------
  |  Branch (4043:11): [True: 0, False: 0]
  ------------------
 4044|      0|        target->extras_json_string = detail::JsonToString(detail::GetValue(it));
 4045|      0|      }
 4046|      0|    }
 4047|      0|  }
 4048|  1.55k|  return true;
 4049|  1.55k|}
fuzz_gltf.cc:_ZN8tinygltfL22ParseNormalTextureInfoEPNS_17NormalTextureInfoEPNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEERKN8nlohmann10basic_jsonINS2_3mapENS2_6vectorES8_blmdS6_NSA_14adl_serializerENSD_IhNS6_IhEEEEEEb:
 4247|    299|    bool store_original_json_for_extras_and_extensions) {
 4248|    299|  if (texinfo == nullptr) {
  ------------------
  |  Branch (4248:7): [True: 0, False: 299]
  ------------------
 4249|      0|    return false;
 4250|      0|  }
 4251|       |
 4252|    299|  if (!ParseIntegerProperty(&texinfo->index, err, o, "index",
  ------------------
  |  Branch (4252:7): [True: 138, False: 161]
  ------------------
 4253|    299|                            /* required */ true, "NormalTextureInfo")) {
 4254|    138|    return false;
 4255|    138|  }
 4256|       |
 4257|    161|  ParseIntegerProperty(&texinfo->texCoord, err, o, "texCoord", false);
 4258|    161|  ParseNumberProperty(&texinfo->scale, err, o, "scale", false);
 4259|       |
 4260|    161|  ParseExtrasAndExtensions(texinfo, err, o, store_original_json_for_extras_and_extensions);
 4261|       |
 4262|    161|  return true;
 4263|    299|}
fuzz_gltf.cc:_ZN8tinygltfL24ParseExtrasAndExtensionsINS_17NormalTextureInfoEEEbPT_PNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEERKN8nlohmann10basic_jsonINS4_3mapENS4_6vectorESA_blmdS8_NSC_14adl_serializerENSF_IhNS8_IhEEEEEEb:
 4029|    161|    const detail::json & o, bool store_json_strings) {
 4030|       |  
 4031|    161|  ParseExtensionsProperty(&target->extensions, err, o);
 4032|    161|  ParseExtrasProperty(&target->extras, o);
 4033|       |
 4034|    161|  if (store_json_strings) {
  ------------------
  |  Branch (4034:7): [True: 0, False: 161]
  ------------------
 4035|      0|    {
 4036|      0|      detail::json_const_iterator it;
 4037|      0|      if (detail::FindMember(o, "extensions", it)) {
  ------------------
  |  Branch (4037:11): [True: 0, False: 0]
  ------------------
 4038|      0|        target->extensions_json_string = detail::JsonToString(detail::GetValue(it));
 4039|      0|      }
 4040|      0|    }
 4041|      0|    {
 4042|      0|      detail::json_const_iterator it;
 4043|      0|      if (detail::FindMember(o, "extras", it)) {
  ------------------
  |  Branch (4043:11): [True: 0, False: 0]
  ------------------
 4044|      0|        target->extras_json_string = detail::JsonToString(detail::GetValue(it));
 4045|      0|      }
 4046|      0|    }
 4047|      0|  }
 4048|    161|  return true;
 4049|    161|}
fuzz_gltf.cc:_ZN8tinygltfL25ParseOcclusionTextureInfoEPNS_20OcclusionTextureInfoEPNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEERKN8nlohmann10basic_jsonINS2_3mapENS2_6vectorES8_blmdS6_NSA_14adl_serializerENSD_IhNS6_IhEEEEEEb:
 4267|    168|    bool store_original_json_for_extras_and_extensions) {
 4268|    168|  if (texinfo == nullptr) {
  ------------------
  |  Branch (4268:7): [True: 0, False: 168]
  ------------------
 4269|      0|    return false;
 4270|      0|  }
 4271|       |
 4272|    168|  if (!ParseIntegerProperty(&texinfo->index, err, o, "index",
  ------------------
  |  Branch (4272:7): [True: 136, False: 32]
  ------------------
 4273|    168|                            /* required */ true, "NormalTextureInfo")) {
 4274|    136|    return false;
 4275|    136|  }
 4276|       |
 4277|     32|  ParseIntegerProperty(&texinfo->texCoord, err, o, "texCoord", false);
 4278|     32|  ParseNumberProperty(&texinfo->strength, err, o, "strength", false);
 4279|       |
 4280|     32|  ParseExtrasAndExtensions(texinfo, err, o, store_original_json_for_extras_and_extensions);
 4281|       |
 4282|     32|  return true;
 4283|    168|}
fuzz_gltf.cc:_ZN8tinygltfL24ParseExtrasAndExtensionsINS_20OcclusionTextureInfoEEEbPT_PNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEERKN8nlohmann10basic_jsonINS4_3mapENS4_6vectorESA_blmdS8_NSC_14adl_serializerENSF_IhNS8_IhEEEEEEb:
 4029|     32|    const detail::json & o, bool store_json_strings) {
 4030|       |  
 4031|     32|  ParseExtensionsProperty(&target->extensions, err, o);
 4032|     32|  ParseExtrasProperty(&target->extras, o);
 4033|       |
 4034|     32|  if (store_json_strings) {
  ------------------
  |  Branch (4034:7): [True: 0, False: 32]
  ------------------
 4035|      0|    {
 4036|      0|      detail::json_const_iterator it;
 4037|      0|      if (detail::FindMember(o, "extensions", it)) {
  ------------------
  |  Branch (4037:11): [True: 0, False: 0]
  ------------------
 4038|      0|        target->extensions_json_string = detail::JsonToString(detail::GetValue(it));
 4039|      0|      }
 4040|      0|    }
 4041|      0|    {
 4042|      0|      detail::json_const_iterator it;
 4043|      0|      if (detail::FindMember(o, "extras", it)) {
  ------------------
  |  Branch (4043:11): [True: 0, False: 0]
  ------------------
 4044|      0|        target->extras_json_string = detail::JsonToString(detail::GetValue(it));
 4045|      0|      }
 4046|      0|    }
 4047|      0|  }
 4048|     32|  return true;
 4049|     32|}
fuzz_gltf.cc:_ZN8tinygltfL16ParseTextureInfoEPNS_11TextureInfoEPNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEERKN8nlohmann10basic_jsonINS2_3mapENS2_6vectorES8_blmdS6_NSA_14adl_serializerENSD_IhNS6_IhEEEEEEb:
 4228|    983|    bool store_original_json_for_extras_and_extensions) {
 4229|    983|  if (texinfo == nullptr) {
  ------------------
  |  Branch (4229:7): [True: 0, False: 983]
  ------------------
 4230|      0|    return false;
 4231|      0|  }
 4232|       |
 4233|    983|  if (!ParseIntegerProperty(&texinfo->index, err, o, "index",
  ------------------
  |  Branch (4233:7): [True: 685, False: 298]
  ------------------
 4234|    983|                            /* required */ true, "TextureInfo")) {
 4235|    685|    return false;
 4236|    685|  }
 4237|       |
 4238|    298|  ParseIntegerProperty(&texinfo->texCoord, err, o, "texCoord", false);
 4239|       |
 4240|    298|  ParseExtrasAndExtensions(texinfo, err, o, store_original_json_for_extras_and_extensions);
 4241|       |
 4242|    298|  return true;
 4243|    983|}
fuzz_gltf.cc:_ZN8tinygltfL24ParseExtrasAndExtensionsINS_11TextureInfoEEEbPT_PNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEERKN8nlohmann10basic_jsonINS4_3mapENS4_6vectorESA_blmdS8_NSC_14adl_serializerENSF_IhNS8_IhEEEEEEb:
 4029|    298|    const detail::json & o, bool store_json_strings) {
 4030|       |  
 4031|    298|  ParseExtensionsProperty(&target->extensions, err, o);
 4032|    298|  ParseExtrasProperty(&target->extras, o);
 4033|       |
 4034|    298|  if (store_json_strings) {
  ------------------
  |  Branch (4034:7): [True: 0, False: 298]
  ------------------
 4035|      0|    {
 4036|      0|      detail::json_const_iterator it;
 4037|      0|      if (detail::FindMember(o, "extensions", it)) {
  ------------------
  |  Branch (4037:11): [True: 0, False: 0]
  ------------------
 4038|      0|        target->extensions_json_string = detail::JsonToString(detail::GetValue(it));
 4039|      0|      }
 4040|      0|    }
 4041|      0|    {
 4042|      0|      detail::json_const_iterator it;
 4043|      0|      if (detail::FindMember(o, "extras", it)) {
  ------------------
  |  Branch (4043:11): [True: 0, False: 0]
  ------------------
 4044|      0|        target->extras_json_string = detail::JsonToString(detail::GetValue(it));
 4045|      0|      }
 4046|      0|    }
 4047|      0|  }
 4048|    298|  return true;
 4049|    298|}
_ZN8tinygltf9ParameterC2Ev:
  510|  17.2k|  Parameter() = default;
fuzz_gltf.cc:_ZN8tinygltfL22ParseParameterPropertyEPNS_9ParameterEPNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEERKN8nlohmann10basic_jsonINS2_3mapENS2_6vectorES8_blmdS6_NSA_14adl_serializerENSD_IhNS6_IhEEEEEERKS8_b:
 3962|  17.2k|                                   bool required) {
 3963|       |  // A parameter value can either be a string or an array of either a boolean or
 3964|       |  // a number. Booleans of any kind aren't supported here. Granted, it
 3965|       |  // complicates the Parameter structure and breaks it semantically in the sense
 3966|       |  // that the client probably works off the assumption that if the string is
 3967|       |  // empty the vector is used, etc. Would a tagged union work?
 3968|  17.2k|  if (ParseStringProperty(&param->string_value, err, o, prop, false)) {
  ------------------
  |  Branch (3968:7): [True: 884, False: 16.3k]
  ------------------
 3969|       |    // Found string property.
 3970|    884|    return true;
 3971|  16.3k|  } else if (ParseNumberArrayProperty(&param->number_array, err, o, prop,
  ------------------
  |  Branch (3971:14): [True: 726, False: 15.6k]
  ------------------
 3972|  16.3k|                                      false)) {
 3973|       |    // Found a number array.
 3974|    726|    return true;
 3975|  15.6k|  } else if (ParseNumberProperty(&param->number_value, err, o, prop, false)) {
  ------------------
  |  Branch (3975:14): [True: 8.06k, False: 7.56k]
  ------------------
 3976|  8.06k|    param->has_number_value = true;
 3977|  8.06k|    return true;
 3978|  8.06k|  } else if (ParseJSONProperty(&param->json_double_value, err, o, prop,
  ------------------
  |  Branch (3978:14): [True: 6.19k, False: 1.37k]
  ------------------
 3979|  7.56k|                               false)) {
 3980|  6.19k|    return true;
 3981|  6.19k|  } else if (ParseBooleanProperty(&param->bool_value, err, o, prop, false)) {
  ------------------
  |  Branch (3981:14): [True: 213, False: 1.16k]
  ------------------
 3982|    213|    return true;
 3983|  1.16k|  } else {
 3984|  1.16k|    if (required) {
  ------------------
  |  Branch (3984:9): [True: 0, False: 1.16k]
  ------------------
 3985|      0|      if (err) {
  ------------------
  |  Branch (3985:11): [True: 0, False: 0]
  ------------------
 3986|      0|        (*err) += "parameter must be a string or number / number array.\n";
 3987|      0|      }
 3988|      0|    }
 3989|  1.16k|    return false;
 3990|  1.16k|  }
 3991|  17.2k|}
fuzz_gltf.cc:_ZN8tinygltfL17ParseJSONPropertyEPNSt3__13mapINS0_12basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEEdNS0_4lessIS7_EENS5_INS0_4pairIKS7_dEEEEEEPS7_RKN8nlohmann10basic_jsonIS1_NS0_6vectorES7_blmdS5_NSH_14adl_serializerENSJ_IhNS5_IhEEEEEERSB_b:
 3925|  7.56k|                              const std::string &property, bool required) {
 3926|  7.56k|  detail::json_const_iterator it;
 3927|  7.56k|  if (!detail::FindMember(o, property.c_str(), it)) {
  ------------------
  |  Branch (3927:7): [True: 323, False: 7.24k]
  ------------------
 3928|    323|    if (required) {
  ------------------
  |  Branch (3928:9): [True: 0, False: 323]
  ------------------
 3929|      0|      if (err) {
  ------------------
  |  Branch (3929:11): [True: 0, False: 0]
  ------------------
 3930|      0|        (*err) += "'" + property + "' property is missing. \n'";
 3931|      0|      }
 3932|      0|    }
 3933|    323|    return false;
 3934|    323|  }
 3935|       |
 3936|  7.24k|  const detail::json &obj = detail::GetValue(it);
 3937|       |
 3938|  7.24k|  if (!detail::IsObject(obj)) {
  ------------------
  |  Branch (3938:7): [True: 1.05k, False: 6.19k]
  ------------------
 3939|  1.05k|    if (required) {
  ------------------
  |  Branch (3939:9): [True: 0, False: 1.05k]
  ------------------
 3940|      0|      if (err) {
  ------------------
  |  Branch (3940:11): [True: 0, False: 0]
  ------------------
 3941|      0|        (*err) += "'" + property + "' property is not a JSON object.\n";
 3942|      0|      }
 3943|      0|    }
 3944|  1.05k|    return false;
 3945|  1.05k|  }
 3946|       |
 3947|  6.19k|  ret->clear();
 3948|       |
 3949|  6.19k|  detail::json_const_iterator it2(detail::ObjectBegin(obj));
 3950|  6.19k|  detail::json_const_iterator itEnd(detail::ObjectEnd(obj));
 3951|  8.25k|  for (; it2 != itEnd; ++it2) {
  ------------------
  |  Branch (3951:10): [True: 2.05k, False: 6.19k]
  ------------------
 3952|  2.05k|    double numVal;
 3953|  2.05k|    if (detail::GetNumber(detail::GetValue(it2), numVal))
  ------------------
  |  Branch (3953:9): [True: 1.43k, False: 623]
  ------------------
 3954|  1.43k|      ret->emplace(std::string(detail::GetKey(it2)), numVal);
 3955|  2.05k|  }
 3956|       |
 3957|  6.19k|  return true;
 3958|  7.24k|}
_ZN8tinygltf9ParameterC2EOS0_:
   79|  14.9k|  x(x &&) TINYGLTF_NOEXCEPT = default; \
fuzz_gltf.cc:_ZN8tinygltfL24ParseExtrasAndExtensionsINS_8MaterialEEEbPT_PNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEERKN8nlohmann10basic_jsonINS4_3mapENS4_6vectorESA_blmdS8_NSC_14adl_serializerENSF_IhNS8_IhEEEEEEb:
 4029|  73.7k|    const detail::json & o, bool store_json_strings) {
 4030|       |  
 4031|  73.7k|  ParseExtensionsProperty(&target->extensions, err, o);
 4032|  73.7k|  ParseExtrasProperty(&target->extras, o);
 4033|       |
 4034|  73.7k|  if (store_json_strings) {
  ------------------
  |  Branch (4034:7): [True: 0, False: 73.7k]
  ------------------
 4035|      0|    {
 4036|      0|      detail::json_const_iterator it;
 4037|      0|      if (detail::FindMember(o, "extensions", it)) {
  ------------------
  |  Branch (4037:11): [True: 0, False: 0]
  ------------------
 4038|      0|        target->extensions_json_string = detail::JsonToString(detail::GetValue(it));
 4039|      0|      }
 4040|      0|    }
 4041|      0|    {
 4042|      0|      detail::json_const_iterator it;
 4043|      0|      if (detail::FindMember(o, "extras", it)) {
  ------------------
  |  Branch (4043:11): [True: 0, False: 0]
  ------------------
 4044|      0|        target->extras_json_string = detail::JsonToString(detail::GetValue(it));
 4045|      0|      }
 4046|      0|    }
 4047|      0|  }
 4048|  73.7k|  return true;
 4049|  73.7k|}
_ZN8tinygltf8MaterialC2EOS0_:
   79|   217k|  x(x &&) TINYGLTF_NOEXCEPT = default; \
_ZN8tinygltf20PbrMetallicRoughnessC2EOS0_:
   79|   217k|  x(x &&) TINYGLTF_NOEXCEPT = default; \
_ZN8tinygltf17NormalTextureInfoC2EOS0_:
   79|   217k|  x(x &&) TINYGLTF_NOEXCEPT = default; \
_ZN8tinygltf20OcclusionTextureInfoC2EOS0_:
   79|   217k|  x(x &&) TINYGLTF_NOEXCEPT = default; \
_ZN8tinygltf11TextureInfoC2EOS0_:
   79|   651k|  x(x &&) TINYGLTF_NOEXCEPT = default; \
fuzz_gltf.cc:_ZN8tinygltf6detail14ForEachInArrayIZNS_8TinyGLTF14LoadFromStringEPNS_5ModelEPNSt3__112basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEESC_PKcjRKSB_jE4$_10EEbRKN8nlohmann10basic_jsonINS5_3mapENS5_6vectorESB_blmdS9_NSI_14adl_serializerENSL_IhNS9_IhEEEEEESE_OT_:
 5471|  1.36k|bool ForEachInArray(const detail::json &_v, const char *member, Callback && cb) {
 5472|  1.36k|  detail::json_const_iterator itm;
 5473|  1.36k|  if (detail::FindMember(_v, member, itm) && detail::IsArray(detail::GetValue(itm))) {
  ------------------
  |  Branch (5473:7): [True: 627, False: 741]
  |  Branch (5473:46): [True: 627, False: 0]
  ------------------
 5474|    627|    const detail::json &root = detail::GetValue(itm);
 5475|    627|    auto it = detail::ArrayBegin(root);
 5476|    627|    auto end = detail::ArrayEnd(root);
 5477|  66.2k|    for (; it != end; ++it) {
  ------------------
  |  Branch (5477:12): [True: 66.0k, False: 276]
  ------------------
 5478|  66.0k|      if (!cb(*it)) return false;
  ------------------
  |  Branch (5478:11): [True: 351, False: 65.6k]
  ------------------
 5479|  66.0k|    }
 5480|    627|  }
 5481|  1.01k|  return true;
 5482|  1.36k|};
fuzz_gltf.cc:_ZZN8tinygltf8TinyGLTF14LoadFromStringEPNS_5ModelEPNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEESA_PKcjRKS9_jENK4$_10clERKN8nlohmann10basic_jsonINS3_3mapENS3_6vectorES9_blmdS7_NSG_14adl_serializerENSJ_IhNS7_IhEEEEEE:
 5912|  66.0k|    bool success = ForEachInArray(v, "images", [&](const detail::json &o) {
 5913|  66.0k|      if (!detail::IsObject(o)) {
  ------------------
  |  Branch (5913:11): [True: 3, False: 66.0k]
  ------------------
 5914|      3|        if (err) {
  ------------------
  |  Branch (5914:13): [True: 3, False: 0]
  ------------------
 5915|      3|          (*err) += "image[" + std::to_string(idx) + "] is not a JSON object.";
 5916|      3|        }
 5917|      3|        return false;
 5918|      3|      }
 5919|  66.0k|      Image image;
 5920|  66.0k|      if (!ParseImage(&image, idx, err, warn, o,
  ------------------
  |  Branch (5920:11): [True: 348, False: 65.6k]
  ------------------
 5921|  66.0k|                      store_original_json_for_extras_and_extensions_, base_dir,
 5922|  66.0k|                      max_external_file_size_, &fs, &uri_cb, &this->LoadImageData,
 5923|  66.0k|                      load_image_user_data)) {
 5924|    348|        return false;
 5925|    348|      }
 5926|       |
 5927|  65.6k|      if (image.bufferView != -1) {
  ------------------
  |  Branch (5927:11): [True: 0, False: 65.6k]
  ------------------
 5928|       |        // Load image from the buffer view.
 5929|      0|        if (size_t(image.bufferView) >= model->bufferViews.size()) {
  ------------------
  |  Branch (5929:13): [True: 0, False: 0]
  ------------------
 5930|      0|          if (err) {
  ------------------
  |  Branch (5930:15): [True: 0, False: 0]
  ------------------
 5931|      0|            std::stringstream ss;
 5932|      0|            ss << "image[" << idx << "] bufferView \"" << image.bufferView
 5933|      0|               << "\" not found in the scene." << std::endl;
 5934|      0|            (*err) += ss.str();
 5935|      0|          }
 5936|      0|          return false;
 5937|      0|        }
 5938|       |
 5939|      0|        const BufferView &bufferView =
 5940|      0|            model->bufferViews[size_t(image.bufferView)];
 5941|      0|        if (size_t(bufferView.buffer) >= model->buffers.size()) {
  ------------------
  |  Branch (5941:13): [True: 0, False: 0]
  ------------------
 5942|      0|          if (err) {
  ------------------
  |  Branch (5942:15): [True: 0, False: 0]
  ------------------
 5943|      0|            std::stringstream ss;
 5944|      0|            ss << "image[" << idx << "] buffer \"" << bufferView.buffer
 5945|      0|               << "\" not found in the scene." << std::endl;
 5946|      0|            (*err) += ss.str();
 5947|      0|          }
 5948|      0|          return false;
 5949|      0|        }
 5950|      0|        const Buffer &buffer = model->buffers[size_t(bufferView.buffer)];
 5951|       |
 5952|      0|        if (*LoadImageData == nullptr) {
  ------------------
  |  Branch (5952:13): [True: 0, False: 0]
  ------------------
 5953|      0|          if (err) {
  ------------------
  |  Branch (5953:15): [True: 0, False: 0]
  ------------------
 5954|      0|            (*err) += "No LoadImageData callback specified.\n";
 5955|      0|          }
 5956|      0|          return false;
 5957|      0|        }
 5958|      0|        bool ret = LoadImageData(
 5959|      0|            &image, idx, err, warn, image.width, image.height,
 5960|      0|            &buffer.data[bufferView.byteOffset],
 5961|      0|            static_cast<int>(bufferView.byteLength), load_image_user_data);
 5962|      0|        if (!ret) {
  ------------------
  |  Branch (5962:13): [True: 0, False: 0]
  ------------------
 5963|      0|          return false;
 5964|      0|        }
 5965|      0|      }
 5966|       |
 5967|  65.6k|      model->images.emplace_back(std::move(image));
 5968|  65.6k|      ++idx;
 5969|  65.6k|      return true;
 5970|  65.6k|    });
_ZN8tinygltf5ImageC2Ev:
  667|  66.0k|  Image() : as_is(false) {
  668|  66.0k|    bufferView = -1;
  669|  66.0k|    width = -1;
  670|  66.0k|    height = -1;
  671|  66.0k|    component = -1;
  672|  66.0k|    bits = -1;
  673|  66.0k|    pixel_type = -1;
  674|  66.0k|  }
fuzz_gltf.cc:_ZN8tinygltfL10ParseImageEPNS_5ImageEiPNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEES9_RKN8nlohmann10basic_jsonINS2_3mapENS2_6vectorES8_blmdS6_NSA_14adl_serializerENSD_IhNS6_IhEEEEEEbRKS8_mPNS_11FsCallbacksEPKNS_12URICallbacksEPPFbS1_iS9_S9_iiPKhiPvEST_:
 4068|  66.0k|                       void *load_image_user_data = nullptr) {
 4069|       |  // A glTF image must either reference a bufferView or an image uri
 4070|       |
 4071|       |  // schema says oneOf [`bufferView`, `uri`]
 4072|       |  // TODO(syoyo): Check the type of each parameters.
 4073|  66.0k|  detail::json_const_iterator it;
 4074|  66.0k|  bool hasBufferView = detail::FindMember(o, "bufferView", it);
 4075|  66.0k|  bool hasURI = detail::FindMember(o, "uri", it);
 4076|       |
 4077|  66.0k|  ParseStringProperty(&image->name, err, o, "name", false);
 4078|       |
 4079|  66.0k|  if (hasBufferView && hasURI) {
  ------------------
  |  Branch (4079:7): [True: 0, False: 66.0k]
  |  Branch (4079:24): [True: 0, False: 0]
  ------------------
 4080|       |    // Should not both defined.
 4081|      0|    if (err) {
  ------------------
  |  Branch (4081:9): [True: 0, False: 0]
  ------------------
 4082|      0|      (*err) +=
 4083|      0|          "Only one of `bufferView` or `uri` should be defined, but both are "
 4084|      0|          "defined for image[" +
 4085|      0|          std::to_string(image_idx) + "] name = \"" + image->name + "\"\n";
 4086|      0|    }
 4087|      0|    return false;
 4088|      0|  }
 4089|       |
 4090|  66.0k|  if (!hasBufferView && !hasURI) {
  ------------------
  |  Branch (4090:7): [True: 66.0k, False: 0]
  |  Branch (4090:25): [True: 8, False: 66.0k]
  ------------------
 4091|      8|    if (err) {
  ------------------
  |  Branch (4091:9): [True: 8, False: 0]
  ------------------
 4092|      8|      (*err) += "Neither required `bufferView` nor `uri` defined for image[" +
 4093|      8|                std::to_string(image_idx) + "] name = \"" + image->name +
 4094|      8|                "\"\n";
 4095|      8|    }
 4096|      8|    return false;
 4097|      8|  }
 4098|       |
 4099|  66.0k|  ParseExtrasAndExtensions(image, err, o, store_original_json_for_extras_and_extensions);
 4100|       |
 4101|  66.0k|  if (hasBufferView) {
  ------------------
  |  Branch (4101:7): [True: 0, False: 66.0k]
  ------------------
 4102|      0|    int bufferView = -1;
 4103|      0|    if (!ParseIntegerProperty(&bufferView, err, o, "bufferView", true)) {
  ------------------
  |  Branch (4103:9): [True: 0, False: 0]
  ------------------
 4104|      0|      if (err) {
  ------------------
  |  Branch (4104:11): [True: 0, False: 0]
  ------------------
 4105|      0|        (*err) += "Failed to parse `bufferView` for image[" +
 4106|      0|                  std::to_string(image_idx) + "] name = \"" + image->name +
 4107|      0|                  "\"\n";
 4108|      0|      }
 4109|      0|      return false;
 4110|      0|    }
 4111|       |
 4112|      0|    std::string mime_type;
 4113|      0|    ParseStringProperty(&mime_type, err, o, "mimeType", false);
 4114|       |
 4115|      0|    int width = 0;
 4116|      0|    ParseIntegerProperty(&width, err, o, "width", false);
 4117|       |
 4118|      0|    int height = 0;
 4119|      0|    ParseIntegerProperty(&height, err, o, "height", false);
 4120|       |
 4121|       |    // Just only save some information here. Loading actual image data from
 4122|       |    // bufferView is done after this `ParseImage` function.
 4123|      0|    image->bufferView = bufferView;
 4124|      0|    image->mimeType = mime_type;
 4125|      0|    image->width = width;
 4126|      0|    image->height = height;
 4127|       |
 4128|      0|    return true;
 4129|      0|  }
 4130|       |
 4131|       |  // Parse URI & Load image data.
 4132|       |
 4133|  66.0k|  std::string uri;
 4134|  66.0k|  std::string tmp_err;
 4135|  66.0k|  if (!ParseStringProperty(&uri, &tmp_err, o, "uri", true)) {
  ------------------
  |  Branch (4135:7): [True: 0, False: 66.0k]
  ------------------
 4136|      0|    if (err) {
  ------------------
  |  Branch (4136:9): [True: 0, False: 0]
  ------------------
 4137|      0|      (*err) += "Failed to parse `uri` for image[" + std::to_string(image_idx) +
 4138|      0|                "] name = \"" + image->name + "\".\n";
 4139|      0|    }
 4140|      0|    return false;
 4141|      0|  }
 4142|       |
 4143|  66.0k|  std::vector<unsigned char> img;
 4144|       |
 4145|  66.0k|  if (IsDataURI(uri)) {
  ------------------
  |  Branch (4145:7): [True: 21.4k, False: 44.5k]
  ------------------
 4146|  21.4k|    if (!DecodeDataURI(&img, image->mimeType, uri, 0, false)) {
  ------------------
  |  Branch (4146:9): [True: 57, False: 21.4k]
  ------------------
 4147|     57|      if (err) {
  ------------------
  |  Branch (4147:11): [True: 57, False: 0]
  ------------------
 4148|     57|        (*err) += "Failed to decode 'uri' for image[" +
 4149|     57|                  std::to_string(image_idx) + "] name = \"" + image->name +
 4150|     57|                  "\"\n";
 4151|     57|      }
 4152|     57|      return false;
 4153|     57|    }
 4154|  44.5k|  } else {
 4155|       |    // Assume external file
 4156|       |    // Keep texture path (for textures that cannot be decoded)
 4157|  44.5k|    image->uri = uri;
 4158|       |#ifdef TINYGLTF_NO_EXTERNAL_IMAGE
 4159|       |    return true;
 4160|       |#else
 4161|  44.5k|    std::string decoded_uri;
 4162|  44.5k|    if (!uri_cb->decode(uri, &decoded_uri, uri_cb->user_data)) {
  ------------------
  |  Branch (4162:9): [True: 0, False: 44.5k]
  ------------------
 4163|      0|      if (warn) {
  ------------------
  |  Branch (4163:11): [True: 0, False: 0]
  ------------------
 4164|      0|        (*warn) += "Failed to decode 'uri' for image[" +
 4165|      0|                   std::to_string(image_idx) + "] name = \"" + image->name +
 4166|      0|                   "\"\n";
 4167|      0|      }
 4168|       |
 4169|       |      // Image loading failure is not critical to overall gltf loading.
 4170|      0|      return true;
 4171|      0|    }
 4172|       |
 4173|  44.5k|    if (!LoadExternalFile(&img, err, warn, decoded_uri, basedir,
  ------------------
  |  Branch (4173:9): [True: 44.5k, False: 0]
  ------------------
 4174|  44.5k|                          /* required */ false, /* required bytes */ 0,
 4175|  44.5k|                          /* checksize */ false, /* max file size */ max_file_size, fs)) {
 4176|  44.5k|      if (warn) {
  ------------------
  |  Branch (4176:11): [True: 44.5k, False: 0]
  ------------------
 4177|  44.5k|        (*warn) += "Failed to load external 'uri' for image[" +
 4178|  44.5k|                   std::to_string(image_idx) + "] name = \"" + decoded_uri +
 4179|  44.5k|                   "\"\n";
 4180|  44.5k|      }
 4181|       |      // If the image cannot be loaded, keep uri as image->uri.
 4182|  44.5k|      return true;
 4183|  44.5k|    }
 4184|       |
 4185|      0|    if (img.empty()) {
  ------------------
  |  Branch (4185:9): [True: 0, False: 0]
  ------------------
 4186|      0|      if (warn) {
  ------------------
  |  Branch (4186:11): [True: 0, False: 0]
  ------------------
 4187|      0|        (*warn) += "Image data is empty for image[" +
 4188|      0|                   std::to_string(image_idx) + "] name = \"" + image->name +
 4189|      0|                   "\" \n";
 4190|      0|      }
 4191|      0|      return false;
 4192|      0|    }
 4193|      0|#endif
 4194|      0|  }
 4195|       |
 4196|  21.4k|  if (*LoadImageData == nullptr) {
  ------------------
  |  Branch (4196:7): [True: 0, False: 21.4k]
  ------------------
 4197|      0|    if (err) {
  ------------------
  |  Branch (4197:9): [True: 0, False: 0]
  ------------------
 4198|      0|      (*err) += "No LoadImageData callback specified.\n";
 4199|      0|    }
 4200|      0|    return false;
 4201|      0|  }
 4202|  21.4k|  return (*LoadImageData)(image, image_idx, err, warn, 0, 0, &img.at(0),
 4203|  21.4k|                          static_cast<int>(img.size()), load_image_user_data);
 4204|  21.4k|}
fuzz_gltf.cc:_ZN8tinygltfL24ParseExtrasAndExtensionsINS_5ImageEEEbPT_PNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEERKN8nlohmann10basic_jsonINS4_3mapENS4_6vectorESA_blmdS8_NSC_14adl_serializerENSF_IhNS8_IhEEEEEEb:
 4029|  66.0k|    const detail::json & o, bool store_json_strings) {
 4030|       |  
 4031|  66.0k|  ParseExtensionsProperty(&target->extensions, err, o);
 4032|  66.0k|  ParseExtrasProperty(&target->extras, o);
 4033|       |
 4034|  66.0k|  if (store_json_strings) {
  ------------------
  |  Branch (4034:7): [True: 0, False: 66.0k]
  ------------------
 4035|      0|    {
 4036|      0|      detail::json_const_iterator it;
 4037|      0|      if (detail::FindMember(o, "extensions", it)) {
  ------------------
  |  Branch (4037:11): [True: 0, False: 0]
  ------------------
 4038|      0|        target->extensions_json_string = detail::JsonToString(detail::GetValue(it));
 4039|      0|      }
 4040|      0|    }
 4041|      0|    {
 4042|      0|      detail::json_const_iterator it;
 4043|      0|      if (detail::FindMember(o, "extras", it)) {
  ------------------
  |  Branch (4043:11): [True: 0, False: 0]
  ------------------
 4044|      0|        target->extras_json_string = detail::JsonToString(detail::GetValue(it));
 4045|      0|      }
 4046|      0|    }
 4047|      0|  }
 4048|  66.0k|  return true;
 4049|  66.0k|}
_ZN8tinygltf5ImageC2EOS0_:
   79|   179k|  x(x &&) TINYGLTF_NOEXCEPT = default; \
fuzz_gltf.cc:_ZN8tinygltf6detail14ForEachInArrayIZNS_8TinyGLTF14LoadFromStringEPNS_5ModelEPNSt3__112basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEESC_PKcjRKSB_jE4$_11EEbRKN8nlohmann10basic_jsonINS5_3mapENS5_6vectorESB_blmdS9_NSI_14adl_serializerENSL_IhNS9_IhEEEEEESE_OT_:
 5471|  1.01k|bool ForEachInArray(const detail::json &_v, const char *member, Callback && cb) {
 5472|  1.01k|  detail::json_const_iterator itm;
 5473|  1.01k|  if (detail::FindMember(_v, member, itm) && detail::IsArray(detail::GetValue(itm))) {
  ------------------
  |  Branch (5473:7): [True: 14, False: 1.00k]
  |  Branch (5473:46): [True: 14, False: 0]
  ------------------
 5474|     14|    const detail::json &root = detail::GetValue(itm);
 5475|     14|    auto it = detail::ArrayBegin(root);
 5476|     14|    auto end = detail::ArrayEnd(root);
 5477|  66.9k|    for (; it != end; ++it) {
  ------------------
  |  Branch (5477:12): [True: 66.9k, False: 14]
  ------------------
 5478|  66.9k|      if (!cb(*it)) return false;
  ------------------
  |  Branch (5478:11): [True: 0, False: 66.9k]
  ------------------
 5479|  66.9k|    }
 5480|     14|  }
 5481|  1.01k|  return true;
 5482|  1.01k|};
fuzz_gltf.cc:_ZZN8tinygltf8TinyGLTF14LoadFromStringEPNS_5ModelEPNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEESA_PKcjRKS9_jENK4$_11clERKN8nlohmann10basic_jsonINS3_3mapENS3_6vectorES9_blmdS7_NSG_14adl_serializerENSJ_IhNS7_IhEEEEEE:
 5979|  66.9k|    bool success = ForEachInArray(v, "textures", [&](const detail::json &o) {
 5980|  66.9k|      if (!detail::IsObject(o)) {
  ------------------
  |  Branch (5980:11): [True: 0, False: 66.9k]
  ------------------
 5981|      0|        if (err) {
  ------------------
  |  Branch (5981:13): [True: 0, False: 0]
  ------------------
 5982|      0|          (*err) += "`textures' does not contain an JSON object.";
 5983|      0|        }
 5984|      0|        return false;
 5985|      0|      }
 5986|  66.9k|      Texture texture;
 5987|  66.9k|      if (!ParseTexture(&texture, err, o,
  ------------------
  |  Branch (5987:11): [True: 0, False: 66.9k]
  ------------------
 5988|  66.9k|                        store_original_json_for_extras_and_extensions_,
 5989|  66.9k|                        base_dir)) {
 5990|      0|        return false;
 5991|      0|      }
 5992|       |
 5993|  66.9k|      model->textures.emplace_back(std::move(texture));
 5994|  66.9k|      return true;
 5995|  66.9k|    });
_ZN8tinygltf7TextureC2Ev:
  692|  66.9k|  Texture() : sampler(-1), source(-1) {}
fuzz_gltf.cc:_ZN8tinygltfL12ParseTextureEPNS_7TextureEPNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEERKN8nlohmann10basic_jsonINS2_3mapENS2_6vectorES8_blmdS6_NSA_14adl_serializerENSD_IhNS6_IhEEEEEEbRKS8_:
 4208|  66.9k|                         const std::string &basedir) {
 4209|  66.9k|  (void)basedir;
 4210|  66.9k|  int sampler = -1;
 4211|  66.9k|  int source = -1;
 4212|  66.9k|  ParseIntegerProperty(&sampler, err, o, "sampler", false);
 4213|       |
 4214|  66.9k|  ParseIntegerProperty(&source, err, o, "source", false);
 4215|       |
 4216|  66.9k|  texture->sampler = sampler;
 4217|  66.9k|  texture->source = source;
 4218|       |
 4219|  66.9k|  ParseExtrasAndExtensions(texture, err, o, store_original_json_for_extras_and_extensions);
 4220|       |
 4221|  66.9k|  ParseStringProperty(&texture->name, err, o, "name", false);
 4222|       |
 4223|  66.9k|  return true;
 4224|  66.9k|}
fuzz_gltf.cc:_ZN8tinygltfL24ParseExtrasAndExtensionsINS_7TextureEEEbPT_PNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEERKN8nlohmann10basic_jsonINS4_3mapENS4_6vectorESA_blmdS8_NSC_14adl_serializerENSF_IhNS8_IhEEEEEEb:
 4029|  66.9k|    const detail::json & o, bool store_json_strings) {
 4030|       |  
 4031|  66.9k|  ParseExtensionsProperty(&target->extensions, err, o);
 4032|  66.9k|  ParseExtrasProperty(&target->extras, o);
 4033|       |
 4034|  66.9k|  if (store_json_strings) {
  ------------------
  |  Branch (4034:7): [True: 0, False: 66.9k]
  ------------------
 4035|      0|    {
 4036|      0|      detail::json_const_iterator it;
 4037|      0|      if (detail::FindMember(o, "extensions", it)) {
  ------------------
  |  Branch (4037:11): [True: 0, False: 0]
  ------------------
 4038|      0|        target->extensions_json_string = detail::JsonToString(detail::GetValue(it));
 4039|      0|      }
 4040|      0|    }
 4041|      0|    {
 4042|      0|      detail::json_const_iterator it;
 4043|      0|      if (detail::FindMember(o, "extras", it)) {
  ------------------
  |  Branch (4043:11): [True: 0, False: 0]
  ------------------
 4044|      0|        target->extras_json_string = detail::JsonToString(detail::GetValue(it));
 4045|      0|      }
 4046|      0|    }
 4047|      0|  }
 4048|  66.9k|  return true;
 4049|  66.9k|}
_ZN8tinygltf7TextureC2EOS0_:
   79|   198k|  x(x &&) TINYGLTF_NOEXCEPT = default; \
fuzz_gltf.cc:_ZN8tinygltf6detail14ForEachInArrayIZNS_8TinyGLTF14LoadFromStringEPNS_5ModelEPNSt3__112basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEESC_PKcjRKSB_jE4$_12EEbRKN8nlohmann10basic_jsonINS5_3mapENS5_6vectorESB_blmdS9_NSI_14adl_serializerENSL_IhNS9_IhEEEEEESE_OT_:
 5471|  1.01k|bool ForEachInArray(const detail::json &_v, const char *member, Callback && cb) {
 5472|  1.01k|  detail::json_const_iterator itm;
 5473|  1.01k|  if (detail::FindMember(_v, member, itm) && detail::IsArray(detail::GetValue(itm))) {
  ------------------
  |  Branch (5473:7): [True: 49, False: 968]
  |  Branch (5473:46): [True: 49, False: 0]
  ------------------
 5474|     49|    const detail::json &root = detail::GetValue(itm);
 5475|     49|    auto it = detail::ArrayBegin(root);
 5476|     49|    auto end = detail::ArrayEnd(root);
 5477|  78.0k|    for (; it != end; ++it) {
  ------------------
  |  Branch (5477:12): [True: 77.9k, False: 48]
  ------------------
 5478|  77.9k|      if (!cb(*it)) return false;
  ------------------
  |  Branch (5478:11): [True: 1, False: 77.9k]
  ------------------
 5479|  77.9k|    }
 5480|     49|  }
 5481|  1.01k|  return true;
 5482|  1.01k|};
fuzz_gltf.cc:_ZZN8tinygltf8TinyGLTF14LoadFromStringEPNS_5ModelEPNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEESA_PKcjRKS9_jENK4$_12clERKN8nlohmann10basic_jsonINS3_3mapENS3_6vectorES9_blmdS7_NSG_14adl_serializerENSJ_IhNS7_IhEEEEEE:
 6004|  77.9k|    bool success = ForEachInArray(v, "animations", [&](const detail::json &o) {
 6005|  77.9k|      if (!detail::IsObject(o)) {
  ------------------
  |  Branch (6005:11): [True: 1, False: 77.9k]
  ------------------
 6006|      1|        if (err) {
  ------------------
  |  Branch (6006:13): [True: 1, False: 0]
  ------------------
 6007|      1|          (*err) += "`animations' does not contain an JSON object.";
 6008|      1|        }
 6009|      1|        return false;
 6010|      1|      }
 6011|  77.9k|      Animation animation;
 6012|  77.9k|      if (!ParseAnimation(&animation, err, o,
  ------------------
  |  Branch (6012:11): [True: 0, False: 77.9k]
  ------------------
 6013|  77.9k|                          store_original_json_for_extras_and_extensions_)) {
 6014|      0|        return false;
 6015|      0|      }
 6016|       |
 6017|  77.9k|      model->animations.emplace_back(std::move(animation));
 6018|  77.9k|      return true;
 6019|  77.9k|    });
_ZN8tinygltf9AnimationC2Ev:
  577|  77.9k|  Animation() = default;
fuzz_gltf.cc:_ZN8tinygltfL14ParseAnimationEPNS_9AnimationEPNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEERKN8nlohmann10basic_jsonINS2_3mapENS2_6vectorES8_blmdS6_NSA_14adl_serializerENSD_IhNS6_IhEEEEEEb:
 5152|  77.9k|                           bool store_original_json_for_extras_and_extensions) {
 5153|  77.9k|  {
 5154|  77.9k|    detail::json_const_iterator channelsIt;
 5155|  77.9k|    if (detail::FindMember(o, "channels", channelsIt) &&
  ------------------
  |  Branch (5155:9): [True: 651, False: 77.3k]
  ------------------
 5156|  77.9k|        detail::IsArray(detail::GetValue(channelsIt))) {
  ------------------
  |  Branch (5156:9): [True: 651, False: 0]
  ------------------
 5157|    651|      detail::json_const_array_iterator channelEnd = detail::ArrayEnd(detail::GetValue(channelsIt));
 5158|    651|      for (detail::json_const_array_iterator i = detail::ArrayBegin(detail::GetValue(channelsIt));
 5159|  16.8k|           i != channelEnd; ++i) {
  ------------------
  |  Branch (5159:12): [True: 16.2k, False: 651]
  ------------------
 5160|  16.2k|        AnimationChannel channel;
 5161|  16.2k|        if (ParseAnimationChannel(
  ------------------
  |  Branch (5161:13): [True: 14.5k, False: 1.73k]
  ------------------
 5162|  16.2k|                &channel, err, *i,
 5163|  16.2k|                store_original_json_for_extras_and_extensions)) {
 5164|       |          // Only add the channel if the parsing succeeds.
 5165|  14.5k|          animation->channels.emplace_back(std::move(channel));
 5166|  14.5k|        }
 5167|  16.2k|      }
 5168|    651|    }
 5169|  77.9k|  }
 5170|       |
 5171|  77.9k|  {
 5172|  77.9k|    detail::json_const_iterator samplerIt;
 5173|  77.9k|    if (detail::FindMember(o, "samplers", samplerIt) && detail::IsArray(detail::GetValue(samplerIt))) {
  ------------------
  |  Branch (5173:9): [True: 17.0k, False: 60.9k]
  |  Branch (5173:57): [True: 16.8k, False: 184]
  ------------------
 5174|  16.8k|      const detail::json &sampler_array = detail::GetValue(samplerIt);
 5175|       |
 5176|  16.8k|      detail::json_const_array_iterator it = detail::ArrayBegin(sampler_array);
 5177|  16.8k|      detail::json_const_array_iterator itEnd = detail::ArrayEnd(sampler_array);
 5178|       |
 5179|  16.8k|      for (; it != itEnd; ++it) {
  ------------------
  |  Branch (5179:14): [True: 0, False: 16.8k]
  ------------------
 5180|      0|        const detail::json &s = *it;
 5181|       |
 5182|      0|        AnimationSampler sampler;
 5183|      0|        int inputIndex = -1;
 5184|      0|        int outputIndex = -1;
 5185|      0|        if (!ParseIntegerProperty(&inputIndex, err, s, "input", true)) {
  ------------------
  |  Branch (5185:13): [True: 0, False: 0]
  ------------------
 5186|      0|          if (err) {
  ------------------
  |  Branch (5186:15): [True: 0, False: 0]
  ------------------
 5187|      0|            (*err) += "`input` field is missing in animation.sampler\n";
 5188|      0|          }
 5189|      0|          return false;
 5190|      0|        }
 5191|      0|        ParseStringProperty(&sampler.interpolation, err, s, "interpolation",
 5192|      0|                            false);
 5193|      0|        if (!ParseIntegerProperty(&outputIndex, err, s, "output", true)) {
  ------------------
  |  Branch (5193:13): [True: 0, False: 0]
  ------------------
 5194|      0|          if (err) {
  ------------------
  |  Branch (5194:15): [True: 0, False: 0]
  ------------------
 5195|      0|            (*err) += "`output` field is missing in animation.sampler\n";
 5196|      0|          }
 5197|      0|          return false;
 5198|      0|        }
 5199|      0|        sampler.input = inputIndex;
 5200|      0|        sampler.output = outputIndex;
 5201|      0|        ParseExtrasAndExtensions(&sampler, err, o,
 5202|      0|            store_original_json_for_extras_and_extensions);
 5203|       |
 5204|      0|        animation->samplers.emplace_back(std::move(sampler));
 5205|      0|      }
 5206|  16.8k|    }
 5207|  77.9k|  }
 5208|       |
 5209|  77.9k|  ParseStringProperty(&animation->name, err, o, "name", false);
 5210|       |
 5211|  77.9k|  ParseExtrasAndExtensions(animation, err, o, store_original_json_for_extras_and_extensions);
 5212|       |
 5213|  77.9k|  return true;
 5214|  77.9k|}
_ZN8tinygltf16AnimationChannelC2Ev:
  544|  16.2k|  AnimationChannel() : sampler(-1), target_node(-1) {}
fuzz_gltf.cc:_ZN8tinygltfL21ParseAnimationChannelEPNS_16AnimationChannelEPNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEERKN8nlohmann10basic_jsonINS2_3mapENS2_6vectorES8_blmdS6_NSA_14adl_serializerENSD_IhNS6_IhEEEEEEb:
 5100|  16.2k|    bool store_original_json_for_extras_and_extensions) {
 5101|  16.2k|  int samplerIndex = -1;
 5102|  16.2k|  int targetIndex = -1;
 5103|  16.2k|  if (!ParseIntegerProperty(&samplerIndex, err, o, "sampler", true,
  ------------------
  |  Branch (5103:7): [True: 1.60k, False: 14.6k]
  ------------------
 5104|  16.2k|                            "AnimationChannel")) {
 5105|  1.60k|    if (err) {
  ------------------
  |  Branch (5105:9): [True: 1.60k, False: 0]
  ------------------
 5106|  1.60k|      (*err) += "`sampler` field is missing in animation channels\n";
 5107|  1.60k|    }
 5108|  1.60k|    return false;
 5109|  1.60k|  }
 5110|       |
 5111|  14.6k|  detail::json_const_iterator targetIt;
 5112|  14.6k|  if (detail::FindMember(o, "target", targetIt) && detail::IsObject(detail::GetValue(targetIt))) {
  ------------------
  |  Branch (5112:7): [True: 162, False: 14.4k]
  |  Branch (5112:52): [True: 129, False: 33]
  ------------------
 5113|    129|    const detail::json &target_object = detail::GetValue(targetIt);
 5114|       |
 5115|    129|    ParseIntegerProperty(&targetIndex, err, target_object, "node", false);
 5116|       |
 5117|    129|    if (!ParseStringProperty(&channel->target_path, err, target_object, "path",
  ------------------
  |  Branch (5117:9): [True: 129, False: 0]
  ------------------
 5118|    129|                             true)) {
 5119|    129|      if (err) {
  ------------------
  |  Branch (5119:11): [True: 129, False: 0]
  ------------------
 5120|    129|        (*err) += "`path` field is missing in animation.channels.target\n";
 5121|    129|      }
 5122|    129|      return false;
 5123|    129|    }
 5124|      0|    ParseExtensionsProperty(&channel->target_extensions, err, target_object);
 5125|      0|    ParseExtrasProperty(&channel->target_extras, target_object);
 5126|      0|    if (store_original_json_for_extras_and_extensions) {
  ------------------
  |  Branch (5126:9): [True: 0, False: 0]
  ------------------
 5127|      0|      {
 5128|      0|        detail::json_const_iterator it;
 5129|      0|        if (detail::FindMember(target_object, "extensions", it)) {
  ------------------
  |  Branch (5129:13): [True: 0, False: 0]
  ------------------
 5130|      0|          channel->target_extensions_json_string = detail::JsonToString(detail::GetValue(it));
 5131|      0|        }
 5132|      0|      }
 5133|      0|      {
 5134|      0|        detail::json_const_iterator it;
 5135|      0|        if (detail::FindMember(target_object, "extras", it)) {
  ------------------
  |  Branch (5135:13): [True: 0, False: 0]
  ------------------
 5136|      0|          channel->target_extras_json_string = detail::JsonToString(detail::GetValue(it));
 5137|      0|        }
 5138|      0|      }
 5139|      0|    }
 5140|      0|  }
 5141|       |
 5142|  14.5k|  channel->sampler = samplerIndex;
 5143|  14.5k|  channel->target_node = targetIndex;
 5144|       |
 5145|  14.5k|  ParseExtrasAndExtensions(channel, err, o, store_original_json_for_extras_and_extensions);
 5146|       |
 5147|  14.5k|  return true;
 5148|  14.6k|}
fuzz_gltf.cc:_ZN8tinygltfL24ParseExtrasAndExtensionsINS_16AnimationChannelEEEbPT_PNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEERKN8nlohmann10basic_jsonINS4_3mapENS4_6vectorESA_blmdS8_NSC_14adl_serializerENSF_IhNS8_IhEEEEEEb:
 4029|  14.5k|    const detail::json & o, bool store_json_strings) {
 4030|       |  
 4031|  14.5k|  ParseExtensionsProperty(&target->extensions, err, o);
 4032|  14.5k|  ParseExtrasProperty(&target->extras, o);
 4033|       |
 4034|  14.5k|  if (store_json_strings) {
  ------------------
  |  Branch (4034:7): [True: 0, False: 14.5k]
  ------------------
 4035|      0|    {
 4036|      0|      detail::json_const_iterator it;
 4037|      0|      if (detail::FindMember(o, "extensions", it)) {
  ------------------
  |  Branch (4037:11): [True: 0, False: 0]
  ------------------
 4038|      0|        target->extensions_json_string = detail::JsonToString(detail::GetValue(it));
 4039|      0|      }
 4040|      0|    }
 4041|      0|    {
 4042|      0|      detail::json_const_iterator it;
 4043|      0|      if (detail::FindMember(o, "extras", it)) {
  ------------------
  |  Branch (4043:11): [True: 0, False: 0]
  ------------------
 4044|      0|        target->extras_json_string = detail::JsonToString(detail::GetValue(it));
 4045|      0|      }
 4046|      0|    }
 4047|      0|  }
 4048|  14.5k|  return true;
 4049|  14.5k|}
_ZN8tinygltf16AnimationChannelC2EOS0_:
   79|  41.5k|  x(x &&) TINYGLTF_NOEXCEPT = default; \
fuzz_gltf.cc:_ZN8tinygltfL24ParseExtrasAndExtensionsINS_9AnimationEEEbPT_PNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEERKN8nlohmann10basic_jsonINS4_3mapENS4_6vectorESA_blmdS8_NSC_14adl_serializerENSF_IhNS8_IhEEEEEEb:
 4029|  77.9k|    const detail::json & o, bool store_json_strings) {
 4030|       |  
 4031|  77.9k|  ParseExtensionsProperty(&target->extensions, err, o);
 4032|  77.9k|  ParseExtrasProperty(&target->extras, o);
 4033|       |
 4034|  77.9k|  if (store_json_strings) {
  ------------------
  |  Branch (4034:7): [True: 0, False: 77.9k]
  ------------------
 4035|      0|    {
 4036|      0|      detail::json_const_iterator it;
 4037|      0|      if (detail::FindMember(o, "extensions", it)) {
  ------------------
  |  Branch (4037:11): [True: 0, False: 0]
  ------------------
 4038|      0|        target->extensions_json_string = detail::JsonToString(detail::GetValue(it));
 4039|      0|      }
 4040|      0|    }
 4041|      0|    {
 4042|      0|      detail::json_const_iterator it;
 4043|      0|      if (detail::FindMember(o, "extras", it)) {
  ------------------
  |  Branch (4043:11): [True: 0, False: 0]
  ------------------
 4044|      0|        target->extras_json_string = detail::JsonToString(detail::GetValue(it));
 4045|      0|      }
 4046|      0|    }
 4047|      0|  }
 4048|  77.9k|  return true;
 4049|  77.9k|}
_ZN8tinygltf9AnimationC2EOS0_:
   79|   227k|  x(x &&) TINYGLTF_NOEXCEPT = default; \
fuzz_gltf.cc:_ZN8tinygltf6detail14ForEachInArrayIZNS_8TinyGLTF14LoadFromStringEPNS_5ModelEPNSt3__112basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEESC_PKcjRKSB_jE4$_13EEbRKN8nlohmann10basic_jsonINS5_3mapENS5_6vectorESB_blmdS9_NSI_14adl_serializerENSL_IhNS9_IhEEEEEESE_OT_:
 5471|  1.01k|bool ForEachInArray(const detail::json &_v, const char *member, Callback && cb) {
 5472|  1.01k|  detail::json_const_iterator itm;
 5473|  1.01k|  if (detail::FindMember(_v, member, itm) && detail::IsArray(detail::GetValue(itm))) {
  ------------------
  |  Branch (5473:7): [True: 0, False: 1.01k]
  |  Branch (5473:46): [True: 0, False: 0]
  ------------------
 5474|      0|    const detail::json &root = detail::GetValue(itm);
 5475|      0|    auto it = detail::ArrayBegin(root);
 5476|      0|    auto end = detail::ArrayEnd(root);
 5477|      0|    for (; it != end; ++it) {
  ------------------
  |  Branch (5477:12): [True: 0, False: 0]
  ------------------
 5478|      0|      if (!cb(*it)) return false;
  ------------------
  |  Branch (5478:11): [True: 0, False: 0]
  ------------------
 5479|      0|    }
 5480|      0|  }
 5481|  1.01k|  return true;
 5482|  1.01k|};
fuzz_gltf.cc:_ZN8tinygltf6detail14ForEachInArrayIZNS_8TinyGLTF14LoadFromStringEPNS_5ModelEPNSt3__112basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEESC_PKcjRKSB_jE4$_14EEbRKN8nlohmann10basic_jsonINS5_3mapENS5_6vectorESB_blmdS9_NSI_14adl_serializerENSL_IhNS9_IhEEEEEESE_OT_:
 5471|  1.01k|bool ForEachInArray(const detail::json &_v, const char *member, Callback && cb) {
 5472|  1.01k|  detail::json_const_iterator itm;
 5473|  1.01k|  if (detail::FindMember(_v, member, itm) && detail::IsArray(detail::GetValue(itm))) {
  ------------------
  |  Branch (5473:7): [True: 15, False: 1.00k]
  |  Branch (5473:46): [True: 15, False: 0]
  ------------------
 5474|     15|    const detail::json &root = detail::GetValue(itm);
 5475|     15|    auto it = detail::ArrayBegin(root);
 5476|     15|    auto end = detail::ArrayEnd(root);
 5477|   132k|    for (; it != end; ++it) {
  ------------------
  |  Branch (5477:12): [True: 132k, False: 15]
  ------------------
 5478|   132k|      if (!cb(*it)) return false;
  ------------------
  |  Branch (5478:11): [True: 0, False: 132k]
  ------------------
 5479|   132k|    }
 5480|     15|  }
 5481|  1.01k|  return true;
 5482|  1.01k|};
fuzz_gltf.cc:_ZZN8tinygltf8TinyGLTF14LoadFromStringEPNS_5ModelEPNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEESA_PKcjRKS9_jENK4$_14clERKN8nlohmann10basic_jsonINS3_3mapENS3_6vectorES9_blmdS7_NSG_14adl_serializerENSJ_IhNS7_IhEEEEEE:
 6052|   132k|    bool success = ForEachInArray(v, "samplers", [&](const detail::json &o) {
 6053|   132k|      if (!detail::IsObject(o)) {
  ------------------
  |  Branch (6053:11): [True: 0, False: 132k]
  ------------------
 6054|      0|        if (err) {
  ------------------
  |  Branch (6054:13): [True: 0, False: 0]
  ------------------
 6055|      0|          (*err) += "`samplers' does not contain an JSON object.";
 6056|      0|        }
 6057|      0|        return false;
 6058|      0|      }
 6059|   132k|      Sampler sampler;
 6060|   132k|      if (!ParseSampler(&sampler, err, o,
  ------------------
  |  Branch (6060:11): [True: 0, False: 132k]
  ------------------
 6061|   132k|                        store_original_json_for_extras_and_extensions_)) {
 6062|      0|        return false;
 6063|      0|      }
 6064|       |
 6065|   132k|      model->samplers.emplace_back(std::move(sampler));
 6066|   132k|      return true;
 6067|   132k|    });
_ZN8tinygltf7SamplerC2Ev:
  633|   132k|        wrapT(TINYGLTF_TEXTURE_WRAP_REPEAT) {}
fuzz_gltf.cc:_ZN8tinygltfL12ParseSamplerEPNS_7SamplerEPNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEERKN8nlohmann10basic_jsonINS2_3mapENS2_6vectorES8_blmdS6_NSA_14adl_serializerENSD_IhNS6_IhEEEEEEb:
 5217|   132k|                         bool store_original_json_for_extras_and_extensions) {
 5218|   132k|  ParseStringProperty(&sampler->name, err, o, "name", false);
 5219|       |
 5220|   132k|  int minFilter = -1;
 5221|   132k|  int magFilter = -1;
 5222|   132k|  int wrapS = TINYGLTF_TEXTURE_WRAP_REPEAT;
  ------------------
  |  |  113|   132k|#define TINYGLTF_TEXTURE_WRAP_REPEAT (10497)
  ------------------
 5223|   132k|  int wrapT = TINYGLTF_TEXTURE_WRAP_REPEAT;
  ------------------
  |  |  113|   132k|#define TINYGLTF_TEXTURE_WRAP_REPEAT (10497)
  ------------------
 5224|       |  // int wrapR = TINYGLTF_TEXTURE_WRAP_REPEAT;
 5225|   132k|  ParseIntegerProperty(&minFilter, err, o, "minFilter", false);
 5226|   132k|  ParseIntegerProperty(&magFilter, err, o, "magFilter", false);
 5227|   132k|  ParseIntegerProperty(&wrapS, err, o, "wrapS", false);
 5228|   132k|  ParseIntegerProperty(&wrapT, err, o, "wrapT", false);
 5229|       |  // ParseIntegerProperty(&wrapR, err, o, "wrapR", false);  // tinygltf
 5230|       |  // extension
 5231|       |
 5232|       |  // TODO(syoyo): Check the value is allowed one.
 5233|       |  // (e.g. we allow 9728(NEAREST), but don't allow 9727)
 5234|       |
 5235|   132k|  sampler->minFilter = minFilter;
 5236|   132k|  sampler->magFilter = magFilter;
 5237|   132k|  sampler->wrapS = wrapS;
 5238|   132k|  sampler->wrapT = wrapT;
 5239|       |  // sampler->wrapR = wrapR;
 5240|       |
 5241|   132k|  ParseExtrasAndExtensions(sampler, err, o, store_original_json_for_extras_and_extensions);
 5242|       |
 5243|   132k|  return true;
 5244|   132k|}
fuzz_gltf.cc:_ZN8tinygltfL24ParseExtrasAndExtensionsINS_7SamplerEEEbPT_PNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEERKN8nlohmann10basic_jsonINS4_3mapENS4_6vectorESA_blmdS8_NSC_14adl_serializerENSF_IhNS8_IhEEEEEEb:
 4029|   132k|    const detail::json & o, bool store_json_strings) {
 4030|       |  
 4031|   132k|  ParseExtensionsProperty(&target->extensions, err, o);
 4032|   132k|  ParseExtrasProperty(&target->extras, o);
 4033|       |
 4034|   132k|  if (store_json_strings) {
  ------------------
  |  Branch (4034:7): [True: 0, False: 132k]
  ------------------
 4035|      0|    {
 4036|      0|      detail::json_const_iterator it;
 4037|      0|      if (detail::FindMember(o, "extensions", it)) {
  ------------------
  |  Branch (4037:11): [True: 0, False: 0]
  ------------------
 4038|      0|        target->extensions_json_string = detail::JsonToString(detail::GetValue(it));
 4039|      0|      }
 4040|      0|    }
 4041|      0|    {
 4042|      0|      detail::json_const_iterator it;
 4043|      0|      if (detail::FindMember(o, "extras", it)) {
  ------------------
  |  Branch (4043:11): [True: 0, False: 0]
  ------------------
 4044|      0|        target->extras_json_string = detail::JsonToString(detail::GetValue(it));
 4045|      0|      }
 4046|      0|    }
 4047|      0|  }
 4048|   132k|  return true;
 4049|   132k|}
_ZN8tinygltf7SamplerC2EOS0_:
   79|   394k|  x(x &&) TINYGLTF_NOEXCEPT = default; \
fuzz_gltf.cc:_ZN8tinygltf6detail14ForEachInArrayIZNS_8TinyGLTF14LoadFromStringEPNS_5ModelEPNSt3__112basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEESC_PKcjRKSB_jE4$_15EEbRKN8nlohmann10basic_jsonINS5_3mapENS5_6vectorESB_blmdS9_NSI_14adl_serializerENSL_IhNS9_IhEEEEEESE_OT_:
 5471|  1.01k|bool ForEachInArray(const detail::json &_v, const char *member, Callback && cb) {
 5472|  1.01k|  detail::json_const_iterator itm;
 5473|  1.01k|  if (detail::FindMember(_v, member, itm) && detail::IsArray(detail::GetValue(itm))) {
  ------------------
  |  Branch (5473:7): [True: 25, False: 991]
  |  Branch (5473:46): [True: 25, False: 0]
  ------------------
 5474|     25|    const detail::json &root = detail::GetValue(itm);
 5475|     25|    auto it = detail::ArrayBegin(root);
 5476|     25|    auto end = detail::ArrayEnd(root);
 5477|     25|    for (; it != end; ++it) {
  ------------------
  |  Branch (5477:12): [True: 25, False: 0]
  ------------------
 5478|     25|      if (!cb(*it)) return false;
  ------------------
  |  Branch (5478:11): [True: 25, False: 0]
  ------------------
 5479|     25|    }
 5480|     25|  }
 5481|    991|  return true;
 5482|  1.01k|};
fuzz_gltf.cc:_ZZN8tinygltf8TinyGLTF14LoadFromStringEPNS_5ModelEPNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEESA_PKcjRKS9_jENK4$_15clERKN8nlohmann10basic_jsonINS3_3mapENS3_6vectorES9_blmdS7_NSG_14adl_serializerENSJ_IhNS7_IhEEEEEE:
 6076|     25|    bool success = ForEachInArray(v, "cameras", [&](const detail::json &o) {
 6077|     25|      if (!detail::IsObject(o)) {
  ------------------
  |  Branch (6077:11): [True: 0, False: 25]
  ------------------
 6078|      0|        if (err) {
  ------------------
  |  Branch (6078:13): [True: 0, False: 0]
  ------------------
 6079|      0|          (*err) += "`cameras' does not contain an JSON object.";
 6080|      0|        }
 6081|      0|        return false;
 6082|      0|      }
 6083|     25|      Camera camera;
 6084|     25|      if (!ParseCamera(&camera, err, o,
  ------------------
  |  Branch (6084:11): [True: 25, False: 0]
  ------------------
 6085|     25|                       store_original_json_for_extras_and_extensions_)) {
 6086|     25|        return false;
 6087|     25|      }
 6088|       |
 6089|      0|      model->cameras.emplace_back(std::move(camera));
 6090|      0|      return true;
 6091|     25|    });
_ZN8tinygltf6CameraC2Ev:
  987|     25|  Camera() {}
_ZN8tinygltf17PerspectiveCameraC2Ev:
  950|     25|        znear(0.0) {}
_ZN8tinygltf18OrthographicCameraC2Ev:
  968|     25|  OrthographicCamera() : xmag(0.0), ymag(0.0), zfar(0.0), znear(0.0) {}
fuzz_gltf.cc:_ZN8tinygltfL11ParseCameraEPNS_6CameraEPNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEERKN8nlohmann10basic_jsonINS2_3mapENS2_6vectorES8_blmdS6_NSA_14adl_serializerENSD_IhNS6_IhEEEEEEb:
 5351|     25|                        bool store_original_json_for_extras_and_extensions) {
 5352|     25|  if (!ParseStringProperty(&camera->type, err, o, "type", true, "Camera")) {
  ------------------
  |  Branch (5352:7): [True: 0, False: 25]
  ------------------
 5353|      0|    return false;
 5354|      0|  }
 5355|       |
 5356|     25|  if (camera->type.compare("orthographic") == 0) {
  ------------------
  |  Branch (5356:7): [True: 0, False: 25]
  ------------------
 5357|      0|    detail::json_const_iterator orthoIt;
 5358|      0|    if (!detail::FindMember(o, "orthographic", orthoIt)) {
  ------------------
  |  Branch (5358:9): [True: 0, False: 0]
  ------------------
 5359|      0|      if (err) {
  ------------------
  |  Branch (5359:11): [True: 0, False: 0]
  ------------------
 5360|      0|        std::stringstream ss;
 5361|      0|        ss << "Orthographic camera description not found." << std::endl;
 5362|      0|        (*err) += ss.str();
 5363|      0|      }
 5364|      0|      return false;
 5365|      0|    }
 5366|       |
 5367|      0|    const detail::json &v = detail::GetValue(orthoIt);
 5368|      0|    if (!detail::IsObject(v)) {
  ------------------
  |  Branch (5368:9): [True: 0, False: 0]
  ------------------
 5369|      0|      if (err) {
  ------------------
  |  Branch (5369:11): [True: 0, False: 0]
  ------------------
 5370|      0|        std::stringstream ss;
 5371|      0|        ss << "\"orthographic\" is not a JSON object." << std::endl;
 5372|      0|        (*err) += ss.str();
 5373|      0|      }
 5374|      0|      return false;
 5375|      0|    }
 5376|       |
 5377|      0|    if (!ParseOrthographicCamera(
  ------------------
  |  Branch (5377:9): [True: 0, False: 0]
  ------------------
 5378|      0|            &camera->orthographic, err, v,
 5379|      0|            store_original_json_for_extras_and_extensions)) {
 5380|      0|      return false;
 5381|      0|    }
 5382|     25|  } else if (camera->type.compare("perspective") == 0) {
  ------------------
  |  Branch (5382:14): [True: 0, False: 25]
  ------------------
 5383|      0|    detail::json_const_iterator perspIt;
 5384|      0|    if (!detail::FindMember(o, "perspective", perspIt)) {
  ------------------
  |  Branch (5384:9): [True: 0, False: 0]
  ------------------
 5385|      0|      if (err) {
  ------------------
  |  Branch (5385:11): [True: 0, False: 0]
  ------------------
 5386|      0|        std::stringstream ss;
 5387|      0|        ss << "Perspective camera description not found." << std::endl;
 5388|      0|        (*err) += ss.str();
 5389|      0|      }
 5390|      0|      return false;
 5391|      0|    }
 5392|       |
 5393|      0|    const detail::json &v = detail::GetValue(perspIt);
 5394|      0|    if (!detail::IsObject(v)) {
  ------------------
  |  Branch (5394:9): [True: 0, False: 0]
  ------------------
 5395|      0|      if (err) {
  ------------------
  |  Branch (5395:11): [True: 0, False: 0]
  ------------------
 5396|      0|        std::stringstream ss;
 5397|      0|        ss << "\"perspective\" is not a JSON object." << std::endl;
 5398|      0|        (*err) += ss.str();
 5399|      0|      }
 5400|      0|      return false;
 5401|      0|    }
 5402|       |
 5403|      0|    if (!ParsePerspectiveCamera(
  ------------------
  |  Branch (5403:9): [True: 0, False: 0]
  ------------------
 5404|      0|            &camera->perspective, err, v,
 5405|      0|            store_original_json_for_extras_and_extensions)) {
 5406|      0|      return false;
 5407|      0|    }
 5408|     25|  } else {
 5409|     25|    if (err) {
  ------------------
  |  Branch (5409:9): [True: 25, False: 0]
  ------------------
 5410|     25|      std::stringstream ss;
 5411|     25|      ss << "Invalid camera type: \"" << camera->type
 5412|     25|         << "\". Must be \"perspective\" or \"orthographic\"" << std::endl;
 5413|     25|      (*err) += ss.str();
 5414|     25|    }
 5415|     25|    return false;
 5416|     25|  }
 5417|       |
 5418|      0|  ParseStringProperty(&camera->name, err, o, "name", false);
 5419|       |
 5420|      0|  ParseExtrasAndExtensions(camera, err, o, store_original_json_for_extras_and_extensions);
 5421|       |
 5422|      0|  return true;
 5423|     25|}
fuzz_gltf.cc:_ZN8tinygltfL24ParseExtrasAndExtensionsINS_5ModelEEEbPT_PNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEERKN8nlohmann10basic_jsonINS4_3mapENS4_6vectorESA_blmdS8_NSC_14adl_serializerENSF_IhNS8_IhEEEEEEb:
 4029|    991|    const detail::json & o, bool store_json_strings) {
 4030|       |  
 4031|    991|  ParseExtensionsProperty(&target->extensions, err, o);
 4032|    991|  ParseExtrasProperty(&target->extras, o);
 4033|       |
 4034|    991|  if (store_json_strings) {
  ------------------
  |  Branch (4034:7): [True: 0, False: 991]
  ------------------
 4035|      0|    {
 4036|      0|      detail::json_const_iterator it;
 4037|      0|      if (detail::FindMember(o, "extensions", it)) {
  ------------------
  |  Branch (4037:11): [True: 0, False: 0]
  ------------------
 4038|      0|        target->extensions_json_string = detail::JsonToString(detail::GetValue(it));
 4039|      0|      }
 4040|      0|    }
 4041|      0|    {
 4042|      0|      detail::json_const_iterator it;
 4043|      0|      if (detail::FindMember(o, "extras", it)) {
  ------------------
  |  Branch (4043:11): [True: 0, False: 0]
  ------------------
 4044|      0|        target->extras_json_string = detail::JsonToString(detail::GetValue(it));
 4045|      0|      }
 4046|      0|    }
 4047|      0|  }
 4048|    991|  return true;
 4049|    991|}

LLVMFuzzerTestOneInput:
   29|  1.57k|{
   30|  1.57k|    parse_intCoding4(data, size);
   31|  1.57k|    return 0;
   32|  1.57k|}
fuzz_gltf.cc:_ZL16parse_intCoding4PKhm:
   13|  1.57k|{
   14|       |
   15|  1.57k|  tinygltf::Model model;
   16|  1.57k|  tinygltf::TinyGLTF ctx;
   17|  1.57k|  std::string err;
   18|  1.57k|  std::string warn;
   19|       |
   20|  1.57k|  const char *str = reinterpret_cast<const char *>(data);
   21|       |
   22|  1.57k|  bool ret = ctx.LoadASCIIFromString(&model, &err, &warn, str, size, /* base_dir */"" );
   23|  1.57k|  (void)ret;
   24|       |
   25|  1.57k|}

