LLVMFuzzerTestOneInput:
   35|     64|extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
   36|     64|    if (size < 2) return 0;
  ------------------
  |  Branch (36:9): [True: 1, False: 63]
  ------------------
   37|       |
   38|     63|    const uint8_t* payload = data;
   39|     63|    size_t payload_len = size;
   40|       |
   41|     63|    if (!validate_nsm_msg_length(payload, payload_len)) {
  ------------------
  |  Branch (41:9): [True: 3, False: 60]
  ------------------
   42|      3|        return 0;
   43|      3|    }
   44|       |
   45|     60|    const struct nsm_msg* msg = reinterpret_cast<const struct nsm_msg*>(payload);
   46|     60|    const struct nsm_msg_hdr* hdr = reinterpret_cast<const struct nsm_msg_hdr*>(payload);
   47|       |
   48|       |    // Mismatch prevention: verify request/response type
   49|     60|    if (hdr->request != false) {
  ------------------
  |  Branch (49:9): [True: 4, False: 56]
  ------------------
   50|      4|        return 0;
   51|      4|    }
   52|       |
   53|     56|    std::vector<uint8_t> out_buf(65536, 0);
   54|     56|    std::vector<uint8_t> fuzz_instance_id_buf(65536, 0);
   55|     56|    uint8_t* fuzz_instance_id = reinterpret_cast<uint8_t*>(fuzz_instance_id_buf.data());
   56|     56|    std::vector<uint8_t> fuzz_nsm_type_buf(65536, 0);
   57|     56|    uint8_t* fuzz_nsm_type = reinterpret_cast<uint8_t*>(fuzz_nsm_type_buf.data());
   58|     56|    std::vector<uint8_t> fuzz_event_id_buf(65536, 0);
   59|     56|    uint8_t* fuzz_event_id = reinterpret_cast<uint8_t*>(fuzz_event_id_buf.data());
   60|     56|    decode_nsm_event_acknowledgement(msg, payload_len, fuzz_instance_id, fuzz_nsm_type, fuzz_event_id);
   61|       |
   62|     56|    return 0;
   63|     60|}

_Z23validate_nsm_msg_lengthPKhm:
   27|     63|inline bool validate_nsm_msg_length(const uint8_t* payload, size_t payload_len) {
   28|     63|    return payload_len >= sizeof(struct nsm_msg_hdr);
   29|     63|}

decode_nsm_event_acknowledgement:
  755|     56|{
  756|     56|	if (msg == NULL || instance_id == NULL || nsm_type == NULL ||
  ------------------
  |  Branch (756:6): [True: 0, False: 56]
  |  Branch (756:21): [True: 0, False: 56]
  |  Branch (756:44): [True: 0, False: 56]
  ------------------
  757|     56|	    event_id == NULL) {
  ------------------
  |  Branch (757:6): [True: 0, False: 56]
  ------------------
  758|      0|		return NSM_ERR_INVALID_DATA;
  759|      0|	}
  760|       |
  761|     56|	if (msg_len <
  ------------------
  |  Branch (761:6): [True: 1, False: 55]
  ------------------
  762|     56|	    sizeof(struct nsm_msg_hdr) + sizeof(struct nsm_event_ack)) {
  763|      1|		return NSM_ERR_INVALID_DATA;
  764|      1|	}
  765|       |
  766|     55|	struct nsm_event_ack *event = (struct nsm_event_ack *)msg->payload;
  767|       |
  768|     55|	*event_id = event->event_id;
  769|     55|	*instance_id = msg->hdr.instance_id;
  770|     55|	*nsm_type = msg->hdr.nvidia_msg_type;
  771|       |
  772|     55|	return NSM_SUCCESS;
  773|     56|}

