ZydisDecoderInit:
 5422|     87|{
 5423|     87|    ZYAN_STATIC_ASSERT(ZYDIS_DECODER_MODE_MAX_VALUE <= 32);
  ------------------
  |  |  388|     87|#   define ZYAN_STATIC_ASSERT(x) _Static_assert(x, #x)
  ------------------
 5424|       |
 5425|     87|    static const ZyanU32 decoder_modes =
 5426|       |#ifdef ZYDIS_MINIMAL_MODE
 5427|       |        (1 << ZYDIS_DECODER_MODE_MINIMAL) |
 5428|       |#endif
 5429|     87|        (1 << ZYDIS_DECODER_MODE_MPX) |
 5430|     87|        (1 << ZYDIS_DECODER_MODE_CET) |
 5431|     87|        (1 << ZYDIS_DECODER_MODE_LZCNT) |
 5432|     87|        (1 << ZYDIS_DECODER_MODE_TZCNT) |
 5433|     87|        (1 << ZYDIS_DECODER_MODE_WBNOINVD) |
 5434|     87|        (1 << ZYDIS_DECODER_MODE_CLDEMOTE) |
 5435|     87|        (1 << ZYDIS_DECODER_MODE_IPREFETCH) |
 5436|     87|        (1 << ZYDIS_DECODER_MODE_APX);
 5437|       |
 5438|     87|    if (!decoder)
  ------------------
  |  Branch (5438:9): [True: 0, False: 87]
  ------------------
 5439|      0|    {
 5440|      0|        return ZYAN_STATUS_INVALID_ARGUMENT;
  ------------------
  |  |  188|      0|    ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ZYCORE, 0x04u)
  |  |  ------------------
  |  |  |  |   68|      0|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
 5441|      0|    }
 5442|     87|    switch (machine_mode)
 5443|     87|    {
 5444|     62|    case ZYDIS_MACHINE_MODE_LONG_64:
  ------------------
  |  Branch (5444:5): [True: 62, False: 25]
  ------------------
 5445|     62|        if (stack_width != ZYDIS_STACK_WIDTH_64)
  ------------------
  |  Branch (5445:13): [True: 0, False: 62]
  ------------------
 5446|      0|        {
 5447|      0|            return ZYAN_STATUS_INVALID_ARGUMENT;
  ------------------
  |  |  188|      0|    ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ZYCORE, 0x04u)
  |  |  ------------------
  |  |  |  |   68|      0|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
 5448|      0|        }
 5449|     62|        break;
 5450|     62|    case ZYDIS_MACHINE_MODE_LONG_COMPAT_32:
  ------------------
  |  Branch (5450:5): [True: 1, False: 86]
  ------------------
 5451|     13|    case ZYDIS_MACHINE_MODE_LONG_COMPAT_16:
  ------------------
  |  Branch (5451:5): [True: 12, False: 75]
  ------------------
 5452|     13|    case ZYDIS_MACHINE_MODE_LEGACY_32:
  ------------------
  |  Branch (5452:5): [True: 0, False: 87]
  ------------------
 5453|     22|    case ZYDIS_MACHINE_MODE_LEGACY_16:
  ------------------
  |  Branch (5453:5): [True: 9, False: 78]
  ------------------
 5454|     25|    case ZYDIS_MACHINE_MODE_REAL_16:
  ------------------
  |  Branch (5454:5): [True: 3, False: 84]
  ------------------
 5455|     25|        if ((stack_width != ZYDIS_STACK_WIDTH_16) && (stack_width != ZYDIS_STACK_WIDTH_32))
  ------------------
  |  Branch (5455:13): [True: 1, False: 24]
  |  Branch (5455:54): [True: 0, False: 1]
  ------------------
 5456|      0|        {
 5457|      0|            return ZYAN_STATUS_INVALID_ARGUMENT;
  ------------------
  |  |  188|      0|    ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ZYCORE, 0x04u)
  |  |  ------------------
  |  |  |  |   68|      0|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
 5458|      0|        }
 5459|     25|        break;
 5460|     25|    default:
  ------------------
  |  Branch (5460:5): [True: 0, False: 87]
  ------------------
 5461|      0|        return ZYAN_STATUS_INVALID_ARGUMENT;
  ------------------
  |  |  188|      0|    ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ZYCORE, 0x04u)
  |  |  ------------------
  |  |  |  |   68|      0|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
 5462|     87|    }
 5463|       |
 5464|     87|    decoder->machine_mode = machine_mode;
 5465|     87|    decoder->stack_width = stack_width;
 5466|     87|    decoder->decoder_mode = decoder_modes;
 5467|       |
 5468|     87|    return ZYAN_STATUS_SUCCESS;
  ------------------
  |  |  164|     87|    ZYAN_MAKE_STATUS(0u, ZYAN_MODULE_ZYCORE, 0x00u)
  |  |  ------------------
  |  |  |  |   68|     87|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
 5469|     87|}
ZydisDecoderEnableMode:
 5472|      2|{
 5473|      2|    if (!decoder || ((ZyanUSize)mode > ZYDIS_DECODER_MODE_MAX_VALUE))
  ------------------
  |  Branch (5473:9): [True: 0, False: 2]
  |  Branch (5473:21): [True: 0, False: 2]
  ------------------
 5474|      0|    {
 5475|      0|        return ZYAN_STATUS_INVALID_ARGUMENT;
  ------------------
  |  |  188|      0|    ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ZYCORE, 0x04u)
  |  |  ------------------
  |  |  |  |   68|      0|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
 5476|      0|    }
 5477|       |
 5478|       |#ifdef ZYDIS_MINIMAL_MODE
 5479|       |    if ((mode == ZYDIS_DECODER_MODE_MINIMAL) && !enabled)
 5480|       |    {
 5481|       |        return ZYAN_STATUS_INVALID_OPERATION;
 5482|       |    }
 5483|       |#endif
 5484|       |
 5485|      2|    if (enabled)
  ------------------
  |  Branch (5485:9): [True: 2, False: 0]
  ------------------
 5486|      2|    {
 5487|      2|        decoder->decoder_mode |= (1 << mode);
 5488|      2|    }
 5489|      0|    else
 5490|      0|    {
 5491|      0|        decoder->decoder_mode &= ~(1 << mode);
 5492|      0|    }
 5493|       |
 5494|      2|    return ZYAN_STATUS_SUCCESS;
  ------------------
  |  |  164|      2|    ZYAN_MAKE_STATUS(0u, ZYAN_MODULE_ZYCORE, 0x00u)
  |  |  ------------------
  |  |  |  |   68|      2|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
 5495|      2|}
ZydisDecoderDecodeFull:
 5500|    174|{
 5501|    174|    if (!decoder || !instruction || !buffer || !operands)
  ------------------
  |  Branch (5501:9): [True: 0, False: 174]
  |  Branch (5501:21): [True: 0, False: 174]
  |  Branch (5501:37): [True: 0, False: 174]
  |  Branch (5501:48): [True: 0, False: 174]
  ------------------
 5502|      0|    {
 5503|      0|        return ZYAN_STATUS_INVALID_ARGUMENT;
  ------------------
  |  |  188|      0|    ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ZYCORE, 0x04u)
  |  |  ------------------
  |  |  |  |   68|      0|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
 5504|      0|    }
 5505|    174|    if (!length)
  ------------------
  |  Branch (5505:9): [True: 0, False: 174]
  ------------------
 5506|      0|    {
 5507|      0|        return ZYDIS_STATUS_NO_MORE_DATA;
  ------------------
  |  |   67|      0|    ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ZYDIS, 0x00u)
  |  |  ------------------
  |  |  |  |   68|      0|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
 5508|      0|    }
 5509|    174|    if (ZYDIS_DECODER_MODE_ACTIVE(decoder, ZYDIS_DECODER_MODE_MINIMAL))
  ------------------
  |  |   55|    174|    (!!(((decoder)->decoder_mode & (1 << (mode)))))
  |  |  ------------------
  |  |  |  Branch (55:5): [True: 0, False: 174]
  |  |  ------------------
  ------------------
 5510|      0|    {
 5511|      0|        return ZYAN_STATUS_MISSING_DEPENDENCY; // TODO: Introduce better status code
  ------------------
  |  |  243|      0|    ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ZYCORE, 0x0Du)
  |  |  ------------------
  |  |  |  |   68|      0|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
 5512|      0|    }
 5513|       |
 5514|    174|    ZydisDecoderContext context;
 5515|    174|    ZYAN_CHECK(ZydisDecoderDecodeInstruction(decoder, &context, buffer, length, instruction));
  ------------------
  |  |  100|    174|    do \
  |  |  101|    174|    { \
  |  |  102|    174|        const ZyanStatus status_047620348 = (status); \
  |  |  103|    174|        if (!ZYAN_SUCCESS(status_047620348)) \
  |  |  ------------------
  |  |  |  |   82|    174|    (!((status) & 0x80000000u))
  |  |  ------------------
  |  |  |  Branch (103:13): [True: 0, False: 174]
  |  |  ------------------
  |  |  104|    174|        { \
  |  |  105|      0|            return status_047620348; \
  |  |  106|      0|        } \
  |  |  107|    174|    } while (0)
  |  |  ------------------
  |  |  |  Branch (107:14): [Folded, False: 174]
  |  |  ------------------
  ------------------
 5516|    174|    ZYAN_CHECK(ZydisDecoderDecodeOperands(decoder, &context, instruction, operands,
  ------------------
  |  |  100|    174|    do \
  |  |  101|    174|    { \
  |  |  102|    174|        const ZyanStatus status_047620348 = (status); \
  |  |  103|    174|        if (!ZYAN_SUCCESS(status_047620348)) \
  |  |  ------------------
  |  |  |  |   82|    174|    (!((status) & 0x80000000u))
  |  |  ------------------
  |  |  |  Branch (103:13): [True: 0, False: 174]
  |  |  ------------------
  |  |  104|    174|        { \
  |  |  105|      0|            return status_047620348; \
  |  |  106|      0|        } \
  |  |  107|    174|    } while (0)
  |  |  ------------------
  |  |  |  Branch (107:14): [Folded, False: 174]
  |  |  ------------------
  ------------------
 5517|    174|        instruction->operand_count));
 5518|    174|    ZYAN_MEMSET(&operands[instruction->operand_count], 0,
  ------------------
  |  |  115|    174|#define ZYAN_MEMSET     memset
  ------------------
 5519|    174|        (ZYDIS_MAX_OPERAND_COUNT - instruction->operand_count) * sizeof(operands[0]));
  ------------------
  |  |   50|    174|#define ZYDIS_MAX_OPERAND_COUNT         10 // TODO: Auto generate
  ------------------
 5520|       |
 5521|    174|    return ZYAN_STATUS_SUCCESS;
  ------------------
  |  |  164|    174|    ZYAN_MAKE_STATUS(0u, ZYAN_MODULE_ZYCORE, 0x00u)
  |  |  ------------------
  |  |  |  |   68|    174|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
 5522|    174|}
ZydisDecoderDecodeInstruction:
 5526|    174|{
 5527|    174|    if (!decoder || !instruction || !buffer)
  ------------------
  |  Branch (5527:9): [True: 0, False: 174]
  |  Branch (5527:21): [True: 0, False: 174]
  |  Branch (5527:37): [True: 0, False: 174]
  ------------------
 5528|      0|    {
 5529|      0|        return ZYAN_STATUS_INVALID_ARGUMENT;
  ------------------
  |  |  188|      0|    ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ZYCORE, 0x04u)
  |  |  ------------------
  |  |  |  |   68|      0|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
 5530|      0|    }
 5531|       |
 5532|    174|    if (!length)
  ------------------
  |  Branch (5532:9): [True: 0, False: 174]
  ------------------
 5533|      0|    {
 5534|      0|        return ZYDIS_STATUS_NO_MORE_DATA;
  ------------------
  |  |   67|      0|    ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ZYDIS, 0x00u)
  |  |  ------------------
  |  |  |  |   68|      0|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
 5535|      0|    }
 5536|       |
 5537|    174|    ZydisDecoderState state;
 5538|    174|    ZYAN_MEMSET(&state, 0, sizeof(state));
  ------------------
  |  |  115|    174|#define ZYAN_MEMSET     memset
  ------------------
 5539|    174|    state.decoder = decoder;
 5540|    174|    state.buffer = (const ZyanU8*)buffer;
 5541|    174|    state.buffer_len = length;
 5542|    174|    state.prefixes.offset_notrack = -1;
 5543|       |
 5544|    174|    ZydisDecoderContext default_context;
 5545|    174|    if (!context)
  ------------------
  |  Branch (5545:9): [True: 0, False: 174]
  ------------------
 5546|      0|    {
 5547|       |        // Use a fallback context if no custom one has been provided
 5548|      0|        context = &default_context;
 5549|      0|    }
 5550|    174|    ZYAN_MEMSET(context, 0, sizeof(*context));
  ------------------
  |  |  115|    174|#define ZYAN_MEMSET     memset
  ------------------
 5551|    174|    state.context = context;
 5552|       |
 5553|    174|    ZYAN_MEMSET(instruction, 0, sizeof(*instruction));
  ------------------
  |  |  115|    174|#define ZYAN_MEMSET     memset
  ------------------
 5554|    174|    instruction->machine_mode = decoder->machine_mode;
 5555|    174|    instruction->stack_width = 16 << decoder->stack_width;
 5556|       |
 5557|    174|    ZYAN_CHECK(ZydisCollectOptionalPrefixes(&state, instruction));
  ------------------
  |  |  100|    174|    do \
  |  |  101|    174|    { \
  |  |  102|    174|        const ZyanStatus status_047620348 = (status); \
  |  |  103|    174|        if (!ZYAN_SUCCESS(status_047620348)) \
  |  |  ------------------
  |  |  |  |   82|    174|    (!((status) & 0x80000000u))
  |  |  ------------------
  |  |  |  Branch (103:13): [True: 0, False: 174]
  |  |  ------------------
  |  |  104|    174|        { \
  |  |  105|      0|            return status_047620348; \
  |  |  106|      0|        } \
  |  |  107|    174|    } while (0)
  |  |  ------------------
  |  |  |  Branch (107:14): [Folded, False: 174]
  |  |  ------------------
  ------------------
 5558|    174|    ZYAN_CHECK(ZydisDecodeInstruction(&state, instruction));
  ------------------
  |  |  100|    174|    do \
  |  |  101|    174|    { \
  |  |  102|    174|        const ZyanStatus status_047620348 = (status); \
  |  |  103|    174|        if (!ZYAN_SUCCESS(status_047620348)) \
  |  |  ------------------
  |  |  |  |   82|    174|    (!((status) & 0x80000000u))
  |  |  ------------------
  |  |  |  Branch (103:13): [True: 0, False: 174]
  |  |  ------------------
  |  |  104|    174|        { \
  |  |  105|      0|            return status_047620348; \
  |  |  106|      0|        } \
  |  |  107|    174|    } while (0)
  |  |  ------------------
  |  |  |  Branch (107:14): [Folded, False: 174]
  |  |  ------------------
  ------------------
 5559|       |
 5560|    174|    instruction->raw.encoding2 = instruction->encoding;
 5561|       |
 5562|    174|    return ZYAN_STATUS_SUCCESS;
  ------------------
  |  |  164|    174|    ZYAN_MAKE_STATUS(0u, ZYAN_MODULE_ZYCORE, 0x00u)
  |  |  ------------------
  |  |  |  |   68|    174|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
 5563|    174|}
ZydisDecoderDecodeOperands:
 5568|    174|{
 5569|       |#ifdef ZYDIS_MINIMAL_MODE
 5570|       |
 5571|       |    ZYAN_UNUSED(decoder);
 5572|       |    ZYAN_UNUSED(context);
 5573|       |    ZYAN_UNUSED(instruction);
 5574|       |    ZYAN_UNUSED(operands);
 5575|       |    ZYAN_UNUSED(operand_count);
 5576|       |
 5577|       |    return ZYAN_STATUS_MISSING_DEPENDENCY; // TODO: Introduce better status code
 5578|       |
 5579|       |#else
 5580|       |
 5581|    174|    if (!decoder || !context || !context->definition || !instruction ||
  ------------------
  |  Branch (5581:9): [True: 0, False: 174]
  |  Branch (5581:21): [True: 0, False: 174]
  |  Branch (5581:33): [True: 0, False: 174]
  |  Branch (5581:57): [True: 0, False: 174]
  ------------------
 5582|    174|        (operand_count && !operands) || (operand_count > ZYDIS_MAX_OPERAND_COUNT))
  ------------------
  |  |   50|    174|#define ZYDIS_MAX_OPERAND_COUNT         10 // TODO: Auto generate
  ------------------
  |  Branch (5582:10): [True: 170, False: 4]
  |  Branch (5582:27): [True: 0, False: 170]
  |  Branch (5582:41): [True: 0, False: 174]
  ------------------
 5583|      0|    {
 5584|      0|        return ZYAN_STATUS_INVALID_ARGUMENT;
  ------------------
  |  |  188|      0|    ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ZYCORE, 0x04u)
  |  |  ------------------
  |  |  |  |   68|      0|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
 5585|      0|    }
 5586|       |
 5587|    174|    if (ZYDIS_DECODER_MODE_ACTIVE(decoder, ZYDIS_DECODER_MODE_MINIMAL))
  ------------------
  |  |   55|    174|    (!!(((decoder)->decoder_mode & (1 << (mode)))))
  |  |  ------------------
  |  |  |  Branch (55:5): [True: 0, False: 174]
  |  |  ------------------
  ------------------
 5588|      0|    {
 5589|      0|        return ZYAN_STATUS_MISSING_DEPENDENCY; // TODO: Introduce better status code
  ------------------
  |  |  243|      0|    ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ZYCORE, 0x0Du)
  |  |  ------------------
  |  |  |  |   68|      0|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
 5590|      0|    }
 5591|       |
 5592|    174|    operand_count = ZYAN_MIN(operand_count, instruction->operand_count);
  ------------------
  |  |  524|    174|#define ZYAN_MIN(a, b) (((a) < (b)) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (524:25): [True: 0, False: 174]
  |  |  ------------------
  ------------------
 5593|    174|    if (!operand_count)
  ------------------
  |  Branch (5593:9): [True: 4, False: 170]
  ------------------
 5594|      4|    {
 5595|      4|        return ZYAN_STATUS_SUCCESS;
  ------------------
  |  |  164|      4|    ZYAN_MAKE_STATUS(0u, ZYAN_MODULE_ZYCORE, 0x00u)
  |  |  ------------------
  |  |  |  |   68|      4|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
 5596|      4|    }
 5597|       |
 5598|    170|    return ZydisDecodeOperands(decoder, context, instruction, operands, operand_count);
 5599|       |
 5600|    174|#endif
 5601|    174|}
Decoder.c:ZydisCollectOptionalPrefixes:
 3178|    174|{
 3179|    174|    ZYAN_ASSERT(state);
  ------------------
  |  |  381|    174|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (3179:5): [True: 0, False: 174]
  |  Branch (3179:5): [True: 174, False: 0]
  ------------------
 3180|    174|    ZYAN_ASSERT(instruction);
  ------------------
  |  |  381|    174|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (3180:5): [True: 0, False: 174]
  |  Branch (3180:5): [True: 174, False: 0]
  ------------------
 3181|    174|    ZYAN_ASSERT(instruction->raw.prefix_count == 0);
  ------------------
  |  |  381|    174|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (3181:5): [True: 0, False: 174]
  |  Branch (3181:5): [True: 174, False: 0]
  ------------------
 3182|       |
 3183|    174|    ZyanU8 rex = 0x00;
 3184|    174|    ZyanU8 offset = 0;
 3185|    174|    ZyanBool done = ZYAN_FALSE;
  ------------------
  |  |  287|    174|#define ZYAN_FALSE 0u
  ------------------
 3186|    174|    do
 3187|    314|    {
 3188|    314|        ZyanU8 prefix_byte;
 3189|    314|        ZYAN_CHECK(ZydisInputPeek(state, instruction, &prefix_byte));
  ------------------
  |  |  100|    314|    do \
  |  |  101|    314|    { \
  |  |  102|    314|        const ZyanStatus status_047620348 = (status); \
  |  |  103|    314|        if (!ZYAN_SUCCESS(status_047620348)) \
  |  |  ------------------
  |  |  |  |   82|    314|    (!((status) & 0x80000000u))
  |  |  ------------------
  |  |  |  Branch (103:13): [True: 0, False: 314]
  |  |  ------------------
  |  |  104|    314|        { \
  |  |  105|      0|            return status_047620348; \
  |  |  106|      0|        } \
  |  |  107|    314|    } while (0)
  |  |  ------------------
  |  |  |  Branch (107:14): [Folded, False: 314]
  |  |  ------------------
  ------------------
 3190|    314|        switch (prefix_byte)
 3191|    314|        {
 3192|      2|        case 0xF0:
  ------------------
  |  Branch (3192:9): [True: 2, False: 312]
  ------------------
 3193|      2|            state->prefixes.has_lock = ZYAN_TRUE;
  ------------------
  |  |  288|      2|#define ZYAN_TRUE  1u
  ------------------
 3194|      2|            state->prefixes.offset_lock = offset;
 3195|      2|            break;
 3196|      6|        case 0xF2:
  ------------------
  |  Branch (3196:9): [True: 6, False: 308]
  ------------------
 3197|      6|            ZYAN_FALLTHROUGH;
 3198|     12|        case 0xF3:
  ------------------
  |  Branch (3198:9): [True: 6, False: 308]
  ------------------
 3199|     12|            state->prefixes.group1 = prefix_byte;
 3200|     12|            state->prefixes.mandatory_candidate = prefix_byte;
 3201|     12|            state->prefixes.offset_group1 = offset;
 3202|     12|            state->prefixes.offset_mandatory = offset;
 3203|     12|            break;
 3204|      2|        case 0x2E:
  ------------------
  |  Branch (3204:9): [True: 2, False: 312]
  ------------------
 3205|      2|            ZYAN_FALLTHROUGH;
 3206|      2|        case 0x36:
  ------------------
  |  Branch (3206:9): [True: 0, False: 314]
  ------------------
 3207|      2|            ZYAN_FALLTHROUGH;
 3208|      6|        case 0x3E:
  ------------------
  |  Branch (3208:9): [True: 4, False: 310]
  ------------------
 3209|      6|            ZYAN_FALLTHROUGH;
 3210|      6|        case 0x26:
  ------------------
  |  Branch (3210:9): [True: 0, False: 314]
  ------------------
 3211|      6|            if (state->decoder->machine_mode == ZYDIS_MACHINE_MODE_LONG_64)
  ------------------
  |  Branch (3211:17): [True: 0, False: 6]
  ------------------
 3212|      0|            {
 3213|      0|                if ((prefix_byte == 0x3E) &&
  ------------------
  |  Branch (3213:21): [True: 0, False: 0]
  ------------------
 3214|      0|                    (state->prefixes.effective_segment != 0x64) &&
  ------------------
  |  Branch (3214:21): [True: 0, False: 0]
  ------------------
 3215|      0|                    (state->prefixes.effective_segment != 0x65))
  ------------------
  |  Branch (3215:21): [True: 0, False: 0]
  ------------------
 3216|      0|                {
 3217|      0|                    state->prefixes.offset_notrack = offset;
 3218|      0|                }
 3219|      0|                state->prefixes.group2 = prefix_byte;
 3220|      0|                state->prefixes.offset_group2 = offset;
 3221|      0|                break;
 3222|      0|            }
 3223|      6|            ZYAN_FALLTHROUGH;
 3224|     12|        case 0x64:
  ------------------
  |  Branch (3224:9): [True: 6, False: 308]
  ------------------
 3225|     12|            ZYAN_FALLTHROUGH;
 3226|     16|        case 0x65:
  ------------------
  |  Branch (3226:9): [True: 4, False: 310]
  ------------------
 3227|     16|            state->prefixes.group2 = prefix_byte;
 3228|     16|            state->prefixes.offset_group2 = offset;
 3229|     16|            state->prefixes.effective_segment = prefix_byte;
 3230|     16|            state->prefixes.offset_segment = offset;
 3231|     16|            state->prefixes.offset_notrack = -1;
 3232|     16|            break;
 3233|     36|        case 0x66:
  ------------------
  |  Branch (3233:9): [True: 36, False: 278]
  ------------------
 3234|       |            // context->prefixes.has_osz_override = ZYAN_TRUE;
 3235|     36|            state->prefixes.offset_osz_override = offset;
 3236|     36|            if (!state->prefixes.mandatory_candidate)
  ------------------
  |  Branch (3236:17): [True: 30, False: 6]
  ------------------
 3237|     30|            {
 3238|     30|                state->prefixes.mandatory_candidate = 0x66;
 3239|     30|                state->prefixes.offset_mandatory = offset;
 3240|     30|            }
 3241|     36|            instruction->attributes |= ZYDIS_ATTRIB_HAS_OPERANDSIZE;
  ------------------
  |  |  737|     36|#define ZYDIS_ATTRIB_HAS_OPERANDSIZE            (1ULL << 43) // TODO: rename
  ------------------
 3242|     36|            break;
 3243|     28|        case 0x67:
  ------------------
  |  Branch (3243:9): [True: 28, False: 286]
  ------------------
 3244|       |            // context->prefixes.has_asz_override = ZYAN_TRUE;
 3245|     28|            state->prefixes.offset_asz_override = offset;
 3246|     28|            instruction->attributes |= ZYDIS_ATTRIB_HAS_ADDRESSSIZE;
  ------------------
  |  |  741|     28|#define ZYDIS_ATTRIB_HAS_ADDRESSSIZE            (1ULL << 44) // TODO: rename
  ------------------
 3247|     28|            break;
 3248|    220|        default:
  ------------------
  |  Branch (3248:9): [True: 220, False: 94]
  ------------------
 3249|    220|            if ((state->decoder->machine_mode == ZYDIS_MACHINE_MODE_LONG_64) &&
  ------------------
  |  Branch (3249:17): [True: 170, False: 50]
  ------------------
 3250|    170|                (prefix_byte & 0xF0) == 0x40)
  ------------------
  |  Branch (3250:17): [True: 46, False: 124]
  ------------------
 3251|     46|            {
 3252|     46|                rex = prefix_byte;
 3253|     46|                instruction->raw.rex.offset = offset;
 3254|     46|            } else
 3255|    174|            {
 3256|    174|                done = ZYAN_TRUE;
  ------------------
  |  |  288|    174|#define ZYAN_TRUE  1u
  ------------------
 3257|    174|            }
 3258|    220|            break;
 3259|    314|        }
 3260|    314|        if (!done)
  ------------------
  |  Branch (3260:13): [True: 140, False: 174]
  ------------------
 3261|    140|        {
 3262|       |            // Invalidate `REX`, if it's not the last legacy prefix
 3263|    140|            if (rex && (rex != prefix_byte))
  ------------------
  |  Branch (3263:17): [True: 46, False: 94]
  |  Branch (3263:24): [True: 0, False: 46]
  ------------------
 3264|      0|            {
 3265|      0|                rex = 0x00;
 3266|      0|                instruction->raw.rex.offset = 0;
 3267|      0|            }
 3268|    140|            instruction->raw.prefixes[instruction->raw.prefix_count++].value = prefix_byte;
 3269|    140|            ZydisInputSkip(state, instruction);
 3270|    140|            ++offset;
 3271|    140|        }
 3272|    314|    } while (!done);
  ------------------
  |  Branch (3272:14): [True: 140, False: 174]
  ------------------
 3273|       |
 3274|    174|    if (instruction->attributes & ZYDIS_ATTRIB_HAS_OPERANDSIZE)
  ------------------
  |  |  737|    174|#define ZYDIS_ATTRIB_HAS_OPERANDSIZE            (1ULL << 43) // TODO: rename
  ------------------
  |  Branch (3274:9): [True: 36, False: 138]
  ------------------
 3275|     36|    {
 3276|     36|        instruction->raw.prefixes[state->prefixes.offset_osz_override].type =
 3277|     36|            ZYDIS_PREFIX_TYPE_EFFECTIVE;
 3278|     36|    }
 3279|    174|    if (instruction->attributes & ZYDIS_ATTRIB_HAS_ADDRESSSIZE)
  ------------------
  |  |  741|    174|#define ZYDIS_ATTRIB_HAS_ADDRESSSIZE            (1ULL << 44) // TODO: rename
  ------------------
  |  Branch (3279:9): [True: 28, False: 146]
  ------------------
 3280|     28|    {
 3281|     28|        instruction->raw.prefixes[state->prefixes.offset_asz_override].type =
 3282|     28|            ZYDIS_PREFIX_TYPE_EFFECTIVE;
 3283|     28|    }
 3284|    174|    if (rex)
  ------------------
  |  Branch (3284:9): [True: 46, False: 128]
  ------------------
 3285|     46|    {
 3286|     46|        instruction->raw.prefixes[instruction->raw.rex.offset].type = ZYDIS_PREFIX_TYPE_EFFECTIVE;
 3287|     46|        ZydisDecodeREX(state->context, instruction, rex);
 3288|     46|    }
 3289|    174|    if ((state->decoder->machine_mode != ZYDIS_MACHINE_MODE_LONG_64) &&
  ------------------
  |  Branch (3289:9): [True: 50, False: 124]
  ------------------
 3290|     50|        (state->prefixes.group2 == 0x3E))
  ------------------
  |  Branch (3290:9): [True: 4, False: 46]
  ------------------
 3291|      4|    {
 3292|      4|        state->prefixes.offset_notrack = state->prefixes.offset_group2;
 3293|      4|    }
 3294|       |
 3295|    174|    return ZYAN_STATUS_SUCCESS;
  ------------------
  |  |  164|    174|    ZYAN_MAKE_STATUS(0u, ZYAN_MODULE_ZYCORE, 0x00u)
  |  |  ------------------
  |  |  |  |   68|    174|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
 3296|    174|}
Decoder.c:ZydisInputPeek:
  267|    348|{
  268|    348|    ZYAN_ASSERT(state);
  ------------------
  |  |  381|    348|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (268:5): [True: 0, False: 348]
  |  Branch (268:5): [True: 348, False: 0]
  ------------------
  269|    348|    ZYAN_ASSERT(instruction);
  ------------------
  |  |  381|    348|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (269:5): [True: 0, False: 348]
  |  Branch (269:5): [True: 348, False: 0]
  ------------------
  270|    348|    ZYAN_ASSERT(value);
  ------------------
  |  |  381|    348|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (270:5): [True: 0, False: 348]
  |  Branch (270:5): [True: 348, False: 0]
  ------------------
  271|       |
  272|    348|    if (instruction->length >= ZYDIS_MAX_INSTRUCTION_LENGTH)
  ------------------
  |  |   49|    348|#define ZYDIS_MAX_INSTRUCTION_LENGTH    15
  ------------------
  |  Branch (272:9): [True: 0, False: 348]
  ------------------
  273|      0|    {
  274|      0|        return ZYDIS_STATUS_INSTRUCTION_TOO_LONG;
  ------------------
  |  |   80|      0|    ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ZYDIS, 0x02u)
  |  |  ------------------
  |  |  |  |   68|      0|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
  275|      0|    }
  276|       |
  277|    348|    if (state->buffer_len > 0)
  ------------------
  |  Branch (277:9): [True: 348, False: 0]
  ------------------
  278|    348|    {
  279|    348|        *value = state->buffer[0];
  280|    348|        return ZYAN_STATUS_SUCCESS;
  ------------------
  |  |  164|    348|    ZYAN_MAKE_STATUS(0u, ZYAN_MODULE_ZYCORE, 0x00u)
  |  |  ------------------
  |  |  |  |   68|    348|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
  281|    348|    }
  282|       |
  283|      0|    return ZYDIS_STATUS_NO_MORE_DATA;
  ------------------
  |  |   67|      0|    ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ZYDIS, 0x00u)
  |  |  ------------------
  |  |  |  |   68|      0|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
  284|    348|}
Decoder.c:ZydisInputSkip:
  297|    140|{
  298|    140|    ZYAN_ASSERT(state);
  ------------------
  |  |  381|    140|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (298:5): [True: 0, False: 140]
  |  Branch (298:5): [True: 140, False: 0]
  ------------------
  299|    140|    ZYAN_ASSERT(instruction);
  ------------------
  |  |  381|    140|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (299:5): [True: 0, False: 140]
  |  Branch (299:5): [True: 140, False: 0]
  ------------------
  300|    140|    ZYAN_ASSERT(instruction->length < ZYDIS_MAX_INSTRUCTION_LENGTH);
  ------------------
  |  |  381|    140|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (300:5): [True: 0, False: 140]
  |  Branch (300:5): [True: 140, False: 0]
  ------------------
  301|       |
  302|    140|    ++instruction->length;
  303|    140|    ++state->buffer;
  304|    140|    --state->buffer_len;
  305|    140|}
Decoder.c:ZydisDecodeREX:
  395|     46|{
  396|     46|    ZYAN_ASSERT(instruction);
  ------------------
  |  |  381|     46|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (396:5): [True: 0, False: 46]
  |  Branch (396:5): [True: 46, False: 0]
  ------------------
  397|     46|    ZYAN_ASSERT((data & 0xF0) == 0x40);
  ------------------
  |  |  381|     46|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (397:5): [True: 0, False: 46]
  |  Branch (397:5): [True: 46, False: 0]
  ------------------
  398|       |
  399|     46|    instruction->attributes |= ZYDIS_ATTRIB_HAS_REX;
  ------------------
  |  |  544|     46|#define ZYDIS_ATTRIB_HAS_REX                    (1ULL <<  2)
  ------------------
  400|     46|    instruction->raw.rex.W   = (data >> 3) & 0x01;
  401|     46|    instruction->raw.rex.R   = (data >> 2) & 0x01;
  402|     46|    instruction->raw.rex.X   = (data >> 1) & 0x01;
  403|     46|    instruction->raw.rex.B   = (data >> 0) & 0x01;
  404|       |
  405|       |    // Update internal fields
  406|     46|    context->vector_unified.W  = instruction->raw.rex.W;
  407|     46|    context->vector_unified.R3 = instruction->raw.rex.R;
  408|     46|    context->vector_unified.X3 = instruction->raw.rex.X;
  409|     46|    context->vector_unified.B3 = instruction->raw.rex.B;
  410|     46|}
Decoder.c:ZydisDecodeInstruction:
 5207|    174|{
 5208|    174|    ZYAN_ASSERT(state);
  ------------------
  |  |  381|    174|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (5208:5): [True: 0, False: 174]
  |  Branch (5208:5): [True: 174, False: 0]
  ------------------
 5209|    174|    ZYAN_ASSERT(instruction);
  ------------------
  |  |  381|    174|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (5209:5): [True: 0, False: 174]
  |  Branch (5209:5): [True: 174, False: 0]
  ------------------
 5210|       |
 5211|       |    // TODO: Handlers should return the next node instead of the index.
 5212|       |
 5213|       |    // Iterate through the decoder tree.
 5214|    174|    const ZydisDecoderTreeNode* node = ZydisGetOpcodeTableRootNode(ZYDIS_OPCODE_TABLE_PRIMARY);
  ------------------
  |  |  233|    174|#define ZYDIS_OPCODE_TABLE_PRIMARY 0x00
  ------------------
 5215|       |
 5216|    174|    do
 5217|    744|    {
 5218|    744|        const ZydisDecoderTreeNodeType node_type = ZYDIS_DT_GET_TYPE(node);
  ------------------
  |  |  349|    744|    ((ZydisDecoderTreeNodeType)((*(node)) & 0xFF))
  ------------------
 5219|    744|        ZyanU16 index = 0;
 5220|    744|        ZyanStatus status = 0;
 5221|    744|        switch (node_type)
 5222|    744|        {
 5223|    102|        case ZYDIS_NODETYPE_SWITCH_TABLE:
  ------------------
  |  Branch (5223:9): [True: 102, False: 642]
  ------------------
 5224|    102|            node = ZydisGetOpcodeTableRootNode(ZYDIS_DT_GET_ARG0(node));
  ------------------
  |  |  359|    102|    ((ZyanU8)(((*(node)) >> 8) & 0xFF))
  ------------------
 5225|       |            // The generator omits switch table nodes for empty opcode tables.
 5226|    102|            ZYAN_ASSERT(node);
  ------------------
  |  |  381|    102|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (5226:13): [True: 0, False: 102]
  |  Branch (5226:13): [True: 102, False: 0]
  ------------------
 5227|    102|            continue;
 5228|    102|        case ZYDIS_NODETYPE_SWITCH_TABLE_XOP:
  ------------------
  |  Branch (5228:9): [True: 2, False: 742]
  ------------------
 5229|      2|            status = ZydisNodeHandlerXOP(instruction, &index);
 5230|      2|            break;
 5231|      0|        case ZYDIS_NODETYPE_SWITCH_TABLE_VEX:
  ------------------
  |  Branch (5231:9): [True: 0, False: 744]
  ------------------
 5232|      0|            status = ZydisNodeHandlerVEX(instruction, &index);
 5233|      0|            break;
 5234|     32|        case ZYDIS_NODETYPE_SWITCH_TABLE_EMVEX:
  ------------------
  |  Branch (5234:9): [True: 32, False: 712]
  ------------------
 5235|     32|            status = ZydisNodeHandlerEMVEX(instruction, &index);
 5236|     32|            break;
 5237|     24|        case ZYDIS_NODETYPE_SWITCH_TABLE_REX2:
  ------------------
  |  Branch (5237:9): [True: 24, False: 720]
  ------------------
 5238|     24|            status = ZydisNodeHandlerREX2(instruction, &index);
 5239|     24|            break;
 5240|    276|        case ZYDIS_NODETYPE_OPCODE_TABLE:
  ------------------
  |  Branch (5240:9): [True: 276, False: 468]
  ------------------
 5241|    276|            status = ZydisNodeHandlerOpcode(state, instruction, &index);
 5242|    276|            break;
 5243|    174|        case ZYDIS_NODETYPE_DEFINITION:
  ------------------
  |  Branch (5243:9): [True: 174, False: 570]
  ------------------
 5244|    174|        {
 5245|    174|            const ZydisInstructionDefinition* definition;
 5246|    174|            ZydisGetInstructionDefinition(instruction->encoding, ZYDIS_DT_GET_VALUE(node, 0), &definition);
  ------------------
  |  |  368|    174|    ((ZyanU16)(*((node) + 1 + (index))))
  ------------------
 5247|       |
 5248|       |            // Now that the acting definition is known, resolve how a mandatory-candidate prefix
 5249|       |            // is classified. The tree routed us here purely by candidate; only the definition
 5250|       |            // knows whether that prefix selects the opcode or acts as an operand-size/REP
 5251|       |            // override. `HAS_OPERANDSIZE` must be settled before `ZydisSetEffectiveOperandWidth`
 5252|       |            // consumes it below.
 5253|    174|            if ((instruction->encoding == ZYDIS_INSTRUCTION_ENCODING_LEGACY) ||
  ------------------
  |  Branch (5253:17): [True: 118, False: 56]
  ------------------
 5254|     56|                (instruction->encoding == ZYDIS_INSTRUCTION_ENCODING_REX2) ||
  ------------------
  |  Branch (5254:17): [True: 22, False: 34]
  ------------------
 5255|     34|                (instruction->encoding == ZYDIS_INSTRUCTION_ENCODING_3DNOW))
  ------------------
  |  Branch (5255:17): [True: 0, False: 34]
  ------------------
 5256|    140|            {
 5257|       |                // `LEGACY` and `REX2` share the definition record that carries `mandatory_prefix`;
 5258|       |                // no `3DNOW` definition consumes a candidate, so a `3DNOW` candidate is never
 5259|       |                // mandatory.
 5260|    140|                if ((instruction->encoding != ZYDIS_INSTRUCTION_ENCODING_3DNOW) &&
  ------------------
  |  Branch (5260:21): [True: 140, False: 0]
  ------------------
 5261|    140|                    (state->prefixes.mandatory_candidate != 0x00))
  ------------------
  |  Branch (5261:21): [True: 42, False: 98]
  ------------------
 5262|     42|                {
 5263|     42|                    const ZydisInstructionDefinitionLEGACY* legacy_def =
 5264|     42|                        (const ZydisInstructionDefinitionLEGACY*)definition;
 5265|     42|                    if (legacy_def->mandatory_prefix != 0)
  ------------------
  |  Branch (5265:25): [True: 8, False: 34]
  ------------------
 5266|      8|                    {
 5267|       |                        // A non-zero field means the candidate is consumed as a mandatory prefix.
 5268|       |                        // The field does not correspond to the candidate one-to-one: string ops
 5269|       |                        // fold the F2 and F3 variants onto a single record (`mandatory_prefix == 2`
 5270|       |                        // reached with an F2 candidate), so only the non-zero test is authoritative.
 5271|      8|                        instruction->raw.prefixes[state->prefixes.offset_mandatory].type =
 5272|      8|                            ZYDIS_PREFIX_TYPE_MANDATORY;
 5273|      8|                        if (state->prefixes.mandatory_candidate == 0x66)
  ------------------
  |  Branch (5273:29): [True: 4, False: 4]
  ------------------
 5274|      4|                        {
 5275|      4|                            instruction->attributes &= ~ZYDIS_ATTRIB_HAS_OPERANDSIZE;
  ------------------
  |  |  737|      4|#define ZYDIS_ATTRIB_HAS_OPERANDSIZE            (1ULL << 43) // TODO: rename
  ------------------
 5276|      4|                        }
 5277|      8|                    }
 5278|     34|                    else
 5279|     34|                    {
 5280|     34|                        instruction->raw.prefixes[state->prefixes.offset_mandatory].type =
 5281|     34|                            ZYDIS_PREFIX_TYPE_IGNORED;
 5282|     34|                        if ((state->prefixes.mandatory_candidate == 0x66) &&
  ------------------
  |  Branch (5282:29): [True: 26, False: 8]
  ------------------
 5283|     26|                            (state->prefixes.offset_osz_override ==
  ------------------
  |  Branch (5283:29): [True: 26, False: 0]
  ------------------
 5284|     26|                                state->prefixes.offset_mandatory))
 5285|     26|                        {
 5286|     26|                            instruction->raw.prefixes[state->prefixes.offset_mandatory].type =
 5287|     26|                                ZYDIS_PREFIX_TYPE_EFFECTIVE;
 5288|     26|                        }
 5289|     34|                    }
 5290|     42|                }
 5291|       |
 5292|    140|                if (!((instruction->machine_mode == ZYDIS_MACHINE_MODE_LONG_64) &&
  ------------------
  |  Branch (5292:23): [True: 94, False: 46]
  ------------------
 5293|     94|                        (state->context->vector_unified.W)) &&
  ------------------
  |  Branch (5293:25): [True: 46, False: 48]
  ------------------
 5294|     94|                    (instruction->attributes & ZYDIS_ATTRIB_HAS_OPERANDSIZE))
  ------------------
  |  |  737|     94|#define ZYDIS_ATTRIB_HAS_OPERANDSIZE            (1ULL << 43) // TODO: rename
  ------------------
  |  Branch (5294:21): [True: 32, False: 62]
  ------------------
 5295|     32|                {
 5296|     32|                    instruction->raw.prefixes[state->prefixes.offset_osz_override].type =
 5297|     32|                        ZYDIS_PREFIX_TYPE_EFFECTIVE;
 5298|     32|                }
 5299|    140|            }
 5300|       |
 5301|    174|            ZydisSetEffectiveOperandWidth(state->context, instruction, definition);
 5302|    174|            ZydisSetEffectiveAddressWidth(state->context, instruction, definition);
 5303|       |
 5304|    174|            const ZydisInstructionEncodingInfo* info;
 5305|    174|            ZydisGetInstructionEncodingInfo(node, &info);
 5306|    174|            ZYAN_CHECK(ZydisDecodeOptionalInstructionParts(state, instruction, info));
  ------------------
  |  |  100|    174|    do \
  |  |  101|    174|    { \
  |  |  102|    174|        const ZyanStatus status_047620348 = (status); \
  |  |  103|    174|        if (!ZYAN_SUCCESS(status_047620348)) \
  |  |  ------------------
  |  |  |  |   82|    174|    (!((status) & 0x80000000u))
  |  |  ------------------
  |  |  |  Branch (103:13): [True: 0, False: 174]
  |  |  ------------------
  |  |  104|    174|        { \
  |  |  105|      0|            return status_047620348; \
  |  |  106|      0|        } \
  |  |  107|    174|    } while (0)
  |  |  ------------------
  |  |  |  Branch (107:14): [Folded, False: 174]
  |  |  ------------------
  ------------------
 5307|    174|            ZYAN_CHECK(ZydisCheckErrorConditions(state, instruction, definition));
  ------------------
  |  |  100|    174|    do \
  |  |  101|    174|    { \
  |  |  102|    174|        const ZyanStatus status_047620348 = (status); \
  |  |  103|    174|        if (!ZYAN_SUCCESS(status_047620348)) \
  |  |  ------------------
  |  |  |  |   82|    174|    (!((status) & 0x80000000u))
  |  |  ------------------
  |  |  |  Branch (103:13): [True: 0, False: 174]
  |  |  ------------------
  |  |  104|    174|        { \
  |  |  105|      0|            return status_047620348; \
  |  |  106|      0|        } \
  |  |  107|    174|    } while (0)
  |  |  ------------------
  |  |  |  Branch (107:14): [Folded, False: 174]
  |  |  ------------------
  ------------------
 5308|       |
 5309|    174|            if (instruction->encoding == ZYDIS_INSTRUCTION_ENCODING_3DNOW)
  ------------------
  |  Branch (5309:17): [True: 0, False: 174]
  ------------------
 5310|      0|            {
 5311|       |                // The suffix opcode that trails the `ModRM` byte selects the actual 3DNOW
 5312|       |                // instruction. Index the 3DNOW table with it, then resolve the sub-tree's filters
 5313|       |                // to the acting definition. No 3DNOW definition consumes a mandatory candidate, so
 5314|       |                // the filter walk stays side-effect-free with respect to prefix classification.
 5315|      0|                ZYAN_CHECK(ZydisInputNext(state, instruction, &instruction->opcode));
  ------------------
  |  |  100|      0|    do \
  |  |  101|      0|    { \
  |  |  102|      0|        const ZyanStatus status_047620348 = (status); \
  |  |  103|      0|        if (!ZYAN_SUCCESS(status_047620348)) \
  |  |  ------------------
  |  |  |  |   82|      0|    (!((status) & 0x80000000u))
  |  |  ------------------
  |  |  |  Branch (103:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  104|      0|        { \
  |  |  105|      0|            return status_047620348; \
  |  |  106|      0|        } \
  |  |  107|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (107:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 5316|      0|                node = ZydisGetOpcodeTableRootNode(ZYDIS_OPCODE_TABLE_3DNOW);
  ------------------
  |  |  241|      0|#define ZYDIS_OPCODE_TABLE_3DNOW   0x47
  ------------------
 5317|      0|                const ZyanU16 offset = ZYDIS_DT_GET_VALUE(node, instruction->opcode);
  ------------------
  |  |  368|      0|    ((ZyanU16)(*((node) + 1 + (index))))
  ------------------
 5318|      0|                if (!offset)
  ------------------
  |  Branch (5318:21): [True: 0, False: 0]
  ------------------
 5319|      0|                {
 5320|      0|                    return ZYDIS_STATUS_DECODING_ERROR;
  ------------------
  |  |   74|      0|    ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ZYDIS, 0x01u)
  |  |  ------------------
  |  |  |  |   68|      0|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
 5321|      0|                }
 5322|      0|                node += offset;
 5323|      0|                ZYAN_CHECK(ZydisTreeWalkFilters(state, instruction, &node));
  ------------------
  |  |  100|      0|    do \
  |  |  101|      0|    { \
  |  |  102|      0|        const ZyanStatus status_047620348 = (status); \
  |  |  103|      0|        if (!ZYAN_SUCCESS(status_047620348)) \
  |  |  ------------------
  |  |  |  |   82|      0|    (!((status) & 0x80000000u))
  |  |  ------------------
  |  |  |  Branch (103:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  104|      0|        { \
  |  |  105|      0|            return status_047620348; \
  |  |  106|      0|        } \
  |  |  107|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (107:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 5324|      0|                ZydisGetInstructionDefinition(instruction->encoding, ZYDIS_DT_GET_VALUE(node, 0), &definition);
  ------------------
  |  |  368|      0|    ((ZyanU16)(*((node) + 1 + (index))))
  ------------------
 5325|      0|            }
 5326|       |
 5327|    174|            if (instruction->encoding == ZYDIS_INSTRUCTION_ENCODING_EVEX)
  ------------------
  |  Branch (5327:17): [True: 32, False: 142]
  ------------------
 5328|     32|            {
 5329|     32|                const ZydisInstructionDefinitionEVEX* evex_definition =
 5330|     32|                    (const ZydisInstructionDefinitionEVEX*)definition;
 5331|       |
 5332|     32|                if (evex_definition->is_eevex)
  ------------------
  |  Branch (5332:21): [True: 18, False: 14]
  ------------------
 5333|     18|                {
 5334|     18|                    instruction->attributes |= ZYDIS_ATTRIB_HAS_EEVEX;
  ------------------
  |  |  755|     18|#define ZYDIS_ATTRIB_HAS_EEVEX                  (1ULL << 47) // TODO: rebase
  ------------------
 5335|     18|                }
 5336|       |
 5337|     32|                instruction->apx.has_nf = evex_definition->has_apx_nf;
 5338|     32|                instruction->apx.has_zu = evex_definition->has_apx_zu;
 5339|     32|                instruction->apx.has_ppx = evex_definition->has_apx_ppx;
 5340|       |
 5341|     32|                if (instruction->apx.scc != ZYDIS_SCC_NONE)
  ------------------
  |  Branch (5341:21): [True: 4, False: 28]
  ------------------
 5342|      4|                {
 5343|      4|                    instruction->apx.default_flags = state->context->vector_unified.vvvv;
 5344|      4|                }
 5345|     32|            }
 5346|       |
 5347|    174|            instruction->mnemonic = definition->mnemonic;
 5348|       |
 5349|    174|#ifndef ZYDIS_MINIMAL_MODE
 5350|       |
 5351|    174|            instruction->operand_count = definition->operand_count;
 5352|    174|            instruction->operand_count_visible = definition->operand_count_visible;
 5353|    174|            state->context->definition = definition;
 5354|       |
 5355|    174|            instruction->meta.category = definition->category;
 5356|    174|            instruction->meta.isa_set = definition->isa_set;
 5357|    174|            instruction->meta.isa_ext = definition->isa_ext;
 5358|    174|            instruction->meta.branch_type = definition->branch_type;
 5359|    174|            ZYAN_ASSERT((instruction->meta.branch_type == ZYDIS_BRANCH_TYPE_NONE) ||
  ------------------
  |  |  381|    174|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (5359:13): [True: 0, False: 0]
  |  Branch (5359:13): [True: 0, False: 0]
  |  Branch (5359:13): [True: 0, False: 0]
  |  Branch (5359:13): [True: 0, False: 0]
  |  Branch (5359:13): [True: 174, False: 0]
  |  Branch (5359:13): [True: 8, False: 30]
  |  Branch (5359:13): [True: 20, False: 10]
  |  Branch (5359:13): [True: 8, False: 2]
  |  Branch (5359:13): [True: 2, False: 0]
  |  Branch (5359:13): [True: 136, False: 38]
  ------------------
 5360|    174|                ((instruction->meta.category == ZYDIS_CATEGORY_CALL) ||
 5361|    174|                    (instruction->meta.category == ZYDIS_CATEGORY_COND_BR) ||
 5362|    174|                    (instruction->meta.category == ZYDIS_CATEGORY_UNCOND_BR) ||
 5363|    174|                    (instruction->meta.category == ZYDIS_CATEGORY_RET)));
 5364|    174|            instruction->meta.exception_class = definition->exception_class;
 5365|       |
 5366|    174|            if (!ZYDIS_DECODER_MODE_ACTIVE(state->decoder, ZYDIS_DECODER_MODE_MINIMAL))
  ------------------
  |  |   55|    174|    (!!(((decoder)->decoder_mode & (1 << (mode)))))
  ------------------
  |  Branch (5366:17): [True: 174, False: 0]
  ------------------
 5367|    174|            {
 5368|    174|                ZydisSetAttributes(state, instruction, definition);
 5369|    174|                switch (instruction->encoding)
 5370|    174|                {
 5371|      2|                case ZYDIS_INSTRUCTION_ENCODING_XOP:
  ------------------
  |  Branch (5371:17): [True: 2, False: 172]
  ------------------
 5372|      2|                case ZYDIS_INSTRUCTION_ENCODING_VEX:
  ------------------
  |  Branch (5372:17): [True: 0, False: 174]
  ------------------
 5373|     34|                case ZYDIS_INSTRUCTION_ENCODING_EVEX:
  ------------------
  |  Branch (5373:17): [True: 32, False: 142]
  ------------------
 5374|     34|                case ZYDIS_INSTRUCTION_ENCODING_MVEX:
  ------------------
  |  Branch (5374:17): [True: 0, False: 174]
  ------------------
 5375|     34|                    ZydisSetAVXInformation(state->context, instruction, definition);
 5376|     34|                    break;
 5377|    140|                default:
  ------------------
  |  Branch (5377:17): [True: 140, False: 34]
  ------------------
 5378|    140|                    break;
 5379|    174|                }
 5380|       |
 5381|    174|                const ZydisDefinitionAccessedFlags* flags;
 5382|    174|                if (ZydisGetAccessedFlags(definition, &flags))
  ------------------
  |  Branch (5382:21): [True: 58, False: 116]
  ------------------
 5383|     58|                {
 5384|     58|                    instruction->attributes |= ZYDIS_ATTRIB_CPUFLAG_ACCESS;
  ------------------
  |  |  574|     58|#define ZYDIS_ATTRIB_CPUFLAG_ACCESS             (1ULL <<  9)
  ------------------
 5385|     58|                }
 5386|    174|                instruction->cpu_flags = &flags->cpu_flags;
 5387|    174|                instruction->fpu_flags = &flags->fpu_flags;
 5388|    174|            }
 5389|       |
 5390|    174|#endif
 5391|       |
 5392|    174|            return ZYAN_STATUS_SUCCESS;
  ------------------
  |  |  164|    174|    ZYAN_MAKE_STATUS(0u, ZYAN_MODULE_ZYCORE, 0x00u)
  |  |  ------------------
  |  |  |  |   68|    174|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
 5393|    174|        }
 5394|    134|        default:
  ------------------
  |  Branch (5394:9): [True: 134, False: 610]
  ------------------
 5395|       |            // Past the opcode- and switch-table phases the walk is pure filter dispatch; resolve
 5396|       |            // it to the acting definition, then re-enter the loop to handle that node.
 5397|    134|            ZYAN_CHECK(ZydisTreeWalkFilters(state, instruction, &node));
  ------------------
  |  |  100|    134|    do \
  |  |  101|    134|    { \
  |  |  102|    134|        const ZyanStatus status_047620348 = (status); \
  |  |  103|    134|        if (!ZYAN_SUCCESS(status_047620348)) \
  |  |  ------------------
  |  |  |  |   82|    134|    (!((status) & 0x80000000u))
  |  |  ------------------
  |  |  |  Branch (103:13): [True: 0, False: 134]
  |  |  ------------------
  |  |  104|    134|        { \
  |  |  105|      0|            return status_047620348; \
  |  |  106|      0|        } \
  |  |  107|    134|    } while (0)
  |  |  ------------------
  |  |  |  Branch (107:14): [Folded, False: 134]
  |  |  ------------------
  ------------------
 5398|    134|            continue;
 5399|    744|        }
 5400|    334|        ZYAN_CHECK(status);
  ------------------
  |  |  100|    334|    do \
  |  |  101|    334|    { \
  |  |  102|    334|        const ZyanStatus status_047620348 = (status); \
  |  |  103|    334|        if (!ZYAN_SUCCESS(status_047620348)) \
  |  |  ------------------
  |  |  |  |   82|    334|    (!((status) & 0x80000000u))
  |  |  ------------------
  |  |  |  Branch (103:13): [True: 0, False: 334]
  |  |  ------------------
  |  |  104|    334|        { \
  |  |  105|      0|            return status_047620348; \
  |  |  106|      0|        } \
  |  |  107|    334|    } while (0)
  |  |  ------------------
  |  |  |  Branch (107:14): [Folded, False: 334]
  |  |  ------------------
  ------------------
 5401|       |
 5402|    334|        const ZyanU16 offset = ZYDIS_DT_GET_VALUE(node, index);
  ------------------
  |  |  368|    334|    ((ZyanU16)(*((node) + 1 + (index))))
  ------------------
 5403|    334|        node += offset;
 5404|       |
 5405|    334|        if (offset == 0)
  ------------------
  |  Branch (5405:13): [True: 0, False: 334]
  ------------------
 5406|      0|        {
 5407|       |            // Offset = 0 => invalid | empty | unused table entry.
 5408|      0|            return ZYDIS_STATUS_DECODING_ERROR;
  ------------------
  |  |   74|      0|    ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ZYDIS, 0x01u)
  |  |  ------------------
  |  |  |  |   68|      0|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
 5409|      0|        }
 5410|       |
 5411|    570|    } while (ZYAN_TRUE);
  ------------------
  |  |  288|    570|#define ZYAN_TRUE  1u
  |  |  ------------------
  |  |  |  Branch (288:20): [True: 570, Folded]
  |  |  ------------------
  ------------------
 5412|    174|}
Decoder.c:ZydisNodeHandlerXOP:
 3646|      2|{
 3647|      2|    ZYAN_ASSERT(instruction);
  ------------------
  |  |  381|      2|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (3647:5): [True: 0, False: 2]
  |  Branch (3647:5): [True: 2, False: 0]
  ------------------
 3648|      2|    ZYAN_ASSERT(index);
  ------------------
  |  |  381|      2|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (3648:5): [True: 0, False: 2]
  |  Branch (3648:5): [True: 2, False: 0]
  ------------------
 3649|       |
 3650|      2|    switch (instruction->encoding)
 3651|      2|    {
 3652|      0|    case ZYDIS_INSTRUCTION_ENCODING_LEGACY:
  ------------------
  |  Branch (3652:5): [True: 0, False: 2]
  ------------------
 3653|      0|    case ZYDIS_INSTRUCTION_ENCODING_REX2:
  ------------------
  |  Branch (3653:5): [True: 0, False: 2]
  ------------------
 3654|      0|        *index = 0;
 3655|      0|        break;
 3656|      2|    case ZYDIS_INSTRUCTION_ENCODING_XOP:
  ------------------
  |  Branch (3656:5): [True: 2, False: 0]
  ------------------
 3657|      2|        ZYAN_ASSERT(instruction->attributes & ZYDIS_ATTRIB_HAS_XOP);
  ------------------
  |  |  381|      2|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (3657:9): [True: 0, False: 2]
  |  Branch (3657:9): [True: 2, False: 0]
  ------------------
 3658|      2|        *index = (instruction->raw.xop.m_mmmm - 0x08) + (instruction->raw.xop.pp * 3) + 1;
 3659|      2|        break;
 3660|      0|    default:
  ------------------
  |  Branch (3660:5): [True: 0, False: 2]
  ------------------
 3661|      0|        ZYAN_UNREACHABLE;
  ------------------
  |  |  431|      0|#   define ZYAN_UNREACHABLE { assert(0); abort(); }
  ------------------
  |  Branch (3661:9): [Folded, False: 0]
  |  Branch (3661:9): [Folded, False: 0]
  ------------------
 3662|      2|    }
 3663|      2|    return ZYAN_STATUS_SUCCESS;
  ------------------
  |  |  164|      2|    ZYAN_MAKE_STATUS(0u, ZYAN_MODULE_ZYCORE, 0x00u)
  |  |  ------------------
  |  |  |  |   68|      2|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
 3664|      2|}
Decoder.c:ZydisNodeHandlerEMVEX:
 3687|     32|{
 3688|     32|    ZYAN_ASSERT(instruction);
  ------------------
  |  |  381|     32|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (3688:5): [True: 0, False: 32]
  |  Branch (3688:5): [True: 32, False: 0]
  ------------------
 3689|     32|    ZYAN_ASSERT(index);
  ------------------
  |  |  381|     32|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (3689:5): [True: 0, False: 32]
  |  Branch (3689:5): [True: 32, False: 0]
  ------------------
 3690|       |
 3691|     32|    switch (instruction->encoding)
 3692|     32|    {
 3693|      0|    case ZYDIS_INSTRUCTION_ENCODING_LEGACY:
  ------------------
  |  Branch (3693:5): [True: 0, False: 32]
  ------------------
 3694|      0|        *index = 0;
 3695|      0|        break;
 3696|     32|    case ZYDIS_INSTRUCTION_ENCODING_EVEX:
  ------------------
  |  Branch (3696:5): [True: 32, False: 0]
  ------------------
 3697|     32|        ZYAN_ASSERT(instruction->attributes & ZYDIS_ATTRIB_HAS_EVEX);
  ------------------
  |  |  381|     32|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (3697:9): [True: 0, False: 32]
  |  Branch (3697:9): [True: 32, False: 0]
  ------------------
 3698|     32|        *index = instruction->raw.evex.mmm + (instruction->raw.evex.pp << 3) + 1;
 3699|     32|        break;
 3700|      0|    case ZYDIS_INSTRUCTION_ENCODING_MVEX:
  ------------------
  |  Branch (3700:5): [True: 0, False: 32]
  ------------------
 3701|      0|        ZYAN_ASSERT(instruction->attributes & ZYDIS_ATTRIB_HAS_MVEX);
  ------------------
  |  |  381|      0|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (3701:9): [True: 0, False: 0]
  |  Branch (3701:9): [True: 0, False: 0]
  ------------------
 3702|      0|        *index = instruction->raw.mvex.mmmm + (instruction->raw.mvex.pp << 2) + 33;
 3703|      0|        break;
 3704|      0|    default:
  ------------------
  |  Branch (3704:5): [True: 0, False: 32]
  ------------------
 3705|      0|        ZYAN_UNREACHABLE;
  ------------------
  |  |  431|      0|#   define ZYAN_UNREACHABLE { assert(0); abort(); }
  ------------------
  |  Branch (3705:9): [Folded, False: 0]
  |  Branch (3705:9): [Folded, False: 0]
  ------------------
 3706|     32|    }
 3707|     32|    return ZYAN_STATUS_SUCCESS;
  ------------------
  |  |  164|     32|    ZYAN_MAKE_STATUS(0u, ZYAN_MODULE_ZYCORE, 0x00u)
  |  |  ------------------
  |  |  |  |   68|     32|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
 3708|     32|}
Decoder.c:ZydisNodeHandlerREX2:
 3711|     24|{
 3712|     24|    ZYAN_ASSERT(instruction);
  ------------------
  |  |  381|     24|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (3712:5): [True: 0, False: 24]
  |  Branch (3712:5): [True: 24, False: 0]
  ------------------
 3713|     24|    ZYAN_ASSERT(index);
  ------------------
  |  |  381|     24|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (3713:5): [True: 0, False: 24]
  |  Branch (3713:5): [True: 24, False: 0]
  ------------------
 3714|       |
 3715|     24|    switch (instruction->encoding)
 3716|     24|    {
 3717|      2|    case ZYDIS_INSTRUCTION_ENCODING_LEGACY:
  ------------------
  |  Branch (3717:5): [True: 2, False: 22]
  ------------------
 3718|      2|        *index = 0;
 3719|      2|        break;
 3720|     22|    case ZYDIS_INSTRUCTION_ENCODING_REX2:
  ------------------
  |  Branch (3720:5): [True: 22, False: 2]
  ------------------
 3721|     22|        ZYAN_ASSERT(instruction->attributes & ZYDIS_ATTRIB_HAS_REX2);
  ------------------
  |  |  381|     22|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (3721:9): [True: 0, False: 22]
  |  Branch (3721:9): [True: 22, False: 0]
  ------------------
 3722|     22|        *index = 1 + instruction->raw.rex2.M0;
 3723|     22|        break;
 3724|      0|    default:
  ------------------
  |  Branch (3724:5): [True: 0, False: 24]
  ------------------
 3725|      0|        ZYAN_UNREACHABLE;
  ------------------
  |  |  431|      0|#   define ZYAN_UNREACHABLE { assert(0); abort(); }
  ------------------
  |  Branch (3725:9): [Folded, False: 0]
  |  Branch (3725:9): [Folded, False: 0]
  ------------------
 3726|     24|    }
 3727|     24|    return ZYAN_STATUS_SUCCESS;
  ------------------
  |  |  164|     24|    ZYAN_MAKE_STATUS(0u, ZYAN_MODULE_ZYCORE, 0x00u)
  |  |  ------------------
  |  |  |  |   68|     24|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
 3728|     24|}
Decoder.c:ZydisNodeHandlerOpcode:
 3732|    276|{
 3733|    276|    ZYAN_ASSERT(state);
  ------------------
  |  |  381|    276|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (3733:5): [True: 0, False: 276]
  |  Branch (3733:5): [True: 276, False: 0]
  ------------------
 3734|    276|    ZYAN_ASSERT(instruction);
  ------------------
  |  |  381|    276|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (3734:5): [True: 0, False: 276]
  |  Branch (3734:5): [True: 276, False: 0]
  ------------------
 3735|    276|    ZYAN_ASSERT(index);
  ------------------
  |  |  381|    276|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (3735:5): [True: 0, False: 276]
  |  Branch (3735:5): [True: 276, False: 0]
  ------------------
 3736|       |
 3737|       |    // Handle possible encoding-prefix and opcode-map changes
 3738|    276|    switch (instruction->encoding)
 3739|    276|    {
 3740|    220|    case ZYDIS_INSTRUCTION_ENCODING_LEGACY:
  ------------------
  |  Branch (3740:5): [True: 220, False: 56]
  ------------------
 3741|    242|    case ZYDIS_INSTRUCTION_ENCODING_REX2:
  ------------------
  |  Branch (3741:5): [True: 22, False: 254]
  ------------------
 3742|    242|        ZYAN_CHECK(ZydisInputNext(state, instruction, &instruction->opcode));
  ------------------
  |  |  100|    242|    do \
  |  |  101|    242|    { \
  |  |  102|    242|        const ZyanStatus status_047620348 = (status); \
  |  |  103|    242|        if (!ZYAN_SUCCESS(status_047620348)) \
  |  |  ------------------
  |  |  |  |   82|    242|    (!((status) & 0x80000000u))
  |  |  ------------------
  |  |  |  Branch (103:13): [True: 0, False: 242]
  |  |  ------------------
  |  |  104|    242|        { \
  |  |  105|      0|            return status_047620348; \
  |  |  106|      0|        } \
  |  |  107|    242|    } while (0)
  |  |  ------------------
  |  |  |  Branch (107:14): [Folded, False: 242]
  |  |  ------------------
  ------------------
 3743|    242|        switch (instruction->opcode_map)
 3744|    242|        {
 3745|    194|        case ZYDIS_OPCODE_MAP_DEFAULT:
  ------------------
  |  Branch (3745:9): [True: 194, False: 48]
  ------------------
 3746|    194|            switch (instruction->opcode)
 3747|    194|            {
 3748|     38|            case 0x0F:
  ------------------
  |  Branch (3748:13): [True: 38, False: 156]
  ------------------
 3749|     38|                instruction->opcode_map = ZYDIS_OPCODE_MAP_0F;
 3750|     38|                break;
 3751|      0|            case 0xC4:
  ------------------
  |  Branch (3751:13): [True: 0, False: 194]
  ------------------
 3752|      0|            case 0xC5:
  ------------------
  |  Branch (3752:13): [True: 0, False: 194]
  ------------------
 3753|     32|            case 0x62:
  ------------------
  |  Branch (3753:13): [True: 32, False: 162]
  ------------------
 3754|     32|            {
 3755|     32|                ZyanU8 next_input;
 3756|     32|                ZYAN_CHECK(ZydisInputPeek(state, instruction, &next_input));
  ------------------
  |  |  100|     32|    do \
  |  |  101|     32|    { \
  |  |  102|     32|        const ZyanStatus status_047620348 = (status); \
  |  |  103|     32|        if (!ZYAN_SUCCESS(status_047620348)) \
  |  |  ------------------
  |  |  |  |   82|     32|    (!((status) & 0x80000000u))
  |  |  ------------------
  |  |  |  Branch (103:13): [True: 0, False: 32]
  |  |  ------------------
  |  |  104|     32|        { \
  |  |  105|      0|            return status_047620348; \
  |  |  106|      0|        } \
  |  |  107|     32|    } while (0)
  |  |  ------------------
  |  |  |  Branch (107:14): [Folded, False: 32]
  |  |  ------------------
  ------------------
 3757|     32|                if (((next_input & 0xF0) >= 0xC0) ||
  ------------------
  |  Branch (3757:21): [True: 20, False: 12]
  ------------------
 3758|     12|                    (instruction->machine_mode == ZYDIS_MACHINE_MODE_LONG_64))
  ------------------
  |  Branch (3758:21): [True: 12, False: 0]
  ------------------
 3759|     32|                {
 3760|     32|                    if (instruction->attributes & ZYDIS_ATTRIB_HAS_REX)
  ------------------
  |  |  544|     32|#define ZYDIS_ATTRIB_HAS_REX                    (1ULL <<  2)
  ------------------
  |  Branch (3760:25): [True: 0, False: 32]
  ------------------
 3761|      0|                    {
 3762|      0|                        return ZYDIS_STATUS_ILLEGAL_REX;
  ------------------
  |  |  106|      0|    ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ZYDIS, 0x06u)
  |  |  ------------------
  |  |  |  |   68|      0|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
 3763|      0|                    }
 3764|     32|                    if (instruction->attributes & ZYDIS_ATTRIB_HAS_REX2)
  ------------------
  |  |  751|     32|#define ZYDIS_ATTRIB_HAS_REX2                   (1ULL << 46) // TODO: rebase
  ------------------
  |  Branch (3764:25): [True: 0, False: 32]
  ------------------
 3765|      0|                    {
 3766|      0|                        return ZYDIS_STATUS_ILLEGAL_REX2;
  ------------------
  |  |  112|      0|    ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ZYDIS, 0x07u)
  |  |  ------------------
  |  |  |  |   68|      0|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
 3767|      0|                    }
 3768|     32|                    if (state->prefixes.has_lock)
  ------------------
  |  Branch (3768:25): [True: 0, False: 32]
  ------------------
 3769|      0|                    {
 3770|      0|                        return ZYDIS_STATUS_ILLEGAL_LOCK;
  ------------------
  |  |   93|      0|    ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ZYDIS, 0x04u)
  |  |  ------------------
  |  |  |  |   68|      0|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
 3771|      0|                    }
 3772|     32|                    if (state->prefixes.mandatory_candidate)
  ------------------
  |  Branch (3772:25): [True: 0, False: 32]
  ------------------
 3773|      0|                    {
 3774|      0|                        return ZYDIS_STATUS_ILLEGAL_LEGACY_PFX;
  ------------------
  |  |  100|      0|    ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ZYDIS, 0x05u)
  |  |  ------------------
  |  |  |  |   68|      0|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
 3775|      0|                    }
 3776|     32|                    ZyanU8 prefix_bytes[4] = { 0, 0, 0, 0 };
 3777|     32|                    prefix_bytes[0] = instruction->opcode;
 3778|     32|                    switch (instruction->opcode)
 3779|     32|                    {
 3780|      0|                    case 0xC4:
  ------------------
  |  Branch (3780:21): [True: 0, False: 32]
  ------------------
 3781|      0|                        instruction->raw.vex.offset = instruction->length - 1;
 3782|       |                        // Read additional 3-byte VEX-prefix data
 3783|      0|                        ZYAN_ASSERT(!(instruction->attributes & ZYDIS_ATTRIB_HAS_VEX));
  ------------------
  |  |  381|      0|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (3783:25): [True: 0, False: 0]
  |  Branch (3783:25): [True: 0, False: 0]
  ------------------
 3784|      0|                        ZYAN_CHECK(ZydisInputNextBytes(state, instruction, &prefix_bytes[1], 2));
  ------------------
  |  |  100|      0|    do \
  |  |  101|      0|    { \
  |  |  102|      0|        const ZyanStatus status_047620348 = (status); \
  |  |  103|      0|        if (!ZYAN_SUCCESS(status_047620348)) \
  |  |  ------------------
  |  |  |  |   82|      0|    (!((status) & 0x80000000u))
  |  |  ------------------
  |  |  |  Branch (103:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  104|      0|        { \
  |  |  105|      0|            return status_047620348; \
  |  |  106|      0|        } \
  |  |  107|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (107:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 3785|      0|                        break;
 3786|      0|                    case 0xC5:
  ------------------
  |  Branch (3786:21): [True: 0, False: 32]
  ------------------
 3787|      0|                        instruction->raw.vex.offset = instruction->length - 1;
 3788|       |                        // Read additional 2-byte VEX-prefix data
 3789|      0|                        ZYAN_ASSERT(!(instruction->attributes & ZYDIS_ATTRIB_HAS_VEX));
  ------------------
  |  |  381|      0|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (3789:25): [True: 0, False: 0]
  |  Branch (3789:25): [True: 0, False: 0]
  ------------------
 3790|      0|                        ZYAN_CHECK(ZydisInputNext(state, instruction, &prefix_bytes[1]));
  ------------------
  |  |  100|      0|    do \
  |  |  101|      0|    { \
  |  |  102|      0|        const ZyanStatus status_047620348 = (status); \
  |  |  103|      0|        if (!ZYAN_SUCCESS(status_047620348)) \
  |  |  ------------------
  |  |  |  |   82|      0|    (!((status) & 0x80000000u))
  |  |  ------------------
  |  |  |  Branch (103:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  104|      0|        { \
  |  |  105|      0|            return status_047620348; \
  |  |  106|      0|        } \
  |  |  107|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (107:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 3791|      0|                        break;
 3792|     32|                    case 0x62:
  ------------------
  |  Branch (3792:21): [True: 32, False: 0]
  ------------------
 3793|     32|#if !defined(ZYDIS_DISABLE_AVX512) || !defined(ZYDIS_DISABLE_KNC)
 3794|       |                        // Read additional EVEX/MVEX-prefix data
 3795|     32|                        ZYAN_ASSERT(!(instruction->attributes & ZYDIS_ATTRIB_HAS_EVEX));
  ------------------
  |  |  381|     32|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (3795:25): [True: 0, False: 32]
  |  Branch (3795:25): [True: 32, False: 0]
  ------------------
 3796|     32|                        ZYAN_ASSERT(!(instruction->attributes & ZYDIS_ATTRIB_HAS_MVEX));
  ------------------
  |  |  381|     32|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (3796:25): [True: 0, False: 32]
  |  Branch (3796:25): [True: 32, False: 0]
  ------------------
 3797|     32|                        ZYAN_CHECK(ZydisInputNextBytes(state, instruction, &prefix_bytes[1], 3));
  ------------------
  |  |  100|     32|    do \
  |  |  101|     32|    { \
  |  |  102|     32|        const ZyanStatus status_047620348 = (status); \
  |  |  103|     32|        if (!ZYAN_SUCCESS(status_047620348)) \
  |  |  ------------------
  |  |  |  |   82|     32|    (!((status) & 0x80000000u))
  |  |  ------------------
  |  |  |  Branch (103:13): [True: 0, False: 32]
  |  |  ------------------
  |  |  104|     32|        { \
  |  |  105|      0|            return status_047620348; \
  |  |  106|      0|        } \
  |  |  107|     32|    } while (0)
  |  |  ------------------
  |  |  |  Branch (107:14): [Folded, False: 32]
  |  |  ------------------
  ------------------
 3798|     32|                        break;
 3799|       |#else
 3800|       |                        return ZYDIS_STATUS_DECODING_ERROR;
 3801|       |#endif
 3802|     32|                    default:
  ------------------
  |  Branch (3802:21): [True: 0, False: 32]
  ------------------
 3803|      0|                        ZYAN_UNREACHABLE;
  ------------------
  |  |  431|      0|#   define ZYAN_UNREACHABLE { assert(0); abort(); }
  ------------------
  |  Branch (3803:25): [Folded, False: 0]
  |  Branch (3803:25): [Folded, False: 0]
  ------------------
 3804|     32|                    }
 3805|     32|                    switch (instruction->opcode)
 3806|     32|                    {
 3807|      0|                    case 0xC4:
  ------------------
  |  Branch (3807:21): [True: 0, False: 32]
  ------------------
 3808|      0|                    case 0xC5:
  ------------------
  |  Branch (3808:21): [True: 0, False: 32]
  ------------------
 3809|       |                        // Decode VEX-prefix
 3810|      0|                        instruction->encoding = ZYDIS_INSTRUCTION_ENCODING_VEX;
 3811|      0|                        ZYAN_CHECK(ZydisDecodeVEX(state->context, instruction, prefix_bytes));
  ------------------
  |  |  100|      0|    do \
  |  |  101|      0|    { \
  |  |  102|      0|        const ZyanStatus status_047620348 = (status); \
  |  |  103|      0|        if (!ZYAN_SUCCESS(status_047620348)) \
  |  |  ------------------
  |  |  |  |   82|      0|    (!((status) & 0x80000000u))
  |  |  ------------------
  |  |  |  Branch (103:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  104|      0|        { \
  |  |  105|      0|            return status_047620348; \
  |  |  106|      0|        } \
  |  |  107|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (107:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 3812|      0|                        instruction->opcode_map =
 3813|      0|                            ZYDIS_OPCODE_MAP_DEFAULT + instruction->raw.vex.m_mmmm;
 3814|      0|                        break;
 3815|     32|                    case 0x62:
  ------------------
  |  Branch (3815:21): [True: 32, False: 0]
  ------------------
 3816|       |#if defined(ZYDIS_DISABLE_AVX512) && defined(ZYDIS_DISABLE_KNC)
 3817|       |                        return ZYDIS_STATUS_DECODING_ERROR;
 3818|       |#else
 3819|     32|                        if (ZYDIS_DECODER_MODE_ACTIVE(state->decoder, ZYDIS_DECODER_MODE_KNC))
  ------------------
  |  |   55|     32|    (!!(((decoder)->decoder_mode & (1 << (mode)))))
  |  |  ------------------
  |  |  |  Branch (55:5): [True: 0, False: 32]
  |  |  ------------------
  ------------------
 3820|      0|                        {
 3821|      0|#ifndef ZYDIS_DISABLE_KNC
 3822|      0|                            instruction->raw.mvex.offset = instruction->length - 4;
 3823|       |                            // `KNC` instructions are only valid in 64-bit mode.
 3824|       |                            // This condition catches the `MVEX` encoded ones to save a bunch of
 3825|       |                            // `mode` filters in the data-tables.
 3826|       |                            // `KNC` instructions with `VEX` encoding still require a `mode` filter.
 3827|      0|                            if (state->decoder->machine_mode != ZYDIS_MACHINE_MODE_LONG_64)
  ------------------
  |  Branch (3827:33): [True: 0, False: 0]
  ------------------
 3828|      0|                            {
 3829|      0|                                return ZYDIS_STATUS_DECODING_ERROR;
  ------------------
  |  |   74|      0|    ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ZYDIS, 0x01u)
  |  |  ------------------
  |  |  |  |   68|      0|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
 3830|      0|                            }
 3831|       |                            // Decode MVEX-prefix
 3832|      0|                            instruction->encoding = ZYDIS_INSTRUCTION_ENCODING_MVEX;
 3833|      0|                            ZYAN_CHECK(ZydisDecodeMVEX(state->context, instruction, prefix_bytes));
  ------------------
  |  |  100|      0|    do \
  |  |  101|      0|    { \
  |  |  102|      0|        const ZyanStatus status_047620348 = (status); \
  |  |  103|      0|        if (!ZYAN_SUCCESS(status_047620348)) \
  |  |  ------------------
  |  |  |  |   82|      0|    (!((status) & 0x80000000u))
  |  |  ------------------
  |  |  |  Branch (103:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  104|      0|        { \
  |  |  105|      0|            return status_047620348; \
  |  |  106|      0|        } \
  |  |  107|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (107:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 3834|      0|                            instruction->opcode_map =
 3835|      0|                                ZYDIS_OPCODE_MAP_DEFAULT + instruction->raw.mvex.mmmm;
 3836|      0|                            break;
 3837|       |#else
 3838|       |                            return ZYDIS_STATUS_DECODING_ERROR;
 3839|       |#endif
 3840|      0|                        }
 3841|     32|                        else
 3842|     32|                        {
 3843|     32|#ifndef ZYDIS_DISABLE_AVX512
 3844|     32|                            instruction->raw.evex.offset = instruction->length - 4;
 3845|       |                            // Decode EVEX-prefix
 3846|     32|                            instruction->encoding = ZYDIS_INSTRUCTION_ENCODING_EVEX;
 3847|     32|                            ZYAN_CHECK(ZydisDecodeEVEX(state->decoder, state->context, instruction, prefix_bytes));
  ------------------
  |  |  100|     32|    do \
  |  |  101|     32|    { \
  |  |  102|     32|        const ZyanStatus status_047620348 = (status); \
  |  |  103|     32|        if (!ZYAN_SUCCESS(status_047620348)) \
  |  |  ------------------
  |  |  |  |   82|     32|    (!((status) & 0x80000000u))
  |  |  ------------------
  |  |  |  Branch (103:13): [True: 0, False: 32]
  |  |  ------------------
  |  |  104|     32|        { \
  |  |  105|      0|            return status_047620348; \
  |  |  106|      0|        } \
  |  |  107|     32|    } while (0)
  |  |  ------------------
  |  |  |  Branch (107:14): [Folded, False: 32]
  |  |  ------------------
  ------------------
 3848|     32|                            instruction->opcode_map =
 3849|     32|                                ZYDIS_OPCODE_MAP_DEFAULT + instruction->raw.evex.mmm;
 3850|     32|                            break;
 3851|       |#else
 3852|       |                            return ZYDIS_STATUS_DECODING_ERROR;
 3853|       |#endif
 3854|     32|                        }
 3855|      0|                        break;
 3856|      0|#endif
 3857|      0|                    default:
  ------------------
  |  Branch (3857:21): [True: 0, False: 32]
  ------------------
 3858|      0|                        ZYAN_UNREACHABLE;
  ------------------
  |  |  431|      0|#   define ZYAN_UNREACHABLE { assert(0); abort(); }
  ------------------
  |  Branch (3858:25): [Folded, False: 0]
  |  Branch (3858:25): [Folded, False: 0]
  ------------------
 3859|     32|                    }
 3860|     32|                }
 3861|     32|                break;
 3862|     32|            }
 3863|     32|            case 0x8F:
  ------------------
  |  Branch (3863:13): [True: 2, False: 192]
  ------------------
 3864|      2|            {
 3865|      2|                if (instruction->attributes & ZYDIS_ATTRIB_HAS_REX2)
  ------------------
  |  |  751|      2|#define ZYDIS_ATTRIB_HAS_REX2                   (1ULL << 46) // TODO: rebase
  ------------------
  |  Branch (3865:21): [True: 0, False: 2]
  ------------------
 3866|      0|                {
 3867|       |                    // 0x8F is just a normal opcode in this case
 3868|      0|                    break;
 3869|      0|                }
 3870|       |
 3871|      2|                ZyanU8 next_input;
 3872|      2|                ZYAN_CHECK(ZydisInputPeek(state, instruction, &next_input));
  ------------------
  |  |  100|      2|    do \
  |  |  101|      2|    { \
  |  |  102|      2|        const ZyanStatus status_047620348 = (status); \
  |  |  103|      2|        if (!ZYAN_SUCCESS(status_047620348)) \
  |  |  ------------------
  |  |  |  |   82|      2|    (!((status) & 0x80000000u))
  |  |  ------------------
  |  |  |  Branch (103:13): [True: 0, False: 2]
  |  |  ------------------
  |  |  104|      2|        { \
  |  |  105|      0|            return status_047620348; \
  |  |  106|      0|        } \
  |  |  107|      2|    } while (0)
  |  |  ------------------
  |  |  |  Branch (107:14): [Folded, False: 2]
  |  |  ------------------
  ------------------
 3873|      2|                if ((next_input & 0x1F) >= 8)
  ------------------
  |  Branch (3873:21): [True: 2, False: 0]
  ------------------
 3874|      2|                {
 3875|      2|                    if (instruction->attributes & ZYDIS_ATTRIB_HAS_REX)
  ------------------
  |  |  544|      2|#define ZYDIS_ATTRIB_HAS_REX                    (1ULL <<  2)
  ------------------
  |  Branch (3875:25): [True: 0, False: 2]
  ------------------
 3876|      0|                    {
 3877|      0|                        return ZYDIS_STATUS_ILLEGAL_REX;
  ------------------
  |  |  106|      0|    ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ZYDIS, 0x06u)
  |  |  ------------------
  |  |  |  |   68|      0|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
 3878|      0|                    }
 3879|      2|                    if (instruction->attributes & ZYDIS_ATTRIB_HAS_REX2)
  ------------------
  |  |  751|      2|#define ZYDIS_ATTRIB_HAS_REX2                   (1ULL << 46) // TODO: rebase
  ------------------
  |  Branch (3879:25): [True: 0, False: 2]
  ------------------
 3880|      0|                    {
 3881|      0|                        return ZYDIS_STATUS_ILLEGAL_REX2;
  ------------------
  |  |  112|      0|    ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ZYDIS, 0x07u)
  |  |  ------------------
  |  |  |  |   68|      0|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
 3882|      0|                    }
 3883|      2|                    if (state->prefixes.has_lock)
  ------------------
  |  Branch (3883:25): [True: 0, False: 2]
  ------------------
 3884|      0|                    {
 3885|      0|                        return ZYDIS_STATUS_ILLEGAL_LOCK;
  ------------------
  |  |   93|      0|    ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ZYDIS, 0x04u)
  |  |  ------------------
  |  |  |  |   68|      0|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
 3886|      0|                    }
 3887|      2|                    if (state->prefixes.mandatory_candidate)
  ------------------
  |  Branch (3887:25): [True: 0, False: 2]
  ------------------
 3888|      0|                    {
 3889|      0|                        return ZYDIS_STATUS_ILLEGAL_LEGACY_PFX;
  ------------------
  |  |  100|      0|    ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ZYDIS, 0x05u)
  |  |  ------------------
  |  |  |  |   68|      0|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
 3890|      0|                    }
 3891|      2|                    instruction->raw.xop.offset = instruction->length - 1;
 3892|      2|                    ZyanU8 prefix_bytes[3] = { 0x8F, 0x00, 0x00 };
 3893|       |                    // Read additional xop-prefix data
 3894|      2|                    ZYAN_CHECK(ZydisInputNextBytes(state, instruction, &prefix_bytes[1], 2));
  ------------------
  |  |  100|      2|    do \
  |  |  101|      2|    { \
  |  |  102|      2|        const ZyanStatus status_047620348 = (status); \
  |  |  103|      2|        if (!ZYAN_SUCCESS(status_047620348)) \
  |  |  ------------------
  |  |  |  |   82|      2|    (!((status) & 0x80000000u))
  |  |  ------------------
  |  |  |  Branch (103:13): [True: 0, False: 2]
  |  |  ------------------
  |  |  104|      2|        { \
  |  |  105|      0|            return status_047620348; \
  |  |  106|      0|        } \
  |  |  107|      2|    } while (0)
  |  |  ------------------
  |  |  |  Branch (107:14): [Folded, False: 2]
  |  |  ------------------
  ------------------
 3895|       |                    // Decode xop-prefix
 3896|      2|                    instruction->encoding = ZYDIS_INSTRUCTION_ENCODING_XOP;
 3897|      2|                    ZYAN_CHECK(ZydisDecodeXOP(state->context, instruction, prefix_bytes));
  ------------------
  |  |  100|      2|    do \
  |  |  101|      2|    { \
  |  |  102|      2|        const ZyanStatus status_047620348 = (status); \
  |  |  103|      2|        if (!ZYAN_SUCCESS(status_047620348)) \
  |  |  ------------------
  |  |  |  |   82|      2|    (!((status) & 0x80000000u))
  |  |  ------------------
  |  |  |  Branch (103:13): [True: 0, False: 2]
  |  |  ------------------
  |  |  104|      2|        { \
  |  |  105|      0|            return status_047620348; \
  |  |  106|      0|        } \
  |  |  107|      2|    } while (0)
  |  |  ------------------
  |  |  |  Branch (107:14): [Folded, False: 2]
  |  |  ------------------
  ------------------
 3898|      2|                    instruction->opcode_map =
 3899|      2|                        ZYDIS_OPCODE_MAP_XOP8 + instruction->raw.xop.m_mmmm - 0x08;
 3900|      2|                }
 3901|      2|                break;
 3902|      2|            }
 3903|     24|            case 0xD5:
  ------------------
  |  Branch (3903:13): [True: 24, False: 170]
  ------------------
 3904|     24|            {
 3905|     24|                if (!ZYDIS_DECODER_MODE_ACTIVE(state->decoder, ZYDIS_DECODER_MODE_APX))
  ------------------
  |  |   55|     24|    (!!(((decoder)->decoder_mode & (1 << (mode)))))
  ------------------
  |  Branch (3905:21): [True: 0, False: 24]
  ------------------
 3906|      0|                {
 3907|      0|                    break;
 3908|      0|                }
 3909|       |
 3910|     24|                if (instruction->attributes & ZYDIS_ATTRIB_HAS_REX2)
  ------------------
  |  |  751|     24|#define ZYDIS_ATTRIB_HAS_REX2                   (1ULL << 46) // TODO: rebase
  ------------------
  |  Branch (3910:21): [True: 0, False: 24]
  ------------------
 3911|      0|                {
 3912|      0|                    return ZYDIS_STATUS_DECODING_ERROR;
  ------------------
  |  |   74|      0|    ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ZYDIS, 0x01u)
  |  |  ------------------
  |  |  |  |   68|      0|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
 3913|      0|                }
 3914|       |
 3915|     24|                if (state->decoder->machine_mode == ZYDIS_MACHINE_MODE_LONG_64)
  ------------------
  |  Branch (3915:21): [True: 22, False: 2]
  ------------------
 3916|     22|                {
 3917|     22|                    ZyanU8 rex2;
 3918|     22|                    ZYAN_CHECK(ZydisInputNext(state, instruction, &rex2));
  ------------------
  |  |  100|     22|    do \
  |  |  101|     22|    { \
  |  |  102|     22|        const ZyanStatus status_047620348 = (status); \
  |  |  103|     22|        if (!ZYAN_SUCCESS(status_047620348)) \
  |  |  ------------------
  |  |  |  |   82|     22|    (!((status) & 0x80000000u))
  |  |  ------------------
  |  |  |  Branch (103:13): [True: 0, False: 22]
  |  |  ------------------
  |  |  104|     22|        { \
  |  |  105|      0|            return status_047620348; \
  |  |  106|      0|        } \
  |  |  107|     22|    } while (0)
  |  |  ------------------
  |  |  |  Branch (107:14): [Folded, False: 22]
  |  |  ------------------
  ------------------
 3919|       |
 3920|     22|                    instruction->raw.rex2.offset = instruction->length - 2;
 3921|       |
 3922|     22|                    if (instruction->attributes & ZYDIS_ATTRIB_HAS_REX)
  ------------------
  |  |  544|     22|#define ZYDIS_ATTRIB_HAS_REX                    (1ULL <<  2)
  ------------------
  |  Branch (3922:25): [True: 0, False: 22]
  ------------------
 3923|      0|                    {
 3924|       |                        // A REX prefix immediately preceding REX2 is illegal
 3925|      0|                        if (instruction->raw.rex.offset == (instruction->raw.rex2.offset - 1))
  ------------------
  |  Branch (3925:29): [True: 0, False: 0]
  ------------------
 3926|      0|                        {
 3927|      0|                            return ZYDIS_STATUS_ILLEGAL_REX;
  ------------------
  |  |  106|      0|    ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ZYDIS, 0x06u)
  |  |  ------------------
  |  |  |  |   68|      0|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
 3928|      0|                        }
 3929|       |
 3930|       |                        // Mark existing REX prefix as "not used"
 3931|      0|                        instruction->raw.prefixes[instruction->raw.rex.offset].type = ZYDIS_PREFIX_TYPE_IGNORED;
 3932|      0|                    }
 3933|       |
 3934|     22|                    ZydisDecodeREX2(state->context, instruction, rex2);
 3935|       |
 3936|     22|                    instruction->encoding = ZYDIS_INSTRUCTION_ENCODING_REX2;
 3937|     22|                    instruction->opcode_map = ZYDIS_OPCODE_MAP_MIN_VALUE + instruction->raw.rex2.M0;
 3938|     22|                }
 3939|     24|                break;
 3940|     24|            }
 3941|     98|            default:
  ------------------
  |  Branch (3941:13): [True: 98, False: 96]
  ------------------
 3942|     98|                break;
 3943|    194|            }
 3944|    194|            break;
 3945|    194|        case ZYDIS_OPCODE_MAP_0F:
  ------------------
  |  Branch (3945:9): [True: 40, False: 202]
  ------------------
 3946|     40|            switch (instruction->opcode)
 3947|     40|            {
 3948|      0|            case 0x0F:
  ------------------
  |  Branch (3948:13): [True: 0, False: 40]
  ------------------
 3949|      0|                if (instruction->attributes & ZYDIS_ATTRIB_HAS_REX2)
  ------------------
  |  |  751|      0|#define ZYDIS_ATTRIB_HAS_REX2                   (1ULL << 46) // TODO: rebase
  ------------------
  |  Branch (3949:21): [True: 0, False: 0]
  ------------------
 3950|      0|                {
 3951|      0|                    return ZYDIS_STATUS_ILLEGAL_REX2;
  ------------------
  |  |  112|      0|    ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ZYDIS, 0x07u)
  |  |  ------------------
  |  |  |  |   68|      0|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
 3952|      0|                }
 3953|      0|                if (state->prefixes.has_lock)
  ------------------
  |  Branch (3953:21): [True: 0, False: 0]
  ------------------
 3954|      0|                {
 3955|      0|                    return ZYDIS_STATUS_ILLEGAL_LOCK;
  ------------------
  |  |   93|      0|    ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ZYDIS, 0x04u)
  |  |  ------------------
  |  |  |  |   68|      0|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
 3956|      0|                }
 3957|      0|                instruction->encoding = ZYDIS_INSTRUCTION_ENCODING_3DNOW;
 3958|      0|                instruction->opcode_map = ZYDIS_OPCODE_MAP_0F0F;
 3959|      0|                break;
 3960|      8|            case 0x38:
  ------------------
  |  Branch (3960:13): [True: 8, False: 32]
  ------------------
 3961|      8|                if (instruction->attributes & ZYDIS_ATTRIB_HAS_REX2)
  ------------------
  |  |  751|      8|#define ZYDIS_ATTRIB_HAS_REX2                   (1ULL << 46) // TODO: rebase
  ------------------
  |  Branch (3961:21): [True: 0, False: 8]
  ------------------
 3962|      0|                {
 3963|      0|                    return ZYDIS_STATUS_ILLEGAL_REX2;
  ------------------
  |  |  112|      0|    ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ZYDIS, 0x07u)
  |  |  ------------------
  |  |  |  |   68|      0|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
 3964|      0|                }
 3965|      8|                instruction->opcode_map = ZYDIS_OPCODE_MAP_0F38;
 3966|      8|                break;
 3967|      0|            case 0x3A:
  ------------------
  |  Branch (3967:13): [True: 0, False: 40]
  ------------------
 3968|      0|                if (instruction->attributes & ZYDIS_ATTRIB_HAS_REX2)
  ------------------
  |  |  751|      0|#define ZYDIS_ATTRIB_HAS_REX2                   (1ULL << 46) // TODO: rebase
  ------------------
  |  Branch (3968:21): [True: 0, False: 0]
  ------------------
 3969|      0|                {
 3970|      0|                    return ZYDIS_STATUS_ILLEGAL_REX2;
  ------------------
  |  |  112|      0|    ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ZYDIS, 0x07u)
  |  |  ------------------
  |  |  |  |   68|      0|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
 3971|      0|                }
 3972|      0|                instruction->opcode_map = ZYDIS_OPCODE_MAP_0F3A;
 3973|      0|                break;
 3974|     32|            default:
  ------------------
  |  Branch (3974:13): [True: 32, False: 8]
  ------------------
 3975|     32|                break;
 3976|     40|            }
 3977|     40|            break;
 3978|     40|        case ZYDIS_OPCODE_MAP_0F38:
  ------------------
  |  Branch (3978:9): [True: 8, False: 234]
  ------------------
 3979|      8|        case ZYDIS_OPCODE_MAP_0F3A:
  ------------------
  |  Branch (3979:9): [True: 0, False: 242]
  ------------------
 3980|      8|        case ZYDIS_OPCODE_MAP_XOP8:
  ------------------
  |  Branch (3980:9): [True: 0, False: 242]
  ------------------
 3981|      8|        case ZYDIS_OPCODE_MAP_XOP9:
  ------------------
  |  Branch (3981:9): [True: 0, False: 242]
  ------------------
 3982|      8|        case ZYDIS_OPCODE_MAP_XOPA:
  ------------------
  |  Branch (3982:9): [True: 0, False: 242]
  ------------------
 3983|       |            // Nothing to do here
 3984|      8|            break;
 3985|      0|        default:
  ------------------
  |  Branch (3985:9): [True: 0, False: 242]
  ------------------
 3986|      0|            ZYAN_UNREACHABLE;
  ------------------
  |  |  431|      0|#   define ZYAN_UNREACHABLE { assert(0); abort(); }
  ------------------
  |  Branch (3986:13): [Folded, False: 0]
  |  Branch (3986:13): [Folded, False: 0]
  ------------------
 3987|    242|        }
 3988|       |
 3989|    242|        if (instruction->encoding != ZYDIS_INSTRUCTION_ENCODING_REX2)
  ------------------
  |  Branch (3989:13): [True: 198, False: 44]
  ------------------
 3990|    198|        {
 3991|    198|            break;
 3992|    198|        }
 3993|       |
 3994|     44|        if (instruction->opcode == 0x0F)
  ------------------
  |  Branch (3994:13): [True: 0, False: 44]
  ------------------
 3995|      0|        {
 3996|       |            // 2-byte/3-byte opcodes are not allowed with REX2 (`REX2.m0` is used instead).
 3997|      0|            return ZYDIS_STATUS_ILLEGAL_REX2;
  ------------------
  |  |  112|      0|    ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ZYDIS, 0x07u)
  |  |  ------------------
  |  |  |  |   68|      0|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
 3998|      0|        }
 3999|       |
 4000|     44|        break;
 4001|     44|    case ZYDIS_INSTRUCTION_ENCODING_3DNOW:
  ------------------
  |  Branch (4001:5): [True: 0, False: 276]
  ------------------
 4002|       |        // All 3DNOW (0x0F 0x0F) instructions are using the same operand encoding. We just
 4003|       |        // decode a random (pi2fw) instruction and extract the actual opcode later.
 4004|      0|        *index = 0x0C;
 4005|      0|        return ZYAN_STATUS_SUCCESS;
  ------------------
  |  |  164|      0|    ZYAN_MAKE_STATUS(0u, ZYAN_MODULE_ZYCORE, 0x00u)
  |  |  ------------------
  |  |  |  |   68|      0|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
 4006|     34|    default:
  ------------------
  |  Branch (4006:5): [True: 34, False: 242]
  ------------------
 4007|     34|        ZYAN_CHECK(ZydisInputNext(state, instruction, &instruction->opcode));
  ------------------
  |  |  100|     34|    do \
  |  |  101|     34|    { \
  |  |  102|     34|        const ZyanStatus status_047620348 = (status); \
  |  |  103|     34|        if (!ZYAN_SUCCESS(status_047620348)) \
  |  |  ------------------
  |  |  |  |   82|     34|    (!((status) & 0x80000000u))
  |  |  ------------------
  |  |  |  Branch (103:13): [True: 0, False: 34]
  |  |  ------------------
  |  |  104|     34|        { \
  |  |  105|      0|            return status_047620348; \
  |  |  106|      0|        } \
  |  |  107|     34|    } while (0)
  |  |  ------------------
  |  |  |  Branch (107:14): [Folded, False: 34]
  |  |  ------------------
  ------------------
 4008|     34|        break;
 4009|    276|    }
 4010|       |
 4011|    276|    *index = instruction->opcode;
 4012|    276|    return ZYAN_STATUS_SUCCESS;
  ------------------
  |  |  164|    276|    ZYAN_MAKE_STATUS(0u, ZYAN_MODULE_ZYCORE, 0x00u)
  |  |  ------------------
  |  |  |  |   68|    276|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
 4013|    276|}
Decoder.c:ZydisInputNextBytes:
  358|    170|{
  359|    170|    ZYAN_ASSERT(state);
  ------------------
  |  |  381|    170|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (359:5): [True: 0, False: 170]
  |  Branch (359:5): [True: 170, False: 0]
  ------------------
  360|    170|    ZYAN_ASSERT(instruction);
  ------------------
  |  |  381|    170|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (360:5): [True: 0, False: 170]
  |  Branch (360:5): [True: 170, False: 0]
  ------------------
  361|    170|    ZYAN_ASSERT(value);
  ------------------
  |  |  381|    170|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (361:5): [True: 0, False: 170]
  |  Branch (361:5): [True: 170, False: 0]
  ------------------
  362|       |
  363|    170|    if (instruction->length + number_of_bytes > ZYDIS_MAX_INSTRUCTION_LENGTH)
  ------------------
  |  |   49|    170|#define ZYDIS_MAX_INSTRUCTION_LENGTH    15
  ------------------
  |  Branch (363:9): [True: 0, False: 170]
  ------------------
  364|      0|    {
  365|      0|        return ZYDIS_STATUS_INSTRUCTION_TOO_LONG;
  ------------------
  |  |   80|      0|    ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ZYDIS, 0x02u)
  |  |  ------------------
  |  |  |  |   68|      0|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
  366|      0|    }
  367|       |
  368|    170|    if (state->buffer_len >= number_of_bytes)
  ------------------
  |  Branch (368:9): [True: 170, False: 0]
  ------------------
  369|    170|    {
  370|    170|        instruction->length += number_of_bytes;
  371|       |
  372|    170|        ZYAN_MEMCPY(value, state->buffer, number_of_bytes);
  ------------------
  |  |  113|    170|#define ZYAN_MEMCPY     memcpy
  ------------------
  373|    170|        state->buffer += number_of_bytes;
  374|    170|        state->buffer_len -= number_of_bytes;
  375|       |
  376|    170|        return ZYAN_STATUS_SUCCESS;
  ------------------
  |  |  164|    170|    ZYAN_MAKE_STATUS(0u, ZYAN_MODULE_ZYCORE, 0x00u)
  |  |  ------------------
  |  |  |  |   68|    170|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
  377|    170|    }
  378|       |
  379|      0|    return ZYDIS_STATUS_NO_MORE_DATA;
  ------------------
  |  |   67|      0|    ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ZYDIS, 0x00u)
  |  |  ------------------
  |  |  |  |   68|      0|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
  380|    170|}
Decoder.c:ZydisDecodeEVEX:
  584|     32|{
  585|     32|    ZYAN_ASSERT(instruction);
  ------------------
  |  |  381|     32|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (585:5): [True: 0, False: 32]
  |  Branch (585:5): [True: 32, False: 0]
  ------------------
  586|     32|    ZYAN_ASSERT(data[0] == 0x62);
  ------------------
  |  |  381|     32|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (586:5): [True: 0, False: 32]
  |  Branch (586:5): [True: 32, False: 0]
  ------------------
  587|     32|    ZYAN_ASSERT(instruction->raw.evex.offset == instruction->length - 4);
  ------------------
  |  |  381|     32|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (587:5): [True: 0, False: 32]
  |  Branch (587:5): [True: 32, False: 0]
  ------------------
  588|       |
  589|     32|    if (instruction->machine_mode == ZYDIS_MACHINE_MODE_REAL_16)
  ------------------
  |  Branch (589:9): [True: 0, False: 32]
  ------------------
  590|      0|    {
  591|       |        // EVEX is invalid in 16-bit real mode
  592|      0|        return ZYDIS_STATUS_DECODING_ERROR;
  ------------------
  |  |   74|      0|    ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ZYDIS, 0x01u)
  |  |  ------------------
  |  |  |  |   68|      0|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
  593|      0|    }
  594|       |
  595|     32|    instruction->attributes |= ZYDIS_ATTRIB_HAS_EVEX;
  ------------------
  |  |  556|     32|#define ZYDIS_ATTRIB_HAS_EVEX                   (1ULL <<  5)
  ------------------
  596|     32|    instruction->raw.evex.R3        = (data[1] >> 7) & 0x01;
  597|     32|    instruction->raw.evex.X3        = (data[1] >> 6) & 0x01;
  598|     32|    instruction->raw.evex.B3        = (data[1] >> 5) & 0x01;
  599|     32|    instruction->raw.evex.R4        = (data[1] >> 4) & 0x01;
  600|     32|    instruction->raw.evex.B4        = (data[1] >> 3) & 0x01;
  601|     32|    instruction->raw.evex.mmm       = (data[1] >> 0) & 0x07;
  602|       |
  603|     32|    const ZyanBool is_apx = ZYDIS_DECODER_MODE_ACTIVE(decoder, ZYDIS_DECODER_MODE_APX);
  ------------------
  |  |   55|     32|    (!!(((decoder)->decoder_mode & (1 << (mode)))))
  ------------------
  604|     32|    if (!is_apx && (instruction->raw.evex.B4 != 0)) // TODO: This condition might have to as well consider AVX 10.2 besides APX
  ------------------
  |  Branch (604:9): [True: 0, False: 32]
  |  Branch (604:20): [True: 0, False: 0]
  ------------------
  605|      0|    {
  606|       |        // Invalid according to the intel documentation
  607|      0|        return ZYDIS_STATUS_MALFORMED_EVEX;
  ------------------
  |  |  124|      0|    ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ZYDIS, 0x09u)
  |  |  ------------------
  |  |  |  |   68|      0|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
  608|      0|    }
  609|       |
  610|     32|    if (instruction->raw.evex.mmm == 0x00)
  ------------------
  |  Branch (610:9): [True: 0, False: 32]
  ------------------
  611|      0|    {
  612|       |        // Invalid according to the intel documentation
  613|      0|        return ZYDIS_STATUS_INVALID_MAP;
  ------------------
  |  |  118|      0|    ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ZYDIS, 0x08u)
  |  |  ------------------
  |  |  |  |   68|      0|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
  614|      0|    }
  615|       |
  616|     32|    instruction->raw.evex.W         = (data[2] >> 7) & 0x01;
  617|     32|    instruction->raw.evex.vvvv      = (data[2] >> 3) & 0x0F;
  618|       |    // instruction->raw.evex.DFV      = (data[2] >> 3) & 0x0F; // uses same bits as 'vvvv'
  619|     32|    instruction->raw.evex.U         = (data[2] >> 2) & 0x01;
  620|     32|    instruction->raw.evex.X4        = (data[2] >> 2) & 0x01; // uses same bit as 'U'
  621|     32|    instruction->raw.evex.pp        = (data[2] >> 0) & 0x03;
  622|       |
  623|     32|    instruction->raw.evex.z         = (data[3] >> 7) & 0x01;
  624|     32|    instruction->raw.evex.L2        = (data[3] >> 6) & 0x01;
  625|     32|    instruction->raw.evex.L         = (data[3] >> 5) & 0x01;
  626|     32|    instruction->raw.evex.b         = (data[3] >> 4) & 0x01;
  627|     32|    instruction->raw.evex.ND        = (data[3] >> 4) & 0x01; // uses same bit as 'b'
  628|     32|    instruction->raw.evex.V4        = (data[3] >> 3) & 0x01;
  629|     32|    instruction->raw.evex.NF        = (data[3] >> 2) & 0x01; // uses bit 3 of 'aaa'
  630|     32|    instruction->raw.evex.aaa       = (data[3] >> 0) & 0x07;
  631|     32|    instruction->raw.evex.SCC       = (data[3] >> 0) & 0x0F; // uses same bits as 'V4' and 'aaa'
  632|       |
  633|     32|    if (!instruction->raw.evex.V4 &&
  ------------------
  |  Branch (633:9): [True: 4, False: 28]
  ------------------
  634|      4|        (instruction->machine_mode != ZYDIS_MACHINE_MODE_LONG_64))
  ------------------
  |  Branch (634:9): [True: 0, False: 4]
  ------------------
  635|      0|    {
  636|      0|        return ZYDIS_STATUS_MALFORMED_EVEX;
  ------------------
  |  |  124|      0|    ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ZYDIS, 0x09u)
  |  |  ------------------
  |  |  |  |   68|      0|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
  637|      0|    }
  638|       |
  639|     32|    if (instruction->raw.evex.z && !instruction->raw.evex.aaa)
  ------------------
  |  Branch (639:9): [True: 2, False: 30]
  |  Branch (639:36): [True: 0, False: 2]
  ------------------
  640|      0|    {
  641|      0|        return ZYDIS_STATUS_INVALID_MASK; // TODO: Dedicated status code
  ------------------
  |  |  136|      0|    ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ZYDIS, 0x0Bu)
  |  |  ------------------
  |  |  |  |   68|      0|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
  642|      0|    }
  643|       |
  644|       |    // Update internal fields
  645|     32|    context->vector_unified.W    = instruction->raw.evex.W;
  646|     32|    context->vector_unified.R3   = 0x01 & ~instruction->raw.evex.R3;
  647|     32|    context->vector_unified.X3   = 0x01 & ~instruction->raw.evex.X3;
  648|     32|    context->vector_unified.X4   = 0x01 & ~instruction->raw.evex.X4;
  649|     32|    context->vector_unified.B3   = 0x01 & ~instruction->raw.evex.B3;
  650|     32|    context->vector_unified.B4   = instruction->raw.evex.B4;
  651|     32|    context->vector_unified.LL   = (data[3] >> 5) & 0x03;
  652|     32|    context->vector_unified.R4   = 0x01 & ~instruction->raw.evex.R4;
  653|     32|    context->vector_unified.V4   = 0x01 & ~instruction->raw.evex.V4;
  654|     32|    context->vector_unified.vvvv = 0x0F & ~instruction->raw.evex.vvvv;
  655|     32|    context->vector_unified.mask = instruction->raw.evex.aaa;
  656|       |
  657|     32|    if (!instruction->raw.evex.b && (context->vector_unified.LL == 3))
  ------------------
  |  Branch (657:9): [True: 24, False: 8]
  |  Branch (657:37): [True: 0, False: 24]
  ------------------
  658|      0|    {
  659|       |        // LL = 3 is only valid for instructions with embedded rounding control
  660|      0|        return ZYDIS_STATUS_MALFORMED_EVEX;
  ------------------
  |  |  124|      0|    ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ZYDIS, 0x09u)
  |  |  ------------------
  |  |  |  |   68|      0|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
  661|      0|    }
  662|       |
  663|     32|    return ZYAN_STATUS_SUCCESS;
  ------------------
  |  |  164|     32|    ZYAN_MAKE_STATUS(0u, ZYAN_MODULE_ZYCORE, 0x00u)
  |  |  ------------------
  |  |  |  |   68|     32|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
  664|     32|}
Decoder.c:ZydisDecodeXOP:
  457|      2|{
  458|      2|    ZYAN_ASSERT(instruction);
  ------------------
  |  |  381|      2|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (458:5): [True: 0, False: 2]
  |  Branch (458:5): [True: 2, False: 0]
  ------------------
  459|      2|    ZYAN_ASSERT(data[0] == 0x8F);
  ------------------
  |  |  381|      2|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (459:5): [True: 0, False: 2]
  |  Branch (459:5): [True: 2, False: 0]
  ------------------
  460|      2|    ZYAN_ASSERT(((data[1] >> 0) & 0x1F) >= 8);
  ------------------
  |  |  381|      2|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (460:5): [True: 0, False: 2]
  |  Branch (460:5): [True: 2, False: 0]
  ------------------
  461|      2|    ZYAN_ASSERT(instruction->raw.xop.offset == instruction->length - 3);
  ------------------
  |  |  381|      2|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (461:5): [True: 0, False: 2]
  |  Branch (461:5): [True: 2, False: 0]
  ------------------
  462|       |
  463|      2|    if (instruction->machine_mode == ZYDIS_MACHINE_MODE_REAL_16)
  ------------------
  |  Branch (463:9): [True: 0, False: 2]
  ------------------
  464|      0|    {
  465|       |        // XOP is invalid in 16-bit real mode
  466|      0|        return ZYDIS_STATUS_DECODING_ERROR;
  ------------------
  |  |   74|      0|    ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ZYDIS, 0x01u)
  |  |  ------------------
  |  |  |  |   68|      0|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
  467|      0|    }
  468|       |
  469|      2|    instruction->attributes |= ZYDIS_ATTRIB_HAS_XOP;
  ------------------
  |  |  548|      2|#define ZYDIS_ATTRIB_HAS_XOP                    (1ULL <<  3)
  ------------------
  470|      2|    instruction->raw.xop.R       = (data[1] >> 7) & 0x01;
  471|      2|    instruction->raw.xop.X       = (data[1] >> 6) & 0x01;
  472|      2|    instruction->raw.xop.B       = (data[1] >> 5) & 0x01;
  473|      2|    instruction->raw.xop.m_mmmm  = (data[1] >> 0) & 0x1F;
  474|       |
  475|      2|    if ((instruction->raw.xop.m_mmmm < 0x08) || (instruction->raw.xop.m_mmmm > 0x0A))
  ------------------
  |  Branch (475:9): [True: 0, False: 2]
  |  Branch (475:49): [True: 0, False: 2]
  ------------------
  476|      0|    {
  477|       |        // Invalid according to the AMD documentation
  478|      0|        return ZYDIS_STATUS_INVALID_MAP;
  ------------------
  |  |  118|      0|    ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ZYDIS, 0x08u)
  |  |  ------------------
  |  |  |  |   68|      0|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
  479|      0|    }
  480|       |
  481|      2|    instruction->raw.xop.W    = (data[2] >> 7) & 0x01;
  482|      2|    instruction->raw.xop.vvvv = (data[2] >> 3) & 0x0F;
  483|      2|    instruction->raw.xop.L    = (data[2] >> 2) & 0x01;
  484|      2|    instruction->raw.xop.pp   = (data[2] >> 0) & 0x03;
  485|       |
  486|       |    // Update internal fields
  487|      2|    context->vector_unified.W    = instruction->raw.xop.W;
  488|      2|    context->vector_unified.R3   = 0x01 & ~instruction->raw.xop.R;
  489|      2|    context->vector_unified.X3   = 0x01 & ~instruction->raw.xop.X;
  490|      2|    context->vector_unified.B3   = 0x01 & ~instruction->raw.xop.B;
  491|      2|    context->vector_unified.LL   = instruction->raw.xop.L;
  492|      2|    context->vector_unified.vvvv = (0x0F & ~instruction->raw.xop.vvvv);
  493|       |
  494|      2|    return ZYAN_STATUS_SUCCESS;
  ------------------
  |  |  164|      2|    ZYAN_MAKE_STATUS(0u, ZYAN_MODULE_ZYCORE, 0x00u)
  |  |  ------------------
  |  |  |  |   68|      2|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
  495|      2|}
Decoder.c:ZydisDecodeREX2:
  421|     22|{
  422|     22|    ZYAN_ASSERT(instruction);
  ------------------
  |  |  381|     22|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (422:5): [True: 0, False: 22]
  |  Branch (422:5): [True: 22, False: 0]
  ------------------
  423|     22|    ZYAN_ASSERT(instruction->raw.rex2.offset == instruction->length - 2);
  ------------------
  |  |  381|     22|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (423:5): [True: 0, False: 22]
  |  Branch (423:5): [True: 22, False: 0]
  ------------------
  424|       |
  425|     22|    instruction->attributes |= ZYDIS_ATTRIB_HAS_REX2;
  ------------------
  |  |  751|     22|#define ZYDIS_ATTRIB_HAS_REX2                   (1ULL << 46) // TODO: rebase
  ------------------
  426|     22|    instruction->raw.rex2.B3 = (payload >> 0) & 0x01;
  427|     22|    instruction->raw.rex2.X3 = (payload >> 1) & 0x01;
  428|     22|    instruction->raw.rex2.R3 = (payload >> 2) & 0x01;
  429|     22|    instruction->raw.rex2.W  = (payload >> 3) & 0x01;
  430|     22|    instruction->raw.rex2.B4 = (payload >> 4) & 0x01;
  431|     22|    instruction->raw.rex2.X4 = (payload >> 5) & 0x01;
  432|     22|    instruction->raw.rex2.R4 = (payload >> 6) & 0x01;
  433|     22|    instruction->raw.rex2.M0 = (payload >> 7) & 0x01;
  434|       |
  435|       |
  436|       |    // Update internal fields
  437|     22|    context->vector_unified.W  = instruction->raw.rex2.W;
  438|     22|    context->vector_unified.R3  = instruction->raw.rex2.R3;
  439|     22|    context->vector_unified.R4 = instruction->raw.rex2.R4;
  440|     22|    context->vector_unified.X3 = instruction->raw.rex2.X3;
  441|     22|    context->vector_unified.X4 = instruction->raw.rex2.X4;
  442|     22|    context->vector_unified.B3 = instruction->raw.rex2.B3;
  443|     22|    context->vector_unified.B4 = instruction->raw.rex2.B4;
  444|     22|}
Decoder.c:ZydisSetEffectiveOperandWidth:
 3445|    174|{
 3446|    174|    ZYAN_ASSERT(context);
  ------------------
  |  |  381|    174|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (3446:5): [True: 0, False: 174]
  |  Branch (3446:5): [True: 174, False: 0]
  ------------------
 3447|    174|    ZYAN_ASSERT(instruction);
  ------------------
  |  |  381|    174|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (3447:5): [True: 0, False: 174]
  |  Branch (3447:5): [True: 174, False: 0]
  ------------------
 3448|    174|    ZYAN_ASSERT(definition);
  ------------------
  |  |  381|    174|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (3448:5): [True: 0, False: 174]
  |  Branch (3448:5): [True: 174, False: 0]
  ------------------
 3449|       |
 3450|    174|    static const ZyanU8 operand_size_map[8][8] =
 3451|    174|    {
 3452|       |        // Default for most instructions
 3453|    174|        {
 3454|    174|            16, // 16 __ W0
 3455|    174|            32, // 16 66 W0
 3456|    174|            32, // 32 __ W0
 3457|    174|            16, // 32 66 W0
 3458|    174|            32, // 64 __ W0
 3459|    174|            16, // 64 66 W0
 3460|    174|            64, // 64 __ W1
 3461|    174|            64  // 64 66 W1
 3462|    174|        },
 3463|       |        // Operand size is forced to 8-bit (this is done later to preserve the `eosz_index`)
 3464|    174|        {
 3465|    174|            16, // 16 __ W0
 3466|    174|            32, // 16 66 W0
 3467|    174|            32, // 32 __ W0
 3468|    174|            16, // 32 66 W0
 3469|    174|            32, // 64 __ W0
 3470|    174|            16, // 64 66 W0
 3471|    174|            64, // 64 __ W1
 3472|    174|            64  // 64 66 W1
 3473|    174|        },
 3474|       |        // Operand size override 0x66 is ignored
 3475|    174|        {
 3476|    174|            16, // 16 __ W0
 3477|    174|            16, // 16 66 W0
 3478|    174|            32, // 32 __ W0
 3479|    174|            32, // 32 66 W0
 3480|    174|            32, // 64 __ W0
 3481|    174|            32, // 64 66 W0
 3482|    174|            64, // 64 __ W1
 3483|    174|            64  // 64 66 W1
 3484|    174|        },
 3485|       |        // REX.W promotes to 32-bit instead of 64-bit
 3486|    174|        {
 3487|    174|            16, // 16 __ W0
 3488|    174|            32, // 16 66 W0
 3489|    174|            32, // 32 __ W0
 3490|    174|            16, // 32 66 W0
 3491|    174|            32, // 64 __ W0
 3492|    174|            16, // 64 66 W0
 3493|    174|            32, // 64 __ W1
 3494|    174|            32  // 64 66 W1
 3495|    174|        },
 3496|       |        // Operand size defaults to 64-bit in 64-bit mode
 3497|    174|        {
 3498|    174|            16, // 16 __ W0
 3499|    174|            32, // 16 66 W0
 3500|    174|            32, // 32 __ W0
 3501|    174|            16, // 32 66 W0
 3502|    174|            64, // 64 __ W0
 3503|    174|            16, // 64 66 W0
 3504|    174|            64, // 64 __ W1
 3505|    174|            64  // 64 66 W1
 3506|    174|        },
 3507|       |        // Operand size is forced to 64-bit in 64-bit mode
 3508|    174|        {
 3509|    174|            16, // 16 __ W0
 3510|    174|            32, // 16 66 W0
 3511|    174|            32, // 32 __ W0
 3512|    174|            16, // 32 66 W0
 3513|    174|            64, // 64 __ W0
 3514|    174|            64, // 64 66 W0
 3515|    174|            64, // 64 __ W1
 3516|    174|            64  // 64 66 W1
 3517|    174|        },
 3518|       |        // Operand size is forced to 32-bit, if no REX.W is present.
 3519|    174|        {
 3520|    174|            32, // 16 __ W0
 3521|    174|            32, // 16 66 W0
 3522|    174|            32, // 32 __ W0
 3523|    174|            32, // 32 66 W0
 3524|    174|            32, // 64 __ W0
 3525|    174|            32, // 64 66 W0
 3526|    174|            64, // 64 __ W1
 3527|    174|            64  // 64 66 W1
 3528|    174|        },
 3529|       |        // Operand size is forced to 64-bit in 64-bit mode and forced to 32-bit in all other modes.
 3530|       |        // This is used for e.g. `mov CR, GPR` and `mov GPR, CR`.
 3531|    174|        {
 3532|    174|            32, // 16 __ W0
 3533|    174|            32, // 16 66 W0
 3534|    174|            32, // 32 __ W0
 3535|    174|            32, // 32 66 W0
 3536|    174|            64, // 64 __ W0
 3537|    174|            64, // 64 66 W0
 3538|    174|            64, // 64 __ W1
 3539|    174|            64  // 64 66 W1
 3540|    174|        }
 3541|    174|    };
 3542|       |
 3543|    174|    ZyanU8 index = (instruction->attributes & ZYDIS_ATTRIB_HAS_OPERANDSIZE) ? 1 : 0;
  ------------------
  |  |  737|    174|#define ZYDIS_ATTRIB_HAS_OPERANDSIZE            (1ULL << 43) // TODO: rename
  ------------------
  |  Branch (3543:20): [True: 32, False: 142]
  ------------------
 3544|       |
 3545|    174|    if ((instruction->encoding == ZYDIS_INSTRUCTION_ENCODING_EVEX) &&
  ------------------
  |  Branch (3545:9): [True: 32, False: 142]
  ------------------
 3546|     32|        (instruction->opcode_map == ZYDIS_OPCODE_MAP_MAP4) &&
  ------------------
  |  Branch (3546:9): [True: 16, False: 16]
  ------------------
 3547|     16|        (instruction->raw.evex.pp == 0x01))
  ------------------
  |  Branch (3547:9): [True: 4, False: 12]
  ------------------
 3548|      4|    {
 3549|       |        // TODO: Add generator flag
 3550|       |
 3551|       |        // EVEX encoded instructions in MAP4 must use 0x66 as the mandatory prefix AND the
 3552|       |        // operand-size override
 3553|      4|        index = 1;
 3554|      4|    }
 3555|       |
 3556|    174|    if ((instruction->machine_mode == ZYDIS_MACHINE_MODE_LONG_COMPAT_32) ||
  ------------------
  |  Branch (3556:9): [True: 2, False: 172]
  ------------------
 3557|    172|        (instruction->machine_mode == ZYDIS_MACHINE_MODE_LEGACY_32))
  ------------------
  |  Branch (3557:9): [True: 0, False: 172]
  ------------------
 3558|      2|    {
 3559|      2|        index += 2;
 3560|      2|    }
 3561|    172|    else if (instruction->machine_mode == ZYDIS_MACHINE_MODE_LONG_64)
  ------------------
  |  Branch (3561:14): [True: 124, False: 48]
  ------------------
 3562|    124|    {
 3563|    124|        index += 4;
 3564|    124|        index += (context->vector_unified.W & 0x01) << 1;
 3565|    124|    }
 3566|       |
 3567|    174|    ZYAN_ASSERT(definition->operand_size_map < ZYAN_ARRAY_LENGTH(operand_size_map));
  ------------------
  |  |  381|    174|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (3567:5): [True: 0, False: 174]
  |  Branch (3567:5): [True: 174, False: 0]
  ------------------
 3568|    174|    ZYAN_ASSERT(index < ZYAN_ARRAY_LENGTH(operand_size_map[definition->operand_size_map]));
  ------------------
  |  |  381|    174|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (3568:5): [True: 0, False: 174]
  |  Branch (3568:5): [True: 174, False: 0]
  ------------------
 3569|       |
 3570|    174|    instruction->operand_width = operand_size_map[definition->operand_size_map][index];
 3571|    174|    context->eosz_index = instruction->operand_width >> 5;
 3572|       |
 3573|       |    // TODO: Cleanup code and remove hardcoded condition
 3574|    174|    if (definition->operand_size_map == 1)
  ------------------
  |  Branch (3574:9): [True: 16, False: 158]
  ------------------
 3575|     16|    {
 3576|     16|        instruction->operand_width = 8;
 3577|     16|    }
 3578|    174|}
Decoder.c:ZydisSetEffectiveAddressWidth:
 3589|    174|{
 3590|    174|    ZYAN_ASSERT(context);
  ------------------
  |  |  381|    174|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (3590:5): [True: 0, False: 174]
  |  Branch (3590:5): [True: 174, False: 0]
  ------------------
 3591|    174|    ZYAN_ASSERT(instruction);
  ------------------
  |  |  381|    174|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (3591:5): [True: 0, False: 174]
  |  Branch (3591:5): [True: 174, False: 0]
  ------------------
 3592|       |
 3593|    174|    static const ZyanU8 address_size_map[3][8] =
 3594|    174|    {
 3595|       |        // Default for most instructions
 3596|    174|        {
 3597|    174|            16, // 16 __
 3598|    174|            32, // 16 67
 3599|    174|            32, // 32 __
 3600|    174|            16, // 32 67
 3601|    174|            64, // 64 __
 3602|    174|            32  // 64 67
 3603|    174|        },
 3604|       |        // The address-size override is ignored
 3605|    174|        {
 3606|    174|            16, // 16 __
 3607|    174|            16, // 16 67
 3608|    174|            32, // 32 __
 3609|    174|            32, // 32 67
 3610|    174|            64, // 64 __
 3611|    174|            64  // 64 67
 3612|    174|        },
 3613|       |        // The address-size is forced to 64-bit in 64-bit mode and 32-bit in non 64-bit mode. This
 3614|       |        // is used by e.g. `ENCLS`, `ENCLV`, `ENCLU`.
 3615|    174|        {
 3616|    174|            32, // 16 __
 3617|    174|            32, // 16 67
 3618|    174|            32, // 32 __
 3619|    174|            32, // 32 67
 3620|    174|            64, // 64 __
 3621|    174|            64  // 64 67
 3622|    174|        }
 3623|    174|    };
 3624|       |
 3625|    174|    ZyanU8 index = (instruction->attributes & ZYDIS_ATTRIB_HAS_ADDRESSSIZE) ? 1 : 0;
  ------------------
  |  |  741|    174|#define ZYDIS_ATTRIB_HAS_ADDRESSSIZE            (1ULL << 44) // TODO: rename
  ------------------
  |  Branch (3625:20): [True: 28, False: 146]
  ------------------
 3626|    174|    if ((instruction->machine_mode == ZYDIS_MACHINE_MODE_LONG_COMPAT_32) ||
  ------------------
  |  Branch (3626:9): [True: 2, False: 172]
  ------------------
 3627|    172|        (instruction->machine_mode == ZYDIS_MACHINE_MODE_LEGACY_32))
  ------------------
  |  Branch (3627:9): [True: 0, False: 172]
  ------------------
 3628|      2|    {
 3629|      2|        index += 2;
 3630|      2|    }
 3631|    172|    else if (instruction->machine_mode == ZYDIS_MACHINE_MODE_LONG_64)
  ------------------
  |  Branch (3631:14): [True: 124, False: 48]
  ------------------
 3632|    124|    {
 3633|    124|        index += 4;
 3634|    124|    }
 3635|       |
 3636|    174|    ZYAN_ASSERT(definition->address_size_map < ZYAN_ARRAY_LENGTH(address_size_map));
  ------------------
  |  |  381|    174|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (3636:5): [True: 0, False: 174]
  |  Branch (3636:5): [True: 174, False: 0]
  ------------------
 3637|    174|    ZYAN_ASSERT(index < ZYAN_ARRAY_LENGTH(address_size_map[definition->address_size_map]));
  ------------------
  |  |  381|    174|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (3637:5): [True: 0, False: 174]
  |  Branch (3637:5): [True: 174, False: 0]
  ------------------
 3638|       |
 3639|    174|    instruction->address_width = address_size_map[definition->address_size_map][index];
 3640|    174|    context->easz_index = instruction->address_width >> 5;
 3641|    174|}
Decoder.c:ZydisDecodeOptionalInstructionParts:
 3310|    174|{
 3311|    174|    ZYAN_ASSERT(state);
  ------------------
  |  |  381|    174|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (3311:5): [True: 0, False: 174]
  |  Branch (3311:5): [True: 174, False: 0]
  ------------------
 3312|    174|    ZYAN_ASSERT(instruction);
  ------------------
  |  |  381|    174|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (3312:5): [True: 0, False: 174]
  |  Branch (3312:5): [True: 174, False: 0]
  ------------------
 3313|    174|    ZYAN_ASSERT(info);
  ------------------
  |  |  381|    174|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (3313:5): [True: 0, False: 174]
  |  Branch (3313:5): [True: 174, False: 0]
  ------------------
 3314|       |
 3315|    174|    ZydisDecoderContext* context = state->context;
 3316|       |
 3317|    174|    if (info->flags & ZYDIS_INSTR_ENC_FLAG_HAS_MODRM)
  ------------------
  |  |  263|    174|#define ZYDIS_INSTR_ENC_FLAG_HAS_MODRM      0x01
  ------------------
  |  Branch (3317:9): [True: 92, False: 82]
  ------------------
 3318|     92|    {
 3319|     92|        if (!instruction->raw.modrm.offset)
  ------------------
  |  Branch (3319:13): [True: 0, False: 92]
  ------------------
 3320|      0|        {
 3321|      0|            instruction->raw.modrm.offset = instruction->length;
 3322|      0|            ZyanU8 modrm_byte;
 3323|      0|            ZYAN_CHECK(ZydisInputNext(state, instruction, &modrm_byte));
  ------------------
  |  |  100|      0|    do \
  |  |  101|      0|    { \
  |  |  102|      0|        const ZyanStatus status_047620348 = (status); \
  |  |  103|      0|        if (!ZYAN_SUCCESS(status_047620348)) \
  |  |  ------------------
  |  |  |  |   82|      0|    (!((status) & 0x80000000u))
  |  |  ------------------
  |  |  |  Branch (103:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  104|      0|        { \
  |  |  105|      0|            return status_047620348; \
  |  |  106|      0|        } \
  |  |  107|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (107:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 3324|      0|            ZydisDecodeModRM(instruction, modrm_byte);
 3325|      0|        }
 3326|       |
 3327|     92|        if (!(info->flags & ZYDIS_INSTR_ENC_FLAG_FORCE_REG_FORM))
  ------------------
  |  |  286|     92|#define ZYDIS_INSTR_ENC_FLAG_FORCE_REG_FORM 0x10
  ------------------
  |  Branch (3327:13): [True: 92, False: 0]
  ------------------
 3328|     92|        {
 3329|     92|            ZyanU8 has_sib = 0;
 3330|     92|            ZyanU8 displacement_size = 0;
 3331|     92|            switch (instruction->address_width)
 3332|     92|            {
 3333|     12|            case 16:
  ------------------
  |  Branch (3333:13): [True: 12, False: 80]
  ------------------
 3334|     12|                switch (instruction->raw.modrm.mod)
 3335|     12|                {
 3336|      2|                case 0:
  ------------------
  |  Branch (3336:17): [True: 2, False: 10]
  ------------------
 3337|      2|                    if (instruction->raw.modrm.rm == 6)
  ------------------
  |  Branch (3337:25): [True: 2, False: 0]
  ------------------
 3338|      2|                    {
 3339|      2|                        displacement_size = 16;
 3340|      2|                    }
 3341|      2|                    break;
 3342|      0|                case 1:
  ------------------
  |  Branch (3342:17): [True: 0, False: 12]
  ------------------
 3343|      0|                    displacement_size = 8;
 3344|      0|                    break;
 3345|      0|                case 2:
  ------------------
  |  Branch (3345:17): [True: 0, False: 12]
  ------------------
 3346|      0|                    displacement_size = 16;
 3347|      0|                    break;
 3348|     10|                case 3:
  ------------------
  |  Branch (3348:17): [True: 10, False: 2]
  ------------------
 3349|     10|                    break;
 3350|      0|                default:
  ------------------
  |  Branch (3350:17): [True: 0, False: 12]
  ------------------
 3351|      0|                    ZYAN_UNREACHABLE;
  ------------------
  |  |  431|      0|#   define ZYAN_UNREACHABLE { assert(0); abort(); }
  ------------------
  |  Branch (3351:21): [Folded, False: 0]
  |  Branch (3351:21): [Folded, False: 0]
  ------------------
 3352|     12|                }
 3353|     12|                break;
 3354|     28|            case 32:
  ------------------
  |  Branch (3354:13): [True: 28, False: 64]
  ------------------
 3355|     80|            case 64:
  ------------------
  |  Branch (3355:13): [True: 52, False: 40]
  ------------------
 3356|     80|                has_sib =
 3357|     80|                    (instruction->raw.modrm.mod != 3) && (instruction->raw.modrm.rm == 4);
  ------------------
  |  Branch (3357:21): [True: 50, False: 30]
  |  Branch (3357:58): [True: 14, False: 36]
  ------------------
 3358|     80|                switch (instruction->raw.modrm.mod)
 3359|     80|                {
 3360|     42|                case 0:
  ------------------
  |  Branch (3360:17): [True: 42, False: 38]
  ------------------
 3361|     42|                    if (instruction->raw.modrm.rm == 5)
  ------------------
  |  Branch (3361:25): [True: 28, False: 14]
  ------------------
 3362|     28|                    {
 3363|     28|                        if (instruction->machine_mode == ZYDIS_MACHINE_MODE_LONG_64)
  ------------------
  |  Branch (3363:29): [True: 28, False: 0]
  ------------------
 3364|     28|                        {
 3365|     28|                            instruction->attributes |= ZYDIS_ATTRIB_IS_RELATIVE;
  ------------------
  |  |  564|     28|#define ZYDIS_ATTRIB_IS_RELATIVE                (1ULL <<  7)
  ------------------
 3366|     28|                        }
 3367|     28|                        displacement_size = 32;
 3368|     28|                    }
 3369|     42|                    break;
 3370|      2|                case 1:
  ------------------
  |  Branch (3370:17): [True: 2, False: 78]
  ------------------
 3371|      2|                    displacement_size = 8;
 3372|      2|                    break;
 3373|      6|                case 2:
  ------------------
  |  Branch (3373:17): [True: 6, False: 74]
  ------------------
 3374|      6|                    displacement_size = 32;
 3375|      6|                    break;
 3376|     30|                case 3:
  ------------------
  |  Branch (3376:17): [True: 30, False: 50]
  ------------------
 3377|     30|                    break;
 3378|      0|                default:
  ------------------
  |  Branch (3378:17): [True: 0, False: 80]
  ------------------
 3379|      0|                    ZYAN_UNREACHABLE;
  ------------------
  |  |  431|      0|#   define ZYAN_UNREACHABLE { assert(0); abort(); }
  ------------------
  |  Branch (3379:21): [Folded, False: 0]
  |  Branch (3379:21): [Folded, False: 0]
  ------------------
 3380|     80|                }
 3381|     80|                break;
 3382|     80|            default:
  ------------------
  |  Branch (3382:13): [True: 0, False: 92]
  ------------------
 3383|      0|                ZYAN_UNREACHABLE;
  ------------------
  |  |  431|      0|#   define ZYAN_UNREACHABLE { assert(0); abort(); }
  ------------------
  |  Branch (3383:17): [Folded, False: 0]
  |  Branch (3383:17): [Folded, False: 0]
  ------------------
 3384|     92|            }
 3385|     92|            if (has_sib)
  ------------------
  |  Branch (3385:17): [True: 14, False: 78]
  ------------------
 3386|     14|            {
 3387|     14|                instruction->raw.sib.offset = instruction->length;
 3388|     14|                ZyanU8 sib_byte;
 3389|     14|                ZYAN_CHECK(ZydisInputNext(state, instruction, &sib_byte));
  ------------------
  |  |  100|     14|    do \
  |  |  101|     14|    { \
  |  |  102|     14|        const ZyanStatus status_047620348 = (status); \
  |  |  103|     14|        if (!ZYAN_SUCCESS(status_047620348)) \
  |  |  ------------------
  |  |  |  |   82|     14|    (!((status) & 0x80000000u))
  |  |  ------------------
  |  |  |  Branch (103:13): [True: 0, False: 14]
  |  |  ------------------
  |  |  104|     14|        { \
  |  |  105|      0|            return status_047620348; \
  |  |  106|      0|        } \
  |  |  107|     14|    } while (0)
  |  |  ------------------
  |  |  |  Branch (107:14): [Folded, False: 14]
  |  |  ------------------
  ------------------
 3390|     14|                ZydisDecodeSIB(instruction, sib_byte);
 3391|     14|                if (instruction->raw.sib.base == 5)
  ------------------
  |  Branch (3391:21): [True: 12, False: 2]
  ------------------
 3392|     12|                {
 3393|     12|                    displacement_size = (instruction->raw.modrm.mod == 1) ? 8 : 32;
  ------------------
  |  Branch (3393:41): [True: 2, False: 10]
  ------------------
 3394|     12|                }
 3395|     14|            }
 3396|     92|            if (displacement_size)
  ------------------
  |  Branch (3396:17): [True: 48, False: 44]
  ------------------
 3397|     48|            {
 3398|     48|                ZYAN_CHECK(ZydisReadDisplacement(state, instruction, displacement_size));
  ------------------
  |  |  100|     48|    do \
  |  |  101|     48|    { \
  |  |  102|     48|        const ZyanStatus status_047620348 = (status); \
  |  |  103|     48|        if (!ZYAN_SUCCESS(status_047620348)) \
  |  |  ------------------
  |  |  |  |   82|     48|    (!((status) & 0x80000000u))
  |  |  ------------------
  |  |  |  Branch (103:13): [True: 0, False: 48]
  |  |  ------------------
  |  |  104|     48|        { \
  |  |  105|      0|            return status_047620348; \
  |  |  106|      0|        } \
  |  |  107|     48|    } while (0)
  |  |  ------------------
  |  |  |  Branch (107:14): [Folded, False: 48]
  |  |  ------------------
  ------------------
 3399|     48|            }
 3400|     92|        }
 3401|       |
 3402|     92|        context->reg_info.is_mod_reg = (instruction->raw.modrm.mod == 3) ||
  ------------------
  |  Branch (3402:40): [True: 40, False: 52]
  ------------------
 3403|     52|                                       (info->flags & ZYDIS_INSTR_ENC_FLAG_FORCE_REG_FORM);
  ------------------
  |  |  286|     52|#define ZYDIS_INSTR_ENC_FLAG_FORCE_REG_FORM 0x10
  ------------------
  |  Branch (3403:40): [True: 0, False: 52]
  ------------------
 3404|     92|    }
 3405|       |
 3406|    174|    if (info->flags & ZYDIS_INSTR_ENC_FLAG_HAS_DISP)
  ------------------
  |  |  268|    174|#define ZYDIS_INSTR_ENC_FLAG_HAS_DISP       0x02
  ------------------
  |  Branch (3406:9): [True: 0, False: 174]
  ------------------
 3407|      0|    {
 3408|      0|        ZYAN_CHECK(ZydisReadDisplacement(
  ------------------
  |  |  100|      0|    do \
  |  |  101|      0|    { \
  |  |  102|      0|        const ZyanStatus status_047620348 = (status); \
  |  |  103|      0|        if (!ZYAN_SUCCESS(status_047620348)) \
  |  |  ------------------
  |  |  |  |   82|      0|    (!((status) & 0x80000000u))
  |  |  ------------------
  |  |  |  Branch (103:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  104|      0|        { \
  |  |  105|      0|            return status_047620348; \
  |  |  106|      0|        } \
  |  |  107|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (107:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 3409|      0|            state, instruction, info->disp.size[context->easz_index]));
 3410|      0|    }
 3411|       |
 3412|    174|    if (info->flags & ZYDIS_INSTR_ENC_FLAG_HAS_IMM0)
  ------------------
  |  |  273|    174|#define ZYDIS_INSTR_ENC_FLAG_HAS_IMM0       0x04
  ------------------
  |  Branch (3412:9): [True: 90, False: 84]
  ------------------
 3413|     90|    {
 3414|     90|        if (info->imm[0].is_relative)
  ------------------
  |  Branch (3414:13): [True: 26, False: 64]
  ------------------
 3415|     26|        {
 3416|     26|            instruction->attributes |= ZYDIS_ATTRIB_IS_RELATIVE;
  ------------------
  |  |  564|     26|#define ZYDIS_ATTRIB_IS_RELATIVE                (1ULL <<  7)
  ------------------
 3417|     26|        }
 3418|     90|        ZYAN_CHECK(ZydisReadImmediate(state, instruction, 0,
  ------------------
  |  |  100|     90|    do \
  |  |  101|     90|    { \
  |  |  102|     90|        const ZyanStatus status_047620348 = (status); \
  |  |  103|     90|        if (!ZYAN_SUCCESS(status_047620348)) \
  |  |  ------------------
  |  |  |  |   82|     90|    (!((status) & 0x80000000u))
  |  |  ------------------
  |  |  |  Branch (103:13): [True: 0, False: 90]
  |  |  ------------------
  |  |  104|     90|        { \
  |  |  105|      0|            return status_047620348; \
  |  |  106|      0|        } \
  |  |  107|     90|    } while (0)
  |  |  ------------------
  |  |  |  Branch (107:14): [Folded, False: 90]
  |  |  ------------------
  ------------------
 3419|     90|            info->imm[0].size[context->eosz_index], info->imm[0].is_signed,
 3420|     90|            info->imm[0].is_address, info->imm[0].is_relative));
 3421|     90|    }
 3422|       |
 3423|    174|    if (info->flags & ZYDIS_INSTR_ENC_FLAG_HAS_IMM1)
  ------------------
  |  |  278|    174|#define ZYDIS_INSTR_ENC_FLAG_HAS_IMM1       0x08
  ------------------
  |  Branch (3423:9): [True: 8, False: 166]
  ------------------
 3424|      8|    {
 3425|      8|        ZYAN_ASSERT(!(info->flags & ZYDIS_INSTR_ENC_FLAG_HAS_DISP));
  ------------------
  |  |  381|      8|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (3425:9): [True: 0, False: 8]
  |  Branch (3425:9): [True: 8, False: 0]
  ------------------
 3426|      8|        ZYAN_CHECK(ZydisReadImmediate(state, instruction, 1,
  ------------------
  |  |  100|      8|    do \
  |  |  101|      8|    { \
  |  |  102|      8|        const ZyanStatus status_047620348 = (status); \
  |  |  103|      8|        if (!ZYAN_SUCCESS(status_047620348)) \
  |  |  ------------------
  |  |  |  |   82|      8|    (!((status) & 0x80000000u))
  |  |  ------------------
  |  |  |  Branch (103:13): [True: 0, False: 8]
  |  |  ------------------
  |  |  104|      8|        { \
  |  |  105|      0|            return status_047620348; \
  |  |  106|      0|        } \
  |  |  107|      8|    } while (0)
  |  |  ------------------
  |  |  |  Branch (107:14): [Folded, False: 8]
  |  |  ------------------
  ------------------
 3427|      8|            info->imm[1].size[context->eosz_index], info->imm[1].is_signed, 
 3428|      8|            info->imm[1].is_address, info->imm[1].is_relative));
 3429|      8|    }
 3430|       |
 3431|    174|    return ZYAN_STATUS_SUCCESS;
  ------------------
  |  |  164|    174|    ZYAN_MAKE_STATUS(0u, ZYAN_MODULE_ZYCORE, 0x00u)
  |  |  ------------------
  |  |  |  |   68|    174|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
 3432|    174|}
Decoder.c:ZydisDecodeModRM:
  739|     92|{
  740|     92|    ZYAN_ASSERT(instruction);
  ------------------
  |  |  381|     92|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (740:5): [True: 0, False: 92]
  |  Branch (740:5): [True: 92, False: 0]
  ------------------
  741|     92|    ZYAN_ASSERT(!(instruction->attributes & ZYDIS_ATTRIB_HAS_MODRM));
  ------------------
  |  |  381|     92|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (741:5): [True: 0, False: 92]
  |  Branch (741:5): [True: 92, False: 0]
  ------------------
  742|     92|    ZYAN_ASSERT(instruction->raw.modrm.offset == instruction->length - 1);
  ------------------
  |  |  381|     92|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (742:5): [True: 0, False: 92]
  |  Branch (742:5): [True: 92, False: 0]
  ------------------
  743|       |
  744|     92|    instruction->attributes   |= ZYDIS_ATTRIB_HAS_MODRM;
  ------------------
  |  |  536|     92|#define ZYDIS_ATTRIB_HAS_MODRM                  (1ULL <<  0)
  ------------------
  745|     92|    instruction->raw.modrm.mod = (data >> 6) & 0x03;
  746|     92|    instruction->raw.modrm.reg = (data >> 3) & 0x07;
  747|     92|    instruction->raw.modrm.rm  = (data >> 0) & 0x07;
  748|     92|}
Decoder.c:ZydisDecodeSIB:
  757|     14|{
  758|     14|    ZYAN_ASSERT(instruction);
  ------------------
  |  |  381|     14|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (758:5): [True: 0, False: 14]
  |  Branch (758:5): [True: 14, False: 0]
  ------------------
  759|     14|    ZYAN_ASSERT(instruction->attributes & ZYDIS_ATTRIB_HAS_MODRM);
  ------------------
  |  |  381|     14|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (759:5): [True: 0, False: 14]
  |  Branch (759:5): [True: 14, False: 0]
  ------------------
  760|     14|    ZYAN_ASSERT(instruction->raw.modrm.rm == 4);
  ------------------
  |  |  381|     14|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (760:5): [True: 0, False: 14]
  |  Branch (760:5): [True: 14, False: 0]
  ------------------
  761|     14|    ZYAN_ASSERT(!(instruction->attributes & ZYDIS_ATTRIB_HAS_SIB));
  ------------------
  |  |  381|     14|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (761:5): [True: 0, False: 14]
  |  Branch (761:5): [True: 14, False: 0]
  ------------------
  762|     14|    ZYAN_ASSERT(instruction->raw.sib.offset == instruction->length - 1);
  ------------------
  |  |  381|     14|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (762:5): [True: 0, False: 14]
  |  Branch (762:5): [True: 14, False: 0]
  ------------------
  763|       |
  764|     14|    instruction->attributes    |= ZYDIS_ATTRIB_HAS_SIB;
  ------------------
  |  |  540|     14|#define ZYDIS_ATTRIB_HAS_SIB                    (1ULL <<  1)
  ------------------
  765|     14|    instruction->raw.sib.scale = (data >> 6) & 0x03;
  766|     14|    instruction->raw.sib.index = (data >> 3) & 0x07;
  767|     14|    instruction->raw.sib.base  = (data >> 0) & 0x07;
  768|     14|}
Decoder.c:ZydisReadDisplacement:
  783|     48|{
  784|     48|    ZYAN_ASSERT(state);
  ------------------
  |  |  381|     48|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (784:5): [True: 0, False: 48]
  |  Branch (784:5): [True: 48, False: 0]
  ------------------
  785|     48|    ZYAN_ASSERT(instruction);
  ------------------
  |  |  381|     48|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (785:5): [True: 0, False: 48]
  |  Branch (785:5): [True: 48, False: 0]
  ------------------
  786|     48|    ZYAN_ASSERT(instruction->raw.disp.size == 0);
  ------------------
  |  |  381|     48|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (786:5): [True: 0, False: 48]
  |  Branch (786:5): [True: 48, False: 0]
  ------------------
  787|       |
  788|     48|    instruction->raw.disp.size = size;
  789|     48|    instruction->raw.disp.offset = instruction->length;
  790|       |
  791|     48|    switch (size)
  792|     48|    {
  793|      2|    case 8:
  ------------------
  |  Branch (793:5): [True: 2, False: 46]
  ------------------
  794|      2|    {
  795|      2|        ZyanU8 value;
  796|      2|        ZYAN_CHECK(ZydisInputNext(state, instruction, &value));
  ------------------
  |  |  100|      2|    do \
  |  |  101|      2|    { \
  |  |  102|      2|        const ZyanStatus status_047620348 = (status); \
  |  |  103|      2|        if (!ZYAN_SUCCESS(status_047620348)) \
  |  |  ------------------
  |  |  |  |   82|      2|    (!((status) & 0x80000000u))
  |  |  ------------------
  |  |  |  Branch (103:13): [True: 0, False: 2]
  |  |  ------------------
  |  |  104|      2|        { \
  |  |  105|      0|            return status_047620348; \
  |  |  106|      0|        } \
  |  |  107|      2|    } while (0)
  |  |  ------------------
  |  |  |  Branch (107:14): [Folded, False: 2]
  |  |  ------------------
  ------------------
  797|      2|        instruction->raw.disp.value = *(ZyanI8*)&value;
  798|      2|        break;
  799|      2|    }
  800|      2|    case 16:
  ------------------
  |  Branch (800:5): [True: 2, False: 46]
  ------------------
  801|      2|    {
  802|      2|        ZyanU16 value;
  803|      2|        ZYAN_CHECK(ZydisInputNextBytes(state, instruction, (ZyanU8*)&value, 2));
  ------------------
  |  |  100|      2|    do \
  |  |  101|      2|    { \
  |  |  102|      2|        const ZyanStatus status_047620348 = (status); \
  |  |  103|      2|        if (!ZYAN_SUCCESS(status_047620348)) \
  |  |  ------------------
  |  |  |  |   82|      2|    (!((status) & 0x80000000u))
  |  |  ------------------
  |  |  |  Branch (103:13): [True: 0, False: 2]
  |  |  ------------------
  |  |  104|      2|        { \
  |  |  105|      0|            return status_047620348; \
  |  |  106|      0|        } \
  |  |  107|      2|    } while (0)
  |  |  ------------------
  |  |  |  Branch (107:14): [Folded, False: 2]
  |  |  ------------------
  ------------------
  804|      2|        ZYAN_LE16_TO_NATIVE(value);
  805|      2|        instruction->raw.disp.value = *(ZyanI16*)&value;
  806|      2|        break;
  807|      2|    }
  808|     44|    case 32:
  ------------------
  |  Branch (808:5): [True: 44, False: 4]
  ------------------
  809|     44|    {
  810|     44|        ZyanU32 value;
  811|     44|        ZYAN_CHECK(ZydisInputNextBytes(state, instruction, (ZyanU8*)&value, 4));
  ------------------
  |  |  100|     44|    do \
  |  |  101|     44|    { \
  |  |  102|     44|        const ZyanStatus status_047620348 = (status); \
  |  |  103|     44|        if (!ZYAN_SUCCESS(status_047620348)) \
  |  |  ------------------
  |  |  |  |   82|     44|    (!((status) & 0x80000000u))
  |  |  ------------------
  |  |  |  Branch (103:13): [True: 0, False: 44]
  |  |  ------------------
  |  |  104|     44|        { \
  |  |  105|      0|            return status_047620348; \
  |  |  106|      0|        } \
  |  |  107|     44|    } while (0)
  |  |  ------------------
  |  |  |  Branch (107:14): [Folded, False: 44]
  |  |  ------------------
  ------------------
  812|     44|        ZYAN_LE32_TO_NATIVE(value);
  813|     44|        instruction->raw.disp.value = *(ZyanI32*)&value;
  814|     44|        break;
  815|     44|    }
  816|      0|    case 64:
  ------------------
  |  Branch (816:5): [True: 0, False: 48]
  ------------------
  817|      0|    {
  818|      0|        ZyanU64 value;
  819|      0|        ZYAN_CHECK(ZydisInputNextBytes(state, instruction, (ZyanU8*)&value, 8));
  ------------------
  |  |  100|      0|    do \
  |  |  101|      0|    { \
  |  |  102|      0|        const ZyanStatus status_047620348 = (status); \
  |  |  103|      0|        if (!ZYAN_SUCCESS(status_047620348)) \
  |  |  ------------------
  |  |  |  |   82|      0|    (!((status) & 0x80000000u))
  |  |  ------------------
  |  |  |  Branch (103:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  104|      0|        { \
  |  |  105|      0|            return status_047620348; \
  |  |  106|      0|        } \
  |  |  107|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (107:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  820|      0|        ZYAN_LE64_TO_NATIVE(value);
  821|      0|        instruction->raw.disp.value = *(ZyanI64*)&value;
  822|      0|        break;
  823|      0|    }
  824|      0|    default:
  ------------------
  |  Branch (824:5): [True: 0, False: 48]
  ------------------
  825|      0|        ZYAN_UNREACHABLE;
  ------------------
  |  |  431|      0|#   define ZYAN_UNREACHABLE { assert(0); abort(); }
  ------------------
  |  Branch (825:9): [Folded, False: 0]
  |  Branch (825:9): [Folded, False: 0]
  ------------------
  826|     48|    }
  827|       |
  828|     48|    return ZYAN_STATUS_SUCCESS;
  ------------------
  |  |  164|     48|    ZYAN_MAKE_STATUS(0u, ZYAN_MODULE_ZYCORE, 0x00u)
  |  |  ------------------
  |  |  |  |   68|     48|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
  829|     48|}
Decoder.c:ZydisReadImmediate:
  846|     98|{
  847|     98|    ZYAN_ASSERT(state);
  ------------------
  |  |  381|     98|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (847:5): [True: 0, False: 98]
  |  Branch (847:5): [True: 98, False: 0]
  ------------------
  848|     98|    ZYAN_ASSERT(instruction);
  ------------------
  |  |  381|     98|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (848:5): [True: 0, False: 98]
  |  Branch (848:5): [True: 98, False: 0]
  ------------------
  849|     98|    ZYAN_ASSERT((id == 0) || (id == 1));
  ------------------
  |  |  381|     98|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (849:5): [True: 98, False: 0]
  |  Branch (849:5): [True: 0, False: 0]
  |  Branch (849:5): [True: 90, False: 8]
  |  Branch (849:5): [True: 8, False: 0]
  ------------------
  850|     98|    ZYAN_ASSERT(is_signed || !is_relative);
  ------------------
  |  |  381|     98|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (850:5): [True: 98, False: 0]
  |  Branch (850:5): [True: 0, False: 0]
  |  Branch (850:5): [True: 78, False: 20]
  |  Branch (850:5): [True: 20, False: 0]
  ------------------
  851|     98|    ZYAN_ASSERT(instruction->raw.imm[id].size == 0);
  ------------------
  |  |  381|     98|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (851:5): [True: 0, False: 98]
  |  Branch (851:5): [True: 98, False: 0]
  ------------------
  852|       |
  853|     98|    instruction->raw.imm[id].size = size;
  854|     98|    instruction->raw.imm[id].offset = instruction->length;
  855|     98|    instruction->raw.imm[id].is_signed = is_signed;
  856|     98|    instruction->raw.imm[id].is_address = is_address;
  857|     98|    instruction->raw.imm[id].is_relative = is_relative;
  858|     98|    switch (size)
  859|     98|    {
  860|      8|    case 8:
  ------------------
  |  Branch (860:5): [True: 8, False: 90]
  ------------------
  861|      8|    {
  862|      8|        ZyanU8 value;
  863|      8|        ZYAN_CHECK(ZydisInputNext(state, instruction, &value));
  ------------------
  |  |  100|      8|    do \
  |  |  101|      8|    { \
  |  |  102|      8|        const ZyanStatus status_047620348 = (status); \
  |  |  103|      8|        if (!ZYAN_SUCCESS(status_047620348)) \
  |  |  ------------------
  |  |  |  |   82|      8|    (!((status) & 0x80000000u))
  |  |  ------------------
  |  |  |  Branch (103:13): [True: 0, False: 8]
  |  |  ------------------
  |  |  104|      8|        { \
  |  |  105|      0|            return status_047620348; \
  |  |  106|      0|        } \
  |  |  107|      8|    } while (0)
  |  |  ------------------
  |  |  |  Branch (107:14): [Folded, False: 8]
  |  |  ------------------
  ------------------
  864|      8|        if (is_signed)
  ------------------
  |  Branch (864:13): [True: 6, False: 2]
  ------------------
  865|      6|        {
  866|      6|            instruction->raw.imm[id].value.s = (ZyanI8)value;
  867|      6|        } else
  868|      2|        {
  869|      2|            instruction->raw.imm[id].value.u = value;
  870|      2|        }
  871|      8|        break;
  872|      8|    }
  873|     12|    case 16:
  ------------------
  |  Branch (873:5): [True: 12, False: 86]
  ------------------
  874|     12|    {
  875|     12|        ZyanU16 value;
  876|     12|        ZYAN_CHECK(ZydisInputNextBytes(state, instruction, (ZyanU8*)&value, 2));
  ------------------
  |  |  100|     12|    do \
  |  |  101|     12|    { \
  |  |  102|     12|        const ZyanStatus status_047620348 = (status); \
  |  |  103|     12|        if (!ZYAN_SUCCESS(status_047620348)) \
  |  |  ------------------
  |  |  |  |   82|     12|    (!((status) & 0x80000000u))
  |  |  ------------------
  |  |  |  Branch (103:13): [True: 0, False: 12]
  |  |  ------------------
  |  |  104|     12|        { \
  |  |  105|      0|            return status_047620348; \
  |  |  106|      0|        } \
  |  |  107|     12|    } while (0)
  |  |  ------------------
  |  |  |  Branch (107:14): [Folded, False: 12]
  |  |  ------------------
  ------------------
  877|     12|        ZYAN_LE16_TO_NATIVE(value);
  878|     12|        if (is_signed)
  ------------------
  |  Branch (878:13): [True: 2, False: 10]
  ------------------
  879|      2|        {
  880|      2|            instruction->raw.imm[id].value.s = (ZyanI16)value;
  881|      2|        } else
  882|     10|        {
  883|     10|            instruction->raw.imm[id].value.u = value;
  884|     10|        }
  885|     12|        break;
  886|     12|    }
  887|     44|    case 32:
  ------------------
  |  Branch (887:5): [True: 44, False: 54]
  ------------------
  888|     44|    {
  889|     44|        ZyanU32 value;
  890|     44|        ZYAN_CHECK(ZydisInputNextBytes(state, instruction, (ZyanU8*)&value, 4));
  ------------------
  |  |  100|     44|    do \
  |  |  101|     44|    { \
  |  |  102|     44|        const ZyanStatus status_047620348 = (status); \
  |  |  103|     44|        if (!ZYAN_SUCCESS(status_047620348)) \
  |  |  ------------------
  |  |  |  |   82|     44|    (!((status) & 0x80000000u))
  |  |  ------------------
  |  |  |  Branch (103:13): [True: 0, False: 44]
  |  |  ------------------
  |  |  104|     44|        { \
  |  |  105|      0|            return status_047620348; \
  |  |  106|      0|        } \
  |  |  107|     44|    } while (0)
  |  |  ------------------
  |  |  |  Branch (107:14): [Folded, False: 44]
  |  |  ------------------
  ------------------
  891|     44|        ZYAN_LE32_TO_NATIVE(value);
  892|     44|        if (is_signed)
  ------------------
  |  Branch (892:13): [True: 36, False: 8]
  ------------------
  893|     36|        {
  894|     36|            instruction->raw.imm[id].value.s = (ZyanI32)value;
  895|     36|        } else
  896|      8|        {
  897|      8|            instruction->raw.imm[id].value.u = value;
  898|      8|        }
  899|     44|        break;
  900|     44|    }
  901|     34|    case 64:
  ------------------
  |  Branch (901:5): [True: 34, False: 64]
  ------------------
  902|     34|    {
  903|     34|        ZyanU64 value;
  904|     34|        ZYAN_CHECK(ZydisInputNextBytes(state, instruction, (ZyanU8*)&value, 8));
  ------------------
  |  |  100|     34|    do \
  |  |  101|     34|    { \
  |  |  102|     34|        const ZyanStatus status_047620348 = (status); \
  |  |  103|     34|        if (!ZYAN_SUCCESS(status_047620348)) \
  |  |  ------------------
  |  |  |  |   82|     34|    (!((status) & 0x80000000u))
  |  |  ------------------
  |  |  |  Branch (103:13): [True: 0, False: 34]
  |  |  ------------------
  |  |  104|     34|        { \
  |  |  105|      0|            return status_047620348; \
  |  |  106|      0|        } \
  |  |  107|     34|    } while (0)
  |  |  ------------------
  |  |  |  Branch (107:14): [Folded, False: 34]
  |  |  ------------------
  ------------------
  905|     34|        ZYAN_LE64_TO_NATIVE(value);
  906|     34|        if (is_signed)
  ------------------
  |  Branch (906:13): [True: 34, False: 0]
  ------------------
  907|     34|        {
  908|     34|            instruction->raw.imm[id].value.s = (ZyanI64)value;
  909|     34|        } else
  910|      0|        {
  911|      0|            instruction->raw.imm[id].value.u = value;
  912|      0|        }
  913|     34|        break;
  914|     34|    }
  915|      0|    default:
  ------------------
  |  Branch (915:5): [True: 0, False: 98]
  ------------------
  916|      0|        ZYAN_UNREACHABLE;
  ------------------
  |  |  431|      0|#   define ZYAN_UNREACHABLE { assert(0); abort(); }
  ------------------
  |  Branch (916:9): [Folded, False: 0]
  |  Branch (916:9): [Folded, False: 0]
  ------------------
  917|     98|    }
  918|       |
  919|     98|    return ZYAN_STATUS_SUCCESS;
  ------------------
  |  |  164|     98|    ZYAN_MAKE_STATUS(0u, ZYAN_MODULE_ZYCORE, 0x00u)
  |  |  ------------------
  |  |  |  |   68|     98|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
  920|     98|}
Decoder.c:ZydisCheckErrorConditions:
 4698|    174|{
 4699|    174|    ZYAN_ASSERT(state);
  ------------------
  |  |  381|    174|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (4699:5): [True: 0, False: 174]
  |  Branch (4699:5): [True: 174, False: 0]
  ------------------
 4700|    174|    ZYAN_ASSERT(instruction);
  ------------------
  |  |  381|    174|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (4700:5): [True: 0, False: 174]
  |  Branch (4700:5): [True: 174, False: 0]
  ------------------
 4701|    174|    ZYAN_ASSERT(definition);
  ------------------
  |  |  381|    174|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (4701:5): [True: 0, False: 174]
  |  Branch (4701:5): [True: 174, False: 0]
  ------------------
 4702|       |
 4703|    174|    ZyanU8 def_reg                  = definition->op_reg;
 4704|    174|    ZyanU8 def_rm                   = definition->op_rm;
 4705|    174|    ZyanU8 def_ndsndd               = ZYDIS_REGKIND_INVALID;
 4706|    174|    ZyanBool is_gather              = ZYAN_FALSE;
  ------------------
  |  |  287|    174|#define ZYAN_FALSE 0u
  ------------------
 4707|    174|    ZyanBool no_source_dest_match   = ZYAN_FALSE;
  ------------------
  |  |  287|    174|#define ZYAN_FALSE 0u
  ------------------
 4708|    174|    ZyanBool no_source_source_match = ZYAN_FALSE;
  ------------------
  |  |  287|    174|#define ZYAN_FALSE 0u
  ------------------
 4709|    174|#if !defined(ZYDIS_DISABLE_AVX512) || !defined(ZYDIS_DISABLE_KNC)
 4710|    174|    ZydisMaskPolicy mask_policy     = ZYDIS_MASK_POLICY_INVALID;
 4711|    174|#endif
 4712|    174|    ZydisDecoderContext* context    = state->context;
 4713|       |
 4714|    174|    switch (instruction->encoding)
 4715|    174|    {
 4716|    118|    case ZYDIS_INSTRUCTION_ENCODING_LEGACY:
  ------------------
  |  Branch (4716:5): [True: 118, False: 56]
  ------------------
 4717|    140|    case ZYDIS_INSTRUCTION_ENCODING_REX2:
  ------------------
  |  Branch (4717:5): [True: 22, False: 152]
  ------------------
 4718|    140|    {
 4719|    140|        const ZydisInstructionDefinitionLEGACY* def =
 4720|    140|            (const ZydisInstructionDefinitionLEGACY*)definition;
 4721|       |
 4722|    140|        if (def->requires_protected_mode &&
  ------------------
  |  Branch (4722:13): [True: 6, False: 134]
  ------------------
 4723|      6|            (instruction->machine_mode == ZYDIS_MACHINE_MODE_REAL_16))
  ------------------
  |  Branch (4723:13): [True: 0, False: 6]
  ------------------
 4724|      0|        {
 4725|      0|            return ZYDIS_STATUS_DECODING_ERROR;
  ------------------
  |  |   74|      0|    ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ZYDIS, 0x01u)
  |  |  ------------------
  |  |  |  |   68|      0|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
 4726|      0|        }
 4727|       |
 4728|    140|        if (def->no_compat_mode &&
  ------------------
  |  Branch (4728:13): [True: 0, False: 140]
  ------------------
 4729|      0|            ((instruction->machine_mode == ZYDIS_MACHINE_MODE_LONG_COMPAT_16) ||
  ------------------
  |  Branch (4729:14): [True: 0, False: 0]
  ------------------
 4730|      0|             (instruction->machine_mode == ZYDIS_MACHINE_MODE_LONG_COMPAT_32)))
  ------------------
  |  Branch (4730:14): [True: 0, False: 0]
  ------------------
 4731|      0|        {
 4732|      0|            return ZYDIS_STATUS_DECODING_ERROR;
  ------------------
  |  |   74|      0|    ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ZYDIS, 0x01u)
  |  |  ------------------
  |  |  |  |   68|      0|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
 4733|      0|        }
 4734|       |
 4735|    140|        if (state->prefixes.has_lock && !def->accepts_LOCK)
  ------------------
  |  Branch (4735:13): [True: 2, False: 138]
  |  Branch (4735:41): [True: 0, False: 2]
  ------------------
 4736|      0|        {
 4737|      0|            return ZYDIS_STATUS_ILLEGAL_LOCK;
  ------------------
  |  |   93|      0|    ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ZYDIS, 0x04u)
  |  |  ------------------
  |  |  |  |   68|      0|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
 4738|      0|        }
 4739|    140|        break;
 4740|    140|    }
 4741|    140|    case ZYDIS_INSTRUCTION_ENCODING_3DNOW:
  ------------------
  |  Branch (4741:5): [True: 0, False: 174]
  ------------------
 4742|      0|    {
 4743|      0|        break;
 4744|    140|    }
 4745|      2|    case ZYDIS_INSTRUCTION_ENCODING_XOP:
  ------------------
  |  Branch (4745:5): [True: 2, False: 172]
  ------------------
 4746|      2|    {
 4747|      2|        const ZydisInstructionDefinitionXOP* def =
 4748|      2|            (const ZydisInstructionDefinitionXOP*)definition;
 4749|      2|        def_ndsndd = def->op_ndsndd;
 4750|      2|        break;
 4751|    140|    }
 4752|      0|    case ZYDIS_INSTRUCTION_ENCODING_VEX:
  ------------------
  |  Branch (4752:5): [True: 0, False: 174]
  ------------------
 4753|      0|    {
 4754|      0|        const ZydisInstructionDefinitionVEX* def =
 4755|      0|            (const ZydisInstructionDefinitionVEX*)definition;
 4756|      0|        def_ndsndd             = def->op_ndsndd;
 4757|      0|        is_gather              = def->is_gather;
 4758|      0|        no_source_source_match = def->no_source_source_match;
 4759|      0|        break;
 4760|    140|    }
 4761|     32|    case ZYDIS_INSTRUCTION_ENCODING_EVEX:
  ------------------
  |  Branch (4761:5): [True: 32, False: 142]
  ------------------
 4762|     32|    {
 4763|     32|#ifndef ZYDIS_DISABLE_AVX512
 4764|     32|        const ZydisInstructionDefinitionEVEX* def =
 4765|     32|            (const ZydisInstructionDefinitionEVEX*)definition;
 4766|     32|        def_ndsndd           = def->op_ndsndd;
 4767|     32|        is_gather            = def->is_gather;
 4768|     32|        no_source_dest_match = def->no_source_dest_match;
 4769|     32|        mask_policy          = def->mask_policy;
 4770|       |
 4771|       |        // The APX `EVEX.NF` and `EVEX.SCC` forms repurpose the mask and `vvvv`/`V4` fields. They
 4772|       |        // are validated and normalized first: the legacy node-order walk rejected these encodings
 4773|       |        // at the `EVEX.NF`/`EVEX.SCC` node before any definition-time check ran, so running them
 4774|       |        // ahead of the zero-mask, register-id and mask-policy logic preserves both the status code
 4775|       |        // and the corrected `vector_unified` those consumers observe.
 4776|     32|        if (def->has_apx_nf_check)
  ------------------
  |  Branch (4776:13): [True: 14, False: 18]
  ------------------
 4777|     14|        {
 4778|     14|            if (instruction->raw.evex.z || context->vector_unified.LL ||
  ------------------
  |  Branch (4778:17): [True: 0, False: 14]
  |  Branch (4778:44): [True: 0, False: 14]
  ------------------
 4779|     14|                (context->vector_unified.mask & 0x03))
  ------------------
  |  Branch (4779:17): [True: 0, False: 14]
  ------------------
 4780|      0|            {
 4781|      0|                return ZYDIS_STATUS_DECODING_ERROR;
  ------------------
  |  |   74|      0|    ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ZYDIS, 0x01u)
  |  |  ------------------
  |  |  |  |   68|      0|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
 4782|      0|            }
 4783|       |
 4784|     14|            context->vector_unified.mask = 0;
 4785|     14|        }
 4786|     32|        if (def->has_apx_scc)
  ------------------
  |  Branch (4786:13): [True: 4, False: 28]
  ------------------
 4787|      4|        {
 4788|      4|            if (instruction->raw.evex.z || context->vector_unified.LL)
  ------------------
  |  Branch (4788:17): [True: 0, False: 4]
  |  Branch (4788:44): [True: 0, False: 4]
  ------------------
 4789|      0|            {
 4790|      0|                return ZYDIS_STATUS_DECODING_ERROR;
  ------------------
  |  |   74|      0|    ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ZYDIS, 0x01u)
  |  |  ------------------
  |  |  |  |   68|      0|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
 4791|      0|            }
 4792|       |
 4793|       |            // Unlike the regular NDS/NDD specifier, the DFV bits reused by `vvvv` are not inverted.
 4794|      4|            context->vector_unified.vvvv = (~context->vector_unified.vvvv) & 0x0F;
 4795|      4|            context->vector_unified.V4   = 0;
 4796|      4|            context->vector_unified.mask = 0;
 4797|       |
 4798|      4|            instruction->apx.scc = ZYDIS_SCC_O + instruction->raw.evex.SCC;
 4799|      4|        }
 4800|       |
 4801|       |        // Check for invalid zero-mask
 4802|     32|        if ((instruction->raw.evex.z) && (!def->accepts_zero_mask))
  ------------------
  |  Branch (4802:13): [True: 2, False: 30]
  |  Branch (4802:42): [True: 0, False: 2]
  ------------------
 4803|      0|        {
 4804|      0|            return ZYDIS_STATUS_INVALID_MASK; // TODO: Dedicated status code
  ------------------
  |  |  136|      0|    ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ZYDIS, 0x0Bu)
  |  |  ------------------
  |  |  |  |   68|      0|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
 4805|      0|        }
 4806|       |#else
 4807|       |        ZYAN_UNREACHABLE;
 4808|       |#endif
 4809|     32|        break;
 4810|     32|    }
 4811|     32|    case ZYDIS_INSTRUCTION_ENCODING_MVEX:
  ------------------
  |  Branch (4811:5): [True: 0, False: 174]
  ------------------
 4812|      0|    {
 4813|      0|#ifndef ZYDIS_DISABLE_KNC
 4814|      0|        const ZydisInstructionDefinitionMVEX* def =
 4815|      0|            (const ZydisInstructionDefinitionMVEX*)definition;
 4816|      0|        def_ndsndd  = def->op_ndsndd;
 4817|      0|        is_gather   = def->is_gather;
 4818|      0|        mask_policy = def->mask_policy;
 4819|       |
 4820|       |        // Check for invalid MVEX.SSS values
 4821|      0|        static const ZyanU8 lookup[26][8] =
 4822|      0|        {
 4823|       |            // ZYDIS_MVEX_FUNC_IGNORED
 4824|      0|            { 1, 1, 1, 1, 1, 1, 1, 1 },
 4825|       |            // ZYDIS_MVEX_FUNC_INVALID
 4826|      0|            { 1, 0, 0, 0, 0, 0, 0, 0 },
 4827|       |            // ZYDIS_MVEX_FUNC_RC
 4828|      0|            { 1, 1, 1, 1, 1, 1, 1, 1 },
 4829|       |            // ZYDIS_MVEX_FUNC_SAE
 4830|      0|            { 1, 1, 1, 1, 1, 1, 1, 1 },
 4831|       |            // ZYDIS_MVEX_FUNC_F_32
 4832|      0|            { 1, 0, 0, 0, 0, 0, 0, 0 },
 4833|       |            // ZYDIS_MVEX_FUNC_I_32
 4834|      0|            { 1, 0, 0, 0, 0, 0, 0, 0 },
 4835|       |            // ZYDIS_MVEX_FUNC_F_64
 4836|      0|            { 1, 0, 0, 0, 0, 0, 0, 0 },
 4837|       |            // ZYDIS_MVEX_FUNC_I_64
 4838|      0|            { 1, 0, 0, 0, 0, 0, 0, 0 },
 4839|       |            // ZYDIS_MVEX_FUNC_SWIZZLE_32
 4840|      0|            { 1, 1, 1, 1, 1, 1, 1, 1 },
 4841|       |            // ZYDIS_MVEX_FUNC_SWIZZLE_64
 4842|      0|            { 1, 1, 1, 1, 1, 1, 1, 1 },
 4843|       |            // ZYDIS_MVEX_FUNC_SF_32
 4844|      0|            { 1, 1, 1, 1, 1, 0, 1, 1 },
 4845|       |            // ZYDIS_MVEX_FUNC_SF_32_BCST
 4846|      0|            { 1, 1, 1, 0, 0, 0, 0, 0 },
 4847|       |            // ZYDIS_MVEX_FUNC_SF_32_BCST_4TO16
 4848|      0|            { 1, 0, 1, 0, 0, 0, 0, 0 },
 4849|       |            // ZYDIS_MVEX_FUNC_SF_64
 4850|      0|            { 1, 1, 1, 0, 0, 0, 0, 0 },
 4851|       |            // ZYDIS_MVEX_FUNC_SI_32
 4852|      0|            { 1, 1, 1, 0, 1, 1, 1, 1 },
 4853|       |            // ZYDIS_MVEX_FUNC_SI_32_BCST
 4854|      0|            { 1, 1, 1, 0, 0, 0, 0, 0 },
 4855|       |            // ZYDIS_MVEX_FUNC_SI_32_BCST_4TO16
 4856|      0|            { 1, 0, 1, 0, 0, 0, 0, 0 },
 4857|       |            // ZYDIS_MVEX_FUNC_SI_64
 4858|      0|            { 1, 1, 1, 0, 0, 0, 0, 0 },
 4859|       |            // ZYDIS_MVEX_FUNC_UF_32
 4860|      0|            { 1, 0, 0, 1, 1, 1, 1, 1 },
 4861|       |            // ZYDIS_MVEX_FUNC_UF_64
 4862|      0|            { 1, 0, 0, 0, 0, 0, 0, 0 },
 4863|       |            // ZYDIS_MVEX_FUNC_UI_32
 4864|      0|            { 1, 0, 0, 0, 1, 1, 1, 1 },
 4865|       |            // ZYDIS_MVEX_FUNC_UI_64
 4866|      0|            { 1, 0, 0, 0, 0, 0, 0, 0 },
 4867|       |            // ZYDIS_MVEX_FUNC_DF_32
 4868|      0|            { 1, 0, 0, 1, 1, 1, 1, 1 },
 4869|       |            // ZYDIS_MVEX_FUNC_DF_64
 4870|      0|            { 1, 0, 0, 0, 0, 0, 0, 0 },
 4871|       |            // ZYDIS_MVEX_FUNC_DI_32
 4872|      0|            { 1, 0, 0, 0, 1, 1, 1, 1 },
 4873|       |            // ZYDIS_MVEX_FUNC_DI_64
 4874|      0|            { 1, 0, 0, 0, 0, 0, 0, 0 }
 4875|      0|        };
 4876|      0|        ZYAN_ASSERT(def->functionality < ZYAN_ARRAY_LENGTH(lookup));
  ------------------
  |  |  381|      0|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (4876:9): [True: 0, False: 0]
  |  Branch (4876:9): [True: 0, False: 0]
  ------------------
 4877|      0|        ZYAN_ASSERT(instruction->raw.mvex.SSS < 8);
  ------------------
  |  |  381|      0|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (4877:9): [True: 0, False: 0]
  |  Branch (4877:9): [True: 0, False: 0]
  ------------------
 4878|      0|        if (!lookup[def->functionality][instruction->raw.mvex.SSS])
  ------------------
  |  Branch (4878:13): [True: 0, False: 0]
  ------------------
 4879|      0|        {
 4880|      0|            return ZYDIS_STATUS_DECODING_ERROR;
  ------------------
  |  |   74|      0|    ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ZYDIS, 0x01u)
  |  |  ------------------
  |  |  |  |   68|      0|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
 4881|      0|        }
 4882|       |#else
 4883|       |        ZYAN_UNREACHABLE;
 4884|       |#endif
 4885|      0|        break;
 4886|      0|    }
 4887|      0|    default:
  ------------------
  |  Branch (4887:5): [True: 0, False: 174]
  ------------------
 4888|      0|        ZYAN_UNREACHABLE;
  ------------------
  |  |  431|      0|#   define ZYAN_UNREACHABLE { assert(0); abort(); }
  ------------------
  |  Branch (4888:9): [Folded, False: 0]
  |  Branch (4888:9): [Folded, False: 0]
  ------------------
 4889|    174|    }
 4890|       |
 4891|    174|    const ZyanBool is_reg = context->reg_info.is_mod_reg;
 4892|       |
 4893|    174|    ZyanU8 no_rip_rel     = ZYAN_FALSE;
  ------------------
  |  |  287|    174|#define ZYAN_FALSE 0u
  ------------------
 4894|    174|    ZyanU8 is_sr_dest_reg = ZYAN_FALSE;
  ------------------
  |  |  287|    174|#define ZYAN_FALSE 0u
  ------------------
 4895|    174|    ZyanU8 is_sr_dest_rm  = ZYAN_FALSE;
  ------------------
  |  |  287|    174|#define ZYAN_FALSE 0u
  ------------------
 4896|    174|    if (def_reg)
  ------------------
  |  Branch (4896:9): [True: 62, False: 112]
  ------------------
 4897|     62|    {
 4898|     62|        is_sr_dest_reg = ZYDIS_OPDEF_GET_REG_HIGH_BIT(def_reg);
  ------------------
  |  |  724|     62|    (((operand_definition) >> ZYDIS_REGKIND_REQUIRED_BITS   ) & 0x01)
  ------------------
 4899|     62|        def_reg = ZYDIS_OPDEF_GET_REG(def_reg);
  ------------------
  |  |  718|     62|    ((operand_definition) & ((1 << ZYDIS_REGKIND_REQUIRED_BITS   ) - 1))
  ------------------
 4900|     62|    }
 4901|    174|    if (def_rm)
  ------------------
  |  Branch (4901:9): [True: 88, False: 86]
  ------------------
 4902|     88|    {
 4903|     88|        if (is_reg)
  ------------------
  |  Branch (4903:13): [True: 36, False: 52]
  ------------------
 4904|     36|        {
 4905|     36|            is_sr_dest_rm = ZYDIS_OPDEF_GET_REG_HIGH_BIT(def_rm);
  ------------------
  |  |  724|     36|    (((operand_definition) >> ZYDIS_REGKIND_REQUIRED_BITS   ) & 0x01)
  ------------------
 4906|     36|            def_rm = ZYDIS_OPDEF_GET_REG(def_rm);
  ------------------
  |  |  718|     36|    ((operand_definition) & ((1 << ZYDIS_REGKIND_REQUIRED_BITS   ) - 1))
  ------------------
 4907|     36|        }
 4908|     52|        else
 4909|     52|        {
 4910|     52|            no_rip_rel = ZYDIS_OPDEF_GET_MEM_HIGH_BIT(def_rm);
  ------------------
  |  |  727|     52|    (((operand_definition) >> ZYDIS_MEMOP_TYPE_REQUIRED_BITS) & 0x01)
  ------------------
 4911|     52|            def_rm = ZYDIS_OPDEF_GET_MEM(def_rm);
  ------------------
  |  |  721|     52|    ((operand_definition) & ((1 << ZYDIS_MEMOP_TYPE_REQUIRED_BITS) - 1))
  ------------------
 4912|     52|        }
 4913|     88|    }
 4914|       |
 4915|       |    // Check RIP-relative memory addressing
 4916|    174|    if (no_rip_rel)
  ------------------
  |  Branch (4916:9): [True: 6, False: 168]
  ------------------
 4917|      6|    {
 4918|      6|        const ZyanBool is_rip_rel =
 4919|      6|            (state->decoder->machine_mode == ZYDIS_MACHINE_MODE_LONG_64) &&
  ------------------
  |  Branch (4919:13): [True: 2, False: 4]
  ------------------
 4920|      2|            (instruction->raw.modrm.mod == 0) && (instruction->raw.modrm.rm == 5);
  ------------------
  |  Branch (4920:13): [True: 0, False: 2]
  |  Branch (4920:50): [True: 0, False: 0]
  ------------------
 4921|      6|        if (is_rip_rel)
  ------------------
  |  Branch (4921:13): [True: 0, False: 6]
  ------------------
 4922|      0|        {
 4923|      0|            return ZYDIS_STATUS_BAD_REGISTER;
  ------------------
  |  |   86|      0|    ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ZYDIS, 0x03u)
  |  |  ------------------
  |  |  |  |   68|      0|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
 4924|      0|        }
 4925|      6|    }
 4926|       |
 4927|       |    // Populate- and validate register constraints
 4928|    174|    ZYAN_CHECK(ZydisPopulateRegisterIds(context, instruction, def_reg, def_rm, def_ndsndd));
  ------------------
  |  |  100|    174|    do \
  |  |  101|    174|    { \
  |  |  102|    174|        const ZyanStatus status_047620348 = (status); \
  |  |  103|    174|        if (!ZYAN_SUCCESS(status_047620348)) \
  |  |  ------------------
  |  |  |  |   82|    174|    (!((status) & 0x80000000u))
  |  |  ------------------
  |  |  |  Branch (103:13): [True: 0, False: 174]
  |  |  ------------------
  |  |  104|    174|        { \
  |  |  105|      0|            return status_047620348; \
  |  |  106|      0|        } \
  |  |  107|    174|    } while (0)
  |  |  ------------------
  |  |  |  Branch (107:14): [Folded, False: 174]
  |  |  ------------------
  ------------------
 4929|       |
 4930|       |    // `ZYDIS_REGISTER_CS` is not allowed as `MOV` target
 4931|    174|    if (is_sr_dest_reg && (context->reg_info.id_reg == 1))
  ------------------
  |  Branch (4931:9): [True: 0, False: 174]
  |  Branch (4931:27): [True: 0, False: 0]
  ------------------
 4932|      0|    {
 4933|      0|        return ZYDIS_STATUS_BAD_REGISTER;
  ------------------
  |  |   86|      0|    ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ZYDIS, 0x03u)
  |  |  ------------------
  |  |  |  |   68|      0|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
 4934|      0|    }
 4935|    174|    if (is_sr_dest_rm && (context->reg_info.id_rm == 1))
  ------------------
  |  Branch (4935:9): [True: 0, False: 174]
  |  Branch (4935:26): [True: 0, False: 0]
  ------------------
 4936|      0|    {
 4937|      0|        return ZYDIS_STATUS_BAD_REGISTER;
  ------------------
  |  |   86|      0|    ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ZYDIS, 0x03u)
  |  |  ------------------
  |  |  |  |   68|      0|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
 4938|      0|    }
 4939|       |
 4940|       |    // Check gather registers
 4941|    174|    if (is_gather)
  ------------------
  |  Branch (4941:9): [True: 0, False: 174]
  ------------------
 4942|      0|    {
 4943|       |        // ZYAN_ASSERT(has_VSIB);
 4944|      0|        ZYAN_ASSERT(instruction->raw.modrm.mod != 3);
  ------------------
  |  |  381|      0|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (4944:9): [True: 0, False: 0]
  |  Branch (4944:9): [True: 0, False: 0]
  ------------------
 4945|      0|        ZYAN_ASSERT(instruction->raw.modrm.rm  == 4);
  ------------------
  |  |  381|      0|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (4945:9): [True: 0, False: 0]
  |  Branch (4945:9): [True: 0, False: 0]
  ------------------
 4946|       |
 4947|      0|        const ZyanU8 index = context->reg_info.id_index;
 4948|      0|        ZyanU8 dest        = context->reg_info.id_reg;
 4949|      0|        ZyanU8 mask        = 0xF0;
 4950|       |
 4951|      0|        if (instruction->encoding == ZYDIS_INSTRUCTION_ENCODING_VEX)
  ------------------
  |  Branch (4951:13): [True: 0, False: 0]
  ------------------
 4952|      0|        {
 4953|      0|            ZYAN_ASSERT((def_reg    == ZYDIS_REGKIND_VR) &&
  ------------------
  |  |  381|      0|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (4953:13): [True: 0, False: 0]
  |  Branch (4953:13): [True: 0, False: 0]
  |  Branch (4953:13): [True: 0, False: 0]
  |  Branch (4953:13): [True: 0, False: 0]
  |  Branch (4953:13): [True: 0, False: 0]
  |  Branch (4953:13): [True: 0, False: 0]
  ------------------
 4954|      0|                        (def_rm     == ZYDIS_MEMOP_TYPE_VSIB) &&
 4955|      0|                        (def_ndsndd == ZYDIS_REGKIND_VR));
 4956|      0|            mask = context->reg_info.id_ndsndd;
 4957|      0|        }
 4958|       |
 4959|      0|        if ((instruction->encoding == ZYDIS_INSTRUCTION_ENCODING_EVEX) ||
  ------------------
  |  Branch (4959:13): [True: 0, False: 0]
  ------------------
 4960|      0|            (instruction->encoding == ZYDIS_INSTRUCTION_ENCODING_MVEX))
  ------------------
  |  Branch (4960:13): [True: 0, False: 0]
  ------------------
 4961|      0|        {
 4962|      0|            ZYAN_ASSERT(((def_reg    == ZYDIS_REGKIND_INVALID) ||
  ------------------
  |  |  381|      0|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (4962:13): [True: 0, False: 0]
  |  Branch (4962:13): [True: 0, False: 0]
  |  Branch (4962:13): [True: 0, False: 0]
  |  Branch (4962:13): [True: 0, False: 0]
  |  Branch (4962:13): [True: 0, False: 0]
  |  Branch (4962:13): [True: 0, False: 0]
  |  Branch (4962:13): [True: 0, False: 0]
  |  Branch (4962:13): [True: 0, False: 0]
  ------------------
 4963|      0|                         (def_reg    == ZYDIS_REGKIND_VR)) &&
 4964|      0|                         (def_rm     == ZYDIS_MEMOP_TYPE_VSIB) &&
 4965|      0|                         (def_ndsndd == ZYDIS_REGKIND_INVALID));
 4966|       |
 4967|       |            // Some gather instructions (like `VGATHERPF0{D|Q}{PS|PD}`) do not have a destination
 4968|       |            // operand
 4969|      0|            if (!def_reg)
  ------------------
  |  Branch (4969:17): [True: 0, False: 0]
  ------------------
 4970|      0|            {
 4971|      0|                dest = 0xF1;
 4972|      0|            }
 4973|      0|        }
 4974|       |
 4975|       |        // If any pair of the index, mask, or destination registers are the same, the instruction
 4976|       |        // results a UD fault
 4977|      0|        if ((dest == index) || (dest == mask) || (index == mask))
  ------------------
  |  Branch (4977:13): [True: 0, False: 0]
  |  Branch (4977:32): [True: 0, False: 0]
  |  Branch (4977:50): [True: 0, False: 0]
  ------------------
 4978|      0|        {
 4979|      0|            return ZYDIS_STATUS_BAD_REGISTER;
  ------------------
  |  |   86|      0|    ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ZYDIS, 0x03u)
  |  |  ------------------
  |  |  |  |   68|      0|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
 4980|      0|        }
 4981|      0|    }
 4982|       |
 4983|       |    // Check if any source register matches the destination register
 4984|    174|    if (no_source_dest_match)
  ------------------
  |  Branch (4984:9): [True: 0, False: 174]
  ------------------
 4985|      0|    {
 4986|      0|        ZYAN_ASSERT((instruction->encoding == ZYDIS_INSTRUCTION_ENCODING_EVEX) ||
  ------------------
  |  |  381|      0|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (4986:9): [True: 0, False: 0]
  |  Branch (4986:9): [True: 0, False: 0]
  |  Branch (4986:9): [True: 0, False: 0]
  |  Branch (4986:9): [True: 0, False: 0]
  ------------------
 4987|      0|                    (instruction->encoding == ZYDIS_INSTRUCTION_ENCODING_VEX));
 4988|       |
 4989|      0|        const ZyanU8 dest    = context->reg_info.id_reg;
 4990|      0|        const ZyanU8 source1 = context->reg_info.id_ndsndd;
 4991|      0|        const ZyanU8 source2 = context->reg_info.id_rm;
 4992|       |
 4993|      0|        if ((dest == source1) || (is_reg && (dest == source2)))
  ------------------
  |  Branch (4993:13): [True: 0, False: 0]
  |  Branch (4993:35): [True: 0, False: 0]
  |  Branch (4993:45): [True: 0, False: 0]
  ------------------
 4994|      0|        {
 4995|      0|            return ZYDIS_STATUS_BAD_REGISTER;
  ------------------
  |  |   86|      0|    ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ZYDIS, 0x03u)
  |  |  ------------------
  |  |  |  |   68|      0|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
 4996|      0|        }
 4997|      0|    }
 4998|       |
 4999|       |    // If any pair of the source or destination registers are the same, the instruction results a
 5000|       |    // UD fault
 5001|    174|    if (no_source_source_match) // TODO: Find better name
  ------------------
  |  Branch (5001:9): [True: 0, False: 174]
  ------------------
 5002|      0|    {
 5003|      0|        ZYAN_ASSERT(instruction->encoding == ZYDIS_INSTRUCTION_ENCODING_VEX);
  ------------------
  |  |  381|      0|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (5003:9): [True: 0, False: 0]
  |  Branch (5003:9): [True: 0, False: 0]
  ------------------
 5004|      0|        ZYAN_ASSERT(is_reg);
  ------------------
  |  |  381|      0|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (5004:9): [True: 0, False: 0]
  |  Branch (5004:9): [True: 0, False: 0]
  ------------------
 5005|       |
 5006|      0|        const ZyanU8 dest    = context->reg_info.id_reg;
 5007|      0|        const ZyanU8 source1 = context->reg_info.id_ndsndd;
 5008|      0|        const ZyanU8 source2 = context->reg_info.id_rm;
 5009|       |
 5010|      0|        if ((dest == source1) || (dest == source2) || (source1 == source2))
  ------------------
  |  Branch (5010:13): [True: 0, False: 0]
  |  Branch (5010:34): [True: 0, False: 0]
  |  Branch (5010:55): [True: 0, False: 0]
  ------------------
 5011|      0|        {
 5012|      0|            return ZYDIS_STATUS_BAD_REGISTER;
  ------------------
  |  |   86|      0|    ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ZYDIS, 0x03u)
  |  |  ------------------
  |  |  |  |   68|      0|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
 5013|      0|        }
 5014|      0|    }
 5015|       |
 5016|    174|#if !defined(ZYDIS_DISABLE_AVX512) || !defined(ZYDIS_DISABLE_KNC)
 5017|       |    // Check for invalid MASK registers
 5018|    174|    switch (mask_policy)
 5019|    174|    {
 5020|    160|    case ZYDIS_MASK_POLICY_INVALID:
  ------------------
  |  Branch (5020:5): [True: 160, False: 14]
  ------------------
 5021|    166|    case ZYDIS_MASK_POLICY_ALLOWED:
  ------------------
  |  Branch (5021:5): [True: 6, False: 168]
  ------------------
 5022|       |        // Nothing to do here
 5023|    166|        break;
 5024|      6|    case ZYDIS_MASK_POLICY_REQUIRED:
  ------------------
  |  Branch (5024:5): [True: 6, False: 168]
  ------------------
 5025|      6|        if (!context->vector_unified.mask)
  ------------------
  |  Branch (5025:13): [True: 0, False: 6]
  ------------------
 5026|      0|        {
 5027|      0|            return ZYDIS_STATUS_INVALID_MASK;
  ------------------
  |  |  136|      0|    ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ZYDIS, 0x0Bu)
  |  |  ------------------
  |  |  |  |   68|      0|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
 5028|      0|        }
 5029|      6|        break;
 5030|      6|    case ZYDIS_MASK_POLICY_FORBIDDEN:
  ------------------
  |  Branch (5030:5): [True: 2, False: 172]
  ------------------
 5031|      2|        if (context->vector_unified.mask)
  ------------------
  |  Branch (5031:13): [True: 0, False: 2]
  ------------------
 5032|      0|        {
 5033|      0|            return ZYDIS_STATUS_INVALID_MASK;
  ------------------
  |  |  136|      0|    ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ZYDIS, 0x0Bu)
  |  |  ------------------
  |  |  |  |   68|      0|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
 5034|      0|        }
 5035|      2|        break;
 5036|      2|    default:
  ------------------
  |  Branch (5036:5): [True: 0, False: 174]
  ------------------
 5037|      0|        ZYAN_UNREACHABLE;
  ------------------
  |  |  431|      0|#   define ZYAN_UNREACHABLE { assert(0); abort(); }
  ------------------
  |  Branch (5037:9): [Folded, False: 0]
  |  Branch (5037:9): [Folded, False: 0]
  ------------------
 5038|    174|    }
 5039|    174|#endif
 5040|       |
 5041|    174|    return ZYAN_STATUS_SUCCESS;
  ------------------
  |  |  164|    174|    ZYAN_MAKE_STATUS(0u, ZYAN_MODULE_ZYCORE, 0x00u)
  |  |  ------------------
  |  |  |  |   68|    174|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
 5042|    174|}
Decoder.c:ZydisPopulateRegisterIds:
 4435|    174|{
 4436|    174|    ZYAN_ASSERT(context);
  ------------------
  |  |  381|    174|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (4436:5): [True: 0, False: 174]
  |  Branch (4436:5): [True: 174, False: 0]
  ------------------
 4437|    174|    ZYAN_ASSERT(instruction);
  ------------------
  |  |  381|    174|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (4437:5): [True: 0, False: 174]
  |  Branch (4437:5): [True: 174, False: 0]
  ------------------
 4438|       |
 4439|       |    /*
 4440|       |        .............................................
 4441|       |        :          ::  4 :  3 :     [2:0] : TYPE    :
 4442|       |        :::::::::::::::::::::::::::::::::::::::::::::
 4443|       |        : REG      :: R4 : R3 : modrm.reg : GPR, VR :
 4444|       |        :----------::----:----:-----------:---------:
 4445|       |        : VVVV     :: V4 : [V3:V2,V1,V0]  : GPR, VR :
 4446|       |        :----------::----:----:-----------:---------:
 4447|       |        : RM (VR ) :: X3 : B3 : modrm.r/m : VR      :
 4448|       |        :----------::----:----:-----------:---------:
 4449|       |        : RM (GPR) :: B4 : B3 : modrm.r/m : GPR     :
 4450|       |        :----------::----:----:-----------:---------:
 4451|       |        : BASE     :: B4 : B3 : modrm.r/m : GPR     :
 4452|       |        :----------::----:----:-----------:---------:
 4453|       |        : INDEX    :: X4 : X3 : sib.index : GPR     :
 4454|       |        :----------::----:----:-----------:---------:
 4455|       |        : VIDX     :: V4 : X3 : sib.index : VR      :
 4456|       |        :.................................:.........:
 4457|       |
 4458|       |        Table 3.3: 32-Register Support in APX Using EVEX  with Embedded REX Bits
 4459|       |
 4460|       |        Note that the R, X and B register identifiers can also address non-GPR register types, such
 4461|       |        as vector registers, control registers and debug registers. When any of them does, the
 4462|       |        highest-order bits R4, X4 or B4 are generally ignored, except when the register being
 4463|       |        addressed is a control or debug register.
 4464|       |    */
 4465|       |
 4466|    174|    const ZyanBool is_64_bit  = (instruction->machine_mode == ZYDIS_MACHINE_MODE_LONG_64);
 4467|    174|    const ZyanBool is_mod_reg = context->reg_info.is_mod_reg;
 4468|    174|    const ZyanBool has_sib    = !is_mod_reg && (instruction->raw.modrm.rm == 4);
  ------------------
  |  Branch (4468:33): [True: 134, False: 40]
  |  Branch (4468:48): [True: 14, False: 120]
  ------------------
 4469|    174|    const ZyanBool has_vsib   = has_sib && (def_rm == ZYDIS_MEMOP_TYPE_VSIB);
  ------------------
  |  Branch (4469:33): [True: 14, False: 160]
  |  Branch (4469:44): [True: 6, False: 8]
  ------------------
 4470|    174|    const ZyanBool is_rex2    = (instruction->encoding == ZYDIS_INSTRUCTION_ENCODING_REX2);
 4471|       |
 4472|    174|    ZyanU8 id_reg   = instruction->raw.modrm.reg;
 4473|    174|    ZyanU8 id_rm    = instruction->raw.modrm.rm;
 4474|    174|    ZyanU8 id_vvvv  = is_64_bit ? context->vector_unified.vvvv : context->vector_unified.vvvv & 0x07;
  ------------------
  |  Branch (4474:23): [True: 124, False: 50]
  ------------------
 4475|    174|    ZyanU8 id_base  = has_sib ? instruction->raw.sib.base : instruction->raw.modrm.rm;
  ------------------
  |  Branch (4475:23): [True: 14, False: 160]
  ------------------
 4476|    174|    ZyanU8 id_index = instruction->raw.sib.index;
 4477|       |
 4478|    174|    if (instruction->machine_mode == ZYDIS_MACHINE_MODE_LONG_64)
  ------------------
  |  Branch (4478:9): [True: 124, False: 50]
  ------------------
 4479|    124|    {
 4480|    124|        const ZyanBool supports_rm4 = is_rex2 || 
  ------------------
  |  Branch (4480:39): [True: 22, False: 102]
  ------------------
 4481|    102|                                      (instruction->encoding == ZYDIS_INSTRUCTION_ENCODING_EVEX) ||
  ------------------
  |  Branch (4481:39): [True: 28, False: 74]
  ------------------
 4482|     74|                                      (instruction->encoding == ZYDIS_INSTRUCTION_ENCODING_MVEX);
  ------------------
  |  Branch (4482:39): [True: 0, False: 74]
  ------------------
 4483|       |
 4484|    124|        ZyanU8 rm4 = 0;
 4485|    124|        if (is_mod_reg && supports_rm4)
  ------------------
  |  Branch (4485:13): [True: 30, False: 94]
  |  Branch (4485:27): [True: 14, False: 16]
  ------------------
 4486|     14|        {
 4487|       |            // The `rm` extension by `X3` is only valid for VR registers (EVEX encoding)
 4488|     14|            if (def_rm == ZYDIS_REGKIND_VR)
  ------------------
  |  Branch (4488:17): [True: 6, False: 8]
  ------------------
 4489|      6|            {
 4490|      6|                rm4 = context->vector_unified.X3;
 4491|      6|            }
 4492|      8|            else
 4493|      8|            {
 4494|      8|                rm4 = context->vector_unified.B4;
 4495|      8|            }
 4496|     14|        }
 4497|       |
 4498|    124|        const ZyanU8 index4 = has_vsib
  ------------------
  |  Branch (4498:31): [True: 2, False: 122]
  ------------------
 4499|    124|            ? context->vector_unified.V4  // VIDX
 4500|    124|            : context->vector_unified.X4; // INDEX
 4501|       |
 4502|    124|        id_reg   |= (context->vector_unified.R4 << 4) | (context->vector_unified.R3 << 3);
 4503|    124|        id_rm    |= (rm4                        << 4) | (context->vector_unified.B3 << 3);
 4504|    124|        id_vvvv  |= (context->vector_unified.V4 << 4)                                    ;
 4505|    124|        id_base  |= (context->vector_unified.B4 << 4) | (context->vector_unified.B3 << 3);
 4506|    124|        id_index |= (index4                     << 4) | (context->vector_unified.X3 << 3);
 4507|       |
 4508|       |        // The masking emulates the actual CPU behavior and does not verify if the resulting ids
 4509|       |        // are actually valid for the given register kind.
 4510|       |
 4511|    124|        const ZyanU8 non_gpr_mask = (ZyanU8)(1 << (is_rex2 ? 4 : 5)) - 1;
  ------------------
  |  Branch (4511:52): [True: 22, False: 102]
  ------------------
 4512|       |
 4513|    124|        const ZyanU8 mask_reg[ZYDIS_REGKIND_MAX_VALUE + 1] =
 4514|    124|        {
 4515|    124|            /* INVALID */ 0,
 4516|    124|            /* GPR     */ (1 << 5) - 1,
 4517|    124|            /* X87     */ (1 << 3) - 1, // ignore `R4`, ignore `R3`
 4518|    124|            /* MMX     */ (1 << 3) - 1, // ignore `R4`, ignore `R3`
 4519|    124|            /* VR      */ non_gpr_mask, // ignore `REX2.R4`
 4520|    124|            /* TMM     */ non_gpr_mask, // ignore `REX2.R4`
 4521|    124|            /* SEGMENT */ (1 << 3) - 1, // ignore `R4`, ignore `R3`
 4522|    124|            /* TEST    */ (1 << 3) - 1, // ignore `R4`, ignore `R3`
 4523|    124|            /* CONTROL */ (1 << 5) - 1,
 4524|    124|            /* DEBUG   */ (1 << 5) - 1,
 4525|    124|            /* MASK    */ non_gpr_mask, // ignore `REX2.R4`
 4526|    124|            /* BOUND   */ (1 << 4) - 1  // ignore `R4`
 4527|    124|        };
 4528|    124|        id_reg &= mask_reg[def_reg];
 4529|       |
 4530|    124|        const ZyanU8 mask_rm[ZYDIS_REGKIND_MAX_VALUE + 1] =
 4531|    124|        {
 4532|    124|            /* INVALID */ 0,
 4533|    124|            /* GPR     */ (1 << 5) - 1, // TODO: 4 if APX is not enabled
 4534|    124|            /* X87     */ (1 << 3) - 1, // ignore `X3|B4`, ignore `B3`
 4535|    124|            /* MMX     */ (1 << 3) - 1, // ignore `X3|B4`, ignore `B3`
 4536|    124|            /* VR      */ non_gpr_mask, // ignore `REX2.B4`
 4537|    124|            /* TMM     */ (1 << 4) - 1, // ignore `X3|B4`
 4538|    124|            /* SEGMENT */ (1 << 3) - 1, // ignore `X3|B4`, ignore `B3`
 4539|    124|            /* TEST    */ (1 << 3) - 1, // ignore `X3|B4`, ignore `B3`
 4540|    124|            /* CONTROL */ (1 << 5) - 1,
 4541|    124|            /* DEBUG   */ (1 << 5) - 1,
 4542|    124|            /* MASK    */ (1 << 3) - 1, // ignore `X3|B4`, ignore `B3`
 4543|    124|            /* BOUND   */ (1 << 4) - 1  // ignore `X3|B4`
 4544|    124|        };
 4545|    124|        id_rm &= (is_mod_reg ? mask_rm[def_rm] : 0xFF);
  ------------------
  |  Branch (4545:19): [True: 30, False: 94]
  ------------------
 4546|       |
 4547|    124|        static const ZyanU8 mask_vvvv[ZYDIS_REGKIND_MAX_VALUE + 1] =
 4548|    124|        {
 4549|    124|            /* INVALID */ 0,
 4550|    124|            /* GPR     */ (1 << 5) - 1, // TODO: 4 if APX is not enabled
 4551|    124|            /* X87     */ 0,
 4552|    124|            /* MMX     */ 0,
 4553|    124|            /* VR      */ (1 << 5) - 1,
 4554|    124|            /* TMM     */ (1 << 5) - 1,
 4555|    124|            /* SEGMENT */ 0,
 4556|    124|            /* TEST    */ 0,
 4557|    124|            /* CONTROL */ 0,
 4558|    124|            /* DEBUG   */ 0,
 4559|    124|            /* MASK    */ (1 << 5) - 1,
 4560|    124|            /* BOUND   */ 0
 4561|    124|        };
 4562|    124|        id_vvvv &= mask_vvvv[def_vvvv];
 4563|    124|    }
 4564|       |
 4565|       |    // Validate
 4566|       |
 4567|    174|    if (instruction->apx.scc == ZYDIS_SCC_NONE)
  ------------------
  |  Branch (4567:9): [True: 170, False: 4]
  ------------------
 4568|    170|    {
 4569|       |        // EEVEX SCC instructions re-use `vvvv` as the DFV value and `V4` as the MSB of the SCC
 4570|       |        // code.
 4571|       |
 4572|       |        // `.vvvv` is not allowed, if the instruction does not encode a NDS/NDD operand.
 4573|    170|        if (!def_vvvv && context->vector_unified.vvvv)
  ------------------
  |  Branch (4573:13): [True: 160, False: 10]
  |  Branch (4573:26): [True: 0, False: 160]
  ------------------
 4574|      0|        {
 4575|      0|            return ZYDIS_STATUS_BAD_REGISTER;
  ------------------
  |  |   86|      0|    ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ZYDIS, 0x03u)
  |  |  ------------------
  |  |  |  |   68|      0|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
 4576|      0|        }
 4577|       |
 4578|       |        // `.V4` is not allowed, if the instruction does not encode a NDS/NDD or VSIB operand
 4579|    170|        if (!def_vvvv && !has_vsib && context->vector_unified.V4)
  ------------------
  |  Branch (4579:13): [True: 160, False: 10]
  |  Branch (4579:26): [True: 154, False: 6]
  |  Branch (4579:39): [True: 0, False: 154]
  ------------------
 4580|      0|        {
 4581|      0|            return ZYDIS_STATUS_BAD_REGISTER;
  ------------------
  |  |   86|      0|    ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ZYDIS, 0x03u)
  |  |  ------------------
  |  |  |  |   68|      0|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
 4582|      0|        }
 4583|    170|    }
 4584|       |
 4585|    174|    static const ZyanU8 available_regs[2][ZYDIS_REGKIND_MAX_VALUE + 1] =
 4586|    174|    {
 4587|       |        // 16/32 bit mode
 4588|    174|        {
 4589|    174|            /* INVALID */ 255,
 4590|    174|            /* GPR     */   8,
 4591|    174|            /* X87     */   8,
 4592|    174|            /* MMX     */   8,
 4593|    174|            /* VR      */   8,
 4594|    174|            /* TMM     */   8,
 4595|    174|            /* SEGMENT */   6,
 4596|    174|            /* TEST    */   8,
 4597|    174|            /* CONTROL */   8,
 4598|    174|            /* DEBUG   */   8,
 4599|    174|            /* MASK    */   8,
 4600|    174|            /* BOUND   */   4
 4601|    174|        },
 4602|       |        // 64 bit mode
 4603|    174|        {
 4604|    174|            /* INVALID */ 255,
 4605|    174|            /* GPR     */  32, // TODO: 16 if APX is not enabled
 4606|    174|            /* X87     */   8,
 4607|    174|            /* MMX     */   8,
 4608|    174|            /* VR      */  32,
 4609|    174|            /* TMM     */   8,
 4610|    174|            /* SEGMENT */   6,
 4611|    174|            /* TEST    */   8,
 4612|    174|            /* CONTROL */  16,
 4613|       |            // Attempts to reference DR8..DR15 result in undefined opcode (#UD) exceptions. DR4 and
 4614|       |            // DR5 are only valid, if the debug extension (DE) flag in CR4 is set. As we can't
 4615|       |            // check this at runtime we just allow them.
 4616|    174|            /* DEBUG   */   8,
 4617|    174|            /* MASK    */   8,
 4618|    174|            /* BOUND   */   4
 4619|    174|        }
 4620|    174|    };
 4621|       |
 4622|    174|    if ((id_reg >= available_regs[is_64_bit][def_reg]) ||
  ------------------
  |  Branch (4622:9): [True: 0, False: 174]
  ------------------
 4623|    174|        (id_vvvv >= available_regs[is_64_bit][def_vvvv]) ||
  ------------------
  |  Branch (4623:9): [True: 0, False: 174]
  ------------------
 4624|    174|        (is_mod_reg && (id_rm >= available_regs[is_64_bit][def_rm])))
  ------------------
  |  Branch (4624:10): [True: 40, False: 134]
  |  Branch (4624:24): [True: 0, False: 40]
  ------------------
 4625|      0|    {
 4626|      0|        return ZYDIS_STATUS_BAD_REGISTER;
  ------------------
  |  |   86|      0|    ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ZYDIS, 0x03u)
  |  |  ------------------
  |  |  |  |   68|      0|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
 4627|      0|    }
 4628|       |
 4629|    174|    ZyanI8 id_cr = -1;
 4630|    174|    if (def_reg == ZYDIS_REGKIND_CONTROL)
  ------------------
  |  Branch (4630:9): [True: 0, False: 174]
  ------------------
 4631|      0|    {
 4632|      0|        id_cr = id_reg;
 4633|      0|    }
 4634|    174|    if (is_mod_reg && (def_rm == ZYDIS_REGKIND_CONTROL))
  ------------------
  |  Branch (4634:9): [True: 40, False: 134]
  |  Branch (4634:23): [True: 0, False: 40]
  ------------------
 4635|      0|    {
 4636|      0|        id_cr = id_rm;
 4637|      0|    }
 4638|    174|    if (id_cr >= 0)
  ------------------
  |  Branch (4638:9): [True: 0, False: 174]
  ------------------
 4639|      0|    {
 4640|       |        // Attempts to reference CR1, CR5, CR6, CR7, and CR9..CR15 result in undefined opcode (#UD)
 4641|       |        // exceptions
 4642|      0|        static const ZyanU8 lookup[16] =
 4643|      0|        {
 4644|      0|            1, 0, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0
 4645|      0|        };
 4646|      0|        ZYAN_ASSERT((ZyanUSize)id_cr < ZYAN_ARRAY_LENGTH(lookup));
  ------------------
  |  |  381|      0|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (4646:9): [True: 0, False: 0]
  |  Branch (4646:9): [True: 0, False: 0]
  ------------------
 4647|      0|        if (!lookup[id_cr])
  ------------------
  |  Branch (4647:13): [True: 0, False: 0]
  ------------------
 4648|      0|        {
 4649|      0|            return ZYDIS_STATUS_BAD_REGISTER;
  ------------------
  |  |   86|      0|    ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ZYDIS, 0x03u)
  |  |  ------------------
  |  |  |  |   68|      0|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
 4650|      0|        }
 4651|      0|    }
 4652|       |
 4653|       |    // Assign to context
 4654|       |
 4655|    174|    const ZyanBool has_base  = !is_mod_reg && !(instruction->raw.modrm.mod == 0 && (id_base & 0x07) == 5);
  ------------------
  |  Branch (4655:32): [True: 134, False: 40]
  |  Branch (4655:49): [True: 126, False: 8]
  |  Branch (4655:84): [True: 38, False: 88]
  ------------------
 4656|    174|    const ZyanBool has_index = has_sib && (id_index != 4);
  ------------------
  |  Branch (4656:32): [True: 14, False: 160]
  |  Branch (4656:43): [True: 6, False: 8]
  ------------------
 4657|       |
 4658|    174|    context->reg_info.id_reg    = def_reg              ? id_reg    : -1;
  ------------------
  |  Branch (4658:35): [True: 62, False: 112]
  ------------------
 4659|    174|    context->reg_info.id_rm     = def_rm && is_mod_reg ? id_rm     : -1;
  ------------------
  |  Branch (4659:35): [True: 88, False: 86]
  |  Branch (4659:45): [True: 36, False: 52]
  ------------------
 4660|    174|    context->reg_info.id_ndsndd = def_vvvv             ? id_vvvv   : -1;
  ------------------
  |  Branch (4660:35): [True: 10, False: 164]
  ------------------
 4661|    174|    context->reg_info.id_base   = !is_mod_reg          ? id_base   : -1; // TODO: Use has_base; requires changes to memory operand decoding.
  ------------------
  |  Branch (4661:35): [True: 134, False: 40]
  ------------------
 4662|    174|    context->reg_info.id_index  = !is_mod_reg          ? id_index  : -1; // TODO: Use has_index; requires changes to memory operand decoding.
  ------------------
  |  Branch (4662:35): [True: 134, False: 40]
  ------------------
 4663|       |
 4664|       |    // Update APX info
 4665|       |
 4666|    174|    if (!is_64_bit)
  ------------------
  |  Branch (4666:9): [True: 50, False: 124]
  ------------------
 4667|     50|    {
 4668|     50|        return ZYAN_STATUS_SUCCESS;
  ------------------
  |  |  164|     50|    ZYAN_MAKE_STATUS(0u, ZYAN_MODULE_ZYCORE, 0x00u)
  |  |  ------------------
  |  |  |  |   68|     50|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
 4669|     50|    }
 4670|       |
 4671|    124|    const ZyanBool has_egpr_reg   = (def_reg == ZYDIS_REGKIND_GPR) && (id_reg >= 16);
  ------------------
  |  Branch (4671:37): [True: 44, False: 80]
  |  Branch (4671:71): [True: 14, False: 30]
  ------------------
 4672|    124|    const ZyanBool has_egpr_rm    = is_mod_reg && (def_rm == ZYDIS_REGKIND_GPR) && (id_rm >= 16);
  ------------------
  |  Branch (4672:37): [True: 30, False: 94]
  |  Branch (4672:51): [True: 16, False: 14]
  |  Branch (4672:84): [True: 8, False: 8]
  ------------------
 4673|    124|    const ZyanBool has_egpr_vvvv  = (def_vvvv == ZYDIS_REGKIND_GPR) && (id_vvvv >= 16);
  ------------------
  |  Branch (4673:37): [True: 6, False: 118]
  |  Branch (4673:72): [True: 2, False: 4]
  ------------------
 4674|    124|    const ZyanBool has_egpr_base  = has_base && (id_base >= 16);
  ------------------
  |  Branch (4674:37): [True: 60, False: 64]
  |  Branch (4674:49): [True: 18, False: 42]
  ------------------
 4675|    124|    const ZyanBool has_egpr_index = has_index && !has_vsib && (id_index >= 16);
  ------------------
  |  Branch (4675:37): [True: 2, False: 122]
  |  Branch (4675:50): [True: 2, False: 0]
  |  Branch (4675:63): [True: 2, False: 0]
  ------------------
 4676|       |
 4677|    124|    if (has_egpr_reg || has_egpr_rm || has_egpr_vvvv || has_egpr_base || has_egpr_index)
  ------------------
  |  Branch (4677:9): [True: 14, False: 110]
  |  Branch (4677:25): [True: 6, False: 104]
  |  Branch (4677:40): [True: 2, False: 102]
  |  Branch (4677:57): [True: 16, False: 86]
  |  Branch (4677:74): [True: 0, False: 86]
  ------------------
 4678|     38|    {
 4679|     38|        instruction->apx.uses_egpr = ZYAN_TRUE;
  ------------------
  |  |  288|     38|#define ZYAN_TRUE  1u
  ------------------
 4680|     38|    }
 4681|       |
 4682|    124|    return ZYAN_STATUS_SUCCESS;
  ------------------
  |  |  164|    124|    ZYAN_MAKE_STATUS(0u, ZYAN_MODULE_ZYCORE, 0x00u)
  |  |  ------------------
  |  |  |  |   68|    124|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
 4683|    174|}
Decoder.c:ZydisInputNext:
  321|    414|{
  322|    414|    ZYAN_ASSERT(state);
  ------------------
  |  |  381|    414|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (322:5): [True: 0, False: 414]
  |  Branch (322:5): [True: 414, False: 0]
  ------------------
  323|    414|    ZYAN_ASSERT(instruction);
  ------------------
  |  |  381|    414|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (323:5): [True: 0, False: 414]
  |  Branch (323:5): [True: 414, False: 0]
  ------------------
  324|    414|    ZYAN_ASSERT(value);
  ------------------
  |  |  381|    414|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (324:5): [True: 0, False: 414]
  |  Branch (324:5): [True: 414, False: 0]
  ------------------
  325|       |
  326|    414|    if (instruction->length >= ZYDIS_MAX_INSTRUCTION_LENGTH)
  ------------------
  |  |   49|    414|#define ZYDIS_MAX_INSTRUCTION_LENGTH    15
  ------------------
  |  Branch (326:9): [True: 0, False: 414]
  ------------------
  327|      0|    {
  328|      0|        return ZYDIS_STATUS_INSTRUCTION_TOO_LONG;
  ------------------
  |  |   80|      0|    ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ZYDIS, 0x02u)
  |  |  ------------------
  |  |  |  |   68|      0|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
  329|      0|    }
  330|       |
  331|    414|    if (state->buffer_len > 0)
  ------------------
  |  Branch (331:9): [True: 414, False: 0]
  ------------------
  332|    414|    {
  333|    414|        *value = state->buffer++[0];
  334|    414|        ++instruction->length;
  335|    414|        --state->buffer_len;
  336|    414|        return ZYAN_STATUS_SUCCESS;
  ------------------
  |  |  164|    414|    ZYAN_MAKE_STATUS(0u, ZYAN_MODULE_ZYCORE, 0x00u)
  |  |  ------------------
  |  |  |  |   68|    414|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
  337|    414|    }
  338|       |
  339|      0|    return ZYDIS_STATUS_NO_MORE_DATA;
  ------------------
  |  |   67|      0|    ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ZYDIS, 0x00u)
  |  |  ------------------
  |  |  |  |   68|      0|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
  340|    414|}
Decoder.c:ZydisTreeWalkFilters:
 5062|    134|{
 5063|    134|    ZYAN_ASSERT(state);
  ------------------
  |  |  381|    134|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (5063:5): [True: 0, False: 134]
  |  Branch (5063:5): [True: 134, False: 0]
  ------------------
 5064|    134|    ZYAN_ASSERT(instruction);
  ------------------
  |  |  381|    134|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (5064:5): [True: 0, False: 134]
  |  Branch (5064:5): [True: 134, False: 0]
  ------------------
 5065|    134|    ZYAN_ASSERT(node);
  ------------------
  |  |  381|    134|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (5065:5): [True: 0, False: 134]
  |  Branch (5065:5): [True: 134, False: 0]
  ------------------
 5066|       |
 5067|    134|    for (;;)
 5068|    510|    {
 5069|    510|        const ZydisDecoderTreeNodeType node_type = ZYDIS_DT_GET_TYPE(*node);
  ------------------
  |  |  349|    510|    ((ZydisDecoderTreeNodeType)((*(node)) & 0xFF))
  ------------------
 5070|    510|        if (node_type == ZYDIS_NODETYPE_DEFINITION)
  ------------------
  |  Branch (5070:13): [True: 134, False: 376]
  ------------------
 5071|    134|        {
 5072|    134|            return ZYAN_STATUS_SUCCESS;
  ------------------
  |  |  164|    134|    ZYAN_MAKE_STATUS(0u, ZYAN_MODULE_ZYCORE, 0x00u)
  |  |  ------------------
  |  |  |  |   68|    134|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
 5073|    134|        }
 5074|       |
 5075|    376|        ZyanU16 index = 0;
 5076|    376|        ZyanStatus status = 0;
 5077|    376|        switch (node_type)
 5078|    376|        {
 5079|     10|        case ZYDIS_NODETYPE_MODE:
  ------------------
  |  Branch (5079:9): [True: 10, False: 366]
  ------------------
 5080|     10|            status = ZydisNodeHandlerMode(instruction, &index);
 5081|     10|            break;
 5082|     46|        case ZYDIS_NODETYPE_MODE_COMPACT:
  ------------------
  |  Branch (5082:9): [True: 46, False: 330]
  ------------------
 5083|     46|            status = ZydisNodeHandlerModeCompact(instruction, &index);
 5084|     46|            break;
 5085|     16|        case ZYDIS_NODETYPE_MODRM_MOD:
  ------------------
  |  Branch (5085:9): [True: 16, False: 360]
  ------------------
 5086|     16|            status = ZydisNodeHandlerModrmMod(state, instruction, &index);
 5087|     16|            break;
 5088|     76|        case ZYDIS_NODETYPE_MODRM_MOD_COMPACT:
  ------------------
  |  Branch (5088:9): [True: 76, False: 300]
  ------------------
 5089|     76|            status = ZydisNodeHandlerModrmModCompact(state, instruction, &index);
 5090|     76|            break;
 5091|     30|        case ZYDIS_NODETYPE_MODRM_REG:
  ------------------
  |  Branch (5091:9): [True: 30, False: 346]
  ------------------
 5092|     30|            status = ZydisNodeHandlerModrmReg(state, instruction, &index);
 5093|     30|            break;
 5094|     10|        case ZYDIS_NODETYPE_MODRM_RM:
  ------------------
  |  Branch (5094:9): [True: 10, False: 366]
  ------------------
 5095|     10|            status = ZydisNodeHandlerModrmRm(state, instruction, &index);
 5096|     10|            break;
 5097|      0|        case ZYDIS_NODETYPE_PREFIX_GROUP1:
  ------------------
  |  Branch (5097:9): [True: 0, False: 376]
  ------------------
 5098|      0|            index = state->prefixes.group1 ? 1 : 0;
  ------------------
  |  Branch (5098:21): [True: 0, False: 0]
  ------------------
 5099|      0|            break;
 5100|     20|        case ZYDIS_NODETYPE_MANDATORY_PREFIX:
  ------------------
  |  Branch (5100:9): [True: 20, False: 356]
  ------------------
 5101|     20|            status = ZydisNodeHandlerMandatoryPrefix(state, &index);
 5102|     20|            break;
 5103|      4|        case ZYDIS_NODETYPE_OPERAND_SIZE:
  ------------------
  |  Branch (5103:9): [True: 4, False: 372]
  ------------------
 5104|      4|            status = ZydisNodeHandlerOperandSize(state, instruction, &index);
 5105|      4|            break;
 5106|      6|        case ZYDIS_NODETYPE_ADDRESS_SIZE:
  ------------------
  |  Branch (5106:9): [True: 6, False: 370]
  ------------------
 5107|      6|            status = ZydisNodeHandlerAddressSize(instruction, &index);
 5108|      6|            break;
 5109|     30|        case ZYDIS_NODETYPE_VECTOR_LENGTH:
  ------------------
  |  Branch (5109:9): [True: 30, False: 346]
  ------------------
 5110|     30|            status = ZydisNodeHandlerVectorLength(state->context, instruction, &index);
 5111|     30|            break;
 5112|     22|        case ZYDIS_NODETYPE_REX_W:
  ------------------
  |  Branch (5112:9): [True: 22, False: 354]
  ------------------
 5113|     22|            status = ZydisNodeHandlerRexW(state->context, instruction, &index);
 5114|     22|            break;
 5115|      0|        case ZYDIS_NODETYPE_REX_B:
  ------------------
  |  Branch (5115:9): [True: 0, False: 376]
  ------------------
 5116|      0|            status = ZydisNodeHandlerRexB(state->context, instruction, &index);
 5117|      0|            break;
 5118|      0|#ifndef ZYDIS_DISABLE_AVX512
 5119|     18|        case ZYDIS_NODETYPE_EVEX_U:
  ------------------
  |  Branch (5119:9): [True: 18, False: 358]
  ------------------
 5120|     18|            status = ZydisNodeHandlerEvexU(state, instruction, &index);
 5121|     18|            break;
 5122|     12|        case ZYDIS_NODETYPE_EVEX_B:
  ------------------
  |  Branch (5122:9): [True: 12, False: 364]
  ------------------
 5123|     12|            status = ZydisNodeHandlerEvexB(instruction, &index);
 5124|     12|            break;
 5125|      0|#endif
 5126|      0|#ifndef ZYDIS_DISABLE_KNC
 5127|      0|        case ZYDIS_NODETYPE_MVEX_E:
  ------------------
  |  Branch (5127:9): [True: 0, False: 376]
  ------------------
 5128|      0|            status = ZydisNodeHandlerMvexE(instruction, &index);
 5129|      0|            break;
 5130|      0|#endif
 5131|      6|        case ZYDIS_NODETYPE_MODE_AMD:
  ------------------
  |  Branch (5131:9): [True: 6, False: 370]
  ------------------
 5132|      6|            index = ZYDIS_DECODER_MODE_ACTIVE(state->decoder, ZYDIS_DECODER_MODE_AMD_BRANCHES);
  ------------------
  |  |   55|      6|    (!!(((decoder)->decoder_mode & (1 << (mode)))))
  ------------------
 5133|      6|            break;
 5134|      0|        case ZYDIS_NODETYPE_MODE_KNC:
  ------------------
  |  Branch (5134:9): [True: 0, False: 376]
  ------------------
 5135|      0|            index = ZYDIS_DECODER_MODE_ACTIVE(state->decoder, ZYDIS_DECODER_MODE_KNC);
  ------------------
  |  |   55|      0|    (!!(((decoder)->decoder_mode & (1 << (mode)))))
  ------------------
 5136|      0|            break;
 5137|      2|        case ZYDIS_NODETYPE_MODE_MPX:
  ------------------
  |  Branch (5137:9): [True: 2, False: 374]
  ------------------
 5138|      2|            index = ZYDIS_DECODER_MODE_ACTIVE(state->decoder, ZYDIS_DECODER_MODE_MPX);
  ------------------
  |  |   55|      2|    (!!(((decoder)->decoder_mode & (1 << (mode)))))
  ------------------
 5139|      2|            break;
 5140|      0|        case ZYDIS_NODETYPE_MODE_CET:
  ------------------
  |  Branch (5140:9): [True: 0, False: 376]
  ------------------
 5141|      0|            index = ZYDIS_DECODER_MODE_ACTIVE(state->decoder, ZYDIS_DECODER_MODE_CET);
  ------------------
  |  |   55|      0|    (!!(((decoder)->decoder_mode & (1 << (mode)))))
  ------------------
 5142|      0|            break;
 5143|      0|        case ZYDIS_NODETYPE_MODE_LZCNT:
  ------------------
  |  Branch (5143:9): [True: 0, False: 376]
  ------------------
 5144|      0|            index = ZYDIS_DECODER_MODE_ACTIVE(state->decoder, ZYDIS_DECODER_MODE_LZCNT);
  ------------------
  |  |   55|      0|    (!!(((decoder)->decoder_mode & (1 << (mode)))))
  ------------------
 5145|      0|            break;
 5146|      0|        case ZYDIS_NODETYPE_MODE_TZCNT:
  ------------------
  |  Branch (5146:9): [True: 0, False: 376]
  ------------------
 5147|      0|            index = ZYDIS_DECODER_MODE_ACTIVE(state->decoder, ZYDIS_DECODER_MODE_TZCNT);
  ------------------
  |  |   55|      0|    (!!(((decoder)->decoder_mode & (1 << (mode)))))
  ------------------
 5148|      0|            break;
 5149|      0|        case ZYDIS_NODETYPE_MODE_WBNOINVD:
  ------------------
  |  Branch (5149:9): [True: 0, False: 376]
  ------------------
 5150|      0|            index = ZYDIS_DECODER_MODE_ACTIVE(state->decoder, ZYDIS_DECODER_MODE_WBNOINVD);
  ------------------
  |  |   55|      0|    (!!(((decoder)->decoder_mode & (1 << (mode)))))
  ------------------
 5151|      0|            break;
 5152|      0|        case ZYDIS_NODETYPE_MODE_CLDEMOTE:
  ------------------
  |  Branch (5152:9): [True: 0, False: 376]
  ------------------
 5153|      0|            index = ZYDIS_DECODER_MODE_ACTIVE(state->decoder, ZYDIS_DECODER_MODE_CLDEMOTE);
  ------------------
  |  |   55|      0|    (!!(((decoder)->decoder_mode & (1 << (mode)))))
  ------------------
 5154|      0|            break;
 5155|      0|        case ZYDIS_NODETYPE_MODE_IPREFETCH:
  ------------------
  |  Branch (5155:9): [True: 0, False: 376]
  ------------------
 5156|      0|            index = ZYDIS_DECODER_MODE_ACTIVE(state->decoder, ZYDIS_DECODER_MODE_IPREFETCH);
  ------------------
  |  |   55|      0|    (!!(((decoder)->decoder_mode & (1 << (mode)))))
  ------------------
 5157|      0|            break;
 5158|      2|        case ZYDIS_NODETYPE_MODE_UD0_COMPAT:
  ------------------
  |  Branch (5158:9): [True: 2, False: 374]
  ------------------
 5159|      2|            index = ZYDIS_DECODER_MODE_ACTIVE(state->decoder, ZYDIS_DECODER_MODE_UD0_COMPAT);
  ------------------
  |  |   55|      2|    (!!(((decoder)->decoder_mode & (1 << (mode)))))
  ------------------
 5160|      2|            break;
 5161|     18|        case ZYDIS_NODETYPE_EVEX_ND:
  ------------------
  |  Branch (5161:9): [True: 18, False: 358]
  ------------------
 5162|     18|            status = ZydisNodeHandlerEvexND(instruction, &index);
 5163|     18|            break;
 5164|     14|        case ZYDIS_NODETYPE_EVEX_NF:
  ------------------
  |  Branch (5164:9): [True: 14, False: 362]
  ------------------
 5165|     14|            status = ZydisNodeHandlerEvexNF(instruction, &index);
 5166|     14|            break;
 5167|      4|        case ZYDIS_NODETYPE_EVEX_SCC:
  ------------------
  |  Branch (5167:9): [True: 4, False: 372]
  ------------------
 5168|      4|            status = ZydisNodeHandlerEvexSCC(instruction, &index);
 5169|      4|            break;
 5170|     30|        case ZYDIS_NODETYPE_REX_2:
  ------------------
  |  Branch (5170:9): [True: 30, False: 346]
  ------------------
 5171|     30|            index = (instruction->encoding == ZYDIS_INSTRUCTION_ENCODING_REX2) ? 1 : 0;
  ------------------
  |  Branch (5171:21): [True: 0, False: 30]
  ------------------
 5172|     30|            break;
 5173|      0|        default:
  ------------------
  |  Branch (5173:9): [True: 0, False: 376]
  ------------------
 5174|      0|            ZYAN_UNREACHABLE;
  ------------------
  |  |  431|      0|#   define ZYAN_UNREACHABLE { assert(0); abort(); }
  ------------------
  |  Branch (5174:13): [Folded, False: 0]
  |  Branch (5174:13): [Folded, False: 0]
  ------------------
 5175|    376|        }
 5176|    376|        ZYAN_CHECK(status);
  ------------------
  |  |  100|    376|    do \
  |  |  101|    376|    { \
  |  |  102|    376|        const ZyanStatus status_047620348 = (status); \
  |  |  103|    376|        if (!ZYAN_SUCCESS(status_047620348)) \
  |  |  ------------------
  |  |  |  |   82|    376|    (!((status) & 0x80000000u))
  |  |  ------------------
  |  |  |  Branch (103:13): [True: 0, False: 376]
  |  |  ------------------
  |  |  104|    376|        { \
  |  |  105|      0|            return status_047620348; \
  |  |  106|      0|        } \
  |  |  107|    376|    } while (0)
  |  |  ------------------
  |  |  |  Branch (107:14): [Folded, False: 376]
  |  |  ------------------
  ------------------
 5177|       |
 5178|    376|        const ZyanU16 offset = ZYDIS_DT_GET_VALUE(*node, index);
  ------------------
  |  |  368|    376|    ((ZyanU16)(*((node) + 1 + (index))))
  ------------------
 5179|    376|        *node += offset;
 5180|       |
 5181|    376|        if (offset == 0)
  ------------------
  |  Branch (5181:13): [True: 0, False: 376]
  ------------------
 5182|      0|        {
 5183|       |            // Offset = 0 => invalid | empty | unused table entry.
 5184|       |
 5185|      0|            if ((node_type == ZYDIS_NODETYPE_REX_2) && (index == 0))
  ------------------
  |  Branch (5185:17): [True: 0, False: 0]
  |  Branch (5185:56): [True: 0, False: 0]
  ------------------
 5186|      0|            {
 5187|      0|                return ZYDIS_STATUS_ILLEGAL_REX2;
  ------------------
  |  |  112|      0|    ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ZYDIS, 0x07u)
  |  |  ------------------
  |  |  |  |   68|      0|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
 5188|      0|            }
 5189|       |
 5190|      0|            return ZYDIS_STATUS_DECODING_ERROR;
  ------------------
  |  |   74|      0|    ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ZYDIS, 0x01u)
  |  |  ------------------
  |  |  |  |   68|      0|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
 5191|      0|        }
 5192|    376|    }
 5193|    134|}
Decoder.c:ZydisNodeHandlerMode:
 4016|     10|{
 4017|     10|    ZYAN_ASSERT(instruction);
  ------------------
  |  |  381|     10|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (4017:5): [True: 0, False: 10]
  |  Branch (4017:5): [True: 10, False: 0]
  ------------------
 4018|     10|    ZYAN_ASSERT(index);
  ------------------
  |  |  381|     10|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (4018:5): [True: 0, False: 10]
  |  Branch (4018:5): [True: 10, False: 0]
  ------------------
 4019|       |
 4020|     10|    switch (instruction->machine_mode)
 4021|     10|    {
 4022|      8|    case ZYDIS_MACHINE_MODE_LONG_COMPAT_16:
  ------------------
  |  Branch (4022:5): [True: 8, False: 2]
  ------------------
 4023|     10|    case ZYDIS_MACHINE_MODE_LEGACY_16:
  ------------------
  |  Branch (4023:5): [True: 2, False: 8]
  ------------------
 4024|     10|    case ZYDIS_MACHINE_MODE_REAL_16:
  ------------------
  |  Branch (4024:5): [True: 0, False: 10]
  ------------------
 4025|     10|        *index = 0;
 4026|     10|        break;
 4027|      0|    case ZYDIS_MACHINE_MODE_LONG_COMPAT_32:
  ------------------
  |  Branch (4027:5): [True: 0, False: 10]
  ------------------
 4028|      0|    case ZYDIS_MACHINE_MODE_LEGACY_32:
  ------------------
  |  Branch (4028:5): [True: 0, False: 10]
  ------------------
 4029|      0|        *index = 1;
 4030|      0|        break;
 4031|      0|    case ZYDIS_MACHINE_MODE_LONG_64:
  ------------------
  |  Branch (4031:5): [True: 0, False: 10]
  ------------------
 4032|      0|        *index = 2;
 4033|      0|        break;
 4034|      0|    default:
  ------------------
  |  Branch (4034:5): [True: 0, False: 10]
  ------------------
 4035|      0|        ZYAN_UNREACHABLE;
  ------------------
  |  |  431|      0|#   define ZYAN_UNREACHABLE { assert(0); abort(); }
  ------------------
  |  Branch (4035:9): [Folded, False: 0]
  |  Branch (4035:9): [Folded, False: 0]
  ------------------
 4036|     10|    }
 4037|     10|    return ZYAN_STATUS_SUCCESS;
  ------------------
  |  |  164|     10|    ZYAN_MAKE_STATUS(0u, ZYAN_MODULE_ZYCORE, 0x00u)
  |  |  ------------------
  |  |  |  |   68|     10|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
 4038|     10|}
Decoder.c:ZydisNodeHandlerModeCompact:
 4042|     46|{
 4043|     46|    ZYAN_ASSERT(instruction);
  ------------------
  |  |  381|     46|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (4043:5): [True: 0, False: 46]
  |  Branch (4043:5): [True: 46, False: 0]
  ------------------
 4044|     46|    ZYAN_ASSERT(index);
  ------------------
  |  |  381|     46|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (4044:5): [True: 0, False: 46]
  |  Branch (4044:5): [True: 46, False: 0]
  ------------------
 4045|       |
 4046|     46|    *index = (instruction->machine_mode == ZYDIS_MACHINE_MODE_LONG_64) ? 0 : 1;
  ------------------
  |  Branch (4046:14): [True: 26, False: 20]
  ------------------
 4047|     46|    return ZYAN_STATUS_SUCCESS;
  ------------------
  |  |  164|     46|    ZYAN_MAKE_STATUS(0u, ZYAN_MODULE_ZYCORE, 0x00u)
  |  |  ------------------
  |  |  |  |   68|     46|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
 4048|     46|}
Decoder.c:ZydisNodeHandlerModrmMod:
 4052|     92|{
 4053|     92|    ZYAN_ASSERT(state);
  ------------------
  |  |  381|     92|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (4053:5): [True: 0, False: 92]
  |  Branch (4053:5): [True: 92, False: 0]
  ------------------
 4054|     92|    ZYAN_ASSERT(instruction);
  ------------------
  |  |  381|     92|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (4054:5): [True: 0, False: 92]
  |  Branch (4054:5): [True: 92, False: 0]
  ------------------
 4055|     92|    ZYAN_ASSERT(index);
  ------------------
  |  |  381|     92|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (4055:5): [True: 0, False: 92]
  |  Branch (4055:5): [True: 92, False: 0]
  ------------------
 4056|       |
 4057|     92|    if (!instruction->raw.modrm.offset)
  ------------------
  |  Branch (4057:9): [True: 76, False: 16]
  ------------------
 4058|     76|    {
 4059|     76|        instruction->raw.modrm.offset = instruction->length;
 4060|     76|        ZyanU8 modrm_byte;
 4061|     76|        ZYAN_CHECK(ZydisInputNext(state, instruction, &modrm_byte));
  ------------------
  |  |  100|     76|    do \
  |  |  101|     76|    { \
  |  |  102|     76|        const ZyanStatus status_047620348 = (status); \
  |  |  103|     76|        if (!ZYAN_SUCCESS(status_047620348)) \
  |  |  ------------------
  |  |  |  |   82|     76|    (!((status) & 0x80000000u))
  |  |  ------------------
  |  |  |  Branch (103:13): [True: 0, False: 76]
  |  |  ------------------
  |  |  104|     76|        { \
  |  |  105|      0|            return status_047620348; \
  |  |  106|      0|        } \
  |  |  107|     76|    } while (0)
  |  |  ------------------
  |  |  |  Branch (107:14): [Folded, False: 76]
  |  |  ------------------
  ------------------
 4062|     76|        ZydisDecodeModRM(instruction, modrm_byte);
 4063|     76|    }
 4064|     92|    *index = instruction->raw.modrm.mod;
 4065|     92|    return ZYAN_STATUS_SUCCESS;
  ------------------
  |  |  164|     92|    ZYAN_MAKE_STATUS(0u, ZYAN_MODULE_ZYCORE, 0x00u)
  |  |  ------------------
  |  |  |  |   68|     92|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
 4066|     92|}
Decoder.c:ZydisNodeHandlerModrmModCompact:
 4070|     76|{
 4071|     76|    ZYAN_CHECK(ZydisNodeHandlerModrmMod(state, instruction, index));
  ------------------
  |  |  100|     76|    do \
  |  |  101|     76|    { \
  |  |  102|     76|        const ZyanStatus status_047620348 = (status); \
  |  |  103|     76|        if (!ZYAN_SUCCESS(status_047620348)) \
  |  |  ------------------
  |  |  |  |   82|     76|    (!((status) & 0x80000000u))
  |  |  ------------------
  |  |  |  Branch (103:13): [True: 0, False: 76]
  |  |  ------------------
  |  |  104|     76|        { \
  |  |  105|      0|            return status_047620348; \
  |  |  106|      0|        } \
  |  |  107|     76|    } while (0)
  |  |  ------------------
  |  |  |  Branch (107:14): [Folded, False: 76]
  |  |  ------------------
  ------------------
 4072|     76|    *index = (*index == 0x3) ? 0 : 1;
  ------------------
  |  Branch (4072:14): [True: 40, False: 36]
  ------------------
 4073|     76|    return ZYAN_STATUS_SUCCESS;
  ------------------
  |  |  164|     76|    ZYAN_MAKE_STATUS(0u, ZYAN_MODULE_ZYCORE, 0x00u)
  |  |  ------------------
  |  |  |  |   68|     76|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
 4074|     76|}
Decoder.c:ZydisNodeHandlerModrmReg:
 4078|     30|{
 4079|     30|    ZYAN_ASSERT(state);
  ------------------
  |  |  381|     30|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (4079:5): [True: 0, False: 30]
  |  Branch (4079:5): [True: 30, False: 0]
  ------------------
 4080|     30|    ZYAN_ASSERT(instruction);
  ------------------
  |  |  381|     30|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (4080:5): [True: 0, False: 30]
  |  Branch (4080:5): [True: 30, False: 0]
  ------------------
 4081|     30|    ZYAN_ASSERT(index);
  ------------------
  |  |  381|     30|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (4081:5): [True: 0, False: 30]
  |  Branch (4081:5): [True: 30, False: 0]
  ------------------
 4082|       |
 4083|     30|    if (!instruction->raw.modrm.offset)
  ------------------
  |  Branch (4083:9): [True: 8, False: 22]
  ------------------
 4084|      8|    {
 4085|      8|        instruction->raw.modrm.offset = instruction->length;
 4086|      8|        ZyanU8 modrm_byte;
 4087|      8|        ZYAN_CHECK(ZydisInputNext(state, instruction, &modrm_byte));
  ------------------
  |  |  100|      8|    do \
  |  |  101|      8|    { \
  |  |  102|      8|        const ZyanStatus status_047620348 = (status); \
  |  |  103|      8|        if (!ZYAN_SUCCESS(status_047620348)) \
  |  |  ------------------
  |  |  |  |   82|      8|    (!((status) & 0x80000000u))
  |  |  ------------------
  |  |  |  Branch (103:13): [True: 0, False: 8]
  |  |  ------------------
  |  |  104|      8|        { \
  |  |  105|      0|            return status_047620348; \
  |  |  106|      0|        } \
  |  |  107|      8|    } while (0)
  |  |  ------------------
  |  |  |  Branch (107:14): [Folded, False: 8]
  |  |  ------------------
  ------------------
 4088|      8|        ZydisDecodeModRM(instruction, modrm_byte);
 4089|      8|    }
 4090|     30|    *index = instruction->raw.modrm.reg;
 4091|     30|    return ZYAN_STATUS_SUCCESS;
  ------------------
  |  |  164|     30|    ZYAN_MAKE_STATUS(0u, ZYAN_MODULE_ZYCORE, 0x00u)
  |  |  ------------------
  |  |  |  |   68|     30|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
 4092|     30|}
Decoder.c:ZydisNodeHandlerModrmRm:
 4096|     10|{
 4097|     10|    ZYAN_ASSERT(state);
  ------------------
  |  |  381|     10|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (4097:5): [True: 0, False: 10]
  |  Branch (4097:5): [True: 10, False: 0]
  ------------------
 4098|     10|    ZYAN_ASSERT(instruction);
  ------------------
  |  |  381|     10|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (4098:5): [True: 0, False: 10]
  |  Branch (4098:5): [True: 10, False: 0]
  ------------------
 4099|     10|    ZYAN_ASSERT(index);
  ------------------
  |  |  381|     10|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (4099:5): [True: 0, False: 10]
  |  Branch (4099:5): [True: 10, False: 0]
  ------------------
 4100|       |
 4101|     10|    if (!instruction->raw.modrm.offset)
  ------------------
  |  Branch (4101:9): [True: 0, False: 10]
  ------------------
 4102|      0|    {
 4103|      0|        instruction->raw.modrm.offset = instruction->length;
 4104|      0|        ZyanU8 modrm_byte;
 4105|      0|        ZYAN_CHECK(ZydisInputNext(state, instruction, &modrm_byte));
  ------------------
  |  |  100|      0|    do \
  |  |  101|      0|    { \
  |  |  102|      0|        const ZyanStatus status_047620348 = (status); \
  |  |  103|      0|        if (!ZYAN_SUCCESS(status_047620348)) \
  |  |  ------------------
  |  |  |  |   82|      0|    (!((status) & 0x80000000u))
  |  |  ------------------
  |  |  |  Branch (103:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  104|      0|        { \
  |  |  105|      0|            return status_047620348; \
  |  |  106|      0|        } \
  |  |  107|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (107:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 4106|      0|        ZydisDecodeModRM(instruction, modrm_byte);
 4107|      0|    }
 4108|     10|    *index = instruction->raw.modrm.rm;
 4109|     10|    return ZYAN_STATUS_SUCCESS;
  ------------------
  |  |  164|     10|    ZYAN_MAKE_STATUS(0u, ZYAN_MODULE_ZYCORE, 0x00u)
  |  |  ------------------
  |  |  |  |   68|     10|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
 4110|     10|}
Decoder.c:ZydisNodeHandlerMandatoryPrefix:
 4113|     20|{
 4114|     20|    ZYAN_ASSERT(state);
  ------------------
  |  |  381|     20|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (4114:5): [True: 0, False: 20]
  |  Branch (4114:5): [True: 20, False: 0]
  ------------------
 4115|     20|    ZYAN_ASSERT(index);
  ------------------
  |  |  381|     20|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (4115:5): [True: 0, False: 20]
  |  Branch (4115:5): [True: 20, False: 0]
  ------------------
 4116|       |
 4117|       |    // Pure routing: whether the candidate is actually consumed (and how the prefix is
 4118|       |    // classified) is decided at definition time, once the acting definition is known.
 4119|     20|    switch (state->prefixes.mandatory_candidate)
 4120|     20|    {
 4121|      6|    case 0x66: *index = 2; break;
  ------------------
  |  Branch (4121:5): [True: 6, False: 14]
  ------------------
 4122|      2|    case 0xF3: *index = 3; break;
  ------------------
  |  Branch (4122:5): [True: 2, False: 18]
  ------------------
 4123|      2|    case 0xF2: *index = 4; break;
  ------------------
  |  Branch (4123:5): [True: 2, False: 18]
  ------------------
 4124|     10|    default:   *index = 1; break;
  ------------------
  |  Branch (4124:5): [True: 10, False: 10]
  ------------------
 4125|     20|    }
 4126|       |
 4127|     20|    return ZYAN_STATUS_SUCCESS;
  ------------------
  |  |  164|     20|    ZYAN_MAKE_STATUS(0u, ZYAN_MODULE_ZYCORE, 0x00u)
  |  |  ------------------
  |  |  |  |   68|     20|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
 4128|     20|}
Decoder.c:ZydisNodeHandlerOperandSize:
 4132|      4|{
 4133|      4|    ZYAN_ASSERT(state);
  ------------------
  |  |  381|      4|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (4133:5): [True: 0, False: 4]
  |  Branch (4133:5): [True: 4, False: 0]
  ------------------
 4134|      4|    ZYAN_ASSERT(instruction);
  ------------------
  |  |  381|      4|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (4134:5): [True: 0, False: 4]
  |  Branch (4134:5): [True: 4, False: 0]
  ------------------
 4135|      4|    ZYAN_ASSERT(index);
  ------------------
  |  |  381|      4|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (4135:5): [True: 0, False: 4]
  |  Branch (4135:5): [True: 4, False: 0]
  ------------------
 4136|       |
 4137|      4|    if ((instruction->machine_mode == ZYDIS_MACHINE_MODE_LONG_64) &&
  ------------------
  |  Branch (4137:9): [True: 0, False: 4]
  ------------------
 4138|      0|        (state->context->vector_unified.W))
  ------------------
  |  Branch (4138:9): [True: 0, False: 0]
  ------------------
 4139|      0|    {
 4140|      0|        *index = 2;
 4141|      0|    } else
 4142|      4|    {
 4143|      4|        switch (instruction->machine_mode)
 4144|      4|        {
 4145|      0|        case ZYDIS_MACHINE_MODE_LONG_COMPAT_16:
  ------------------
  |  Branch (4145:9): [True: 0, False: 4]
  ------------------
 4146|      2|        case ZYDIS_MACHINE_MODE_LEGACY_16:
  ------------------
  |  Branch (4146:9): [True: 2, False: 2]
  ------------------
 4147|      2|        case ZYDIS_MACHINE_MODE_REAL_16:
  ------------------
  |  Branch (4147:9): [True: 0, False: 4]
  ------------------
 4148|      2|            *index = (instruction->attributes & ZYDIS_ATTRIB_HAS_OPERANDSIZE) ? 1 : 0;
  ------------------
  |  |  737|      2|#define ZYDIS_ATTRIB_HAS_OPERANDSIZE            (1ULL << 43) // TODO: rename
  ------------------
  |  Branch (4148:22): [True: 2, False: 0]
  ------------------
 4149|      2|            break;
 4150|      2|        case ZYDIS_MACHINE_MODE_LONG_COMPAT_32:
  ------------------
  |  Branch (4150:9): [True: 2, False: 2]
  ------------------
 4151|      2|        case ZYDIS_MACHINE_MODE_LEGACY_32:
  ------------------
  |  Branch (4151:9): [True: 0, False: 4]
  ------------------
 4152|      2|        case ZYDIS_MACHINE_MODE_LONG_64:
  ------------------
  |  Branch (4152:9): [True: 0, False: 4]
  ------------------
 4153|      2|            *index = (instruction->attributes & ZYDIS_ATTRIB_HAS_OPERANDSIZE) ? 0 : 1;
  ------------------
  |  |  737|      2|#define ZYDIS_ATTRIB_HAS_OPERANDSIZE            (1ULL << 43) // TODO: rename
  ------------------
  |  Branch (4153:22): [True: 0, False: 2]
  ------------------
 4154|      2|            break;
 4155|      0|        default:
  ------------------
  |  Branch (4155:9): [True: 0, False: 4]
  ------------------
 4156|      0|            ZYAN_UNREACHABLE;
  ------------------
  |  |  431|      0|#   define ZYAN_UNREACHABLE { assert(0); abort(); }
  ------------------
  |  Branch (4156:13): [Folded, False: 0]
  |  Branch (4156:13): [Folded, False: 0]
  ------------------
 4157|      4|        }
 4158|      4|    }
 4159|       |
 4160|      4|    return ZYAN_STATUS_SUCCESS;
  ------------------
  |  |  164|      4|    ZYAN_MAKE_STATUS(0u, ZYAN_MODULE_ZYCORE, 0x00u)
  |  |  ------------------
  |  |  |  |   68|      4|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
 4161|      4|}
Decoder.c:ZydisNodeHandlerAddressSize:
 4164|      6|{
 4165|      6|    ZYAN_ASSERT(instruction);
  ------------------
  |  |  381|      6|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (4165:5): [True: 0, False: 6]
  |  Branch (4165:5): [True: 6, False: 0]
  ------------------
 4166|      6|    ZYAN_ASSERT(index);
  ------------------
  |  |  381|      6|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (4166:5): [True: 0, False: 6]
  |  Branch (4166:5): [True: 6, False: 0]
  ------------------
 4167|       |
 4168|       |    /*if (instruction->attributes & ZYDIS_ATTRIB_HAS_ADDRESSSIZE)
 4169|       |    {
 4170|       |        instruction->raw.prefixes[context->prefixes.offset_asz_override].type =
 4171|       |            ZYDIS_PREFIX_TYPE_EFFECTIVE;
 4172|       |    }*/
 4173|      6|    switch (instruction->machine_mode)
 4174|      6|    {
 4175|      2|    case ZYDIS_MACHINE_MODE_LONG_COMPAT_16:
  ------------------
  |  Branch (4175:5): [True: 2, False: 4]
  ------------------
 4176|      4|    case ZYDIS_MACHINE_MODE_LEGACY_16:
  ------------------
  |  Branch (4176:5): [True: 2, False: 4]
  ------------------
 4177|      4|    case ZYDIS_MACHINE_MODE_REAL_16:
  ------------------
  |  Branch (4177:5): [True: 0, False: 6]
  ------------------
 4178|      4|        *index = (instruction->attributes & ZYDIS_ATTRIB_HAS_ADDRESSSIZE) ? 1 : 0;
  ------------------
  |  |  741|      4|#define ZYDIS_ATTRIB_HAS_ADDRESSSIZE            (1ULL << 44) // TODO: rename
  ------------------
  |  Branch (4178:18): [True: 4, False: 0]
  ------------------
 4179|      4|        break;
 4180|      0|    case ZYDIS_MACHINE_MODE_LONG_COMPAT_32:
  ------------------
  |  Branch (4180:5): [True: 0, False: 6]
  ------------------
 4181|      0|    case ZYDIS_MACHINE_MODE_LEGACY_32:
  ------------------
  |  Branch (4181:5): [True: 0, False: 6]
  ------------------
 4182|      0|        *index = (instruction->attributes & ZYDIS_ATTRIB_HAS_ADDRESSSIZE) ? 0 : 1;
  ------------------
  |  |  741|      0|#define ZYDIS_ATTRIB_HAS_ADDRESSSIZE            (1ULL << 44) // TODO: rename
  ------------------
  |  Branch (4182:18): [True: 0, False: 0]
  ------------------
 4183|      0|        break;
 4184|      2|    case ZYDIS_MACHINE_MODE_LONG_64:
  ------------------
  |  Branch (4184:5): [True: 2, False: 4]
  ------------------
 4185|      2|        *index = (instruction->attributes & ZYDIS_ATTRIB_HAS_ADDRESSSIZE) ? 1 : 2;
  ------------------
  |  |  741|      2|#define ZYDIS_ATTRIB_HAS_ADDRESSSIZE            (1ULL << 44) // TODO: rename
  ------------------
  |  Branch (4185:18): [True: 2, False: 0]
  ------------------
 4186|      2|        break;
 4187|      0|    default:
  ------------------
  |  Branch (4187:5): [True: 0, False: 6]
  ------------------
 4188|      0|        ZYAN_UNREACHABLE;
  ------------------
  |  |  431|      0|#   define ZYAN_UNREACHABLE { assert(0); abort(); }
  ------------------
  |  Branch (4188:9): [Folded, False: 0]
  |  Branch (4188:9): [Folded, False: 0]
  ------------------
 4189|      6|    }
 4190|       |
 4191|      6|    return ZYAN_STATUS_SUCCESS;
  ------------------
  |  |  164|      6|    ZYAN_MAKE_STATUS(0u, ZYAN_MODULE_ZYCORE, 0x00u)
  |  |  ------------------
  |  |  |  |   68|      6|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
 4192|      6|}
Decoder.c:ZydisNodeHandlerVectorLength:
 4196|     30|{
 4197|     30|    ZYAN_ASSERT(context);
  ------------------
  |  |  381|     30|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (4197:5): [True: 0, False: 30]
  |  Branch (4197:5): [True: 30, False: 0]
  ------------------
 4198|     30|    ZYAN_ASSERT(instruction);
  ------------------
  |  |  381|     30|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (4198:5): [True: 0, False: 30]
  |  Branch (4198:5): [True: 30, False: 0]
  ------------------
 4199|     30|    ZYAN_ASSERT(index);
  ------------------
  |  |  381|     30|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (4199:5): [True: 0, False: 30]
  |  Branch (4199:5): [True: 30, False: 0]
  ------------------
 4200|       |
 4201|     30|    switch (instruction->encoding)
 4202|     30|    {
 4203|      2|    case ZYDIS_INSTRUCTION_ENCODING_XOP:
  ------------------
  |  Branch (4203:5): [True: 2, False: 28]
  ------------------
 4204|      2|        ZYAN_ASSERT(instruction->attributes & ZYDIS_ATTRIB_HAS_XOP);
  ------------------
  |  |  381|      2|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (4204:9): [True: 0, False: 2]
  |  Branch (4204:9): [True: 2, False: 0]
  ------------------
 4205|      2|        break;
 4206|      2|    case ZYDIS_INSTRUCTION_ENCODING_VEX:
  ------------------
  |  Branch (4206:5): [True: 0, False: 30]
  ------------------
 4207|      0|        ZYAN_ASSERT(instruction->attributes & ZYDIS_ATTRIB_HAS_VEX);
  ------------------
  |  |  381|      0|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (4207:9): [True: 0, False: 0]
  |  Branch (4207:9): [True: 0, False: 0]
  ------------------
 4208|      0|        break;
 4209|     28|    case ZYDIS_INSTRUCTION_ENCODING_EVEX:
  ------------------
  |  Branch (4209:5): [True: 28, False: 2]
  ------------------
 4210|     28|        ZYAN_ASSERT(instruction->attributes & ZYDIS_ATTRIB_HAS_EVEX);
  ------------------
  |  |  381|     28|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (4210:9): [True: 0, False: 28]
  |  Branch (4210:9): [True: 28, False: 0]
  ------------------
 4211|     28|        break;
 4212|     28|    case ZYDIS_INSTRUCTION_ENCODING_MVEX:
  ------------------
  |  Branch (4212:5): [True: 0, False: 30]
  ------------------
 4213|      0|        ZYAN_ASSERT(instruction->attributes & ZYDIS_ATTRIB_HAS_MVEX);
  ------------------
  |  |  381|      0|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (4213:9): [True: 0, False: 0]
  |  Branch (4213:9): [True: 0, False: 0]
  ------------------
 4214|      0|        break;
 4215|      0|    default:
  ------------------
  |  Branch (4215:5): [True: 0, False: 30]
  ------------------
 4216|      0|        ZYAN_UNREACHABLE;
  ------------------
  |  |  431|      0|#   define ZYAN_UNREACHABLE { assert(0); abort(); }
  ------------------
  |  Branch (4216:9): [Folded, False: 0]
  |  Branch (4216:9): [Folded, False: 0]
  ------------------
 4217|     30|    }
 4218|       |
 4219|     30|    *index = context->vector_unified.LL;
 4220|     30|    if (*index == 3)
  ------------------
  |  Branch (4220:9): [True: 0, False: 30]
  ------------------
 4221|      0|    {
 4222|      0|        return ZYDIS_STATUS_DECODING_ERROR;
  ------------------
  |  |   74|      0|    ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ZYDIS, 0x01u)
  |  |  ------------------
  |  |  |  |   68|      0|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
 4223|      0|    }
 4224|     30|    return ZYAN_STATUS_SUCCESS;
  ------------------
  |  |  164|     30|    ZYAN_MAKE_STATUS(0u, ZYAN_MODULE_ZYCORE, 0x00u)
  |  |  ------------------
  |  |  |  |   68|     30|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
 4225|     30|}
Decoder.c:ZydisNodeHandlerRexW:
 4229|     22|{
 4230|     22|    ZYAN_ASSERT(context);
  ------------------
  |  |  381|     22|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (4230:5): [True: 0, False: 22]
  |  Branch (4230:5): [True: 22, False: 0]
  ------------------
 4231|     22|    ZYAN_ASSERT(instruction);
  ------------------
  |  |  381|     22|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (4231:5): [True: 0, False: 22]
  |  Branch (4231:5): [True: 22, False: 0]
  ------------------
 4232|     22|    ZYAN_ASSERT(index);
  ------------------
  |  |  381|     22|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (4232:5): [True: 0, False: 22]
  |  Branch (4232:5): [True: 22, False: 0]
  ------------------
 4233|       |
 4234|     22|    switch (instruction->encoding)
 4235|     22|    {
 4236|      6|    case ZYDIS_INSTRUCTION_ENCODING_LEGACY:
  ------------------
  |  Branch (4236:5): [True: 6, False: 16]
  ------------------
 4237|       |        // nothing to do here
 4238|      6|        break;
 4239|      0|    case ZYDIS_INSTRUCTION_ENCODING_XOP:
  ------------------
  |  Branch (4239:5): [True: 0, False: 22]
  ------------------
 4240|      0|        ZYAN_ASSERT(instruction->attributes & ZYDIS_ATTRIB_HAS_XOP);
  ------------------
  |  |  381|      0|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (4240:9): [True: 0, False: 0]
  |  Branch (4240:9): [True: 0, False: 0]
  ------------------
 4241|      0|        break;
 4242|      0|    case ZYDIS_INSTRUCTION_ENCODING_VEX:
  ------------------
  |  Branch (4242:5): [True: 0, False: 22]
  ------------------
 4243|      0|        ZYAN_ASSERT(instruction->attributes & ZYDIS_ATTRIB_HAS_VEX);
  ------------------
  |  |  381|      0|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (4243:9): [True: 0, False: 0]
  |  Branch (4243:9): [True: 0, False: 0]
  ------------------
 4244|      0|        break;
 4245|     16|    case ZYDIS_INSTRUCTION_ENCODING_EVEX:
  ------------------
  |  Branch (4245:5): [True: 16, False: 6]
  ------------------
 4246|     16|        ZYAN_ASSERT(instruction->attributes & ZYDIS_ATTRIB_HAS_EVEX);
  ------------------
  |  |  381|     16|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (4246:9): [True: 0, False: 16]
  |  Branch (4246:9): [True: 16, False: 0]
  ------------------
 4247|     16|        break;
 4248|     16|    case ZYDIS_INSTRUCTION_ENCODING_MVEX:
  ------------------
  |  Branch (4248:5): [True: 0, False: 22]
  ------------------
 4249|      0|        ZYAN_ASSERT(instruction->attributes & ZYDIS_ATTRIB_HAS_MVEX);
  ------------------
  |  |  381|      0|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (4249:9): [True: 0, False: 0]
  |  Branch (4249:9): [True: 0, False: 0]
  ------------------
 4250|      0|        break;
 4251|      0|    case ZYDIS_INSTRUCTION_ENCODING_REX2:
  ------------------
  |  Branch (4251:5): [True: 0, False: 22]
  ------------------
 4252|      0|        ZYAN_ASSERT(instruction->attributes & ZYDIS_ATTRIB_HAS_REX2);
  ------------------
  |  |  381|      0|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (4252:9): [True: 0, False: 0]
  |  Branch (4252:9): [True: 0, False: 0]
  ------------------
 4253|      0|        break;
 4254|      0|    default:
  ------------------
  |  Branch (4254:5): [True: 0, False: 22]
  ------------------
 4255|      0|        ZYAN_UNREACHABLE;
  ------------------
  |  |  431|      0|#   define ZYAN_UNREACHABLE { assert(0); abort(); }
  ------------------
  |  Branch (4255:9): [Folded, False: 0]
  |  Branch (4255:9): [Folded, False: 0]
  ------------------
 4256|     22|    }
 4257|     22|    *index = context->vector_unified.W;
 4258|     22|    return ZYAN_STATUS_SUCCESS;
  ------------------
  |  |  164|     22|    ZYAN_MAKE_STATUS(0u, ZYAN_MODULE_ZYCORE, 0x00u)
  |  |  ------------------
  |  |  |  |   68|     22|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
 4259|     22|}
Decoder.c:ZydisNodeHandlerEvexU:
 4301|     18|{
 4302|     18|    ZYAN_ASSERT(state);
  ------------------
  |  |  381|     18|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (4302:5): [True: 0, False: 18]
  |  Branch (4302:5): [True: 18, False: 0]
  ------------------
 4303|     18|    ZYAN_ASSERT(instruction);
  ------------------
  |  |  381|     18|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (4303:5): [True: 0, False: 18]
  |  Branch (4303:5): [True: 18, False: 0]
  ------------------
 4304|     18|    ZYAN_ASSERT(index);
  ------------------
  |  |  381|     18|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (4304:5): [True: 0, False: 18]
  |  Branch (4304:5): [True: 18, False: 0]
  ------------------
 4305|       |
 4306|     18|    ZYAN_ASSERT(instruction->encoding == ZYDIS_INSTRUCTION_ENCODING_EVEX);
  ------------------
  |  |  381|     18|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (4306:5): [True: 0, False: 18]
  |  Branch (4306:5): [True: 18, False: 0]
  ------------------
 4307|     18|    ZYAN_ASSERT(instruction->attributes & ZYDIS_ATTRIB_HAS_EVEX);
  ------------------
  |  |  381|     18|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (4307:5): [True: 0, False: 18]
  |  Branch (4307:5): [True: 18, False: 0]
  ------------------
 4308|       |
 4309|       |    // The APX `EVEX.U`/`EVEX.X4` reinterpretation depends on `modrm.mod`, so the filter must
 4310|       |    // fetch the `ModRM` byte itself rather than assume an earlier node already did.
 4311|     18|    if (!instruction->raw.modrm.offset)
  ------------------
  |  Branch (4311:9): [True: 8, False: 10]
  ------------------
 4312|      8|    {
 4313|      8|        instruction->raw.modrm.offset = instruction->length;
 4314|      8|        ZyanU8 modrm_byte;
 4315|      8|        ZYAN_CHECK(ZydisInputNext(state, instruction, &modrm_byte));
  ------------------
  |  |  100|      8|    do \
  |  |  101|      8|    { \
  |  |  102|      8|        const ZyanStatus status_047620348 = (status); \
  |  |  103|      8|        if (!ZYAN_SUCCESS(status_047620348)) \
  |  |  ------------------
  |  |  |  |   82|      8|    (!((status) & 0x80000000u))
  |  |  ------------------
  |  |  |  Branch (103:13): [True: 0, False: 8]
  |  |  ------------------
  |  |  104|      8|        { \
  |  |  105|      0|            return status_047620348; \
  |  |  106|      0|        } \
  |  |  107|      8|    } while (0)
  |  |  ------------------
  |  |  |  Branch (107:14): [Folded, False: 8]
  |  |  ------------------
  ------------------
 4316|      8|        ZydisDecodeModRM(instruction, modrm_byte);
 4317|      8|    }
 4318|       |
 4319|     18|    *index = instruction->raw.evex.U;
 4320|       |
 4321|     18|    if (!ZYDIS_DECODER_MODE_ACTIVE(state->decoder, ZYDIS_DECODER_MODE_APX)) // TODO: AVX10.2
  ------------------
  |  |   55|     18|    (!!(((decoder)->decoder_mode & (1 << (mode)))))
  ------------------
  |  Branch (4321:9): [True: 0, False: 18]
  ------------------
 4322|      0|    {
 4323|      0|        return ZYAN_STATUS_SUCCESS;
  ------------------
  |  |  164|      0|    ZYAN_MAKE_STATUS(0u, ZYAN_MODULE_ZYCORE, 0x00u)
  |  |  ------------------
  |  |  |  |   68|      0|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
 4324|      0|    }
 4325|       |
 4326|     18|    if ((instruction->attributes & ZYDIS_ATTRIB_HAS_MODRM) && (instruction->raw.modrm.mod != 3))
  ------------------
  |  |  536|     18|#define ZYDIS_ATTRIB_HAS_MODRM                  (1ULL <<  0)
  ------------------
  |  Branch (4326:9): [True: 18, False: 0]
  |  Branch (4326:63): [True: 8, False: 10]
  ------------------
 4327|      8|    {
 4328|       |        // APX reinterprets `EVEX.U` as `EVEX.X4` for instructions with memory operands
 4329|       |        // (`modrm.mod != 3`).
 4330|       |
 4331|       |        // We don't care about the actual value of `EVEX.U` in this case and force it to `1` to
 4332|       |        // emulate legacy `EVEX` instruction behavior.
 4333|       |
 4334|      8|        *index = 1;
 4335|      8|    }
 4336|       |
 4337|     18|    return ZYAN_STATUS_SUCCESS;
  ------------------
  |  |  164|     18|    ZYAN_MAKE_STATUS(0u, ZYAN_MODULE_ZYCORE, 0x00u)
  |  |  ------------------
  |  |  |  |   68|     18|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
 4338|     18|}
Decoder.c:ZydisNodeHandlerEvexB:
 4341|     12|{
 4342|     12|    ZYAN_ASSERT(instruction);
  ------------------
  |  |  381|     12|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (4342:5): [True: 0, False: 12]
  |  Branch (4342:5): [True: 12, False: 0]
  ------------------
 4343|     12|    ZYAN_ASSERT(index);
  ------------------
  |  |  381|     12|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (4343:5): [True: 0, False: 12]
  |  Branch (4343:5): [True: 12, False: 0]
  ------------------
 4344|       |
 4345|     12|    ZYAN_ASSERT(instruction->encoding == ZYDIS_INSTRUCTION_ENCODING_EVEX);
  ------------------
  |  |  381|     12|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (4345:5): [True: 0, False: 12]
  |  Branch (4345:5): [True: 12, False: 0]
  ------------------
 4346|     12|    ZYAN_ASSERT(instruction->attributes & ZYDIS_ATTRIB_HAS_EVEX);
  ------------------
  |  |  381|     12|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (4346:5): [True: 0, False: 12]
  |  Branch (4346:5): [True: 12, False: 0]
  ------------------
 4347|     12|    *index = instruction->raw.evex.b;
 4348|     12|    return ZYAN_STATUS_SUCCESS;
  ------------------
  |  |  164|     12|    ZYAN_MAKE_STATUS(0u, ZYAN_MODULE_ZYCORE, 0x00u)
  |  |  ------------------
  |  |  |  |   68|     12|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
 4349|     12|}
Decoder.c:ZydisNodeHandlerEvexND:
 4353|     18|{
 4354|     18|    ZYAN_ASSERT(instruction);
  ------------------
  |  |  381|     18|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (4354:5): [True: 0, False: 18]
  |  Branch (4354:5): [True: 18, False: 0]
  ------------------
 4355|     18|    ZYAN_ASSERT(index);
  ------------------
  |  |  381|     18|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (4355:5): [True: 0, False: 18]
  |  Branch (4355:5): [True: 18, False: 0]
  ------------------
 4356|       |
 4357|     18|    ZYAN_ASSERT(instruction->encoding == ZYDIS_INSTRUCTION_ENCODING_EVEX);
  ------------------
  |  |  381|     18|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (4357:5): [True: 0, False: 18]
  |  Branch (4357:5): [True: 18, False: 0]
  ------------------
 4358|     18|    ZYAN_ASSERT(instruction->attributes & ZYDIS_ATTRIB_HAS_EVEX);
  ------------------
  |  |  381|     18|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (4358:5): [True: 0, False: 18]
  |  Branch (4358:5): [True: 18, False: 0]
  ------------------
 4359|       |
 4360|       |    // TODO: Error conditions
 4361|       |
 4362|     18|    *index = instruction->raw.evex.ND;
 4363|     18|    return ZYAN_STATUS_SUCCESS;
  ------------------
  |  |  164|     18|    ZYAN_MAKE_STATUS(0u, ZYAN_MODULE_ZYCORE, 0x00u)
  |  |  ------------------
  |  |  |  |   68|     18|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
 4364|     18|}
Decoder.c:ZydisNodeHandlerEvexNF:
 4368|     14|{
 4369|     14|    ZYAN_ASSERT(instruction);
  ------------------
  |  |  381|     14|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (4369:5): [True: 0, False: 14]
  |  Branch (4369:5): [True: 14, False: 0]
  ------------------
 4370|     14|    ZYAN_ASSERT(index);
  ------------------
  |  |  381|     14|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (4370:5): [True: 0, False: 14]
  |  Branch (4370:5): [True: 14, False: 0]
  ------------------
 4371|       |
 4372|     14|    ZYAN_ASSERT(instruction->encoding == ZYDIS_INSTRUCTION_ENCODING_EVEX);
  ------------------
  |  |  381|     14|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (4372:5): [True: 0, False: 14]
  |  Branch (4372:5): [True: 14, False: 0]
  ------------------
 4373|     14|    ZYAN_ASSERT(instruction->attributes & ZYDIS_ATTRIB_HAS_EVEX);
  ------------------
  |  |  381|     14|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (4373:5): [True: 0, False: 14]
  |  Branch (4373:5): [True: 14, False: 0]
  ------------------
 4374|       |
 4375|       |    // Error conditions and mask normalization live in `ZydisCheckErrorConditions`, keyed on the
 4376|       |    // `has_apx_nf_check` definition flag.
 4377|       |
 4378|     14|    *index = instruction->raw.evex.NF;
 4379|     14|    return ZYAN_STATUS_SUCCESS;
  ------------------
  |  |  164|     14|    ZYAN_MAKE_STATUS(0u, ZYAN_MODULE_ZYCORE, 0x00u)
  |  |  ------------------
  |  |  |  |   68|     14|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
 4380|     14|}
Decoder.c:ZydisNodeHandlerEvexSCC:
 4384|      4|{
 4385|      4|    ZYAN_ASSERT(instruction);
  ------------------
  |  |  381|      4|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (4385:5): [True: 0, False: 4]
  |  Branch (4385:5): [True: 4, False: 0]
  ------------------
 4386|      4|    ZYAN_ASSERT(index);
  ------------------
  |  |  381|      4|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (4386:5): [True: 0, False: 4]
  |  Branch (4386:5): [True: 4, False: 0]
  ------------------
 4387|       |
 4388|      4|    ZYAN_ASSERT(instruction->encoding == ZYDIS_INSTRUCTION_ENCODING_EVEX);
  ------------------
  |  |  381|      4|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (4388:5): [True: 0, False: 4]
  |  Branch (4388:5): [True: 4, False: 0]
  ------------------
 4389|      4|    ZYAN_ASSERT(instruction->attributes & ZYDIS_ATTRIB_HAS_EVEX);
  ------------------
  |  |  381|      4|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (4389:5): [True: 0, False: 4]
  |  Branch (4389:5): [True: 4, False: 0]
  ------------------
 4390|       |
 4391|       |    // Error conditions and the `vvvv`/`V4`/`mask` DFV normalization live in
 4392|       |    // `ZydisCheckErrorConditions`, keyed on the `has_apx_scc` definition flag.
 4393|       |
 4394|      4|    *index = instruction->raw.evex.SCC;
 4395|      4|    return ZYAN_STATUS_SUCCESS;
  ------------------
  |  |  164|      4|    ZYAN_MAKE_STATUS(0u, ZYAN_MODULE_ZYCORE, 0x00u)
  |  |  ------------------
  |  |  |  |   68|      4|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
 4396|      4|}
Decoder.c:ZydisSetAttributes:
 2075|    174|{
 2076|    174|    ZYAN_ASSERT(state);
  ------------------
  |  |  381|    174|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (2076:5): [True: 0, False: 174]
  |  Branch (2076:5): [True: 174, False: 0]
  ------------------
 2077|    174|    ZYAN_ASSERT(instruction);
  ------------------
  |  |  381|    174|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (2077:5): [True: 0, False: 174]
  |  Branch (2077:5): [True: 174, False: 0]
  ------------------
 2078|    174|    ZYAN_ASSERT(definition);
  ------------------
  |  |  381|    174|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (2078:5): [True: 0, False: 174]
  |  Branch (2078:5): [True: 174, False: 0]
  ------------------
 2079|       |
 2080|    174|    if (definition->cpu_state != ZYDIS_RW_ACTION_NONE)
  ------------------
  |  Branch (2080:9): [True: 2, False: 172]
  ------------------
 2081|      2|    {
 2082|      2|        static const ZydisInstructionAttributes mapping[ZYDIS_RW_ACTION_MAX_VALUE + 1] =
 2083|      2|        {
 2084|      2|            /* NONE      */ 0,
 2085|      2|            /* READ      */ ZYDIS_ATTRIB_CPU_STATE_CR,
  ------------------
  |  |  578|      2|#define ZYDIS_ATTRIB_CPU_STATE_CR               (1ULL << 10)
  ------------------
 2086|      2|            /* WRITE     */ ZYDIS_ATTRIB_CPU_STATE_CW,
  ------------------
  |  |  582|      2|#define ZYDIS_ATTRIB_CPU_STATE_CW               (1ULL << 11)
  ------------------
 2087|      2|            /* READWRITE */ ZYDIS_ATTRIB_CPU_STATE_CR | ZYDIS_ATTRIB_CPU_STATE_CW
  ------------------
  |  |  578|      2|#define ZYDIS_ATTRIB_CPU_STATE_CR               (1ULL << 10)
  ------------------
                          /* READWRITE */ ZYDIS_ATTRIB_CPU_STATE_CR | ZYDIS_ATTRIB_CPU_STATE_CW
  ------------------
  |  |  582|      2|#define ZYDIS_ATTRIB_CPU_STATE_CW               (1ULL << 11)
  ------------------
 2088|      2|        };
 2089|      2|        ZYAN_ASSERT(definition->cpu_state < ZYAN_ARRAY_LENGTH(mapping));
  ------------------
  |  |  381|      2|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (2089:9): [True: 0, False: 2]
  |  Branch (2089:9): [True: 2, False: 0]
  ------------------
 2090|      2|        instruction->attributes |= mapping[definition->cpu_state];
 2091|      2|    }
 2092|       |
 2093|    174|    if (definition->fpu_state != ZYDIS_RW_ACTION_NONE)
  ------------------
  |  Branch (2093:9): [True: 0, False: 174]
  ------------------
 2094|      0|    {
 2095|      0|        static const ZydisInstructionAttributes mapping[ZYDIS_RW_ACTION_MAX_VALUE + 1] =
 2096|      0|        {
 2097|      0|            /* NONE      */ 0,
 2098|      0|            /* READ      */ ZYDIS_ATTRIB_FPU_STATE_CR,
  ------------------
  |  |  586|      0|#define ZYDIS_ATTRIB_FPU_STATE_CR               (1ULL << 12)
  ------------------
 2099|      0|            /* WRITE     */ ZYDIS_ATTRIB_FPU_STATE_CW,
  ------------------
  |  |  590|      0|#define ZYDIS_ATTRIB_FPU_STATE_CW               (1ULL << 13)
  ------------------
 2100|      0|            /* READWRITE */ ZYDIS_ATTRIB_FPU_STATE_CR | ZYDIS_ATTRIB_FPU_STATE_CW
  ------------------
  |  |  586|      0|#define ZYDIS_ATTRIB_FPU_STATE_CR               (1ULL << 12)
  ------------------
                          /* READWRITE */ ZYDIS_ATTRIB_FPU_STATE_CR | ZYDIS_ATTRIB_FPU_STATE_CW
  ------------------
  |  |  590|      0|#define ZYDIS_ATTRIB_FPU_STATE_CW               (1ULL << 13)
  ------------------
 2101|      0|        };
 2102|      0|        ZYAN_ASSERT(definition->fpu_state < ZYAN_ARRAY_LENGTH(mapping));
  ------------------
  |  |  381|      0|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (2102:9): [True: 0, False: 0]
  |  Branch (2102:9): [True: 0, False: 0]
  ------------------
 2103|      0|        instruction->attributes |= mapping[definition->fpu_state];
 2104|      0|    }
 2105|       |
 2106|    174|    if (definition->xmm_state != ZYDIS_RW_ACTION_NONE)
  ------------------
  |  Branch (2106:9): [True: 0, False: 174]
  ------------------
 2107|      0|    {
 2108|      0|        static const ZydisInstructionAttributes mapping[ZYDIS_RW_ACTION_MAX_VALUE + 1] =
 2109|      0|        {
 2110|      0|            /* NONE      */ 0,
 2111|      0|            /* READ      */ ZYDIS_ATTRIB_XMM_STATE_CR,
  ------------------
  |  |  594|      0|#define ZYDIS_ATTRIB_XMM_STATE_CR               (1ULL << 14)
  ------------------
 2112|      0|            /* WRITE     */ ZYDIS_ATTRIB_XMM_STATE_CW,
  ------------------
  |  |  598|      0|#define ZYDIS_ATTRIB_XMM_STATE_CW               (1ULL << 15)
  ------------------
 2113|      0|            /* READWRITE */ ZYDIS_ATTRIB_XMM_STATE_CR | ZYDIS_ATTRIB_XMM_STATE_CW
  ------------------
  |  |  594|      0|#define ZYDIS_ATTRIB_XMM_STATE_CR               (1ULL << 14)
  ------------------
                          /* READWRITE */ ZYDIS_ATTRIB_XMM_STATE_CR | ZYDIS_ATTRIB_XMM_STATE_CW
  ------------------
  |  |  598|      0|#define ZYDIS_ATTRIB_XMM_STATE_CW               (1ULL << 15)
  ------------------
 2114|      0|        };
 2115|      0|        ZYAN_ASSERT(definition->xmm_state < ZYAN_ARRAY_LENGTH(mapping));
  ------------------
  |  |  381|      0|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (2115:9): [True: 0, False: 0]
  |  Branch (2115:9): [True: 0, False: 0]
  ------------------
 2116|      0|        instruction->attributes |= mapping[definition->xmm_state];
 2117|      0|    }
 2118|       |
 2119|    174|    if (definition->is_privileged)
  ------------------
  |  Branch (2119:9): [True: 0, False: 174]
  ------------------
 2120|      0|    {
 2121|      0|        instruction->attributes |= ZYDIS_ATTRIB_IS_PRIVILEGED;
  ------------------
  |  |  570|      0|#define ZYDIS_ATTRIB_IS_PRIVILEGED              (1ULL <<  8)
  ------------------
 2122|      0|    }
 2123|       |
 2124|    174|    switch (instruction->encoding)
 2125|    174|    {
 2126|    118|    case ZYDIS_INSTRUCTION_ENCODING_LEGACY:
  ------------------
  |  Branch (2126:5): [True: 118, False: 56]
  ------------------
 2127|    140|    case ZYDIS_INSTRUCTION_ENCODING_REX2:
  ------------------
  |  Branch (2127:5): [True: 22, False: 152]
  ------------------
 2128|    140|    {
 2129|    140|        const ZydisInstructionDefinitionLEGACY* def =
 2130|    140|            (const ZydisInstructionDefinitionLEGACY*)definition;
 2131|       |
 2132|    140|        if (def->accepts_LOCK)
  ------------------
  |  Branch (2132:13): [True: 4, False: 136]
  ------------------
 2133|      4|        {
 2134|      4|            instruction->attributes |= ZYDIS_ATTRIB_ACCEPTS_LOCK;
  ------------------
  |  |  602|      4|#define ZYDIS_ATTRIB_ACCEPTS_LOCK               (1ULL << 16)
  ------------------
 2135|      4|            if (state->prefixes.has_lock)
  ------------------
  |  Branch (2135:17): [True: 2, False: 2]
  ------------------
 2136|      2|            {
 2137|      2|                instruction->attributes |= ZYDIS_ATTRIB_HAS_LOCK;
  ------------------
  |  |  656|      2|#define ZYDIS_ATTRIB_HAS_LOCK                   (1ULL << 27)
  ------------------
 2138|      2|                instruction->raw.prefixes[state->prefixes.offset_lock].type =
 2139|      2|                    ZYDIS_PREFIX_TYPE_EFFECTIVE;
 2140|      2|            }
 2141|      4|        }
 2142|    140|        if (def->accepts_REP)
  ------------------
  |  Branch (2142:13): [True: 0, False: 140]
  ------------------
 2143|      0|        {
 2144|      0|            instruction->attributes |= ZYDIS_ATTRIB_ACCEPTS_REP;
  ------------------
  |  |  606|      0|#define ZYDIS_ATTRIB_ACCEPTS_REP                (1ULL << 17)
  ------------------
 2145|      0|        }
 2146|    140|        if (def->accepts_REPEREPZ)
  ------------------
  |  Branch (2146:13): [True: 2, False: 138]
  ------------------
 2147|      2|        {
 2148|      2|            instruction->attributes |= ZYDIS_ATTRIB_ACCEPTS_REPE;
  ------------------
  |  |  610|      2|#define ZYDIS_ATTRIB_ACCEPTS_REPE               (1ULL << 18)
  ------------------
 2149|      2|        }
 2150|    140|        if (def->accepts_REPNEREPNZ)
  ------------------
  |  Branch (2150:13): [True: 2, False: 138]
  ------------------
 2151|      2|        {
 2152|      2|            instruction->attributes |= ZYDIS_ATTRIB_ACCEPTS_REPNE;
  ------------------
  |  |  618|      2|#define ZYDIS_ATTRIB_ACCEPTS_REPNE              (1ULL << 19)
  ------------------
 2153|      2|        }
 2154|    140|        if (def->accepts_BOUND)
  ------------------
  |  Branch (2154:13): [True: 24, False: 116]
  ------------------
 2155|     24|        {
 2156|     24|            instruction->attributes |= ZYDIS_ATTRIB_ACCEPTS_BND;
  ------------------
  |  |  626|     24|#define ZYDIS_ATTRIB_ACCEPTS_BND                (1ULL << 20)
  ------------------
 2157|     24|        }
 2158|    140|        if (def->accepts_XACQUIRE)
  ------------------
  |  Branch (2158:13): [True: 4, False: 136]
  ------------------
 2159|      4|        {
 2160|      4|            instruction->attributes |= ZYDIS_ATTRIB_ACCEPTS_XACQUIRE;
  ------------------
  |  |  630|      4|#define ZYDIS_ATTRIB_ACCEPTS_XACQUIRE           (1ULL << 21)
  ------------------
 2161|      4|        }
 2162|    140|        if (def->accepts_XRELEASE)
  ------------------
  |  Branch (2162:13): [True: 16, False: 124]
  ------------------
 2163|     16|        {
 2164|     16|            instruction->attributes |= ZYDIS_ATTRIB_ACCEPTS_XRELEASE;
  ------------------
  |  |  634|     16|#define ZYDIS_ATTRIB_ACCEPTS_XRELEASE           (1ULL << 22)
  ------------------
 2165|     16|        }
 2166|    140|        if (def->accepts_hle_without_lock)
  ------------------
  |  Branch (2166:13): [True: 12, False: 128]
  ------------------
 2167|     12|        {
 2168|     12|            instruction->attributes |= ZYDIS_ATTRIB_ACCEPTS_HLE_WITHOUT_LOCK;
  ------------------
  |  |  639|     12|#define ZYDIS_ATTRIB_ACCEPTS_HLE_WITHOUT_LOCK   (1ULL << 23)
  ------------------
 2169|     12|        }
 2170|       |
 2171|    140|        switch (state->prefixes.group1)
 2172|    140|        {
 2173|      6|        case 0xF2:
  ------------------
  |  Branch (2173:9): [True: 6, False: 134]
  ------------------
 2174|      6|            if (instruction->attributes & ZYDIS_ATTRIB_ACCEPTS_REPNE)
  ------------------
  |  |  618|      6|#define ZYDIS_ATTRIB_ACCEPTS_REPNE              (1ULL << 19)
  ------------------
  |  Branch (2174:17): [True: 0, False: 6]
  ------------------
 2175|      0|            {
 2176|      0|                instruction->attributes |= ZYDIS_ATTRIB_HAS_REPNE;
  ------------------
  |  |  672|      0|#define ZYDIS_ATTRIB_HAS_REPNE                  (1ULL << 30)
  ------------------
 2177|      0|                break;
 2178|      0|            }
 2179|      6|            if (instruction->attributes & ZYDIS_ATTRIB_ACCEPTS_XACQUIRE)
  ------------------
  |  |  630|      6|#define ZYDIS_ATTRIB_ACCEPTS_XACQUIRE           (1ULL << 21)
  ------------------
  |  Branch (2179:17): [True: 0, False: 6]
  ------------------
 2180|      0|            {
 2181|      0|                if ((instruction->attributes & ZYDIS_ATTRIB_HAS_LOCK) ||
  ------------------
  |  |  656|      0|#define ZYDIS_ATTRIB_HAS_LOCK                   (1ULL << 27)
  ------------------
  |  Branch (2181:21): [True: 0, False: 0]
  ------------------
 2182|      0|                    (def->accepts_hle_without_lock))
  ------------------
  |  Branch (2182:21): [True: 0, False: 0]
  ------------------
 2183|      0|                {
 2184|      0|                    instruction->attributes |= ZYDIS_ATTRIB_HAS_XACQUIRE;
  ------------------
  |  |  684|      0|#define ZYDIS_ATTRIB_HAS_XACQUIRE               (1ULL << 32)
  ------------------
 2185|      0|                    break;
 2186|      0|                }
 2187|      0|            }
 2188|      6|            if (ZYDIS_DECODER_MODE_ACTIVE(state->decoder, ZYDIS_DECODER_MODE_MPX) &&
  ------------------
  |  |   55|     12|    (!!(((decoder)->decoder_mode & (1 << (mode)))))
  |  |  ------------------
  |  |  |  Branch (55:5): [True: 6, False: 0]
  |  |  ------------------
  ------------------
 2189|      6|                instruction->attributes & ZYDIS_ATTRIB_ACCEPTS_BND)
  ------------------
  |  |  626|      6|#define ZYDIS_ATTRIB_ACCEPTS_BND                (1ULL << 20)
  ------------------
  |  Branch (2189:17): [True: 4, False: 2]
  ------------------
 2190|      4|            {
 2191|      4|                instruction->attributes |= ZYDIS_ATTRIB_HAS_BND;
  ------------------
  |  |  680|      4|#define ZYDIS_ATTRIB_HAS_BND                    (1ULL << 31)
  ------------------
 2192|      4|                break;
 2193|      4|            }
 2194|      2|            break;
 2195|      6|        case 0xF3:
  ------------------
  |  Branch (2195:9): [True: 6, False: 134]
  ------------------
 2196|      6|            if (instruction->attributes & ZYDIS_ATTRIB_ACCEPTS_REP)
  ------------------
  |  |  606|      6|#define ZYDIS_ATTRIB_ACCEPTS_REP                (1ULL << 17)
  ------------------
  |  Branch (2196:17): [True: 0, False: 6]
  ------------------
 2197|      0|            {
 2198|      0|                instruction->attributes |= ZYDIS_ATTRIB_HAS_REP;
  ------------------
  |  |  660|      0|#define ZYDIS_ATTRIB_HAS_REP                    (1ULL << 28)
  ------------------
 2199|      0|                break;
 2200|      0|            }
 2201|      6|            if (instruction->attributes & ZYDIS_ATTRIB_ACCEPTS_REPE)
  ------------------
  |  |  610|      6|#define ZYDIS_ATTRIB_ACCEPTS_REPE               (1ULL << 18)
  ------------------
  |  Branch (2201:17): [True: 0, False: 6]
  ------------------
 2202|      0|            {
 2203|      0|                instruction->attributes |= ZYDIS_ATTRIB_HAS_REPE;
  ------------------
  |  |  664|      0|#define ZYDIS_ATTRIB_HAS_REPE                   (1ULL << 29)
  ------------------
 2204|      0|                break;
 2205|      0|            }
 2206|      6|            if (instruction->attributes & ZYDIS_ATTRIB_ACCEPTS_XRELEASE)
  ------------------
  |  |  634|      6|#define ZYDIS_ATTRIB_ACCEPTS_XRELEASE           (1ULL << 22)
  ------------------
  |  Branch (2206:17): [True: 4, False: 2]
  ------------------
 2207|      4|            {
 2208|      4|                if ((instruction->attributes & ZYDIS_ATTRIB_HAS_LOCK) ||
  ------------------
  |  |  656|      4|#define ZYDIS_ATTRIB_HAS_LOCK                   (1ULL << 27)
  ------------------
  |  Branch (2208:21): [True: 2, False: 2]
  ------------------
 2209|      2|                    (def->accepts_hle_without_lock))
  ------------------
  |  Branch (2209:21): [True: 2, False: 0]
  ------------------
 2210|      4|                {
 2211|      4|                    instruction->attributes |= ZYDIS_ATTRIB_HAS_XRELEASE;
  ------------------
  |  |  688|      4|#define ZYDIS_ATTRIB_HAS_XRELEASE               (1ULL << 33)
  ------------------
 2212|      4|                    break;
 2213|      4|                }
 2214|      4|            }
 2215|      2|            break;
 2216|    128|        default:
  ------------------
  |  Branch (2216:9): [True: 128, False: 12]
  ------------------
 2217|    128|            break;
 2218|    140|        }
 2219|    140|        if ((instruction->raw.prefixes[state->prefixes.offset_group1].type ==
  ------------------
  |  Branch (2219:13): [True: 60, False: 80]
  ------------------
 2220|    140|             ZYDIS_PREFIX_TYPE_IGNORED) &&
 2221|     60|            (instruction->attributes & (
  ------------------
  |  Branch (2221:13): [True: 8, False: 52]
  ------------------
 2222|     60|             ZYDIS_ATTRIB_HAS_REP | ZYDIS_ATTRIB_HAS_REPE | ZYDIS_ATTRIB_HAS_REPNE |
  ------------------
  |  |  660|     60|#define ZYDIS_ATTRIB_HAS_REP                    (1ULL << 28)
  ------------------
                           ZYDIS_ATTRIB_HAS_REP | ZYDIS_ATTRIB_HAS_REPE | ZYDIS_ATTRIB_HAS_REPNE |
  ------------------
  |  |  664|     60|#define ZYDIS_ATTRIB_HAS_REPE                   (1ULL << 29)
  ------------------
                           ZYDIS_ATTRIB_HAS_REP | ZYDIS_ATTRIB_HAS_REPE | ZYDIS_ATTRIB_HAS_REPNE |
  ------------------
  |  |  672|     60|#define ZYDIS_ATTRIB_HAS_REPNE                  (1ULL << 30)
  ------------------
 2223|     60|             ZYDIS_ATTRIB_HAS_BND | ZYDIS_ATTRIB_HAS_XACQUIRE | ZYDIS_ATTRIB_HAS_XRELEASE)))
  ------------------
  |  |  680|     60|#define ZYDIS_ATTRIB_HAS_BND                    (1ULL << 31)
  ------------------
                           ZYDIS_ATTRIB_HAS_BND | ZYDIS_ATTRIB_HAS_XACQUIRE | ZYDIS_ATTRIB_HAS_XRELEASE)))
  ------------------
  |  |  684|     60|#define ZYDIS_ATTRIB_HAS_XACQUIRE               (1ULL << 32)
  ------------------
                           ZYDIS_ATTRIB_HAS_BND | ZYDIS_ATTRIB_HAS_XACQUIRE | ZYDIS_ATTRIB_HAS_XRELEASE)))
  ------------------
  |  |  688|     60|#define ZYDIS_ATTRIB_HAS_XRELEASE               (1ULL << 33)
  ------------------
 2224|      8|        {
 2225|      8|            instruction->raw.prefixes[state->prefixes.offset_group1].type =
 2226|      8|                ZYDIS_PREFIX_TYPE_EFFECTIVE;
 2227|      8|        }
 2228|       |
 2229|    140|        if (def->accepts_branch_hints)
  ------------------
  |  Branch (2229:13): [True: 16, False: 124]
  ------------------
 2230|     16|        {
 2231|     16|            instruction->attributes |= ZYDIS_ATTRIB_ACCEPTS_BRANCH_HINTS;
  ------------------
  |  |  643|     16|#define ZYDIS_ATTRIB_ACCEPTS_BRANCH_HINTS       (1ULL << 24)
  ------------------
 2232|     16|            switch (state->prefixes.group2)
 2233|     16|            {
 2234|      0|            case 0x2E:
  ------------------
  |  Branch (2234:13): [True: 0, False: 16]
  ------------------
 2235|      0|                instruction->attributes |= ZYDIS_ATTRIB_HAS_BRANCH_NOT_TAKEN;
  ------------------
  |  |  692|      0|#define ZYDIS_ATTRIB_HAS_BRANCH_NOT_TAKEN       (1ULL << 34)
  ------------------
 2236|      0|                instruction->raw.prefixes[state->prefixes.offset_group2].type =
 2237|      0|                    ZYDIS_PREFIX_TYPE_EFFECTIVE;
 2238|      0|                break;
 2239|      0|            case 0x3E:
  ------------------
  |  Branch (2239:13): [True: 0, False: 16]
  ------------------
 2240|      0|                instruction->attributes |= ZYDIS_ATTRIB_HAS_BRANCH_TAKEN;
  ------------------
  |  |  696|      0|#define ZYDIS_ATTRIB_HAS_BRANCH_TAKEN           (1ULL << 35)
  ------------------
 2241|      0|                instruction->raw.prefixes[state->prefixes.offset_group2].type =
 2242|      0|                    ZYDIS_PREFIX_TYPE_EFFECTIVE;
 2243|      0|                break;
 2244|     16|            default:
  ------------------
  |  Branch (2244:13): [True: 16, False: 0]
  ------------------
 2245|     16|                break;
 2246|     16|            }
 2247|     16|        }
 2248|       |
 2249|    140|        if (def->accepts_NOTRACK)
  ------------------
  |  Branch (2249:13): [True: 10, False: 130]
  ------------------
 2250|     10|        {
 2251|     10|            instruction->attributes |= ZYDIS_ATTRIB_ACCEPTS_NOTRACK;
  ------------------
  |  |  647|     10|#define ZYDIS_ATTRIB_ACCEPTS_NOTRACK            (1ULL << 25)
  ------------------
 2252|     10|            if (ZYDIS_DECODER_MODE_ACTIVE(state->decoder, ZYDIS_DECODER_MODE_CET) &&
  ------------------
  |  |   55|     20|    (!!(((decoder)->decoder_mode & (1 << (mode)))))
  |  |  ------------------
  |  |  |  Branch (55:5): [True: 10, False: 0]
  |  |  ------------------
  ------------------
 2253|     10|                (state->prefixes.offset_notrack >= 0))
  ------------------
  |  Branch (2253:17): [True: 2, False: 8]
  ------------------
 2254|      2|            {
 2255|      2|                instruction->attributes |= ZYDIS_ATTRIB_HAS_NOTRACK;
  ------------------
  |  |  700|      2|#define ZYDIS_ATTRIB_HAS_NOTRACK                (1ULL << 36)
  ------------------
 2256|      2|                instruction->raw.prefixes[state->prefixes.offset_notrack].type =
 2257|      2|                    ZYDIS_PREFIX_TYPE_EFFECTIVE;
 2258|      2|            }
 2259|     10|        }
 2260|       |
 2261|    140|        if (def->accepts_segment && !def->accepts_branch_hints)
  ------------------
  |  Branch (2261:13): [True: 36, False: 104]
  |  Branch (2261:37): [True: 36, False: 0]
  ------------------
 2262|     36|        {
 2263|     36|            instruction->attributes |= ZYDIS_ATTRIB_ACCEPTS_SEGMENT;
  ------------------
  |  |  652|     36|#define ZYDIS_ATTRIB_ACCEPTS_SEGMENT            (1ULL << 26)
  ------------------
 2264|     36|            if (state->prefixes.effective_segment &&
  ------------------
  |  Branch (2264:17): [True: 6, False: 30]
  ------------------
 2265|      6|                !(instruction->attributes & ZYDIS_ATTRIB_HAS_NOTRACK))
  ------------------
  |  |  700|      6|#define ZYDIS_ATTRIB_HAS_NOTRACK                (1ULL << 36)
  ------------------
  |  Branch (2265:17): [True: 4, False: 2]
  ------------------
 2266|      4|            {
 2267|      4|                switch (state->prefixes.effective_segment)
 2268|      4|                {
 2269|      0|                case 0x2E:
  ------------------
  |  Branch (2269:17): [True: 0, False: 4]
  ------------------
 2270|      0|                    instruction->attributes |= ZYDIS_ATTRIB_HAS_SEGMENT_CS;
  ------------------
  |  |  704|      0|#define ZYDIS_ATTRIB_HAS_SEGMENT_CS             (1ULL << 37)
  ------------------
 2271|      0|                    break;
 2272|      0|                case 0x36:
  ------------------
  |  Branch (2272:17): [True: 0, False: 4]
  ------------------
 2273|      0|                    instruction->attributes |= ZYDIS_ATTRIB_HAS_SEGMENT_SS;
  ------------------
  |  |  708|      0|#define ZYDIS_ATTRIB_HAS_SEGMENT_SS             (1ULL << 38)
  ------------------
 2274|      0|                    break;
 2275|      0|                case 0x3E:
  ------------------
  |  Branch (2275:17): [True: 0, False: 4]
  ------------------
 2276|      0|                    instruction->attributes |= ZYDIS_ATTRIB_HAS_SEGMENT_DS;
  ------------------
  |  |  712|      0|#define ZYDIS_ATTRIB_HAS_SEGMENT_DS             (1ULL << 39)
  ------------------
 2277|      0|                    break;
 2278|      0|                case 0x26:
  ------------------
  |  Branch (2278:17): [True: 0, False: 4]
  ------------------
 2279|      0|                    instruction->attributes |= ZYDIS_ATTRIB_HAS_SEGMENT_ES;
  ------------------
  |  |  716|      0|#define ZYDIS_ATTRIB_HAS_SEGMENT_ES             (1ULL << 40)
  ------------------
 2280|      0|                    break;
 2281|      2|                case 0x64:
  ------------------
  |  Branch (2281:17): [True: 2, False: 2]
  ------------------
 2282|      2|                    instruction->attributes |= ZYDIS_ATTRIB_HAS_SEGMENT_FS;
  ------------------
  |  |  720|      2|#define ZYDIS_ATTRIB_HAS_SEGMENT_FS             (1ULL << 41)
  ------------------
 2283|      2|                    break;
 2284|      2|                case 0x65:
  ------------------
  |  Branch (2284:17): [True: 2, False: 2]
  ------------------
 2285|      2|                    instruction->attributes |= ZYDIS_ATTRIB_HAS_SEGMENT_GS;
  ------------------
  |  |  724|      2|#define ZYDIS_ATTRIB_HAS_SEGMENT_GS             (1ULL << 42)
  ------------------
 2286|      2|                    break;
 2287|      0|                default:
  ------------------
  |  Branch (2287:17): [True: 0, False: 4]
  ------------------
 2288|      0|                    ZYAN_UNREACHABLE;
  ------------------
  |  |  431|      0|#   define ZYAN_UNREACHABLE { assert(0); abort(); }
  ------------------
  |  Branch (2288:21): [Folded, False: 0]
  |  Branch (2288:21): [Folded, False: 0]
  ------------------
 2289|      4|                }
 2290|      4|            }
 2291|     36|            if (instruction->attributes & ZYDIS_ATTRIB_HAS_SEGMENT)
  ------------------
  |  |  728|     36|#define ZYDIS_ATTRIB_HAS_SEGMENT                (ZYDIS_ATTRIB_HAS_SEGMENT_CS | \
  |  |  ------------------
  |  |  |  |  704|     36|#define ZYDIS_ATTRIB_HAS_SEGMENT_CS             (1ULL << 37)
  |  |  ------------------
  |  |  729|     36|                                                 ZYDIS_ATTRIB_HAS_SEGMENT_SS | \
  |  |  ------------------
  |  |  |  |  708|     36|#define ZYDIS_ATTRIB_HAS_SEGMENT_SS             (1ULL << 38)
  |  |  ------------------
  |  |  730|     36|                                                 ZYDIS_ATTRIB_HAS_SEGMENT_DS | \
  |  |  ------------------
  |  |  |  |  712|     36|#define ZYDIS_ATTRIB_HAS_SEGMENT_DS             (1ULL << 39)
  |  |  ------------------
  |  |  731|     36|                                                 ZYDIS_ATTRIB_HAS_SEGMENT_ES | \
  |  |  ------------------
  |  |  |  |  716|     36|#define ZYDIS_ATTRIB_HAS_SEGMENT_ES             (1ULL << 40)
  |  |  ------------------
  |  |  732|     36|                                                 ZYDIS_ATTRIB_HAS_SEGMENT_FS | \
  |  |  ------------------
  |  |  |  |  720|     36|#define ZYDIS_ATTRIB_HAS_SEGMENT_FS             (1ULL << 41)
  |  |  ------------------
  |  |  733|     36|                                                 ZYDIS_ATTRIB_HAS_SEGMENT_GS)
  |  |  ------------------
  |  |  |  |  724|     36|#define ZYDIS_ATTRIB_HAS_SEGMENT_GS             (1ULL << 42)
  |  |  ------------------
  ------------------
  |  Branch (2291:17): [True: 4, False: 32]
  ------------------
 2292|      4|            {
 2293|      4|                instruction->raw.prefixes[state->prefixes.offset_segment].type =
 2294|      4|                    ZYDIS_PREFIX_TYPE_EFFECTIVE;
 2295|      4|            }
 2296|     36|        }
 2297|       |
 2298|    140|        break;
 2299|    140|    }
 2300|    140|    case ZYDIS_INSTRUCTION_ENCODING_3DNOW:
  ------------------
  |  Branch (2300:5): [True: 0, False: 174]
  ------------------
 2301|      2|    case ZYDIS_INSTRUCTION_ENCODING_XOP:
  ------------------
  |  Branch (2301:5): [True: 2, False: 172]
  ------------------
 2302|      2|    case ZYDIS_INSTRUCTION_ENCODING_VEX:
  ------------------
  |  Branch (2302:5): [True: 0, False: 174]
  ------------------
 2303|     34|    case ZYDIS_INSTRUCTION_ENCODING_EVEX:
  ------------------
  |  Branch (2303:5): [True: 32, False: 142]
  ------------------
 2304|     34|    case ZYDIS_INSTRUCTION_ENCODING_MVEX:
  ------------------
  |  Branch (2304:5): [True: 0, False: 174]
  ------------------
 2305|     34|        if (definition->accepts_segment)
  ------------------
  |  Branch (2305:13): [True: 24, False: 10]
  ------------------
 2306|     24|        {
 2307|     24|            instruction->attributes |= ZYDIS_ATTRIB_ACCEPTS_SEGMENT;
  ------------------
  |  |  652|     24|#define ZYDIS_ATTRIB_ACCEPTS_SEGMENT            (1ULL << 26)
  ------------------
 2308|     24|            if (state->prefixes.effective_segment)
  ------------------
  |  Branch (2308:17): [True: 10, False: 14]
  ------------------
 2309|     10|            {
 2310|     10|                switch (state->prefixes.effective_segment)
 2311|     10|                {
 2312|      2|                case 0x2E:
  ------------------
  |  Branch (2312:17): [True: 2, False: 8]
  ------------------
 2313|      2|                    instruction->attributes |= ZYDIS_ATTRIB_HAS_SEGMENT_CS;
  ------------------
  |  |  704|      2|#define ZYDIS_ATTRIB_HAS_SEGMENT_CS             (1ULL << 37)
  ------------------
 2314|      2|                    break;
 2315|      0|                case 0x36:
  ------------------
  |  Branch (2315:17): [True: 0, False: 10]
  ------------------
 2316|      0|                    instruction->attributes |= ZYDIS_ATTRIB_HAS_SEGMENT_SS;
  ------------------
  |  |  708|      0|#define ZYDIS_ATTRIB_HAS_SEGMENT_SS             (1ULL << 38)
  ------------------
 2317|      0|                    break;
 2318|      2|                case 0x3E:
  ------------------
  |  Branch (2318:17): [True: 2, False: 8]
  ------------------
 2319|      2|                    instruction->attributes |= ZYDIS_ATTRIB_HAS_SEGMENT_DS;
  ------------------
  |  |  712|      2|#define ZYDIS_ATTRIB_HAS_SEGMENT_DS             (1ULL << 39)
  ------------------
 2320|      2|                    break;
 2321|      0|                case 0x26:
  ------------------
  |  Branch (2321:17): [True: 0, False: 10]
  ------------------
 2322|      0|                    instruction->attributes |= ZYDIS_ATTRIB_HAS_SEGMENT_ES;
  ------------------
  |  |  716|      0|#define ZYDIS_ATTRIB_HAS_SEGMENT_ES             (1ULL << 40)
  ------------------
 2323|      0|                    break;
 2324|      4|                case 0x64:
  ------------------
  |  Branch (2324:17): [True: 4, False: 6]
  ------------------
 2325|      4|                    instruction->attributes |= ZYDIS_ATTRIB_HAS_SEGMENT_FS;
  ------------------
  |  |  720|      4|#define ZYDIS_ATTRIB_HAS_SEGMENT_FS             (1ULL << 41)
  ------------------
 2326|      4|                    break;
 2327|      2|                case 0x65:
  ------------------
  |  Branch (2327:17): [True: 2, False: 8]
  ------------------
 2328|      2|                    instruction->attributes |= ZYDIS_ATTRIB_HAS_SEGMENT_GS;
  ------------------
  |  |  724|      2|#define ZYDIS_ATTRIB_HAS_SEGMENT_GS             (1ULL << 42)
  ------------------
 2329|      2|                    break;
 2330|      0|                default:
  ------------------
  |  Branch (2330:17): [True: 0, False: 10]
  ------------------
 2331|      0|                    ZYAN_UNREACHABLE;
  ------------------
  |  |  431|      0|#   define ZYAN_UNREACHABLE { assert(0); abort(); }
  ------------------
  |  Branch (2331:21): [Folded, False: 0]
  |  Branch (2331:21): [Folded, False: 0]
  ------------------
 2332|     10|                }
 2333|     10|            }
 2334|     24|            if (instruction->attributes & ZYDIS_ATTRIB_HAS_SEGMENT)
  ------------------
  |  |  728|     24|#define ZYDIS_ATTRIB_HAS_SEGMENT                (ZYDIS_ATTRIB_HAS_SEGMENT_CS | \
  |  |  ------------------
  |  |  |  |  704|     24|#define ZYDIS_ATTRIB_HAS_SEGMENT_CS             (1ULL << 37)
  |  |  ------------------
  |  |  729|     24|                                                 ZYDIS_ATTRIB_HAS_SEGMENT_SS | \
  |  |  ------------------
  |  |  |  |  708|     24|#define ZYDIS_ATTRIB_HAS_SEGMENT_SS             (1ULL << 38)
  |  |  ------------------
  |  |  730|     24|                                                 ZYDIS_ATTRIB_HAS_SEGMENT_DS | \
  |  |  ------------------
  |  |  |  |  712|     24|#define ZYDIS_ATTRIB_HAS_SEGMENT_DS             (1ULL << 39)
  |  |  ------------------
  |  |  731|     24|                                                 ZYDIS_ATTRIB_HAS_SEGMENT_ES | \
  |  |  ------------------
  |  |  |  |  716|     24|#define ZYDIS_ATTRIB_HAS_SEGMENT_ES             (1ULL << 40)
  |  |  ------------------
  |  |  732|     24|                                                 ZYDIS_ATTRIB_HAS_SEGMENT_FS | \
  |  |  ------------------
  |  |  |  |  720|     24|#define ZYDIS_ATTRIB_HAS_SEGMENT_FS             (1ULL << 41)
  |  |  ------------------
  |  |  733|     24|                                                 ZYDIS_ATTRIB_HAS_SEGMENT_GS)
  |  |  ------------------
  |  |  |  |  724|     24|#define ZYDIS_ATTRIB_HAS_SEGMENT_GS             (1ULL << 42)
  |  |  ------------------
  ------------------
  |  Branch (2334:17): [True: 10, False: 14]
  ------------------
 2335|     10|            {
 2336|     10|                instruction->raw.prefixes[state->prefixes.offset_segment].type =
 2337|     10|                    ZYDIS_PREFIX_TYPE_EFFECTIVE;
 2338|     10|            }
 2339|     24|        }
 2340|     34|        break;
 2341|     34|    default:
  ------------------
  |  Branch (2341:5): [True: 0, False: 174]
  ------------------
 2342|      0|        ZYAN_UNREACHABLE;
  ------------------
  |  |  431|      0|#   define ZYAN_UNREACHABLE { assert(0); abort(); }
  ------------------
  |  Branch (2342:9): [Folded, False: 0]
  |  Branch (2342:9): [Folded, False: 0]
  ------------------
 2343|    174|    }
 2344|    174|}
Decoder.c:ZydisSetAVXInformation:
 2380|     34|{
 2381|     34|    ZYAN_ASSERT(context);
  ------------------
  |  |  381|     34|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (2381:5): [True: 0, False: 34]
  |  Branch (2381:5): [True: 34, False: 0]
  ------------------
 2382|     34|    ZYAN_ASSERT(instruction);
  ------------------
  |  |  381|     34|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (2382:5): [True: 0, False: 34]
  |  Branch (2382:5): [True: 34, False: 0]
  ------------------
 2383|     34|    ZYAN_ASSERT(definition);
  ------------------
  |  |  381|     34|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (2383:5): [True: 0, False: 34]
  |  Branch (2383:5): [True: 34, False: 0]
  ------------------
 2384|       |
 2385|     34|    switch (instruction->encoding)
 2386|     34|    {
 2387|      2|    case ZYDIS_INSTRUCTION_ENCODING_XOP:
  ------------------
  |  Branch (2387:5): [True: 2, False: 32]
  ------------------
 2388|      2|    {
 2389|       |        // Vector length
 2390|      2|        static const ZyanU16 lookup[2] =
 2391|      2|        {
 2392|      2|            128,
 2393|      2|            256
 2394|      2|        };
 2395|      2|        ZYAN_ASSERT(context->vector_unified.LL < ZYAN_ARRAY_LENGTH(lookup));
  ------------------
  |  |  381|      2|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (2395:9): [True: 0, False: 2]
  |  Branch (2395:9): [True: 2, False: 0]
  ------------------
 2396|      2|        instruction->avx.vector_length = lookup[context->vector_unified.LL];
 2397|      2|        break;
 2398|      2|    }
 2399|      0|    case ZYDIS_INSTRUCTION_ENCODING_VEX:
  ------------------
  |  Branch (2399:5): [True: 0, False: 34]
  ------------------
 2400|      0|    {
 2401|       |        // Vector length
 2402|      0|        static const ZyanU16 lookup[2] =
 2403|      0|        {
 2404|      0|            128,
 2405|      0|            256
 2406|      0|        };
 2407|      0|        ZYAN_ASSERT(context->vector_unified.LL < ZYAN_ARRAY_LENGTH(lookup));
  ------------------
  |  |  381|      0|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (2407:9): [True: 0, False: 0]
  |  Branch (2407:9): [True: 0, False: 0]
  ------------------
 2408|      0|        instruction->avx.vector_length = lookup[context->vector_unified.LL];
 2409|       |
 2410|       |        // Static broadcast-factor
 2411|      0|        const ZydisInstructionDefinitionVEX* def =
 2412|      0|            (const ZydisInstructionDefinitionVEX*)definition;
 2413|      0|        if (def->broadcast)
  ------------------
  |  Branch (2413:13): [True: 0, False: 0]
  ------------------
 2414|      0|        {
 2415|      0|            instruction->avx.broadcast.is_static = ZYAN_TRUE;
  ------------------
  |  |  288|      0|#define ZYAN_TRUE  1u
  ------------------
 2416|      0|            static ZydisBroadcastMode broadcasts[ZYDIS_VEX_STATIC_BROADCAST_MAX_VALUE + 1] =
 2417|      0|            {
 2418|      0|                ZYDIS_BROADCAST_MODE_NONE,
 2419|      0|                ZYDIS_BROADCAST_MODE_1_TO_2,
 2420|      0|                ZYDIS_BROADCAST_MODE_1_TO_4,
 2421|      0|                ZYDIS_BROADCAST_MODE_1_TO_8,
 2422|      0|                ZYDIS_BROADCAST_MODE_1_TO_16,
 2423|      0|                ZYDIS_BROADCAST_MODE_1_TO_32,
 2424|      0|                ZYDIS_BROADCAST_MODE_2_TO_4
 2425|      0|            };
 2426|      0|            instruction->avx.broadcast.mode = broadcasts[def->broadcast];
 2427|      0|        }
 2428|      0|        break;
 2429|      0|    }
 2430|     32|    case ZYDIS_INSTRUCTION_ENCODING_EVEX:
  ------------------
  |  Branch (2430:5): [True: 32, False: 2]
  ------------------
 2431|     32|    {
 2432|     32|#ifndef ZYDIS_DISABLE_AVX512
 2433|     32|        const ZydisInstructionDefinitionEVEX* def =
 2434|     32|            (const ZydisInstructionDefinitionEVEX*)definition;
 2435|       |
 2436|       |        // TODO: Don't set vector length, etc. for scalar instructions
 2437|       |
 2438|       |        // Vector length
 2439|     32|        ZyanU8 vector_length = context->vector_unified.LL;
 2440|     32|        if (def->vector_length)
  ------------------
  |  Branch (2440:13): [True: 4, False: 28]
  ------------------
 2441|      4|        {
 2442|      4|            vector_length = def->vector_length - 1;
 2443|      4|        }
 2444|     32|        static const ZyanU16 lookup[3] =
 2445|     32|        {
 2446|     32|            128,
 2447|     32|            256,
 2448|     32|            512
 2449|     32|        };
 2450|     32|        ZYAN_ASSERT(vector_length < ZYAN_ARRAY_LENGTH(lookup));
  ------------------
  |  |  381|     32|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (2450:9): [True: 0, False: 32]
  |  Branch (2450:9): [True: 32, False: 0]
  ------------------
 2451|     32|        instruction->avx.vector_length = lookup[vector_length];
 2452|       |
 2453|     32|        context->evex.tuple_type = def->tuple_type;
 2454|     32|        if (def->tuple_type && (def->tuple_type != ZYDIS_TUPLETYPE_NO_SCALE))
  ------------------
  |  Branch (2454:13): [True: 22, False: 10]
  |  Branch (2454:32): [True: 8, False: 14]
  ------------------
 2455|      8|        {
 2456|      8|            ZYAN_ASSERT(instruction->raw.modrm.mod != 3);
  ------------------
  |  |  381|      8|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (2456:13): [True: 0, False: 8]
  |  Branch (2456:13): [True: 8, False: 0]
  ------------------
 2457|      8|            ZYAN_ASSERT(def->element_size);
  ------------------
  |  |  381|      8|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (2457:13): [True: 0, False: 8]
  |  Branch (2457:13): [True: 8, False: 0]
  ------------------
 2458|       |
 2459|       |            // Element size
 2460|      8|            static const ZyanU8 element_sizes[ZYDIS_IELEMENT_SIZE_MAX_VALUE + 1] =
 2461|      8|            {
 2462|      8|                  0,   4,   8,  16,  32,  64, 128
 2463|      8|            };
 2464|      8|            ZYAN_ASSERT(def->element_size < ZYAN_ARRAY_LENGTH(element_sizes));
  ------------------
  |  |  381|      8|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (2464:13): [True: 0, False: 8]
  |  Branch (2464:13): [True: 8, False: 0]
  ------------------
 2465|      8|            context->evex.element_size = element_sizes[def->element_size];
 2466|       |
 2467|       |            // Compressed disp8 scale and broadcast-factor
 2468|      8|            switch (def->tuple_type)
 2469|      8|            {
 2470|      2|            case ZYDIS_TUPLETYPE_FV:
  ------------------
  |  Branch (2470:13): [True: 2, False: 6]
  ------------------
 2471|      2|            {
 2472|      2|                const ZyanU8 evex_b = instruction->raw.evex.b;
 2473|      2|                ZYAN_ASSERT(evex_b < 2);
  ------------------
  |  |  381|      2|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (2473:17): [True: 0, False: 2]
  |  Branch (2473:17): [True: 2, False: 0]
  ------------------
 2474|      2|                ZYAN_ASSERT(!evex_b || ((!context->vector_unified.W && (context->evex.element_size == 16 ||
  ------------------
  |  |  381|      2|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (2474:17): [True: 0, False: 0]
  |  Branch (2474:17): [True: 0, False: 0]
  |  Branch (2474:17): [True: 0, False: 0]
  |  Branch (2474:17): [True: 0, False: 0]
  |  Branch (2474:17): [True: 0, False: 0]
  |  Branch (2474:17): [True: 2, False: 0]
  |  Branch (2474:17): [True: 0, False: 0]
  |  Branch (2474:17): [True: 0, False: 0]
  |  Branch (2474:17): [True: 0, False: 0]
  |  Branch (2474:17): [True: 0, False: 0]
  |  Branch (2474:17): [True: 0, False: 0]
  |  Branch (2474:17): [True: 2, False: 0]
  ------------------
 2475|      2|                                                                        context->evex.element_size == 32)) ||
 2476|      2|                                        ( context->vector_unified.W &&  context->evex.element_size == 64)));
 2477|      2|                ZYAN_ASSERT(!evex_b || def->functionality == ZYDIS_EVEX_FUNC_BC);
  ------------------
  |  |  381|      2|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (2477:17): [True: 2, False: 0]
  |  Branch (2477:17): [True: 0, False: 0]
  |  Branch (2477:17): [True: 2, False: 0]
  |  Branch (2477:17): [True: 0, False: 0]
  ------------------
 2478|       |
 2479|      2|                static const ZyanU8 scales[2][3][3] =
 2480|      2|                {
 2481|      2|                    /*B0*/ { /*16*/ { 16, 32, 64 }, /*32*/ { 16, 32, 64 }, /*64*/ { 16, 32, 64 } },
 2482|      2|                    /*B1*/ { /*16*/ {  2,  2,  2 }, /*32*/ {  4,  4,  4 }, /*64*/ {  8,  8,  8 } }
 2483|      2|                };
 2484|      2|                static const ZydisBroadcastMode broadcasts[2][3][3] =
 2485|      2|                {
 2486|       |                    /*B0*/
 2487|      2|                    {
 2488|       |                        /*16*/
 2489|      2|                        {
 2490|      2|                            ZYDIS_BROADCAST_MODE_NONE,
 2491|      2|                            ZYDIS_BROADCAST_MODE_NONE,
 2492|      2|                            ZYDIS_BROADCAST_MODE_NONE
 2493|      2|                        },
 2494|       |                        /*32*/
 2495|      2|                        {
 2496|      2|                            ZYDIS_BROADCAST_MODE_NONE,
 2497|      2|                            ZYDIS_BROADCAST_MODE_NONE,
 2498|      2|                            ZYDIS_BROADCAST_MODE_NONE
 2499|      2|                        },
 2500|       |                        /*64*/
 2501|      2|                        {
 2502|      2|                            ZYDIS_BROADCAST_MODE_NONE,
 2503|      2|                            ZYDIS_BROADCAST_MODE_NONE,
 2504|      2|                            ZYDIS_BROADCAST_MODE_NONE
 2505|      2|                        }
 2506|      2|                    },
 2507|       |                    /*B1*/
 2508|      2|                    {
 2509|       |                        /*16*/
 2510|      2|                        {
 2511|      2|                            ZYDIS_BROADCAST_MODE_1_TO_8,
 2512|      2|                            ZYDIS_BROADCAST_MODE_1_TO_16,
 2513|      2|                            ZYDIS_BROADCAST_MODE_1_TO_32
 2514|      2|                        },
 2515|       |                        /*32*/
 2516|      2|                        {
 2517|      2|                            ZYDIS_BROADCAST_MODE_1_TO_4,
 2518|      2|                            ZYDIS_BROADCAST_MODE_1_TO_8,
 2519|      2|                            ZYDIS_BROADCAST_MODE_1_TO_16
 2520|      2|                        },
 2521|       |                        /*64*/
 2522|      2|                        {
 2523|      2|                            ZYDIS_BROADCAST_MODE_1_TO_2,
 2524|      2|                            ZYDIS_BROADCAST_MODE_1_TO_4,
 2525|      2|                            ZYDIS_BROADCAST_MODE_1_TO_8
 2526|      2|                        }
 2527|      2|                    }
 2528|      2|                };
 2529|       |
 2530|      2|                const ZyanU8 size_index = context->evex.element_size >> 5;
 2531|      2|                ZYAN_ASSERT(size_index < 3);
  ------------------
  |  |  381|      2|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (2531:17): [True: 0, False: 2]
  |  Branch (2531:17): [True: 2, False: 0]
  ------------------
 2532|       |
 2533|      2|                context->cd8_scale = scales[evex_b][size_index][vector_length];
 2534|      2|                instruction->avx.broadcast.mode = broadcasts[evex_b][size_index][vector_length];
 2535|      2|                break;
 2536|      2|            }
 2537|      0|            case ZYDIS_TUPLETYPE_HV:
  ------------------
  |  Branch (2537:13): [True: 0, False: 8]
  ------------------
 2538|      0|            {
 2539|      0|                const ZyanU8 evex_b = instruction->raw.evex.b;
 2540|      0|                ZYAN_ASSERT(evex_b < 2);
  ------------------
  |  |  381|      0|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (2540:17): [True: 0, False: 0]
  |  Branch (2540:17): [True: 0, False: 0]
  ------------------
 2541|      0|                ZYAN_ASSERT(!context->vector_unified.W);
  ------------------
  |  |  381|      0|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (2541:17): [True: 0, False: 0]
  |  Branch (2541:17): [True: 0, False: 0]
  ------------------
 2542|      0|                ZYAN_ASSERT((context->evex.element_size == 16) ||
  ------------------
  |  |  381|      0|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (2542:17): [True: 0, False: 0]
  |  Branch (2542:17): [True: 0, False: 0]
  |  Branch (2542:17): [True: 0, False: 0]
  |  Branch (2542:17): [True: 0, False: 0]
  ------------------
 2543|      0|                            (context->evex.element_size == 32));
 2544|      0|                ZYAN_ASSERT(!evex_b || def->functionality == ZYDIS_EVEX_FUNC_BC);
  ------------------
  |  |  381|      0|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (2544:17): [True: 0, False: 0]
  |  Branch (2544:17): [True: 0, False: 0]
  |  Branch (2544:17): [True: 0, False: 0]
  |  Branch (2544:17): [True: 0, False: 0]
  ------------------
 2545|       |
 2546|      0|                static const ZyanU8 scales[2][2][3] =
 2547|      0|                {
 2548|      0|                    /*B0*/ { /*16*/ {  8, 16, 32 }, /*32*/ {  8, 16, 32 } },
 2549|      0|                    /*B1*/ { /*16*/ {  2,  2,  2 }, /*32*/ {  4,  4,  4 } }
 2550|      0|                };
 2551|      0|                static const ZydisBroadcastMode broadcasts[2][2][3] =
 2552|      0|                {
 2553|       |                    /*B0*/
 2554|      0|                    {
 2555|       |                        /*16*/
 2556|      0|                        {
 2557|      0|                            ZYDIS_BROADCAST_MODE_NONE,
 2558|      0|                            ZYDIS_BROADCAST_MODE_NONE,
 2559|      0|                            ZYDIS_BROADCAST_MODE_NONE
 2560|      0|                        },
 2561|       |                        /*32*/
 2562|      0|                        {
 2563|      0|                            ZYDIS_BROADCAST_MODE_NONE,
 2564|      0|                            ZYDIS_BROADCAST_MODE_NONE,
 2565|      0|                            ZYDIS_BROADCAST_MODE_NONE
 2566|      0|                        }
 2567|      0|                    },
 2568|       |                    /*B1*/
 2569|      0|                    {
 2570|       |                        /*16*/
 2571|      0|                        {
 2572|      0|                            ZYDIS_BROADCAST_MODE_1_TO_4,
 2573|      0|                            ZYDIS_BROADCAST_MODE_1_TO_8,
 2574|      0|                            ZYDIS_BROADCAST_MODE_1_TO_16
 2575|      0|                        },
 2576|       |                        /*32*/
 2577|      0|                        {
 2578|      0|                            ZYDIS_BROADCAST_MODE_1_TO_2,
 2579|      0|                            ZYDIS_BROADCAST_MODE_1_TO_4,
 2580|      0|                            ZYDIS_BROADCAST_MODE_1_TO_8
 2581|      0|                        }
 2582|      0|                    }
 2583|      0|                };
 2584|       |
 2585|      0|                const ZyanU8 size_index = context->evex.element_size >> 5;
 2586|      0|                ZYAN_ASSERT(size_index < 3);
  ------------------
  |  |  381|      0|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (2586:17): [True: 0, False: 0]
  |  Branch (2586:17): [True: 0, False: 0]
  ------------------
 2587|       |
 2588|      0|                context->cd8_scale = scales[evex_b][size_index][vector_length];
 2589|      0|                instruction->avx.broadcast.mode = broadcasts[evex_b][size_index][vector_length];
 2590|      0|                break;
 2591|      0|            }
 2592|      0|            case ZYDIS_TUPLETYPE_FVM:
  ------------------
  |  Branch (2592:13): [True: 0, False: 8]
  ------------------
 2593|      0|            {
 2594|      0|                static const ZyanU8 scales[3] =
 2595|      0|                {
 2596|      0|                    16, 32, 64
 2597|      0|                };
 2598|      0|                context->cd8_scale = scales[vector_length];
 2599|      0|                break;
 2600|      0|            }
 2601|      6|            case ZYDIS_TUPLETYPE_GSCAT:
  ------------------
  |  Branch (2601:13): [True: 6, False: 2]
  ------------------
 2602|      6|                switch (context->vector_unified.W)
 2603|      6|                {
 2604|      2|                case 0:
  ------------------
  |  Branch (2604:17): [True: 2, False: 4]
  ------------------
 2605|      2|                    ZYAN_ASSERT(context->evex.element_size == 32);
  ------------------
  |  |  381|      2|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (2605:21): [True: 0, False: 2]
  |  Branch (2605:21): [True: 2, False: 0]
  ------------------
 2606|      2|                    break;
 2607|      4|                case 1:
  ------------------
  |  Branch (2607:17): [True: 4, False: 2]
  ------------------
 2608|      4|                    ZYAN_ASSERT(context->evex.element_size == 64);
  ------------------
  |  |  381|      4|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (2608:21): [True: 0, False: 4]
  |  Branch (2608:21): [True: 4, False: 0]
  ------------------
 2609|      4|                    break;
 2610|      4|                default:
  ------------------
  |  Branch (2610:17): [True: 0, False: 6]
  ------------------
 2611|      0|                    ZYAN_UNREACHABLE;
  ------------------
  |  |  431|      0|#   define ZYAN_UNREACHABLE { assert(0); abort(); }
  ------------------
  |  Branch (2611:21): [Folded, False: 0]
  |  Branch (2611:21): [Folded, False: 0]
  ------------------
 2612|      6|                }
 2613|      6|                ZYAN_FALLTHROUGH;
 2614|      6|            case ZYDIS_TUPLETYPE_T1S:
  ------------------
  |  Branch (2614:13): [True: 0, False: 8]
  ------------------
 2615|      6|            {
 2616|      6|                static const ZyanU8 scales[7] =
 2617|      6|                {
 2618|      6|                    /*   */  0,
 2619|      6|                    /*  4*/  0,
 2620|      6|                    /*  8*/  1,
 2621|      6|                    /* 16*/  2,
 2622|      6|                    /* 32*/  4,
 2623|      6|                    /* 64*/  8,
 2624|      6|                    /*128*/ 16,
 2625|      6|                };
 2626|      6|                ZYAN_ASSERT(def->element_size < ZYAN_ARRAY_LENGTH(scales));
  ------------------
  |  |  381|      6|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (2626:17): [True: 0, False: 6]
  |  Branch (2626:17): [True: 6, False: 0]
  ------------------
 2627|      6|                context->cd8_scale = scales[def->element_size];
 2628|      6|                ZYAN_ASSERT(context->cd8_scale);
  ------------------
  |  |  381|      6|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (2628:17): [True: 0, False: 6]
  |  Branch (2628:17): [True: 6, False: 0]
  ------------------
 2629|      6|                break;
 2630|      6|            };
 2631|      0|            case ZYDIS_TUPLETYPE_T1F:
  ------------------
  |  Branch (2631:13): [True: 0, False: 8]
  ------------------
 2632|      0|            {
 2633|      0|                static const ZyanU8 scales[3] =
 2634|      0|                {
 2635|      0|                    /* 16*/ 2,
 2636|      0|                    /* 32*/ 4,
 2637|      0|                    /* 64*/ 8
 2638|      0|                };
 2639|       |
 2640|      0|                const ZyanU8 size_index = context->evex.element_size >> 5;
 2641|      0|                ZYAN_ASSERT(size_index < 3);
  ------------------
  |  |  381|      0|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (2641:17): [True: 0, False: 0]
  |  Branch (2641:17): [True: 0, False: 0]
  ------------------
 2642|       |
 2643|      0|                context->cd8_scale = scales[size_index];
 2644|      0|                break;
 2645|      0|            }
 2646|      0|            case ZYDIS_TUPLETYPE_T1_4X:
  ------------------
  |  Branch (2646:13): [True: 0, False: 8]
  ------------------
 2647|      0|                ZYAN_ASSERT(context->evex.element_size == 32);
  ------------------
  |  |  381|      0|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (2647:17): [True: 0, False: 0]
  |  Branch (2647:17): [True: 0, False: 0]
  ------------------
 2648|      0|                ZYAN_ASSERT(context->vector_unified.W == 0);
  ------------------
  |  |  381|      0|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (2648:17): [True: 0, False: 0]
  |  Branch (2648:17): [True: 0, False: 0]
  ------------------
 2649|      0|                context->cd8_scale = 16;
 2650|      0|                break;
 2651|      0|            case ZYDIS_TUPLETYPE_T2:
  ------------------
  |  Branch (2651:13): [True: 0, False: 8]
  ------------------
 2652|      0|                switch (context->vector_unified.W)
 2653|      0|                {
 2654|      0|                case 0:
  ------------------
  |  Branch (2654:17): [True: 0, False: 0]
  ------------------
 2655|      0|                    ZYAN_ASSERT(context->evex.element_size == 32);
  ------------------
  |  |  381|      0|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (2655:21): [True: 0, False: 0]
  |  Branch (2655:21): [True: 0, False: 0]
  ------------------
 2656|      0|                    context->cd8_scale = 8;
 2657|      0|                    break;
 2658|      0|                case 1:
  ------------------
  |  Branch (2658:17): [True: 0, False: 0]
  ------------------
 2659|      0|                    ZYAN_ASSERT(context->evex.element_size == 64);
  ------------------
  |  |  381|      0|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (2659:21): [True: 0, False: 0]
  |  Branch (2659:21): [True: 0, False: 0]
  ------------------
 2660|      0|                    ZYAN_ASSERT((instruction->avx.vector_length == 256) ||
  ------------------
  |  |  381|      0|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (2660:21): [True: 0, False: 0]
  |  Branch (2660:21): [True: 0, False: 0]
  |  Branch (2660:21): [True: 0, False: 0]
  |  Branch (2660:21): [True: 0, False: 0]
  ------------------
 2661|      0|                                (instruction->avx.vector_length == 512));
 2662|      0|                    context->cd8_scale = 16;
 2663|      0|                    break;
 2664|      0|                default:
  ------------------
  |  Branch (2664:17): [True: 0, False: 0]
  ------------------
 2665|      0|                    ZYAN_UNREACHABLE;
  ------------------
  |  |  431|      0|#   define ZYAN_UNREACHABLE { assert(0); abort(); }
  ------------------
  |  Branch (2665:21): [Folded, False: 0]
  |  Branch (2665:21): [Folded, False: 0]
  ------------------
 2666|      0|                }
 2667|      0|                break;
 2668|      0|            case ZYDIS_TUPLETYPE_T4:
  ------------------
  |  Branch (2668:13): [True: 0, False: 8]
  ------------------
 2669|      0|                switch (context->vector_unified.W)
 2670|      0|                {
 2671|      0|                case 0:
  ------------------
  |  Branch (2671:17): [True: 0, False: 0]
  ------------------
 2672|      0|                    ZYAN_ASSERT(context->evex.element_size == 32);
  ------------------
  |  |  381|      0|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (2672:21): [True: 0, False: 0]
  |  Branch (2672:21): [True: 0, False: 0]
  ------------------
 2673|      0|                    ZYAN_ASSERT((instruction->avx.vector_length == 256) ||
  ------------------
  |  |  381|      0|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (2673:21): [True: 0, False: 0]
  |  Branch (2673:21): [True: 0, False: 0]
  |  Branch (2673:21): [True: 0, False: 0]
  |  Branch (2673:21): [True: 0, False: 0]
  ------------------
 2674|      0|                                (instruction->avx.vector_length == 512));
 2675|      0|                    context->cd8_scale = 16;
 2676|      0|                    break;
 2677|      0|                case 1:
  ------------------
  |  Branch (2677:17): [True: 0, False: 0]
  ------------------
 2678|      0|                    ZYAN_ASSERT(context->evex.element_size == 64);
  ------------------
  |  |  381|      0|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (2678:21): [True: 0, False: 0]
  |  Branch (2678:21): [True: 0, False: 0]
  ------------------
 2679|      0|                    ZYAN_ASSERT(instruction->avx.vector_length == 512);
  ------------------
  |  |  381|      0|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (2679:21): [True: 0, False: 0]
  |  Branch (2679:21): [True: 0, False: 0]
  ------------------
 2680|      0|                    context->cd8_scale = 32;
 2681|      0|                    break;
 2682|      0|                default:
  ------------------
  |  Branch (2682:17): [True: 0, False: 0]
  ------------------
 2683|      0|                    ZYAN_UNREACHABLE;
  ------------------
  |  |  431|      0|#   define ZYAN_UNREACHABLE { assert(0); abort(); }
  ------------------
  |  Branch (2683:21): [Folded, False: 0]
  |  Branch (2683:21): [Folded, False: 0]
  ------------------
 2684|      0|                }
 2685|      0|                break;
 2686|      0|            case ZYDIS_TUPLETYPE_T8:
  ------------------
  |  Branch (2686:13): [True: 0, False: 8]
  ------------------
 2687|      0|                ZYAN_ASSERT(!context->vector_unified.W);
  ------------------
  |  |  381|      0|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (2687:17): [True: 0, False: 0]
  |  Branch (2687:17): [True: 0, False: 0]
  ------------------
 2688|      0|                ZYAN_ASSERT(instruction->avx.vector_length == 512);
  ------------------
  |  |  381|      0|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (2688:17): [True: 0, False: 0]
  |  Branch (2688:17): [True: 0, False: 0]
  ------------------
 2689|      0|                ZYAN_ASSERT(context->evex.element_size == 32);
  ------------------
  |  |  381|      0|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (2689:17): [True: 0, False: 0]
  |  Branch (2689:17): [True: 0, False: 0]
  ------------------
 2690|      0|                context->cd8_scale = 32;
 2691|      0|                break;
 2692|      0|            case ZYDIS_TUPLETYPE_HVM:
  ------------------
  |  Branch (2692:13): [True: 0, False: 8]
  ------------------
 2693|      0|            {
 2694|      0|                static const ZyanU8 scales[3] =
 2695|      0|                {
 2696|      0|                     8, 16, 32
 2697|      0|                };
 2698|      0|                context->cd8_scale = scales[vector_length];
 2699|      0|                break;
 2700|      0|            }
 2701|      0|            case ZYDIS_TUPLETYPE_QVM:
  ------------------
  |  Branch (2701:13): [True: 0, False: 8]
  ------------------
 2702|      0|            {
 2703|      0|                static const ZyanU8 scales[3] =
 2704|      0|                {
 2705|      0|                     4,  8, 16
 2706|      0|                };
 2707|      0|                context->cd8_scale = scales[vector_length];
 2708|      0|                break;
 2709|      0|            }
 2710|      0|            case ZYDIS_TUPLETYPE_OVM:
  ------------------
  |  Branch (2710:13): [True: 0, False: 8]
  ------------------
 2711|      0|            {
 2712|      0|                static const ZyanU8 scales[3] =
 2713|      0|                {
 2714|      0|                     2,  4,  8
 2715|      0|                };
 2716|      0|                context->cd8_scale = scales[vector_length];
 2717|      0|                break;
 2718|      0|            }
 2719|      0|            case ZYDIS_TUPLETYPE_M128:
  ------------------
  |  Branch (2719:13): [True: 0, False: 8]
  ------------------
 2720|      0|                context->cd8_scale = 16;
 2721|      0|                break;
 2722|      0|            case ZYDIS_TUPLETYPE_DUP:
  ------------------
  |  Branch (2722:13): [True: 0, False: 8]
  ------------------
 2723|      0|            {
 2724|      0|                static const ZyanU8 scales[3] =
 2725|      0|                {
 2726|      0|                     8, 32, 64
 2727|      0|                };
 2728|      0|                context->cd8_scale = scales[vector_length];
 2729|      0|                break;
 2730|      0|            }
 2731|      0|            case ZYDIS_TUPLETYPE_QUARTER:
  ------------------
  |  Branch (2731:13): [True: 0, False: 8]
  ------------------
 2732|      0|            {
 2733|      0|                const ZyanU8 evex_b = instruction->raw.evex.b;
 2734|      0|                ZYAN_ASSERT(evex_b < 2);
  ------------------
  |  |  381|      0|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (2734:17): [True: 0, False: 0]
  |  Branch (2734:17): [True: 0, False: 0]
  ------------------
 2735|      0|                ZYAN_ASSERT(!context->vector_unified.W);
  ------------------
  |  |  381|      0|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (2735:17): [True: 0, False: 0]
  |  Branch (2735:17): [True: 0, False: 0]
  ------------------
 2736|      0|                ZYAN_ASSERT(context->evex.element_size == 16);
  ------------------
  |  |  381|      0|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (2736:17): [True: 0, False: 0]
  |  Branch (2736:17): [True: 0, False: 0]
  ------------------
 2737|      0|                ZYAN_ASSERT(!evex_b || def->functionality == ZYDIS_EVEX_FUNC_BC);
  ------------------
  |  |  381|      0|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (2737:17): [True: 0, False: 0]
  |  Branch (2737:17): [True: 0, False: 0]
  |  Branch (2737:17): [True: 0, False: 0]
  |  Branch (2737:17): [True: 0, False: 0]
  ------------------
 2738|       |
 2739|      0|                static const ZyanU8 scales[2][3] =
 2740|      0|                {
 2741|      0|                    /*B0*/ {  4,  8, 16 },
 2742|      0|                    /*B1*/ {  2,  2,  2 }
 2743|      0|                };
 2744|      0|                static const ZydisBroadcastMode broadcasts[2][3] =
 2745|      0|                {
 2746|       |                    /*B0*/
 2747|      0|                    {
 2748|      0|                        ZYDIS_BROADCAST_MODE_NONE,
 2749|      0|                        ZYDIS_BROADCAST_MODE_NONE,
 2750|      0|                        ZYDIS_BROADCAST_MODE_NONE
 2751|      0|                    },
 2752|       |                    /*B1*/
 2753|      0|                    {
 2754|      0|                        ZYDIS_BROADCAST_MODE_1_TO_2,
 2755|      0|                        ZYDIS_BROADCAST_MODE_1_TO_4,
 2756|      0|                        ZYDIS_BROADCAST_MODE_1_TO_8
 2757|      0|                    }
 2758|      0|                };
 2759|      0|                context->cd8_scale = scales[evex_b][vector_length];
 2760|      0|                instruction->avx.broadcast.mode = broadcasts[evex_b][vector_length];
 2761|      0|                break;
 2762|      0|            }
 2763|      0|            default:
  ------------------
  |  Branch (2763:13): [True: 0, False: 8]
  ------------------
 2764|      0|                ZYAN_UNREACHABLE;
  ------------------
  |  |  431|      0|#   define ZYAN_UNREACHABLE { assert(0); abort(); }
  ------------------
  |  Branch (2764:17): [Folded, False: 0]
  |  Branch (2764:17): [Folded, False: 0]
  ------------------
 2765|      8|            }
 2766|      8|        } else
 2767|     24|        {
 2768|     24|            ZYAN_ASSERT((instruction->raw.modrm.mod == 3) || 
  ------------------
  |  |  381|     24|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (2768:13): [True: 24, False: 0]
  |  Branch (2768:13): [True: 0, False: 0]
  |  Branch (2768:13): [True: 10, False: 14]
  |  Branch (2768:13): [True: 14, False: 0]
  ------------------
 2769|     24|                        (def->tuple_type == ZYDIS_TUPLETYPE_NO_SCALE));
 2770|     24|        }
 2771|       |
 2772|       |        // Static broadcast-factor
 2773|     32|        if (def->broadcast)
  ------------------
  |  Branch (2773:13): [True: 0, False: 32]
  ------------------
 2774|      0|        {
 2775|      0|            ZYAN_ASSERT(!instruction->avx.broadcast.mode);
  ------------------
  |  |  381|      0|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (2775:13): [True: 0, False: 0]
  |  Branch (2775:13): [True: 0, False: 0]
  ------------------
 2776|      0|            instruction->avx.broadcast.is_static = ZYAN_TRUE;
  ------------------
  |  |  288|      0|#define ZYAN_TRUE  1u
  ------------------
 2777|      0|            static const ZydisBroadcastMode broadcasts[ZYDIS_EVEX_STATIC_BROADCAST_MAX_VALUE + 1] =
 2778|      0|            {
 2779|      0|                ZYDIS_BROADCAST_MODE_NONE,
 2780|      0|                ZYDIS_BROADCAST_MODE_1_TO_2,
 2781|      0|                ZYDIS_BROADCAST_MODE_1_TO_4,
 2782|      0|                ZYDIS_BROADCAST_MODE_1_TO_8,
 2783|      0|                ZYDIS_BROADCAST_MODE_1_TO_16,
 2784|      0|                ZYDIS_BROADCAST_MODE_1_TO_32,
 2785|      0|                ZYDIS_BROADCAST_MODE_1_TO_64,
 2786|      0|                ZYDIS_BROADCAST_MODE_2_TO_4,
 2787|      0|                ZYDIS_BROADCAST_MODE_2_TO_8,
 2788|      0|                ZYDIS_BROADCAST_MODE_2_TO_16,
 2789|      0|                ZYDIS_BROADCAST_MODE_4_TO_8,
 2790|      0|                ZYDIS_BROADCAST_MODE_4_TO_16,
 2791|      0|                ZYDIS_BROADCAST_MODE_8_TO_16
 2792|      0|            };
 2793|      0|            ZYAN_ASSERT(def->broadcast < ZYAN_ARRAY_LENGTH(broadcasts));
  ------------------
  |  |  381|      0|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (2793:13): [True: 0, False: 0]
  |  Branch (2793:13): [True: 0, False: 0]
  ------------------
 2794|      0|            instruction->avx.broadcast.mode = broadcasts[def->broadcast];
 2795|      0|        }
 2796|       |
 2797|       |        // Rounding mode and SAE
 2798|     32|        if (instruction->raw.evex.b)
  ------------------
  |  Branch (2798:13): [True: 8, False: 24]
  ------------------
 2799|      8|        {
 2800|      8|            switch (def->functionality)
 2801|      8|            {
 2802|      4|            case ZYDIS_EVEX_FUNC_INVALID:
  ------------------
  |  Branch (2802:13): [True: 4, False: 4]
  ------------------
 2803|      4|            case ZYDIS_EVEX_FUNC_BC:
  ------------------
  |  Branch (2803:13): [True: 0, False: 8]
  ------------------
 2804|       |                // Noting to do here
 2805|      4|                break;
 2806|      4|            case ZYDIS_EVEX_FUNC_RC:
  ------------------
  |  Branch (2806:13): [True: 4, False: 4]
  ------------------
 2807|      4|                instruction->avx.rounding.mode = ZYDIS_ROUNDING_MODE_RN + context->vector_unified.LL;
 2808|      4|                ZYAN_FALLTHROUGH;
 2809|      4|            case ZYDIS_EVEX_FUNC_SAE:
  ------------------
  |  Branch (2809:13): [True: 0, False: 8]
  ------------------
 2810|      4|                instruction->avx.has_sae = ZYAN_TRUE;
  ------------------
  |  |  288|      4|#define ZYAN_TRUE  1u
  ------------------
 2811|      4|                break;
 2812|      0|            default:
  ------------------
  |  Branch (2812:13): [True: 0, False: 8]
  ------------------
 2813|      0|                ZYAN_UNREACHABLE;
  ------------------
  |  |  431|      0|#   define ZYAN_UNREACHABLE { assert(0); abort(); }
  ------------------
  |  Branch (2813:17): [Folded, False: 0]
  |  Branch (2813:17): [Folded, False: 0]
  ------------------
 2814|      8|            }
 2815|      8|        }
 2816|       |
 2817|       |        // Mask
 2818|     32|        instruction->avx.mask.reg = ZYDIS_REGISTER_K0 + context->vector_unified.mask;
 2819|     32|        switch (def->mask_override)
 2820|     32|        {
 2821|     32|        case ZYDIS_MASK_OVERRIDE_DEFAULT:
  ------------------
  |  Branch (2821:9): [True: 32, False: 0]
  ------------------
 2822|     32|            instruction->avx.mask.mode = ZYDIS_MASK_MODE_MERGING + instruction->raw.evex.z;
 2823|     32|            break;
 2824|      0|        case ZYDIS_MASK_OVERRIDE_ZEROING:
  ------------------
  |  Branch (2824:9): [True: 0, False: 32]
  ------------------
 2825|      0|            instruction->avx.mask.mode = ZYDIS_MASK_MODE_ZEROING;
 2826|      0|            break;
 2827|      0|        case ZYDIS_MASK_OVERRIDE_CONTROL:
  ------------------
  |  Branch (2827:9): [True: 0, False: 32]
  ------------------
 2828|      0|            instruction->avx.mask.mode = ZYDIS_MASK_MODE_CONTROL + instruction->raw.evex.z;
 2829|      0|            break;
 2830|      0|        default:
  ------------------
  |  Branch (2830:9): [True: 0, False: 32]
  ------------------
 2831|      0|            ZYAN_UNREACHABLE;
  ------------------
  |  |  431|      0|#   define ZYAN_UNREACHABLE { assert(0); abort(); }
  ------------------
  |  Branch (2831:13): [Folded, False: 0]
  |  Branch (2831:13): [Folded, False: 0]
  ------------------
 2832|     32|        }
 2833|     32|        if (!context->vector_unified.mask)
  ------------------
  |  Branch (2833:13): [True: 20, False: 12]
  ------------------
 2834|     20|        {
 2835|     20|            instruction->avx.mask.mode = ZYDIS_MASK_MODE_DISABLED;
 2836|     20|        }
 2837|       |#else
 2838|       |        ZYAN_UNREACHABLE;
 2839|       |#endif
 2840|     32|        break;
 2841|     32|    }
 2842|      0|    case ZYDIS_INSTRUCTION_ENCODING_MVEX:
  ------------------
  |  Branch (2842:5): [True: 0, False: 34]
  ------------------
 2843|      0|    {
 2844|      0|#ifndef ZYDIS_DISABLE_KNC
 2845|       |        // Vector length
 2846|      0|        instruction->avx.vector_length = 512;
 2847|       |
 2848|      0|        const ZydisInstructionDefinitionMVEX* def =
 2849|      0|            (const ZydisInstructionDefinitionMVEX*)definition;
 2850|       |
 2851|       |        // Static broadcast-factor
 2852|      0|        ZyanU8 index = def->has_element_granularity;
 2853|      0|        ZYAN_ASSERT(!index || !def->broadcast);
  ------------------
  |  |  381|      0|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (2853:9): [True: 0, False: 0]
  |  Branch (2853:9): [True: 0, False: 0]
  |  Branch (2853:9): [True: 0, False: 0]
  |  Branch (2853:9): [True: 0, False: 0]
  ------------------
 2854|      0|        if (!index && def->broadcast)
  ------------------
  |  Branch (2854:13): [True: 0, False: 0]
  |  Branch (2854:23): [True: 0, False: 0]
  ------------------
 2855|      0|        {
 2856|      0|            instruction->avx.broadcast.is_static = ZYAN_TRUE;
  ------------------
  |  |  288|      0|#define ZYAN_TRUE  1u
  ------------------
 2857|      0|            switch (def->broadcast)
 2858|      0|            {
 2859|      0|            case ZYDIS_MVEX_STATIC_BROADCAST_1_TO_8:
  ------------------
  |  Branch (2859:13): [True: 0, False: 0]
  ------------------
 2860|      0|                instruction->avx.broadcast.mode = ZYDIS_BROADCAST_MODE_1_TO_8;
 2861|      0|                index = 1;
 2862|      0|                break;
 2863|      0|            case ZYDIS_MVEX_STATIC_BROADCAST_1_TO_16:
  ------------------
  |  Branch (2863:13): [True: 0, False: 0]
  ------------------
 2864|      0|                instruction->avx.broadcast.mode = ZYDIS_BROADCAST_MODE_1_TO_16;
 2865|      0|                index = 1;
 2866|      0|                break;
 2867|      0|            case ZYDIS_MVEX_STATIC_BROADCAST_4_TO_8:
  ------------------
  |  Branch (2867:13): [True: 0, False: 0]
  ------------------
 2868|      0|                instruction->avx.broadcast.mode = ZYDIS_BROADCAST_MODE_4_TO_8;
 2869|      0|                index = 2;
 2870|      0|                break;
 2871|      0|            case ZYDIS_MVEX_STATIC_BROADCAST_4_TO_16:
  ------------------
  |  Branch (2871:13): [True: 0, False: 0]
  ------------------
 2872|      0|                instruction->avx.broadcast.mode = ZYDIS_BROADCAST_MODE_4_TO_16;
 2873|      0|                index = 2;
 2874|      0|                break;
 2875|      0|            default:
  ------------------
  |  Branch (2875:13): [True: 0, False: 0]
  ------------------
 2876|      0|                ZYAN_UNREACHABLE;
  ------------------
  |  |  431|      0|#   define ZYAN_UNREACHABLE { assert(0); abort(); }
  ------------------
  |  Branch (2876:17): [Folded, False: 0]
  |  Branch (2876:17): [Folded, False: 0]
  ------------------
 2877|      0|            }
 2878|      0|        }
 2879|       |
 2880|       |        // Compressed disp8 scale and broadcast-factor
 2881|      0|        switch (def->functionality)
 2882|      0|        {
 2883|      0|        case ZYDIS_MVEX_FUNC_IGNORED:
  ------------------
  |  Branch (2883:9): [True: 0, False: 0]
  ------------------
 2884|      0|        case ZYDIS_MVEX_FUNC_INVALID:
  ------------------
  |  Branch (2884:9): [True: 0, False: 0]
  ------------------
 2885|      0|        case ZYDIS_MVEX_FUNC_RC:
  ------------------
  |  Branch (2885:9): [True: 0, False: 0]
  ------------------
 2886|      0|        case ZYDIS_MVEX_FUNC_SAE:
  ------------------
  |  Branch (2886:9): [True: 0, False: 0]
  ------------------
 2887|      0|        case ZYDIS_MVEX_FUNC_SWIZZLE_32:
  ------------------
  |  Branch (2887:9): [True: 0, False: 0]
  ------------------
 2888|      0|        case ZYDIS_MVEX_FUNC_SWIZZLE_64:
  ------------------
  |  Branch (2888:9): [True: 0, False: 0]
  ------------------
 2889|       |            // Nothing to do here
 2890|      0|            break;
 2891|      0|        case ZYDIS_MVEX_FUNC_F_32:
  ------------------
  |  Branch (2891:9): [True: 0, False: 0]
  ------------------
 2892|      0|        case ZYDIS_MVEX_FUNC_I_32:
  ------------------
  |  Branch (2892:9): [True: 0, False: 0]
  ------------------
 2893|      0|        case ZYDIS_MVEX_FUNC_F_64:
  ------------------
  |  Branch (2893:9): [True: 0, False: 0]
  ------------------
 2894|      0|        case ZYDIS_MVEX_FUNC_I_64:
  ------------------
  |  Branch (2894:9): [True: 0, False: 0]
  ------------------
 2895|      0|            context->cd8_scale = 64;
 2896|      0|            break;
 2897|      0|        case ZYDIS_MVEX_FUNC_SF_32:
  ------------------
  |  Branch (2897:9): [True: 0, False: 0]
  ------------------
 2898|      0|        case ZYDIS_MVEX_FUNC_SF_32_BCST:
  ------------------
  |  Branch (2898:9): [True: 0, False: 0]
  ------------------
 2899|      0|        case ZYDIS_MVEX_FUNC_SF_32_BCST_4TO16:
  ------------------
  |  Branch (2899:9): [True: 0, False: 0]
  ------------------
 2900|      0|        case ZYDIS_MVEX_FUNC_UF_32:
  ------------------
  |  Branch (2900:9): [True: 0, False: 0]
  ------------------
 2901|      0|        {
 2902|      0|            static const ZyanU8 lookup[3][8] =
 2903|      0|            {
 2904|      0|                { 64,  4, 16, 32, 16, 16, 32, 32 },
 2905|      0|                {  4,  0,  0,  2,  1,  1,  2,  2 },
 2906|      0|                { 16,  0,  0,  8,  4,  4,  8,  8 }
 2907|      0|            };
 2908|      0|            ZYAN_ASSERT(instruction->raw.mvex.SSS < ZYAN_ARRAY_LENGTH(lookup[index]));
  ------------------
  |  |  381|      0|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (2908:13): [True: 0, False: 0]
  |  Branch (2908:13): [True: 0, False: 0]
  ------------------
 2909|      0|            context->cd8_scale = lookup[index][instruction->raw.mvex.SSS];
 2910|      0|            break;
 2911|      0|        }
 2912|      0|        case ZYDIS_MVEX_FUNC_SI_32:
  ------------------
  |  Branch (2912:9): [True: 0, False: 0]
  ------------------
 2913|      0|        case ZYDIS_MVEX_FUNC_UI_32:
  ------------------
  |  Branch (2913:9): [True: 0, False: 0]
  ------------------
 2914|      0|        case ZYDIS_MVEX_FUNC_SI_32_BCST:
  ------------------
  |  Branch (2914:9): [True: 0, False: 0]
  ------------------
 2915|      0|        case ZYDIS_MVEX_FUNC_SI_32_BCST_4TO16:
  ------------------
  |  Branch (2915:9): [True: 0, False: 0]
  ------------------
 2916|      0|        {
 2917|      0|            static const ZyanU8 lookup[3][8] =
 2918|      0|            {
 2919|      0|                { 64,  4, 16,  0, 16, 16, 32, 32 },
 2920|      0|                {  4,  0,  0,  0,  1,  1,  2,  2 },
 2921|      0|                { 16,  0,  0,  0,  4,  4,  8,  8 }
 2922|      0|            };
 2923|      0|            ZYAN_ASSERT(instruction->raw.mvex.SSS < ZYAN_ARRAY_LENGTH(lookup[index]));
  ------------------
  |  |  381|      0|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (2923:13): [True: 0, False: 0]
  |  Branch (2923:13): [True: 0, False: 0]
  ------------------
 2924|      0|            context->cd8_scale = lookup[index][instruction->raw.mvex.SSS];
 2925|      0|            break;
 2926|      0|        }
 2927|      0|        case ZYDIS_MVEX_FUNC_SF_64:
  ------------------
  |  Branch (2927:9): [True: 0, False: 0]
  ------------------
 2928|      0|        case ZYDIS_MVEX_FUNC_UF_64:
  ------------------
  |  Branch (2928:9): [True: 0, False: 0]
  ------------------
 2929|      0|        case ZYDIS_MVEX_FUNC_SI_64:
  ------------------
  |  Branch (2929:9): [True: 0, False: 0]
  ------------------
 2930|      0|        case ZYDIS_MVEX_FUNC_UI_64:
  ------------------
  |  Branch (2930:9): [True: 0, False: 0]
  ------------------
 2931|      0|        {
 2932|      0|            static const ZyanU8 lookup[3][3] =
 2933|      0|            {
 2934|      0|                { 64,  8, 32 },
 2935|      0|                {  8,  0,  0 },
 2936|      0|                { 32,  0,  0 }
 2937|      0|            };
 2938|      0|            ZYAN_ASSERT(instruction->raw.mvex.SSS < ZYAN_ARRAY_LENGTH(lookup[index]));
  ------------------
  |  |  381|      0|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (2938:13): [True: 0, False: 0]
  |  Branch (2938:13): [True: 0, False: 0]
  ------------------
 2939|      0|            context->cd8_scale = lookup[index][instruction->raw.mvex.SSS];
 2940|      0|            break;
 2941|      0|        }
 2942|      0|        case ZYDIS_MVEX_FUNC_DF_32:
  ------------------
  |  Branch (2942:9): [True: 0, False: 0]
  ------------------
 2943|      0|        case ZYDIS_MVEX_FUNC_DI_32:
  ------------------
  |  Branch (2943:9): [True: 0, False: 0]
  ------------------
 2944|      0|        {
 2945|      0|            static const ZyanU8 lookup[2][8] =
 2946|      0|            {
 2947|      0|                { 64,  0,  0, 32, 16, 16, 32, 32 },
 2948|      0|                {  4,  0,  0,  2,  1,  1,  2,  2 }
 2949|      0|            };
 2950|      0|            ZYAN_ASSERT(index < 2);
  ------------------
  |  |  381|      0|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (2950:13): [True: 0, False: 0]
  |  Branch (2950:13): [True: 0, False: 0]
  ------------------
 2951|      0|            ZYAN_ASSERT(instruction->raw.mvex.SSS < ZYAN_ARRAY_LENGTH(lookup[index]));
  ------------------
  |  |  381|      0|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (2951:13): [True: 0, False: 0]
  |  Branch (2951:13): [True: 0, False: 0]
  ------------------
 2952|      0|            context->cd8_scale = lookup[index][instruction->raw.mvex.SSS];
 2953|      0|            break;
 2954|      0|        }
 2955|      0|        case ZYDIS_MVEX_FUNC_DF_64:
  ------------------
  |  Branch (2955:9): [True: 0, False: 0]
  ------------------
 2956|      0|        case ZYDIS_MVEX_FUNC_DI_64:
  ------------------
  |  Branch (2956:9): [True: 0, False: 0]
  ------------------
 2957|      0|        {
 2958|      0|            static const ZyanU8 lookup[2][1] =
 2959|      0|            {
 2960|      0|                { 64 },
 2961|      0|                {  8 }
 2962|      0|            };
 2963|      0|            ZYAN_ASSERT(index < 2);
  ------------------
  |  |  381|      0|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (2963:13): [True: 0, False: 0]
  |  Branch (2963:13): [True: 0, False: 0]
  ------------------
 2964|      0|            ZYAN_ASSERT(instruction->raw.mvex.SSS < ZYAN_ARRAY_LENGTH(lookup[index]));
  ------------------
  |  |  381|      0|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (2964:13): [True: 0, False: 0]
  |  Branch (2964:13): [True: 0, False: 0]
  ------------------
 2965|      0|            context->cd8_scale = lookup[index][instruction->raw.mvex.SSS];
 2966|      0|            break;
 2967|      0|        }
 2968|      0|        default:
  ------------------
  |  Branch (2968:9): [True: 0, False: 0]
  ------------------
 2969|      0|            ZYAN_UNREACHABLE;
  ------------------
  |  |  431|      0|#   define ZYAN_UNREACHABLE { assert(0); abort(); }
  ------------------
  |  Branch (2969:13): [Folded, False: 0]
  |  Branch (2969:13): [Folded, False: 0]
  ------------------
 2970|      0|        }
 2971|       |
 2972|       |        // Rounding mode, sae, swizzle, convert
 2973|      0|        context->mvex.functionality = def->functionality;
 2974|      0|        switch (def->functionality)
 2975|      0|        {
 2976|      0|        case ZYDIS_MVEX_FUNC_IGNORED:
  ------------------
  |  Branch (2976:9): [True: 0, False: 0]
  ------------------
 2977|      0|        case ZYDIS_MVEX_FUNC_INVALID:
  ------------------
  |  Branch (2977:9): [True: 0, False: 0]
  ------------------
 2978|      0|        case ZYDIS_MVEX_FUNC_F_32:
  ------------------
  |  Branch (2978:9): [True: 0, False: 0]
  ------------------
 2979|      0|        case ZYDIS_MVEX_FUNC_I_32:
  ------------------
  |  Branch (2979:9): [True: 0, False: 0]
  ------------------
 2980|      0|        case ZYDIS_MVEX_FUNC_F_64:
  ------------------
  |  Branch (2980:9): [True: 0, False: 0]
  ------------------
 2981|      0|        case ZYDIS_MVEX_FUNC_I_64:
  ------------------
  |  Branch (2981:9): [True: 0, False: 0]
  ------------------
 2982|       |            // Nothing to do here
 2983|      0|            break;
 2984|      0|        case ZYDIS_MVEX_FUNC_RC:
  ------------------
  |  Branch (2984:9): [True: 0, False: 0]
  ------------------
 2985|      0|            instruction->avx.rounding.mode = ZYDIS_ROUNDING_MODE_RN + (instruction->raw.mvex.SSS & 3);
 2986|      0|            ZYAN_FALLTHROUGH;
 2987|      0|        case ZYDIS_MVEX_FUNC_SAE:
  ------------------
  |  Branch (2987:9): [True: 0, False: 0]
  ------------------
 2988|      0|            if (instruction->raw.mvex.SSS >= 4)
  ------------------
  |  Branch (2988:17): [True: 0, False: 0]
  ------------------
 2989|      0|            {
 2990|      0|                instruction->avx.has_sae = ZYAN_TRUE;
  ------------------
  |  |  288|      0|#define ZYAN_TRUE  1u
  ------------------
 2991|      0|            }
 2992|      0|            break;
 2993|      0|        case ZYDIS_MVEX_FUNC_SWIZZLE_32:
  ------------------
  |  Branch (2993:9): [True: 0, False: 0]
  ------------------
 2994|      0|        case ZYDIS_MVEX_FUNC_SWIZZLE_64:
  ------------------
  |  Branch (2994:9): [True: 0, False: 0]
  ------------------
 2995|      0|            instruction->avx.swizzle.mode = ZYDIS_SWIZZLE_MODE_DCBA + instruction->raw.mvex.SSS;
 2996|      0|            break;
 2997|      0|        case ZYDIS_MVEX_FUNC_SF_32:
  ------------------
  |  Branch (2997:9): [True: 0, False: 0]
  ------------------
 2998|      0|        case ZYDIS_MVEX_FUNC_SF_32_BCST:
  ------------------
  |  Branch (2998:9): [True: 0, False: 0]
  ------------------
 2999|      0|        case ZYDIS_MVEX_FUNC_SF_32_BCST_4TO16:
  ------------------
  |  Branch (2999:9): [True: 0, False: 0]
  ------------------
 3000|      0|            switch (instruction->raw.mvex.SSS)
 3001|      0|            {
 3002|      0|            case 0:
  ------------------
  |  Branch (3002:13): [True: 0, False: 0]
  ------------------
 3003|      0|                break;
 3004|      0|            case 1:
  ------------------
  |  Branch (3004:13): [True: 0, False: 0]
  ------------------
 3005|      0|                instruction->avx.broadcast.mode = ZYDIS_BROADCAST_MODE_1_TO_16;
 3006|      0|                break;
 3007|      0|            case 2:
  ------------------
  |  Branch (3007:13): [True: 0, False: 0]
  ------------------
 3008|      0|                instruction->avx.broadcast.mode = ZYDIS_BROADCAST_MODE_4_TO_16;
 3009|      0|                break;
 3010|      0|            case 3:
  ------------------
  |  Branch (3010:13): [True: 0, False: 0]
  ------------------
 3011|      0|                instruction->avx.conversion.mode = ZYDIS_CONVERSION_MODE_FLOAT16;
 3012|      0|                break;
 3013|      0|            case 4:
  ------------------
  |  Branch (3013:13): [True: 0, False: 0]
  ------------------
 3014|      0|                instruction->avx.conversion.mode = ZYDIS_CONVERSION_MODE_UINT8;
 3015|      0|                break;
 3016|      0|            case 5:
  ------------------
  |  Branch (3016:13): [True: 0, False: 0]
  ------------------
 3017|      0|                instruction->avx.conversion.mode = ZYDIS_CONVERSION_MODE_SINT8;
 3018|      0|                break;
 3019|      0|            case 6:
  ------------------
  |  Branch (3019:13): [True: 0, False: 0]
  ------------------
 3020|      0|                instruction->avx.conversion.mode = ZYDIS_CONVERSION_MODE_UINT16;
 3021|      0|                break;
 3022|      0|            case 7:
  ------------------
  |  Branch (3022:13): [True: 0, False: 0]
  ------------------
 3023|      0|                instruction->avx.conversion.mode = ZYDIS_CONVERSION_MODE_SINT16;
 3024|      0|                break;
 3025|      0|            default:
  ------------------
  |  Branch (3025:13): [True: 0, False: 0]
  ------------------
 3026|      0|                ZYAN_UNREACHABLE;
  ------------------
  |  |  431|      0|#   define ZYAN_UNREACHABLE { assert(0); abort(); }
  ------------------
  |  Branch (3026:17): [Folded, False: 0]
  |  Branch (3026:17): [Folded, False: 0]
  ------------------
 3027|      0|            }
 3028|      0|            break;
 3029|      0|        case ZYDIS_MVEX_FUNC_SI_32:
  ------------------
  |  Branch (3029:9): [True: 0, False: 0]
  ------------------
 3030|      0|        case ZYDIS_MVEX_FUNC_SI_32_BCST:
  ------------------
  |  Branch (3030:9): [True: 0, False: 0]
  ------------------
 3031|      0|        case ZYDIS_MVEX_FUNC_SI_32_BCST_4TO16:
  ------------------
  |  Branch (3031:9): [True: 0, False: 0]
  ------------------
 3032|      0|            switch (instruction->raw.mvex.SSS)
 3033|      0|            {
 3034|      0|            case 0:
  ------------------
  |  Branch (3034:13): [True: 0, False: 0]
  ------------------
 3035|      0|                break;
 3036|      0|            case 1:
  ------------------
  |  Branch (3036:13): [True: 0, False: 0]
  ------------------
 3037|      0|                instruction->avx.broadcast.mode = ZYDIS_BROADCAST_MODE_1_TO_16;
 3038|      0|                break;
 3039|      0|            case 2:
  ------------------
  |  Branch (3039:13): [True: 0, False: 0]
  ------------------
 3040|      0|                instruction->avx.broadcast.mode = ZYDIS_BROADCAST_MODE_4_TO_16;
 3041|      0|                break;
 3042|      0|            case 4:
  ------------------
  |  Branch (3042:13): [True: 0, False: 0]
  ------------------
 3043|      0|                instruction->avx.conversion.mode = ZYDIS_CONVERSION_MODE_UINT8;
 3044|      0|                break;
 3045|      0|            case 5:
  ------------------
  |  Branch (3045:13): [True: 0, False: 0]
  ------------------
 3046|      0|                instruction->avx.conversion.mode = ZYDIS_CONVERSION_MODE_SINT8;
 3047|      0|                break;
 3048|      0|            case 6:
  ------------------
  |  Branch (3048:13): [True: 0, False: 0]
  ------------------
 3049|      0|                instruction->avx.conversion.mode = ZYDIS_CONVERSION_MODE_UINT16;
 3050|      0|                break;
 3051|      0|            case 7:
  ------------------
  |  Branch (3051:13): [True: 0, False: 0]
  ------------------
 3052|      0|                instruction->avx.conversion.mode = ZYDIS_CONVERSION_MODE_SINT16;
 3053|      0|                break;
 3054|      0|            default:
  ------------------
  |  Branch (3054:13): [True: 0, False: 0]
  ------------------
 3055|      0|                ZYAN_UNREACHABLE;
  ------------------
  |  |  431|      0|#   define ZYAN_UNREACHABLE { assert(0); abort(); }
  ------------------
  |  Branch (3055:17): [Folded, False: 0]
  |  Branch (3055:17): [Folded, False: 0]
  ------------------
 3056|      0|            }
 3057|      0|            break;
 3058|      0|        case ZYDIS_MVEX_FUNC_SF_64:
  ------------------
  |  Branch (3058:9): [True: 0, False: 0]
  ------------------
 3059|      0|        case ZYDIS_MVEX_FUNC_SI_64:
  ------------------
  |  Branch (3059:9): [True: 0, False: 0]
  ------------------
 3060|      0|            switch (instruction->raw.mvex.SSS)
 3061|      0|            {
 3062|      0|            case 0:
  ------------------
  |  Branch (3062:13): [True: 0, False: 0]
  ------------------
 3063|      0|                break;
 3064|      0|            case 1:
  ------------------
  |  Branch (3064:13): [True: 0, False: 0]
  ------------------
 3065|      0|                instruction->avx.broadcast.mode = ZYDIS_BROADCAST_MODE_1_TO_8;
 3066|      0|                break;
 3067|      0|            case 2:
  ------------------
  |  Branch (3067:13): [True: 0, False: 0]
  ------------------
 3068|      0|                instruction->avx.broadcast.mode = ZYDIS_BROADCAST_MODE_4_TO_8;
 3069|      0|                break;
 3070|      0|            default:
  ------------------
  |  Branch (3070:13): [True: 0, False: 0]
  ------------------
 3071|      0|                ZYAN_UNREACHABLE;
  ------------------
  |  |  431|      0|#   define ZYAN_UNREACHABLE { assert(0); abort(); }
  ------------------
  |  Branch (3071:17): [Folded, False: 0]
  |  Branch (3071:17): [Folded, False: 0]
  ------------------
 3072|      0|            }
 3073|      0|            break;
 3074|      0|        case ZYDIS_MVEX_FUNC_UF_32:
  ------------------
  |  Branch (3074:9): [True: 0, False: 0]
  ------------------
 3075|      0|        case ZYDIS_MVEX_FUNC_DF_32:
  ------------------
  |  Branch (3075:9): [True: 0, False: 0]
  ------------------
 3076|      0|            switch (instruction->raw.mvex.SSS)
 3077|      0|            {
 3078|      0|            case 0:
  ------------------
  |  Branch (3078:13): [True: 0, False: 0]
  ------------------
 3079|      0|                break;
 3080|      0|            case 3:
  ------------------
  |  Branch (3080:13): [True: 0, False: 0]
  ------------------
 3081|      0|                instruction->avx.conversion.mode = ZYDIS_CONVERSION_MODE_FLOAT16;
 3082|      0|                break;
 3083|      0|            case 4:
  ------------------
  |  Branch (3083:13): [True: 0, False: 0]
  ------------------
 3084|      0|                instruction->avx.conversion.mode = ZYDIS_CONVERSION_MODE_UINT8;
 3085|      0|                break;
 3086|      0|            case 5:
  ------------------
  |  Branch (3086:13): [True: 0, False: 0]
  ------------------
 3087|      0|                instruction->avx.conversion.mode = ZYDIS_CONVERSION_MODE_SINT8;
 3088|      0|                break;
 3089|      0|            case 6:
  ------------------
  |  Branch (3089:13): [True: 0, False: 0]
  ------------------
 3090|      0|                instruction->avx.conversion.mode = ZYDIS_CONVERSION_MODE_UINT16;
 3091|      0|                break;
 3092|      0|            case 7:
  ------------------
  |  Branch (3092:13): [True: 0, False: 0]
  ------------------
 3093|      0|                instruction->avx.conversion.mode = ZYDIS_CONVERSION_MODE_SINT16;
 3094|      0|                break;
 3095|      0|            default:
  ------------------
  |  Branch (3095:13): [True: 0, False: 0]
  ------------------
 3096|      0|                ZYAN_UNREACHABLE;
  ------------------
  |  |  431|      0|#   define ZYAN_UNREACHABLE { assert(0); abort(); }
  ------------------
  |  Branch (3096:17): [Folded, False: 0]
  |  Branch (3096:17): [Folded, False: 0]
  ------------------
 3097|      0|            }
 3098|      0|            break;
 3099|      0|        case ZYDIS_MVEX_FUNC_UF_64:
  ------------------
  |  Branch (3099:9): [True: 0, False: 0]
  ------------------
 3100|      0|        case ZYDIS_MVEX_FUNC_DF_64:
  ------------------
  |  Branch (3100:9): [True: 0, False: 0]
  ------------------
 3101|      0|            break;
 3102|      0|        case ZYDIS_MVEX_FUNC_UI_32:
  ------------------
  |  Branch (3102:9): [True: 0, False: 0]
  ------------------
 3103|      0|        case ZYDIS_MVEX_FUNC_DI_32:
  ------------------
  |  Branch (3103:9): [True: 0, False: 0]
  ------------------
 3104|      0|            switch (instruction->raw.mvex.SSS)
 3105|      0|            {
 3106|      0|            case 0:
  ------------------
  |  Branch (3106:13): [True: 0, False: 0]
  ------------------
 3107|      0|                break;
 3108|      0|            case 4:
  ------------------
  |  Branch (3108:13): [True: 0, False: 0]
  ------------------
 3109|      0|                instruction->avx.conversion.mode = ZYDIS_CONVERSION_MODE_UINT8;
 3110|      0|                break;
 3111|      0|            case 5:
  ------------------
  |  Branch (3111:13): [True: 0, False: 0]
  ------------------
 3112|      0|                instruction->avx.conversion.mode = ZYDIS_CONVERSION_MODE_SINT8;
 3113|      0|                break;
 3114|      0|            case 6:
  ------------------
  |  Branch (3114:13): [True: 0, False: 0]
  ------------------
 3115|      0|                instruction->avx.conversion.mode = ZYDIS_CONVERSION_MODE_UINT16;
 3116|      0|                break;
 3117|      0|            case 7:
  ------------------
  |  Branch (3117:13): [True: 0, False: 0]
  ------------------
 3118|      0|                instruction->avx.conversion.mode = ZYDIS_CONVERSION_MODE_SINT16;
 3119|      0|                break;
 3120|      0|            default:
  ------------------
  |  Branch (3120:13): [True: 0, False: 0]
  ------------------
 3121|      0|                ZYAN_UNREACHABLE;
  ------------------
  |  |  431|      0|#   define ZYAN_UNREACHABLE { assert(0); abort(); }
  ------------------
  |  Branch (3121:17): [Folded, False: 0]
  |  Branch (3121:17): [Folded, False: 0]
  ------------------
 3122|      0|            }
 3123|      0|            break;
 3124|      0|        case ZYDIS_MVEX_FUNC_UI_64:
  ------------------
  |  Branch (3124:9): [True: 0, False: 0]
  ------------------
 3125|      0|        case ZYDIS_MVEX_FUNC_DI_64:
  ------------------
  |  Branch (3125:9): [True: 0, False: 0]
  ------------------
 3126|      0|            break;
 3127|      0|        default:
  ------------------
  |  Branch (3127:9): [True: 0, False: 0]
  ------------------
 3128|      0|            ZYAN_UNREACHABLE;
  ------------------
  |  |  431|      0|#   define ZYAN_UNREACHABLE { assert(0); abort(); }
  ------------------
  |  Branch (3128:13): [Folded, False: 0]
  |  Branch (3128:13): [Folded, False: 0]
  ------------------
 3129|      0|        }
 3130|       |
 3131|       |        // Eviction hint
 3132|      0|        if ((instruction->raw.modrm.mod != 3) && instruction->raw.mvex.E)
  ------------------
  |  Branch (3132:13): [True: 0, False: 0]
  |  Branch (3132:50): [True: 0, False: 0]
  ------------------
 3133|      0|        {
 3134|      0|            instruction->avx.has_eviction_hint = ZYAN_TRUE;
  ------------------
  |  |  288|      0|#define ZYAN_TRUE  1u
  ------------------
 3135|      0|        }
 3136|       |
 3137|       |        // Mask
 3138|      0|        if (def->mask_policy == ZYDIS_MASK_POLICY_ALLOWED)
  ------------------
  |  Branch (3138:13): [True: 0, False: 0]
  ------------------
 3139|      0|        {
 3140|      0|            instruction->avx.mask.mode = ZYDIS_MASK_MODE_MERGING;
 3141|      0|            instruction->avx.mask.reg = ZYDIS_REGISTER_K0 + context->vector_unified.mask;
 3142|      0|        }
 3143|      0|        else
 3144|      0|        {
 3145|      0|            ZYAN_ASSERT(def->mask_policy == ZYDIS_MASK_POLICY_INVALID);
  ------------------
  |  |  381|      0|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (3145:13): [True: 0, False: 0]
  |  Branch (3145:13): [True: 0, False: 0]
  ------------------
 3146|      0|            instruction->avx.mask.mode = ZYDIS_MASK_MODE_NONE;
 3147|      0|            instruction->avx.mask.reg = ZYDIS_REGISTER_K0;
 3148|      0|        }
 3149|       |#else
 3150|       |        ZYAN_UNREACHABLE;
 3151|       |#endif
 3152|      0|        break;
 3153|      0|    }
 3154|      0|    default:
  ------------------
  |  Branch (3154:5): [True: 0, False: 34]
  ------------------
 3155|       |        // Nothing to do here
 3156|      0|        break;
 3157|     34|    }
 3158|     34|}
Decoder.c:ZydisDecodeOperands:
 1671|    170|{
 1672|    170|    ZYAN_ASSERT(decoder);
  ------------------
  |  |  381|    170|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (1672:5): [True: 0, False: 170]
  |  Branch (1672:5): [True: 170, False: 0]
  ------------------
 1673|    170|    ZYAN_ASSERT(context);
  ------------------
  |  |  381|    170|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (1673:5): [True: 0, False: 170]
  |  Branch (1673:5): [True: 170, False: 0]
  ------------------
 1674|    170|    ZYAN_ASSERT(context->definition);
  ------------------
  |  |  381|    170|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (1674:5): [True: 0, False: 170]
  |  Branch (1674:5): [True: 170, False: 0]
  ------------------
 1675|    170|    ZYAN_ASSERT(instruction);
  ------------------
  |  |  381|    170|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (1675:5): [True: 0, False: 170]
  |  Branch (1675:5): [True: 170, False: 0]
  ------------------
 1676|    170|    ZYAN_ASSERT(operands);
  ------------------
  |  |  381|    170|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (1676:5): [True: 0, False: 170]
  |  Branch (1676:5): [True: 170, False: 0]
  ------------------
 1677|    170|    ZYAN_ASSERT(operand_count);
  ------------------
  |  |  381|    170|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (1677:5): [True: 0, False: 170]
  |  Branch (1677:5): [True: 170, False: 0]
  ------------------
 1678|    170|    ZYAN_ASSERT(operand_count <= instruction->operand_count);
  ------------------
  |  |  381|    170|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (1678:5): [True: 0, False: 170]
  |  Branch (1678:5): [True: 170, False: 0]
  ------------------
 1679|       |
 1680|    170|    const ZydisInstructionDefinition* definition = context->definition;
 1681|    170|    const ZydisOperandDefinition* operand = ZydisGetOperandDefinitions(definition);
 1682|       |
 1683|    170|    ZYAN_MEMSET(operands, 0, sizeof(ZydisDecodedOperand) * operand_count);
  ------------------
  |  |  115|    170|#define ZYAN_MEMSET     memset
  ------------------
 1684|       |
 1685|    170|    ZyanU8 imm_id = 0;
 1686|    612|    for (ZyanU8 i = 0; i < operand_count; ++i)
  ------------------
  |  Branch (1686:24): [True: 442, False: 170]
  ------------------
 1687|    442|    {
 1688|    442|        const ZydisOperandDetails *details = ZydisGetOperandDetails(operand);
 1689|    442|        ZydisRegisterClass register_class = ZYDIS_REGCLASS_INVALID;
 1690|       |
 1691|    442|        operands[i].id = i;
 1692|    442|        operands[i].visibility = operand->visibility;
 1693|    442|        operands[i].actions = operand->actions;
 1694|    442|        ZYAN_ASSERT(!(operand->actions &
  ------------------
  |  |  381|    442|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (1694:9): [True: 442, False: 0]
  |  Branch (1694:9): [True: 0, False: 0]
  |  Branch (1694:9): [True: 442, False: 0]
  |  Branch (1694:9): [True: 0, False: 0]
  ------------------
 1695|    442|            ZYDIS_OPERAND_ACTION_READ & ZYDIS_OPERAND_ACTION_CONDREAD) ||
 1696|    442|            (operand->actions & ZYDIS_OPERAND_ACTION_READ) ^
 1697|    442|            (operand->actions & ZYDIS_OPERAND_ACTION_CONDREAD));
 1698|    442|        ZYAN_ASSERT(!(operand->actions &
  ------------------
  |  |  381|    442|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (1698:9): [True: 442, False: 0]
  |  Branch (1698:9): [True: 0, False: 0]
  |  Branch (1698:9): [True: 442, False: 0]
  |  Branch (1698:9): [True: 0, False: 0]
  ------------------
 1699|    442|            ZYDIS_OPERAND_ACTION_WRITE & ZYDIS_OPERAND_ACTION_CONDWRITE) ||
 1700|    442|            (operand->actions & ZYDIS_OPERAND_ACTION_WRITE) ^
 1701|    442|            (operand->actions & ZYDIS_OPERAND_ACTION_CONDWRITE));
 1702|       |
 1703|       |        // Implicit operands
 1704|    442|        switch (operand->type)
 1705|    442|        {
 1706|    126|        case ZYDIS_SEMANTIC_OPTYPE_IMPLICIT_REG:
  ------------------
  |  Branch (1706:9): [True: 126, False: 316]
  ------------------
 1707|    126|            ZydisDecodeOperandImplicitRegister(decoder, context, instruction, &operands[i], details);
 1708|    126|            break;
 1709|     16|        case ZYDIS_SEMANTIC_OPTYPE_IMPLICIT_MEM:
  ------------------
  |  Branch (1709:9): [True: 16, False: 426]
  ------------------
 1710|     16|            ZydisDecodeOperandImplicitMemory(decoder, context, instruction, &operands[i], details);
 1711|     16|            break;
 1712|      0|        case ZYDIS_SEMANTIC_OPTYPE_IMPLICIT_IMM1:
  ------------------
  |  Branch (1712:9): [True: 0, False: 442]
  ------------------
 1713|      0|            operands[i].type = ZYDIS_OPERAND_TYPE_IMMEDIATE;
 1714|      0|            operands[i].size = 8;
 1715|      0|            operands[i].imm.value.u = 1;
 1716|      0|            operands[i].imm.is_signed = ZYAN_FALSE;
  ------------------
  |  |  287|      0|#define ZYAN_FALSE 0u
  ------------------
 1717|      0|            operands[i].imm.is_relative = ZYAN_FALSE;
  ------------------
  |  |  287|      0|#define ZYAN_FALSE 0u
  ------------------
 1718|      0|            break;
 1719|    300|        default:
  ------------------
  |  Branch (1719:9): [True: 300, False: 142]
  ------------------
 1720|    300|            break;
 1721|    442|        }
 1722|    442|        if (operands[i].type)
  ------------------
  |  Branch (1722:13): [True: 142, False: 300]
  ------------------
 1723|    142|        {
 1724|    142|            goto FinalizeOperand;
 1725|    142|        }
 1726|       |
 1727|    300|        operands[i].encoding = details->encoding;
 1728|       |
 1729|       |        // Register operands
 1730|    300|        switch (operand->type)
 1731|    300|        {
 1732|     18|        case ZYDIS_SEMANTIC_OPTYPE_GPR8:
  ------------------
  |  Branch (1732:9): [True: 18, False: 282]
  ------------------
 1733|     18|            register_class = ZYDIS_REGCLASS_GPR8;
 1734|     18|            break;
 1735|      8|        case ZYDIS_SEMANTIC_OPTYPE_GPR16:
  ------------------
  |  Branch (1735:9): [True: 8, False: 292]
  ------------------
 1736|      8|            register_class = ZYDIS_REGCLASS_GPR16;
 1737|      8|            break;
 1738|      6|        case ZYDIS_SEMANTIC_OPTYPE_GPR32:
  ------------------
  |  Branch (1738:9): [True: 6, False: 294]
  ------------------
 1739|      6|            register_class = ZYDIS_REGCLASS_GPR32;
 1740|      6|            break;
 1741|      4|        case ZYDIS_SEMANTIC_OPTYPE_GPR64:
  ------------------
  |  Branch (1741:9): [True: 4, False: 296]
  ------------------
 1742|      4|            register_class = ZYDIS_REGCLASS_GPR64;
 1743|      4|            break;
 1744|     72|        case ZYDIS_SEMANTIC_OPTYPE_GPR16_32_64:
  ------------------
  |  Branch (1744:9): [True: 72, False: 228]
  ------------------
 1745|     72|            ZYAN_ASSERT((instruction->operand_width == 16) || (instruction->operand_width == 32) ||
  ------------------
  |  |  381|     72|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (1745:13): [True: 72, False: 0]
  |  Branch (1745:13): [True: 0, False: 0]
  |  Branch (1745:13): [True: 0, False: 0]
  |  Branch (1745:13): [True: 8, False: 64]
  |  Branch (1745:13): [True: 14, False: 50]
  |  Branch (1745:13): [True: 50, False: 0]
  ------------------
 1746|     72|                (instruction->operand_width == 64));
 1747|     72|            register_class =
 1748|     72|                (instruction->operand_width == 16) ? ZYDIS_REGCLASS_GPR16 : (
  ------------------
  |  Branch (1748:17): [True: 8, False: 64]
  ------------------
 1749|     64|                    (instruction->operand_width == 32) ? ZYDIS_REGCLASS_GPR32 : ZYDIS_REGCLASS_GPR64);
  ------------------
  |  Branch (1749:21): [True: 14, False: 50]
  ------------------
 1750|     72|            break;
 1751|      6|        case ZYDIS_SEMANTIC_OPTYPE_GPR32_32_64:
  ------------------
  |  Branch (1751:9): [True: 6, False: 294]
  ------------------
 1752|      6|            ZYAN_ASSERT((instruction->operand_width == 16) || (instruction->operand_width == 32) ||
  ------------------
  |  |  381|      6|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (1752:13): [True: 6, False: 0]
  |  Branch (1752:13): [True: 0, False: 0]
  |  Branch (1752:13): [True: 0, False: 0]
  |  Branch (1752:13): [True: 2, False: 4]
  |  Branch (1752:13): [True: 4, False: 0]
  |  Branch (1752:13): [True: 0, False: 0]
  ------------------
 1753|      6|                (instruction->operand_width == 64));
 1754|      6|            register_class =
 1755|      6|                (instruction->operand_width == 16) ? ZYDIS_REGCLASS_GPR32 : (
  ------------------
  |  Branch (1755:17): [True: 2, False: 4]
  ------------------
 1756|      4|                    (instruction->operand_width == 32) ? ZYDIS_REGCLASS_GPR32 : ZYDIS_REGCLASS_GPR64);
  ------------------
  |  Branch (1756:21): [True: 4, False: 0]
  ------------------
 1757|      6|            break;
 1758|      0|        case ZYDIS_SEMANTIC_OPTYPE_GPR16_32_32:
  ------------------
  |  Branch (1758:9): [True: 0, False: 300]
  ------------------
 1759|      0|            ZYAN_ASSERT((instruction->operand_width == 16) || (instruction->operand_width == 32) ||
  ------------------
  |  |  381|      0|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (1759:13): [True: 0, False: 0]
  |  Branch (1759:13): [True: 0, False: 0]
  |  Branch (1759:13): [True: 0, False: 0]
  |  Branch (1759:13): [True: 0, False: 0]
  |  Branch (1759:13): [True: 0, False: 0]
  |  Branch (1759:13): [True: 0, False: 0]
  ------------------
 1760|      0|                (instruction->operand_width == 64));
 1761|      0|            register_class =
 1762|      0|                (instruction->operand_width == 16) ? ZYDIS_REGCLASS_GPR16 : ZYDIS_REGCLASS_GPR32;
  ------------------
  |  Branch (1762:17): [True: 0, False: 0]
  ------------------
 1763|      0|            break;
 1764|      2|        case ZYDIS_SEMANTIC_OPTYPE_GPR_ASZ:
  ------------------
  |  Branch (1764:9): [True: 2, False: 298]
  ------------------
 1765|      2|            ZYAN_ASSERT((instruction->address_width == 16) || (instruction->address_width == 32) ||
  ------------------
  |  |  381|      2|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (1765:13): [True: 2, False: 0]
  |  Branch (1765:13): [True: 0, False: 0]
  |  Branch (1765:13): [True: 0, False: 0]
  |  Branch (1765:13): [True: 0, False: 2]
  |  Branch (1765:13): [True: 2, False: 0]
  |  Branch (1765:13): [True: 0, False: 0]
  ------------------
 1766|      2|                (instruction->address_width == 64));
 1767|      2|            register_class =
 1768|      2|                (instruction->address_width == 16) ? ZYDIS_REGCLASS_GPR16 : (
  ------------------
  |  Branch (1768:17): [True: 0, False: 2]
  ------------------
 1769|      2|                    (instruction->address_width == 32) ? ZYDIS_REGCLASS_GPR32 : ZYDIS_REGCLASS_GPR64);
  ------------------
  |  Branch (1769:21): [True: 2, False: 0]
  ------------------
 1770|      2|            break;
 1771|      2|        case ZYDIS_SEMANTIC_OPTYPE_FPR:
  ------------------
  |  Branch (1771:9): [True: 2, False: 298]
  ------------------
 1772|      2|            register_class = ZYDIS_REGCLASS_X87;
 1773|      2|            break;
 1774|      4|        case ZYDIS_SEMANTIC_OPTYPE_MMX:
  ------------------
  |  Branch (1774:9): [True: 4, False: 296]
  ------------------
 1775|      4|            register_class = ZYDIS_REGCLASS_MMX;
 1776|      4|            break;
 1777|      8|        case ZYDIS_SEMANTIC_OPTYPE_XMM:
  ------------------
  |  Branch (1777:9): [True: 8, False: 292]
  ------------------
 1778|      8|            register_class = ZYDIS_REGCLASS_XMM;
 1779|      8|            break;
 1780|      0|        case ZYDIS_SEMANTIC_OPTYPE_YMM:
  ------------------
  |  Branch (1780:9): [True: 0, False: 300]
  ------------------
 1781|      0|            register_class = ZYDIS_REGCLASS_YMM;
 1782|      0|            break;
 1783|     12|        case ZYDIS_SEMANTIC_OPTYPE_ZMM:
  ------------------
  |  Branch (1783:9): [True: 12, False: 288]
  ------------------
 1784|     12|            register_class = ZYDIS_REGCLASS_ZMM;
 1785|     12|            break;
 1786|      0|        case ZYDIS_SEMANTIC_OPTYPE_TMM:
  ------------------
  |  Branch (1786:9): [True: 0, False: 300]
  ------------------
 1787|      0|            register_class = ZYDIS_REGCLASS_TMM;
 1788|      0|            break;
 1789|      4|        case ZYDIS_SEMANTIC_OPTYPE_BND:
  ------------------
  |  Branch (1789:9): [True: 4, False: 296]
  ------------------
 1790|      4|            register_class = ZYDIS_REGCLASS_BOUND;
 1791|      4|            break;
 1792|      0|        case ZYDIS_SEMANTIC_OPTYPE_SREG:
  ------------------
  |  Branch (1792:9): [True: 0, False: 300]
  ------------------
 1793|      0|            register_class = ZYDIS_REGCLASS_SEGMENT;
 1794|      0|            break;
 1795|      0|        case ZYDIS_SEMANTIC_OPTYPE_CR:
  ------------------
  |  Branch (1795:9): [True: 0, False: 300]
  ------------------
 1796|      0|            register_class = ZYDIS_REGCLASS_CONTROL;
 1797|      0|            break;
 1798|      0|        case ZYDIS_SEMANTIC_OPTYPE_DR:
  ------------------
  |  Branch (1798:9): [True: 0, False: 300]
  ------------------
 1799|      0|            register_class = ZYDIS_REGCLASS_DEBUG;
 1800|      0|            break;
 1801|     12|        case ZYDIS_SEMANTIC_OPTYPE_MASK:
  ------------------
  |  Branch (1801:9): [True: 12, False: 288]
  ------------------
 1802|     12|            register_class = ZYDIS_REGCLASS_MASK;
 1803|     12|            break;
 1804|    142|        default:
  ------------------
  |  Branch (1804:9): [True: 142, False: 158]
  ------------------
 1805|    142|            break;
 1806|    300|        }
 1807|    300|        if (register_class)
  ------------------
  |  Branch (1807:13): [True: 158, False: 142]
  ------------------
 1808|    158|        {
 1809|    158|            switch (details->encoding)
 1810|    158|            {
 1811|     62|            case ZYDIS_OPERAND_ENCODING_MODRM_REG:
  ------------------
  |  Branch (1811:13): [True: 62, False: 96]
  ------------------
 1812|     62|                ZYAN_CHECK(
  ------------------
  |  |  100|     62|    do \
  |  |  101|     62|    { \
  |  |  102|     62|        const ZyanStatus status_047620348 = (status); \
  |  |  103|     62|        if (!ZYAN_SUCCESS(status_047620348)) \
  |  |  ------------------
  |  |  |  |   82|     62|    (!((status) & 0x80000000u))
  |  |  ------------------
  |  |  |  Branch (103:13): [True: 0, False: 62]
  |  |  ------------------
  |  |  104|     62|        { \
  |  |  105|      0|            return status_047620348; \
  |  |  106|      0|        } \
  |  |  107|     62|    } while (0)
  |  |  ------------------
  |  |  |  Branch (107:14): [Folded, False: 62]
  |  |  ------------------
  ------------------
 1813|     62|                    ZydisDecodeOperandRegister(
 1814|     62|                        instruction, &operands[i], register_class,
 1815|     62|                        ZydisCalcRegisterId(
 1816|     62|                            context, instruction, ZYDIS_REG_ENCODING_REG, register_class)));
 1817|     62|                break;
 1818|     62|            case ZYDIS_OPERAND_ENCODING_MODRM_RM:
  ------------------
  |  Branch (1818:13): [True: 36, False: 122]
  ------------------
 1819|     36|                ZYAN_CHECK(
  ------------------
  |  |  100|     36|    do \
  |  |  101|     36|    { \
  |  |  102|     36|        const ZyanStatus status_047620348 = (status); \
  |  |  103|     36|        if (!ZYAN_SUCCESS(status_047620348)) \
  |  |  ------------------
  |  |  |  |   82|     36|    (!((status) & 0x80000000u))
  |  |  ------------------
  |  |  |  Branch (103:13): [True: 0, False: 36]
  |  |  ------------------
  |  |  104|     36|        { \
  |  |  105|      0|            return status_047620348; \
  |  |  106|      0|        } \
  |  |  107|     36|    } while (0)
  |  |  ------------------
  |  |  |  Branch (107:14): [Folded, False: 36]
  |  |  ------------------
  ------------------
 1820|     36|                    ZydisDecodeOperandRegister(
 1821|     36|                        instruction, &operands[i], register_class,
 1822|     36|                        ZydisCalcRegisterId(
 1823|     36|                            context, instruction, ZYDIS_REG_ENCODING_RM, register_class)));
 1824|     36|                break;
 1825|     38|            case ZYDIS_OPERAND_ENCODING_OPCODE:
  ------------------
  |  Branch (1825:13): [True: 38, False: 120]
  ------------------
 1826|     38|                ZYAN_CHECK(
  ------------------
  |  |  100|     38|    do \
  |  |  101|     38|    { \
  |  |  102|     38|        const ZyanStatus status_047620348 = (status); \
  |  |  103|     38|        if (!ZYAN_SUCCESS(status_047620348)) \
  |  |  ------------------
  |  |  |  |   82|     38|    (!((status) & 0x80000000u))
  |  |  ------------------
  |  |  |  Branch (103:13): [True: 0, False: 38]
  |  |  ------------------
  |  |  104|     38|        { \
  |  |  105|      0|            return status_047620348; \
  |  |  106|      0|        } \
  |  |  107|     38|    } while (0)
  |  |  ------------------
  |  |  |  Branch (107:14): [Folded, False: 38]
  |  |  ------------------
  ------------------
 1827|     38|                    ZydisDecodeOperandRegister(
 1828|     38|                        instruction, &operands[i], register_class,
 1829|     38|                        ZydisCalcRegisterId(
 1830|     38|                            context, instruction, ZYDIS_REG_ENCODING_OPCODE, register_class)));
 1831|     38|                break;
 1832|     38|            case ZYDIS_OPERAND_ENCODING_NDSNDD:
  ------------------
  |  Branch (1832:13): [True: 10, False: 148]
  ------------------
 1833|     10|                ZYAN_CHECK(
  ------------------
  |  |  100|     10|    do \
  |  |  101|     10|    { \
  |  |  102|     10|        const ZyanStatus status_047620348 = (status); \
  |  |  103|     10|        if (!ZYAN_SUCCESS(status_047620348)) \
  |  |  ------------------
  |  |  |  |   82|     10|    (!((status) & 0x80000000u))
  |  |  ------------------
  |  |  |  Branch (103:13): [True: 0, False: 10]
  |  |  ------------------
  |  |  104|     10|        { \
  |  |  105|      0|            return status_047620348; \
  |  |  106|      0|        } \
  |  |  107|     10|    } while (0)
  |  |  ------------------
  |  |  |  Branch (107:14): [Folded, False: 10]
  |  |  ------------------
  ------------------
 1834|     10|                    ZydisDecodeOperandRegister(
 1835|     10|                        instruction, &operands[i], register_class,
 1836|     10|                        ZydisCalcRegisterId(
 1837|     10|                            context, instruction, ZYDIS_REG_ENCODING_NDSNDD, register_class)));
 1838|     10|                break;
 1839|     12|            case ZYDIS_OPERAND_ENCODING_MASK:
  ------------------
  |  Branch (1839:13): [True: 12, False: 146]
  ------------------
 1840|     12|                ZYAN_CHECK(
  ------------------
  |  |  100|     12|    do \
  |  |  101|     12|    { \
  |  |  102|     12|        const ZyanStatus status_047620348 = (status); \
  |  |  103|     12|        if (!ZYAN_SUCCESS(status_047620348)) \
  |  |  ------------------
  |  |  |  |   82|     12|    (!((status) & 0x80000000u))
  |  |  ------------------
  |  |  |  Branch (103:13): [True: 0, False: 12]
  |  |  ------------------
  |  |  104|     12|        { \
  |  |  105|      0|            return status_047620348; \
  |  |  106|      0|        } \
  |  |  107|     12|    } while (0)
  |  |  ------------------
  |  |  |  Branch (107:14): [Folded, False: 12]
  |  |  ------------------
  ------------------
 1841|     12|                    ZydisDecodeOperandRegister(
 1842|     12|                        instruction, &operands[i], register_class,
 1843|     12|                        ZydisCalcRegisterId(
 1844|     12|                            context, instruction, ZYDIS_REG_ENCODING_MASK, register_class)));
 1845|     12|                break;
 1846|     12|            case ZYDIS_OPERAND_ENCODING_IS4:
  ------------------
  |  Branch (1846:13): [True: 0, False: 158]
  ------------------
 1847|      0|                ZYAN_CHECK(
  ------------------
  |  |  100|      0|    do \
  |  |  101|      0|    { \
  |  |  102|      0|        const ZyanStatus status_047620348 = (status); \
  |  |  103|      0|        if (!ZYAN_SUCCESS(status_047620348)) \
  |  |  ------------------
  |  |  |  |   82|      0|    (!((status) & 0x80000000u))
  |  |  ------------------
  |  |  |  Branch (103:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  104|      0|        { \
  |  |  105|      0|            return status_047620348; \
  |  |  106|      0|        } \
  |  |  107|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (107:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1848|      0|                    ZydisDecodeOperandRegister(
 1849|      0|                        instruction, &operands[i], register_class,
 1850|      0|                        ZydisCalcRegisterId(
 1851|      0|                            context, instruction, ZYDIS_REG_ENCODING_IS4, register_class)));
 1852|      0|                break;
 1853|      0|            default:
  ------------------
  |  Branch (1853:13): [True: 0, False: 158]
  ------------------
 1854|      0|                ZYAN_UNREACHABLE;
  ------------------
  |  |  431|      0|#   define ZYAN_UNREACHABLE { assert(0); abort(); }
  ------------------
  |  Branch (1854:17): [Folded, False: 0]
  |  Branch (1854:17): [Folded, False: 0]
  ------------------
 1855|    158|            }
 1856|       |
 1857|    158|            if (operand->is_multisource4)
  ------------------
  |  Branch (1857:17): [True: 0, False: 158]
  ------------------
 1858|      0|            {
 1859|      0|                operands[i].attributes |= ZYDIS_OATTRIB_IS_MULTISOURCE4;
  ------------------
  |  |   66|      0|#define ZYDIS_OATTRIB_IS_MULTISOURCE4   (1 <<  0)
  ------------------
 1860|      0|            }
 1861|       |
 1862|    158|            goto FinalizeOperand;
 1863|    158|        }
 1864|       |
 1865|       |        // Memory operands
 1866|    142|        switch (operand->type)
 1867|    142|        {
 1868|     46|        case ZYDIS_SEMANTIC_OPTYPE_MEM:
  ------------------
  |  Branch (1868:9): [True: 46, False: 96]
  ------------------
 1869|     46|            ZYAN_CHECK(
  ------------------
  |  |  100|     46|    do \
  |  |  101|     46|    { \
  |  |  102|     46|        const ZyanStatus status_047620348 = (status); \
  |  |  103|     46|        if (!ZYAN_SUCCESS(status_047620348)) \
  |  |  ------------------
  |  |  |  |   82|     46|    (!((status) & 0x80000000u))
  |  |  ------------------
  |  |  |  Branch (103:13): [True: 0, False: 46]
  |  |  ------------------
  |  |  104|     46|        { \
  |  |  105|      0|            return status_047620348; \
  |  |  106|      0|        } \
  |  |  107|     46|    } while (0)
  |  |  ------------------
  |  |  |  Branch (107:14): [Folded, False: 46]
  |  |  ------------------
  ------------------
 1870|     46|                ZydisDecodeOperandMemory(
 1871|     46|                    context, instruction, &operands[i], ZYDIS_REGCLASS_INVALID));
 1872|     46|            break;
 1873|     46|        case ZYDIS_SEMANTIC_OPTYPE_MEM_VSIBX:
  ------------------
  |  Branch (1873:9): [True: 0, False: 142]
  ------------------
 1874|      0|            ZYAN_CHECK(
  ------------------
  |  |  100|      0|    do \
  |  |  101|      0|    { \
  |  |  102|      0|        const ZyanStatus status_047620348 = (status); \
  |  |  103|      0|        if (!ZYAN_SUCCESS(status_047620348)) \
  |  |  ------------------
  |  |  |  |   82|      0|    (!((status) & 0x80000000u))
  |  |  ------------------
  |  |  |  Branch (103:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  104|      0|        { \
  |  |  105|      0|            return status_047620348; \
  |  |  106|      0|        } \
  |  |  107|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (107:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1875|      0|                ZydisDecodeOperandMemory(
 1876|      0|                    context, instruction, &operands[i], ZYDIS_REGCLASS_XMM));
 1877|      0|            operands[i].mem.type = ZYDIS_MEMOP_TYPE_VSIB;
 1878|      0|            break;
 1879|      2|        case ZYDIS_SEMANTIC_OPTYPE_MEM_VSIBY:
  ------------------
  |  Branch (1879:9): [True: 2, False: 140]
  ------------------
 1880|      2|            ZYAN_CHECK(
  ------------------
  |  |  100|      2|    do \
  |  |  101|      2|    { \
  |  |  102|      2|        const ZyanStatus status_047620348 = (status); \
  |  |  103|      2|        if (!ZYAN_SUCCESS(status_047620348)) \
  |  |  ------------------
  |  |  |  |   82|      2|    (!((status) & 0x80000000u))
  |  |  ------------------
  |  |  |  Branch (103:13): [True: 0, False: 2]
  |  |  ------------------
  |  |  104|      2|        { \
  |  |  105|      0|            return status_047620348; \
  |  |  106|      0|        } \
  |  |  107|      2|    } while (0)
  |  |  ------------------
  |  |  |  Branch (107:14): [Folded, False: 2]
  |  |  ------------------
  ------------------
 1881|      2|                ZydisDecodeOperandMemory(
 1882|      2|                    context, instruction, &operands[i], ZYDIS_REGCLASS_YMM));
 1883|      2|            operands[i].mem.type = ZYDIS_MEMOP_TYPE_VSIB;
 1884|      2|            break;
 1885|      4|        case ZYDIS_SEMANTIC_OPTYPE_MEM_VSIBZ:
  ------------------
  |  Branch (1885:9): [True: 4, False: 138]
  ------------------
 1886|      4|            ZYAN_CHECK(
  ------------------
  |  |  100|      4|    do \
  |  |  101|      4|    { \
  |  |  102|      4|        const ZyanStatus status_047620348 = (status); \
  |  |  103|      4|        if (!ZYAN_SUCCESS(status_047620348)) \
  |  |  ------------------
  |  |  |  |   82|      4|    (!((status) & 0x80000000u))
  |  |  ------------------
  |  |  |  Branch (103:13): [True: 0, False: 4]
  |  |  ------------------
  |  |  104|      4|        { \
  |  |  105|      0|            return status_047620348; \
  |  |  106|      0|        } \
  |  |  107|      4|    } while (0)
  |  |  ------------------
  |  |  |  Branch (107:14): [Folded, False: 4]
  |  |  ------------------
  ------------------
 1887|      4|                ZydisDecodeOperandMemory(
 1888|      4|                    context, instruction, &operands[i], ZYDIS_REGCLASS_ZMM));
 1889|      4|            operands[i].mem.type = ZYDIS_MEMOP_TYPE_VSIB;
 1890|      4|            break;
 1891|      8|        case ZYDIS_SEMANTIC_OPTYPE_PTR:
  ------------------
  |  Branch (1891:9): [True: 8, False: 134]
  ------------------
 1892|      8|            ZYAN_ASSERT((instruction->raw.imm[0].size == 16) ||
  ------------------
  |  |  381|      8|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (1892:13): [True: 8, False: 0]
  |  Branch (1892:13): [True: 0, False: 0]
  |  Branch (1892:13): [True: 2, False: 6]
  |  Branch (1892:13): [True: 6, False: 0]
  ------------------
 1893|      8|                (instruction->raw.imm[0].size == 32));
 1894|      8|            ZYAN_ASSERT(instruction->raw.imm[1].size == 16);
  ------------------
  |  |  381|      8|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (1894:13): [True: 0, False: 8]
  |  Branch (1894:13): [True: 8, False: 0]
  ------------------
 1895|      8|            operands[i].type = ZYDIS_OPERAND_TYPE_POINTER;
 1896|      8|            operands[i].ptr.offset = (ZyanU32)instruction->raw.imm[0].value.u;
 1897|      8|            operands[i].ptr.segment = (ZyanU16)instruction->raw.imm[1].value.u;
 1898|      8|            break;
 1899|      0|        case ZYDIS_SEMANTIC_OPTYPE_AGEN:
  ------------------
  |  Branch (1899:9): [True: 0, False: 142]
  ------------------
 1900|      0|            operands[i].actions = 0; // TODO: Remove after generator update
 1901|      0|            ZYAN_CHECK(
  ------------------
  |  |  100|      0|    do \
  |  |  101|      0|    { \
  |  |  102|      0|        const ZyanStatus status_047620348 = (status); \
  |  |  103|      0|        if (!ZYAN_SUCCESS(status_047620348)) \
  |  |  ------------------
  |  |  |  |   82|      0|    (!((status) & 0x80000000u))
  |  |  ------------------
  |  |  |  Branch (103:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  104|      0|        { \
  |  |  105|      0|            return status_047620348; \
  |  |  106|      0|        } \
  |  |  107|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (107:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1902|      0|                ZydisDecodeOperandMemory(
 1903|      0|                    context, instruction, &operands[i], ZYDIS_REGCLASS_INVALID));
 1904|      0|            operands[i].mem.type = ZYDIS_MEMOP_TYPE_AGEN;
 1905|      0|            break;
 1906|      0|        case ZYDIS_SEMANTIC_OPTYPE_MOFFS:
  ------------------
  |  Branch (1906:9): [True: 0, False: 142]
  ------------------
 1907|      0|            ZYAN_ASSERT(instruction->raw.disp.size);
  ------------------
  |  |  381|      0|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (1907:13): [True: 0, False: 0]
  |  Branch (1907:13): [True: 0, False: 0]
  ------------------
 1908|      0|            operands[i].type = ZYDIS_OPERAND_TYPE_MEMORY;
 1909|      0|            operands[i].mem.type = ZYDIS_MEMOP_TYPE_MEM;
 1910|      0|            operands[i].mem.disp.size = instruction->raw.disp.size;
 1911|      0|            operands[i].mem.disp.offset = instruction->raw.disp.offset;
 1912|      0|            operands[i].mem.disp.value = instruction->raw.disp.value;
 1913|      0|            break;
 1914|      0|        case ZYDIS_SEMANTIC_OPTYPE_MIB:
  ------------------
  |  Branch (1914:9): [True: 0, False: 142]
  ------------------
 1915|      0|            operands[i].actions = 0; // TODO: Remove after generator update
 1916|      0|            ZYAN_CHECK(
  ------------------
  |  |  100|      0|    do \
  |  |  101|      0|    { \
  |  |  102|      0|        const ZyanStatus status_047620348 = (status); \
  |  |  103|      0|        if (!ZYAN_SUCCESS(status_047620348)) \
  |  |  ------------------
  |  |  |  |   82|      0|    (!((status) & 0x80000000u))
  |  |  ------------------
  |  |  |  Branch (103:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  104|      0|        { \
  |  |  105|      0|            return status_047620348; \
  |  |  106|      0|        } \
  |  |  107|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (107:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1917|      0|                ZydisDecodeOperandMemory(
 1918|      0|                    context, instruction, &operands[i], ZYDIS_REGCLASS_INVALID));
 1919|      0|            operands[i].mem.type = ZYDIS_MEMOP_TYPE_MIB;
 1920|      0|            break;
 1921|     82|        default:
  ------------------
  |  Branch (1921:9): [True: 82, False: 60]
  ------------------
 1922|     82|            break;
 1923|    142|        }
 1924|    142|        if (operands[i].type)
  ------------------
  |  Branch (1924:13): [True: 60, False: 82]
  ------------------
 1925|     60|        {
 1926|     60|#if !defined(ZYDIS_DISABLE_AVX512) || !defined(ZYDIS_DISABLE_KNC)
 1927|       |            // Handle compressed 8-bit displacement
 1928|     60|            if (((instruction->encoding == ZYDIS_INSTRUCTION_ENCODING_EVEX) ||
  ------------------
  |  Branch (1928:18): [True: 22, False: 38]
  ------------------
 1929|     38|                (instruction->encoding == ZYDIS_INSTRUCTION_ENCODING_MVEX)) &&
  ------------------
  |  Branch (1929:17): [True: 0, False: 38]
  ------------------
 1930|     22|                (context->evex.tuple_type != ZYDIS_TUPLETYPE_NO_SCALE) &&
  ------------------
  |  Branch (1930:17): [True: 8, False: 14]
  ------------------
 1931|      8|                (instruction->raw.disp.size == 8))
  ------------------
  |  Branch (1931:17): [True: 0, False: 8]
  ------------------
 1932|      0|            {
 1933|      0|                operands[i].mem.disp.value *= context->cd8_scale;
 1934|      0|            }
 1935|     60|#endif
 1936|       |
 1937|     60|            goto FinalizeOperand;
 1938|     60|        }
 1939|       |
 1940|       |        // Immediate operands
 1941|     82|        switch (operand->type)
 1942|     82|        {
 1943|     26|        case ZYDIS_SEMANTIC_OPTYPE_REL:
  ------------------
  |  Branch (1943:9): [True: 26, False: 56]
  ------------------
 1944|     26|        case ZYDIS_SEMANTIC_OPTYPE_ABS:
  ------------------
  |  Branch (1944:9): [True: 0, False: 82]
  ------------------
 1945|     26|            ZYAN_ASSERT((operand->type == ZYDIS_SEMANTIC_OPTYPE_REL) || !instruction->raw.imm[imm_id].is_relative);
  ------------------
  |  |  381|     26|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (1945:13): [True: 26, False: 0]
  |  Branch (1945:13): [True: 0, False: 0]
  |  Branch (1945:13): [True: 26, False: 0]
  |  Branch (1945:13): [True: 0, False: 0]
  ------------------
 1946|     26|            ZYAN_ASSERT((operand->type == ZYDIS_SEMANTIC_OPTYPE_ABS) ||  instruction->raw.imm[imm_id].is_relative);
  ------------------
  |  |  381|     26|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (1946:13): [True: 26, False: 0]
  |  Branch (1946:13): [True: 0, False: 0]
  |  Branch (1946:13): [True: 0, False: 26]
  |  Branch (1946:13): [True: 26, False: 0]
  ------------------
 1947|     26|            ZYAN_FALLTHROUGH;
 1948|     82|        case ZYDIS_SEMANTIC_OPTYPE_IMM:
  ------------------
  |  Branch (1948:9): [True: 56, False: 26]
  ------------------
 1949|     82|            ZYAN_ASSERT((imm_id == 0) || (imm_id == 1));
  ------------------
  |  |  381|     82|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (1949:13): [True: 82, False: 0]
  |  Branch (1949:13): [True: 0, False: 0]
  |  Branch (1949:13): [True: 82, False: 0]
  |  Branch (1949:13): [True: 0, False: 0]
  ------------------
 1950|     82|            operands[i].type = ZYDIS_OPERAND_TYPE_IMMEDIATE;
 1951|     82|            operands[i].size = ZydisGetOperandSizes(operand)[context->eosz_index] * 8;
 1952|     82|            if (details->encoding == ZYDIS_OPERAND_ENCODING_IS4)
  ------------------
  |  Branch (1952:17): [True: 0, False: 82]
  ------------------
 1953|      0|            {
 1954|       |                // The upper half of the 8-bit immediate is used to encode a register specifier
 1955|      0|                ZYAN_ASSERT(instruction->raw.imm[imm_id].size == 8);
  ------------------
  |  |  381|      0|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (1955:17): [True: 0, False: 0]
  |  Branch (1955:17): [True: 0, False: 0]
  ------------------
 1956|      0|                operands[i].imm.value.u = (ZyanU8)instruction->raw.imm[imm_id].value.u & 0x0F;
 1957|      0|            }
 1958|     82|            else
 1959|     82|            {
 1960|     82|                operands[i].imm.value.u = instruction->raw.imm[imm_id].value.u;
 1961|     82|            }
 1962|     82|            operands[i].imm.offset = instruction->raw.imm[imm_id].offset;
 1963|     82|            operands[i].imm.size = instruction->raw.imm[imm_id].size;
 1964|     82|            operands[i].imm.is_signed = instruction->raw.imm[imm_id].is_signed;
 1965|     82|            operands[i].imm.is_address = instruction->raw.imm[imm_id].is_address;
 1966|     82|            operands[i].imm.is_relative = instruction->raw.imm[imm_id].is_relative;
 1967|     82|            ++imm_id;
 1968|     82|            break;
 1969|      0|        default:
  ------------------
  |  Branch (1969:9): [True: 0, False: 82]
  ------------------
 1970|      0|            break;
 1971|     82|        }
 1972|     82|        ZYAN_ASSERT(operands[i].type == ZYDIS_OPERAND_TYPE_IMMEDIATE);
  ------------------
  |  |  381|     82|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (1972:9): [True: 0, False: 82]
  |  Branch (1972:9): [True: 82, False: 0]
  ------------------
 1973|       |
 1974|    442|    FinalizeOperand:
 1975|       |        // Set segment-register for memory operands
 1976|    442|        if (operands[i].type == ZYDIS_OPERAND_TYPE_MEMORY)
  ------------------
  |  Branch (1976:13): [True: 68, False: 374]
  ------------------
 1977|     68|        {
 1978|     68|            if (!operand->ignore_seg_override &&
  ------------------
  |  Branch (1978:17): [True: 54, False: 14]
  ------------------
 1979|     54|                instruction->attributes & ZYDIS_ATTRIB_HAS_SEGMENT_CS)
  ------------------
  |  |  704|     54|#define ZYDIS_ATTRIB_HAS_SEGMENT_CS             (1ULL << 37)
  ------------------
  |  Branch (1979:17): [True: 2, False: 52]
  ------------------
 1980|      2|            {
 1981|      2|                operands[i].mem.segment = ZYDIS_REGISTER_CS;
 1982|      2|            }
 1983|     66|            else if (!operand->ignore_seg_override &&
  ------------------
  |  Branch (1983:22): [True: 52, False: 14]
  ------------------
 1984|     52|                instruction->attributes & ZYDIS_ATTRIB_HAS_SEGMENT_SS)
  ------------------
  |  |  708|     52|#define ZYDIS_ATTRIB_HAS_SEGMENT_SS             (1ULL << 38)
  ------------------
  |  Branch (1984:17): [True: 0, False: 52]
  ------------------
 1985|      0|            {
 1986|      0|                operands[i].mem.segment = ZYDIS_REGISTER_SS;
 1987|      0|            }
 1988|     66|            else if (!operand->ignore_seg_override &&
  ------------------
  |  Branch (1988:22): [True: 52, False: 14]
  ------------------
 1989|     52|                instruction->attributes & ZYDIS_ATTRIB_HAS_SEGMENT_DS)
  ------------------
  |  |  712|     52|#define ZYDIS_ATTRIB_HAS_SEGMENT_DS             (1ULL << 39)
  ------------------
  |  Branch (1989:17): [True: 2, False: 50]
  ------------------
 1990|      2|            {
 1991|      2|                operands[i].mem.segment = ZYDIS_REGISTER_DS;
 1992|      2|            } 
 1993|     64|            else if (!operand->ignore_seg_override &&
  ------------------
  |  Branch (1993:22): [True: 50, False: 14]
  ------------------
 1994|     50|                instruction->attributes & ZYDIS_ATTRIB_HAS_SEGMENT_ES)
  ------------------
  |  |  716|     50|#define ZYDIS_ATTRIB_HAS_SEGMENT_ES             (1ULL << 40)
  ------------------
  |  Branch (1994:17): [True: 0, False: 50]
  ------------------
 1995|      0|            {
 1996|      0|                operands[i].mem.segment = ZYDIS_REGISTER_ES;
 1997|      0|            }
 1998|     64|            else if (!operand->ignore_seg_override &&
  ------------------
  |  Branch (1998:22): [True: 50, False: 14]
  ------------------
 1999|     50|                instruction->attributes & ZYDIS_ATTRIB_HAS_SEGMENT_FS)
  ------------------
  |  |  720|     50|#define ZYDIS_ATTRIB_HAS_SEGMENT_FS             (1ULL << 41)
  ------------------
  |  Branch (1999:17): [True: 8, False: 42]
  ------------------
 2000|      8|            {
 2001|      8|                operands[i].mem.segment = ZYDIS_REGISTER_FS;
 2002|      8|            }
 2003|     56|            else if (!operand->ignore_seg_override &&
  ------------------
  |  Branch (2003:22): [True: 42, False: 14]
  ------------------
 2004|     42|                instruction->attributes & ZYDIS_ATTRIB_HAS_SEGMENT_GS)
  ------------------
  |  |  724|     42|#define ZYDIS_ATTRIB_HAS_SEGMENT_GS             (1ULL << 42)
  ------------------
  |  Branch (2004:17): [True: 4, False: 38]
  ------------------
 2005|      4|            {
 2006|      4|                operands[i].mem.segment = ZYDIS_REGISTER_GS;
 2007|      4|            }
 2008|     52|            else
 2009|     52|            {
 2010|     52|                if (operands[i].mem.segment == ZYDIS_REGISTER_NONE)
  ------------------
  |  Branch (2010:21): [True: 50, False: 2]
  ------------------
 2011|     50|                {
 2012|     50|                    if ((operands[i].mem.base == ZYDIS_REGISTER_RSP) ||
  ------------------
  |  Branch (2012:25): [True: 4, False: 46]
  ------------------
 2013|     46|                        (operands[i].mem.base == ZYDIS_REGISTER_RBP) ||
  ------------------
  |  Branch (2013:25): [True: 0, False: 46]
  ------------------
 2014|     46|                        (operands[i].mem.base == ZYDIS_REGISTER_ESP) ||
  ------------------
  |  Branch (2014:25): [True: 2, False: 44]
  ------------------
 2015|     44|                        (operands[i].mem.base == ZYDIS_REGISTER_EBP) ||
  ------------------
  |  Branch (2015:25): [True: 0, False: 44]
  ------------------
 2016|     44|                        (operands[i].mem.base == ZYDIS_REGISTER_SP) ||
  ------------------
  |  Branch (2016:25): [True: 6, False: 38]
  ------------------
 2017|     38|                        (operands[i].mem.base == ZYDIS_REGISTER_BP))
  ------------------
  |  Branch (2017:25): [True: 0, False: 38]
  ------------------
 2018|     12|                    {
 2019|     12|                        operands[i].mem.segment = ZYDIS_REGISTER_SS;
 2020|     12|                    }
 2021|     38|                    else
 2022|     38|                    {
 2023|     38|                        operands[i].mem.segment = ZYDIS_REGISTER_DS;
 2024|     38|                    }
 2025|     50|                }
 2026|     52|            }
 2027|     68|        }
 2028|       |
 2029|    442|        ZydisSetOperandSizeAndElementInfo(context, instruction, &operands[i], operand);
 2030|    442|        ++operand;
 2031|    442|    }
 2032|       |
 2033|    170|#if !defined(ZYDIS_DISABLE_AVX512) || !defined(ZYDIS_DISABLE_KNC)
 2034|       |    // Fix operand-action for EVEX/MVEX instructions with merge-mask
 2035|    170|    if (instruction->avx.mask.mode == ZYDIS_MASK_MODE_MERGING)
  ------------------
  |  Branch (2035:9): [True: 10, False: 160]
  ------------------
 2036|     10|    {
 2037|     10|        ZYAN_ASSERT(operand_count >= 1);
  ------------------
  |  |  381|     10|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (2037:9): [True: 0, False: 10]
  |  Branch (2037:9): [True: 10, False: 0]
  ------------------
 2038|     10|        switch (operands[0].actions)
 2039|     10|        {
 2040|      4|        case ZYDIS_OPERAND_ACTION_WRITE:
  ------------------
  |  Branch (2040:9): [True: 4, False: 6]
  ------------------
 2041|      4|            if (operands[0].type == ZYDIS_OPERAND_TYPE_MEMORY)
  ------------------
  |  Branch (2041:17): [True: 0, False: 4]
  ------------------
 2042|      0|            {
 2043|      0|                operands[0].actions = ZYDIS_OPERAND_ACTION_CONDWRITE;
 2044|      0|            }
 2045|      4|            else
 2046|      4|            {
 2047|      4|                operands[0].actions = ZYDIS_OPERAND_ACTION_READ_CONDWRITE;
 2048|      4|            }
 2049|      4|            break;
 2050|      0|        case ZYDIS_OPERAND_ACTION_READWRITE:
  ------------------
  |  Branch (2050:9): [True: 0, False: 10]
  ------------------
 2051|      0|            operands[0].actions = ZYDIS_OPERAND_ACTION_READ_CONDWRITE;
 2052|      0|            break;
 2053|      6|        default:
  ------------------
  |  Branch (2053:9): [True: 6, False: 4]
  ------------------
 2054|      6|            break;
 2055|     10|        }
 2056|     10|    }
 2057|    170|#endif
 2058|       |
 2059|    170|    return ZYAN_STATUS_SUCCESS;
  ------------------
  |  |  164|    170|    ZYAN_MAKE_STATUS(0u, ZYAN_MODULE_ZYCORE, 0x00u)
  |  |  ------------------
  |  |  |  |   68|    170|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
 2060|    170|}
Decoder.c:ZydisDecodeOperandImplicitRegister:
 1538|    126|{
 1539|    126|    ZYAN_ASSERT(context);
  ------------------
  |  |  381|    126|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (1539:5): [True: 0, False: 126]
  |  Branch (1539:5): [True: 126, False: 0]
  ------------------
 1540|    126|    ZYAN_ASSERT(instruction);
  ------------------
  |  |  381|    126|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (1540:5): [True: 0, False: 126]
  |  Branch (1540:5): [True: 126, False: 0]
  ------------------
 1541|    126|    ZYAN_ASSERT(operand);
  ------------------
  |  |  381|    126|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (1541:5): [True: 0, False: 126]
  |  Branch (1541:5): [True: 126, False: 0]
  ------------------
 1542|    126|    ZYAN_ASSERT(definition);
  ------------------
  |  |  381|    126|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (1542:5): [True: 0, False: 126]
  |  Branch (1542:5): [True: 126, False: 0]
  ------------------
 1543|       |
 1544|    126|    operand->type = ZYDIS_OPERAND_TYPE_REGISTER;
 1545|       |
 1546|    126|    switch (definition->reg.type)
 1547|    126|    {
 1548|     44|    case ZYDIS_IMPLREG_TYPE_STATIC:
  ------------------
  |  Branch (1548:5): [True: 44, False: 82]
  ------------------
 1549|     44|        operand->reg.value = definition->reg.reg.reg;
 1550|     44|        break;
 1551|      0|    case ZYDIS_IMPLREG_TYPE_GPR_OSZ:
  ------------------
  |  Branch (1551:5): [True: 0, False: 126]
  ------------------
 1552|      0|    {
 1553|      0|        static const ZydisRegisterClass lookup[3] =
 1554|      0|        {
 1555|      0|            ZYDIS_REGCLASS_GPR16,
 1556|      0|            ZYDIS_REGCLASS_GPR32,
 1557|      0|            ZYDIS_REGCLASS_GPR64
 1558|      0|        };
 1559|      0|        operand->reg.value =
 1560|      0|            ZydisRegisterEncode(lookup[context->eosz_index], definition->reg.reg.id);
 1561|      0|        break;
 1562|      0|    }
 1563|      6|    case ZYDIS_IMPLREG_TYPE_GPR_ASZ:
  ------------------
  |  Branch (1563:5): [True: 6, False: 120]
  ------------------
 1564|      6|        operand->reg.value = ZydisRegisterEncode(
 1565|      6|            (instruction->address_width    == 16) ? ZYDIS_REGCLASS_GPR16  :
  ------------------
  |  Branch (1565:13): [True: 6, False: 0]
  ------------------
 1566|      6|            (instruction->address_width    == 32) ? ZYDIS_REGCLASS_GPR32  : ZYDIS_REGCLASS_GPR64,
  ------------------
  |  Branch (1566:13): [True: 0, False: 0]
  ------------------
 1567|      6|            definition->reg.reg.id);
 1568|      6|        break;
 1569|     12|    case ZYDIS_IMPLREG_TYPE_GPR_SSZ:
  ------------------
  |  Branch (1569:5): [True: 12, False: 114]
  ------------------
 1570|     12|        operand->reg.value = ZydisRegisterEncode(
 1571|     12|            (decoder->stack_width == ZYDIS_STACK_WIDTH_16) ? ZYDIS_REGCLASS_GPR16 :
  ------------------
  |  Branch (1571:13): [True: 6, False: 6]
  ------------------
 1572|     12|            (decoder->stack_width == ZYDIS_STACK_WIDTH_32) ? ZYDIS_REGCLASS_GPR32 :
  ------------------
  |  Branch (1572:13): [True: 2, False: 4]
  ------------------
 1573|      6|                                                             ZYDIS_REGCLASS_GPR64,
 1574|     12|            definition->reg.reg.id);
 1575|     12|        break;
 1576|     10|    case ZYDIS_IMPLREG_TYPE_IP_SSZ:
  ------------------
  |  Branch (1576:5): [True: 10, False: 116]
  ------------------
 1577|     10|        operand->reg.value =
 1578|     10|            (decoder->stack_width == ZYDIS_STACK_WIDTH_16) ? ZYDIS_REGISTER_EIP    :
  ------------------
  |  Branch (1578:13): [True: 4, False: 6]
  ------------------
 1579|     10|            (decoder->stack_width == ZYDIS_STACK_WIDTH_32) ? ZYDIS_REGISTER_EIP    :
  ------------------
  |  Branch (1579:13): [True: 2, False: 4]
  ------------------
 1580|      6|                                                             ZYDIS_REGISTER_RIP;
 1581|     10|        break;
 1582|     54|    case ZYDIS_IMPLREG_TYPE_FLAGS_SSZ:
  ------------------
  |  Branch (1582:5): [True: 54, False: 72]
  ------------------
 1583|     54|        operand->reg.value =
 1584|     54|            (decoder->stack_width == ZYDIS_STACK_WIDTH_16) ? ZYDIS_REGISTER_FLAGS  :
  ------------------
  |  Branch (1584:13): [True: 28, False: 26]
  ------------------
 1585|     54|            (decoder->stack_width == ZYDIS_STACK_WIDTH_32) ? ZYDIS_REGISTER_EFLAGS :
  ------------------
  |  Branch (1585:13): [True: 2, False: 24]
  ------------------
 1586|     26|                                                             ZYDIS_REGISTER_RFLAGS;
 1587|     54|        break;
 1588|      0|    default:
  ------------------
  |  Branch (1588:5): [True: 0, False: 126]
  ------------------
 1589|      0|        ZYAN_UNREACHABLE;
  ------------------
  |  |  431|      0|#   define ZYAN_UNREACHABLE { assert(0); abort(); }
  ------------------
  |  Branch (1589:9): [Folded, False: 0]
  |  Branch (1589:9): [Folded, False: 0]
  ------------------
 1590|    126|    }
 1591|    126|}
Decoder.c:ZydisDecodeOperandImplicitMemory:
 1607|     16|{
 1608|     16|    ZYAN_ASSERT(context);
  ------------------
  |  |  381|     16|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (1608:5): [True: 0, False: 16]
  |  Branch (1608:5): [True: 16, False: 0]
  ------------------
 1609|     16|    ZYAN_ASSERT(operand);
  ------------------
  |  |  381|     16|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (1609:5): [True: 0, False: 16]
  |  Branch (1609:5): [True: 16, False: 0]
  ------------------
 1610|     16|    ZYAN_ASSERT(definition);
  ------------------
  |  |  381|     16|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (1610:5): [True: 0, False: 16]
  |  Branch (1610:5): [True: 16, False: 0]
  ------------------
 1611|       |
 1612|     16|    static const ZydisRegisterClass lookup[3] =
 1613|     16|    {
 1614|     16|        ZYDIS_REGCLASS_GPR16,
 1615|     16|        ZYDIS_REGCLASS_GPR32,
 1616|     16|        ZYDIS_REGCLASS_GPR64
 1617|     16|    };
 1618|       |
 1619|     16|    operand->type = ZYDIS_OPERAND_TYPE_MEMORY;
 1620|     16|    operand->mem.type = ZYDIS_MEMOP_TYPE_MEM;
 1621|       |
 1622|     16|    switch (definition->mem.base)
 1623|     16|    {
 1624|      2|    case ZYDIS_IMPLMEM_BASE_AGPR_REG:
  ------------------
  |  Branch (1624:5): [True: 2, False: 14]
  ------------------
 1625|      2|        operand->mem.base = ZydisRegisterEncode(lookup[context->easz_index],
 1626|      2|            ZydisCalcRegisterId(context, instruction, ZYDIS_REG_ENCODING_REG,
 1627|      2|                lookup[context->easz_index]));
 1628|      2|        break;
 1629|      0|    case ZYDIS_IMPLMEM_BASE_AGPR_RM:
  ------------------
  |  Branch (1629:5): [True: 0, False: 16]
  ------------------
 1630|      0|        operand->mem.base = ZydisRegisterEncode(lookup[context->easz_index],
 1631|      0|            ZydisCalcRegisterId(context, instruction, ZYDIS_REG_ENCODING_RM,
 1632|      0|                lookup[context->easz_index]));
 1633|      0|        break;
 1634|      0|    case ZYDIS_IMPLMEM_BASE_AAX:
  ------------------
  |  Branch (1634:5): [True: 0, False: 16]
  ------------------
 1635|      0|        operand->mem.base = ZydisRegisterEncode(lookup[context->easz_index], 0);
 1636|      0|        break;
 1637|      0|    case ZYDIS_IMPLMEM_BASE_ADX:
  ------------------
  |  Branch (1637:5): [True: 0, False: 16]
  ------------------
 1638|      0|        operand->mem.base = ZydisRegisterEncode(lookup[context->easz_index], 2);
 1639|      0|        break;
 1640|      0|    case ZYDIS_IMPLMEM_BASE_ABX:
  ------------------
  |  Branch (1640:5): [True: 0, False: 16]
  ------------------
 1641|      0|        operand->mem.base = ZydisRegisterEncode(lookup[context->easz_index], 3);
 1642|      0|        break;
 1643|      0|    case ZYDIS_IMPLMEM_BASE_ASI:
  ------------------
  |  Branch (1643:5): [True: 0, False: 16]
  ------------------
 1644|      0|        operand->mem.base = ZydisRegisterEncode(lookup[context->easz_index], 6);
 1645|      0|        break;
 1646|      2|    case ZYDIS_IMPLMEM_BASE_ADI:
  ------------------
  |  Branch (1646:5): [True: 2, False: 14]
  ------------------
 1647|      2|        operand->mem.base = ZydisRegisterEncode(lookup[context->easz_index], 7);
 1648|      2|        break;
 1649|     12|    case ZYDIS_IMPLMEM_BASE_SSP:
  ------------------
  |  Branch (1649:5): [True: 12, False: 4]
  ------------------
 1650|     12|        operand->mem.base = ZydisRegisterEncode(lookup[decoder->stack_width], 4);
 1651|     12|        break;
 1652|      0|    case ZYDIS_IMPLMEM_BASE_SBP:
  ------------------
  |  Branch (1652:5): [True: 0, False: 16]
  ------------------
 1653|      0|        operand->mem.base = ZydisRegisterEncode(lookup[decoder->stack_width], 5);
 1654|      0|        break;
 1655|      0|    default:
  ------------------
  |  Branch (1655:5): [True: 0, False: 16]
  ------------------
 1656|      0|        ZYAN_UNREACHABLE;
  ------------------
  |  |  431|      0|#   define ZYAN_UNREACHABLE { assert(0); abort(); }
  ------------------
  |  Branch (1656:9): [Folded, False: 0]
  |  Branch (1656:9): [Folded, False: 0]
  ------------------
 1657|     16|    }
 1658|       |
 1659|     16|    if (definition->mem.seg)
  ------------------
  |  Branch (1659:9): [True: 2, False: 14]
  ------------------
 1660|      2|    {
 1661|      2|        operand->mem.segment =
 1662|      2|            ZydisRegisterEncode(ZYDIS_REGCLASS_SEGMENT, definition->mem.seg - 1);
 1663|       |        ZYAN_ASSERT(operand->mem.segment);
  ------------------
  |  |  381|      2|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (1663:9): [True: 0, False: 2]
  |  Branch (1663:9): [True: 2, False: 0]
  ------------------
 1664|      2|    }
 1665|     16|}
Decoder.c:ZydisDecodeOperandRegister:
 1292|    158|{
 1293|    158|    ZYAN_ASSERT(instruction);
  ------------------
  |  |  381|    158|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (1293:5): [True: 0, False: 158]
  |  Branch (1293:5): [True: 158, False: 0]
  ------------------
 1294|    158|    ZYAN_ASSERT(operand);
  ------------------
  |  |  381|    158|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (1294:5): [True: 0, False: 158]
  |  Branch (1294:5): [True: 158, False: 0]
  ------------------
 1295|       |
 1296|    158|    operand->type = ZYDIS_OPERAND_TYPE_REGISTER;
 1297|       |
 1298|    158|    if (register_class == ZYDIS_REGCLASS_GPR8)
  ------------------
  |  Branch (1298:9): [True: 18, False: 140]
  ------------------
 1299|     18|    {
 1300|     18|        const ZyanBool has_high_register = (instruction->attributes & ZYDIS_ATTRIB_HAS_REX) ||
  ------------------
  |  |  544|     18|#define ZYDIS_ATTRIB_HAS_REX                    (1ULL <<  2)
  ------------------
  |  Branch (1300:44): [True: 8, False: 10]
  ------------------
 1301|     10|                                           (instruction->encoding == ZYDIS_INSTRUCTION_ENCODING_REX2) ||
  ------------------
  |  Branch (1301:44): [True: 4, False: 6]
  ------------------
 1302|      6|                                           ((instruction->encoding == ZYDIS_INSTRUCTION_ENCODING_EVEX) && 
  ------------------
  |  Branch (1302:45): [True: 2, False: 4]
  ------------------
 1303|      2|                                            (instruction->attributes & ZYDIS_ATTRIB_HAS_EEVEX));
  ------------------
  |  |  755|      2|#define ZYDIS_ATTRIB_HAS_EEVEX                  (1ULL << 47) // TODO: rebase
  ------------------
  |  Branch (1303:45): [True: 2, False: 0]
  ------------------
 1304|     18|        if (has_high_register && (register_id >= 4))
  ------------------
  |  Branch (1304:13): [True: 14, False: 4]
  |  Branch (1304:34): [True: 12, False: 2]
  ------------------
 1305|     12|        {
 1306|     12|            operand->reg.value = ZYDIS_REGISTER_SPL + (register_id - 4);
 1307|     12|        } else
 1308|      6|        {
 1309|      6|            operand->reg.value = ZYDIS_REGISTER_AL + register_id;
 1310|      6|        }
 1311|     18|    } else
 1312|    140|    {
 1313|    140|        operand->reg.value = ZydisRegisterEncode(register_class, register_id);
 1314|    140|        ZYAN_ASSERT(operand->reg.value);
  ------------------
  |  |  381|    140|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (1314:9): [True: 0, False: 140]
  |  Branch (1314:9): [True: 140, False: 0]
  ------------------
 1315|       |        /*if (!operand->reg.value)
 1316|       |        {
 1317|       |            return ZYAN_STATUS_BAD_REGISTER;
 1318|       |        }*/
 1319|    140|    }
 1320|       |
 1321|    158|    return ZYAN_STATUS_SUCCESS;
  ------------------
  |  |  164|    158|    ZYAN_MAKE_STATUS(0u, ZYAN_MODULE_ZYCORE, 0x00u)
  |  |  ------------------
  |  |  |  |   68|    158|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
 1322|    158|}
Decoder.c:ZydisCalcRegisterId:
  943|    224|{
  944|    224|    ZYAN_ASSERT(context);
  ------------------
  |  |  381|    224|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (944:5): [True: 0, False: 224]
  |  Branch (944:5): [True: 224, False: 0]
  ------------------
  945|    224|    ZYAN_ASSERT(instruction);
  ------------------
  |  |  381|    224|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (945:5): [True: 0, False: 224]
  |  Branch (945:5): [True: 224, False: 0]
  ------------------
  946|       |
  947|       |    // TODO: Combine OPCODE and IS4 in `ZydisPopulateRegisterIds` and get rid of this
  948|       |    // TODO: function entirely
  949|       |
  950|    224|    switch (encoding)
  951|    224|    {
  952|     64|    case ZYDIS_REG_ENCODING_REG:
  ------------------
  |  Branch (952:5): [True: 64, False: 160]
  ------------------
  953|     64|        return context->reg_info.id_reg;
  954|     10|    case ZYDIS_REG_ENCODING_NDSNDD:
  ------------------
  |  Branch (954:5): [True: 10, False: 214]
  ------------------
  955|     10|        return context->reg_info.id_ndsndd;
  956|     36|    case ZYDIS_REG_ENCODING_RM:
  ------------------
  |  Branch (956:5): [True: 36, False: 188]
  ------------------
  957|     36|        return context->reg_info.id_rm;
  958|     50|    case ZYDIS_REG_ENCODING_BASE:
  ------------------
  |  Branch (958:5): [True: 50, False: 174]
  ------------------
  959|     50|        return context->reg_info.id_base;
  960|      8|    case ZYDIS_REG_ENCODING_INDEX:
  ------------------
  |  Branch (960:5): [True: 8, False: 216]
  ------------------
  961|     14|    case ZYDIS_REG_ENCODING_VIDX:
  ------------------
  |  Branch (961:5): [True: 6, False: 218]
  ------------------
  962|     14|        return context->reg_info.id_index;
  963|     38|    case ZYDIS_REG_ENCODING_OPCODE:
  ------------------
  |  Branch (963:5): [True: 38, False: 186]
  ------------------
  964|     38|    {
  965|     38|        ZYAN_ASSERT((register_class == ZYDIS_REGCLASS_GPR8) ||
  ------------------
  |  |  381|     38|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (965:9): [True: 38, False: 0]
  |  Branch (965:9): [True: 0, False: 0]
  |  Branch (965:9): [True: 0, False: 0]
  |  Branch (965:9): [True: 0, False: 0]
  |  Branch (965:9): [True: 0, False: 38]
  |  Branch (965:9): [True: 2, False: 36]
  |  Branch (965:9): [True: 2, False: 34]
  |  Branch (965:9): [True: 34, False: 0]
  ------------------
  966|     38|                    (register_class == ZYDIS_REGCLASS_GPR16) ||
  967|     38|                    (register_class == ZYDIS_REGCLASS_GPR32) ||
  968|     38|                    (register_class == ZYDIS_REGCLASS_GPR64));
  969|     38|        ZyanU8 value = (instruction->opcode & 0x0F);
  970|     38|        if (value > 7)
  ------------------
  |  Branch (970:13): [True: 38, False: 0]
  ------------------
  971|     38|        {
  972|     38|            value = value - 8;
  973|     38|        }
  974|     38|        if (instruction->machine_mode != ZYDIS_MACHINE_MODE_LONG_64)
  ------------------
  |  Branch (974:13): [True: 0, False: 38]
  ------------------
  975|      0|        {
  976|      0|            return value;
  977|      0|        }
  978|     38|        return value | (context->vector_unified.B4 << 4) | (context->vector_unified.B3 << 3);
  979|     38|    }
  980|      0|    case ZYDIS_REG_ENCODING_IS4:
  ------------------
  |  Branch (980:5): [True: 0, False: 224]
  ------------------
  981|      0|    {
  982|      0|        if (instruction->machine_mode != ZYDIS_MACHINE_MODE_LONG_64)
  ------------------
  |  Branch (982:13): [True: 0, False: 0]
  ------------------
  983|      0|        {
  984|      0|            return (instruction->raw.imm[0].value.u >> 4) & 0x07;
  985|      0|        }
  986|      0|        ZyanU8 value = (instruction->raw.imm[0].value.u >> 4) & 0x0F;
  987|       |        // We have to check the instruction-encoding, because the extension by bit [3] is only
  988|       |        // valid for EVEX and MVEX instructions
  989|      0|        if ((instruction->encoding == ZYDIS_INSTRUCTION_ENCODING_EVEX) ||
  ------------------
  |  Branch (989:13): [True: 0, False: 0]
  ------------------
  990|      0|            (instruction->encoding == ZYDIS_INSTRUCTION_ENCODING_MVEX))
  ------------------
  |  Branch (990:13): [True: 0, False: 0]
  ------------------
  991|      0|        {
  992|      0|            switch (register_class)
  993|      0|            {
  994|      0|            case ZYDIS_REGCLASS_XMM:
  ------------------
  |  Branch (994:13): [True: 0, False: 0]
  ------------------
  995|      0|            case ZYDIS_REGCLASS_YMM:
  ------------------
  |  Branch (995:13): [True: 0, False: 0]
  ------------------
  996|      0|            case ZYDIS_REGCLASS_ZMM:
  ------------------
  |  Branch (996:13): [True: 0, False: 0]
  ------------------
  997|      0|                value |= ((instruction->raw.imm[0].value.u & 0x08) << 1);
  998|      0|            default:
  ------------------
  |  Branch (998:13): [True: 0, False: 0]
  ------------------
  999|      0|                break;
 1000|      0|            }
 1001|      0|        }
 1002|      0|        return value;
 1003|      0|    }
 1004|     12|    case ZYDIS_REG_ENCODING_MASK:
  ------------------
  |  Branch (1004:5): [True: 12, False: 212]
  ------------------
 1005|     12|        return context->vector_unified.mask;
 1006|      0|    default:
  ------------------
  |  Branch (1006:5): [True: 0, False: 224]
  ------------------
 1007|      0|        ZYAN_UNREACHABLE;
  ------------------
  |  |  431|      0|#   define ZYAN_UNREACHABLE { assert(0); abort(); }
  ------------------
  |  Branch (1007:9): [Folded, False: 0]
  |  Branch (1007:9): [Folded, False: 0]
  ------------------
 1008|    224|    }
 1009|    224|}
Decoder.c:ZydisDecodeOperandMemory:
 1340|     52|{
 1341|     52|    ZYAN_ASSERT(context);
  ------------------
  |  |  381|     52|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (1341:5): [True: 0, False: 52]
  |  Branch (1341:5): [True: 52, False: 0]
  ------------------
 1342|     52|    ZYAN_ASSERT(instruction);
  ------------------
  |  |  381|     52|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (1342:5): [True: 0, False: 52]
  |  Branch (1342:5): [True: 52, False: 0]
  ------------------
 1343|     52|    ZYAN_ASSERT(operand);
  ------------------
  |  |  381|     52|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (1343:5): [True: 0, False: 52]
  |  Branch (1343:5): [True: 52, False: 0]
  ------------------
 1344|     52|    ZYAN_ASSERT(instruction->attributes & ZYDIS_ATTRIB_HAS_MODRM);
  ------------------
  |  |  381|     52|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (1344:5): [True: 0, False: 52]
  |  Branch (1344:5): [True: 52, False: 0]
  ------------------
 1345|     52|    ZYAN_ASSERT(instruction->raw.modrm.mod != 3);
  ------------------
  |  |  381|     52|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (1345:5): [True: 0, False: 52]
  |  Branch (1345:5): [True: 52, False: 0]
  ------------------
 1346|     52|    ZYAN_ASSERT(!vidx_register_class || ((instruction->raw.modrm.rm == 4) &&
  ------------------
  |  |  381|     52|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (1346:5): [True: 0, False: 0]
  |  Branch (1346:5): [True: 0, False: 0]
  |  Branch (1346:5): [True: 0, False: 0]
  |  Branch (1346:5): [True: 52, False: 0]
  |  Branch (1346:5): [True: 6, False: 0]
  |  Branch (1346:5): [True: 0, False: 0]
  |  Branch (1346:5): [True: 6, False: 0]
  |  Branch (1346:5): [True: 46, False: 6]
  ------------------
 1347|     52|        ((instruction->address_width == 32) || (instruction->address_width == 64))));
 1348|       |
 1349|     52|    operand->type = ZYDIS_OPERAND_TYPE_MEMORY;
 1350|     52|    operand->mem.type = ZYDIS_MEMOP_TYPE_MEM;
 1351|       |
 1352|     52|    const ZyanU8 modrm_rm = instruction->raw.modrm.rm;
 1353|     52|    ZyanU8 displacement_size = 0;
 1354|     52|    switch (instruction->address_width)
 1355|     52|    {
 1356|      2|    case 16:
  ------------------
  |  Branch (1356:5): [True: 2, False: 50]
  ------------------
 1357|      2|    {
 1358|      2|        static const ZydisRegister bases[] =
 1359|      2|        {
 1360|      2|            ZYDIS_REGISTER_BX,   ZYDIS_REGISTER_BX,   ZYDIS_REGISTER_BP,   ZYDIS_REGISTER_BP,
 1361|      2|            ZYDIS_REGISTER_SI,   ZYDIS_REGISTER_DI,   ZYDIS_REGISTER_BP,   ZYDIS_REGISTER_BX
 1362|      2|        };
 1363|      2|        static const ZydisRegister indices[] =
 1364|      2|        {
 1365|      2|            ZYDIS_REGISTER_SI,   ZYDIS_REGISTER_DI,   ZYDIS_REGISTER_SI,   ZYDIS_REGISTER_DI,
 1366|      2|            ZYDIS_REGISTER_NONE, ZYDIS_REGISTER_NONE, ZYDIS_REGISTER_NONE, ZYDIS_REGISTER_NONE
 1367|      2|        };
 1368|      2|        operand->mem.base = bases[modrm_rm];
 1369|      2|        operand->mem.index = indices[modrm_rm];
 1370|      2|        operand->mem.scale = (operand->mem.index == ZYDIS_REGISTER_NONE) ? 0 : 1;
  ------------------
  |  Branch (1370:30): [True: 2, False: 0]
  ------------------
 1371|      2|        switch (instruction->raw.modrm.mod)
 1372|      2|        {
 1373|      2|        case 0:
  ------------------
  |  Branch (1373:9): [True: 2, False: 0]
  ------------------
 1374|      2|            if (modrm_rm == 6)
  ------------------
  |  Branch (1374:17): [True: 2, False: 0]
  ------------------
 1375|      2|            {
 1376|      2|                displacement_size = 16;
 1377|      2|                operand->mem.base = ZYDIS_REGISTER_NONE;
 1378|      2|            }
 1379|      2|            break;
 1380|      0|        case 1:
  ------------------
  |  Branch (1380:9): [True: 0, False: 2]
  ------------------
 1381|      0|            displacement_size = 8;
 1382|      0|            break;
 1383|      0|        case 2:
  ------------------
  |  Branch (1383:9): [True: 0, False: 2]
  ------------------
 1384|      0|            displacement_size = 16;
 1385|      0|            break;
 1386|      0|        default:
  ------------------
  |  Branch (1386:9): [True: 0, False: 2]
  ------------------
 1387|      0|            ZYAN_UNREACHABLE;
  ------------------
  |  |  431|      0|#   define ZYAN_UNREACHABLE { assert(0); abort(); }
  ------------------
  |  Branch (1387:13): [Folded, False: 0]
  |  Branch (1387:13): [Folded, False: 0]
  ------------------
 1388|      2|        }
 1389|      2|        break;
 1390|      2|    }
 1391|     28|    case 32:
  ------------------
  |  Branch (1391:5): [True: 28, False: 24]
  ------------------
 1392|     28|    {
 1393|     28|        operand->mem.base = ZYDIS_REGISTER_EAX + ZydisCalcRegisterId(context, instruction,
 1394|     28|            ZYDIS_REG_ENCODING_BASE, ZYDIS_REGCLASS_GPR32);
 1395|     28|        switch (instruction->raw.modrm.mod)
 1396|     28|        {
 1397|     24|        case 0:
  ------------------
  |  Branch (1397:9): [True: 24, False: 4]
  ------------------
 1398|     24|            if (modrm_rm == 5)
  ------------------
  |  Branch (1398:17): [True: 14, False: 10]
  ------------------
 1399|     14|            {
 1400|     14|                if (instruction->machine_mode == ZYDIS_MACHINE_MODE_LONG_64)
  ------------------
  |  Branch (1400:21): [True: 14, False: 0]
  ------------------
 1401|     14|                {
 1402|     14|                    operand->mem.base = ZYDIS_REGISTER_EIP;
 1403|     14|                } else
 1404|      0|                {
 1405|      0|                    operand->mem.base = ZYDIS_REGISTER_NONE;
 1406|      0|                }
 1407|     14|                displacement_size = 32;
 1408|     14|            }
 1409|     24|            break;
 1410|      0|        case 1:
  ------------------
  |  Branch (1410:9): [True: 0, False: 28]
  ------------------
 1411|      0|            displacement_size = 8;
 1412|      0|            break;
 1413|      4|        case 2:
  ------------------
  |  Branch (1413:9): [True: 4, False: 24]
  ------------------
 1414|      4|            displacement_size = 32;
 1415|      4|            break;
 1416|      0|        default:
  ------------------
  |  Branch (1416:9): [True: 0, False: 28]
  ------------------
 1417|      0|            ZYAN_UNREACHABLE;
  ------------------
  |  |  431|      0|#   define ZYAN_UNREACHABLE { assert(0); abort(); }
  ------------------
  |  Branch (1417:13): [Folded, False: 0]
  |  Branch (1417:13): [Folded, False: 0]
  ------------------
 1418|     28|        }
 1419|     28|        if (modrm_rm == 4)
  ------------------
  |  Branch (1419:13): [True: 8, False: 20]
  ------------------
 1420|      8|        {
 1421|      8|            ZYAN_ASSERT(instruction->attributes & ZYDIS_ATTRIB_HAS_SIB);
  ------------------
  |  |  381|      8|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (1421:13): [True: 0, False: 8]
  |  Branch (1421:13): [True: 8, False: 0]
  ------------------
 1422|      8|            operand->mem.index =
 1423|      8|                ZydisRegisterEncode(vidx_register_class ? vidx_register_class : ZYDIS_REGCLASS_GPR32,
  ------------------
  |  Branch (1423:37): [True: 6, False: 2]
  ------------------
 1424|      8|                    ZydisCalcRegisterId(context, instruction,
 1425|      8|                        vidx_register_class ? ZYDIS_REG_ENCODING_VIDX : ZYDIS_REG_ENCODING_INDEX,
  ------------------
  |  Branch (1425:25): [True: 6, False: 2]
  ------------------
 1426|      8|                        vidx_register_class ? vidx_register_class : ZYDIS_REGCLASS_GPR32));
  ------------------
  |  Branch (1426:25): [True: 6, False: 2]
  ------------------
 1427|      8|            operand->mem.scale = (1 << instruction->raw.sib.scale);
 1428|      8|            if (operand->mem.index == ZYDIS_REGISTER_ESP)
  ------------------
  |  Branch (1428:17): [True: 2, False: 6]
  ------------------
 1429|      2|            {
 1430|      2|                operand->mem.index = ZYDIS_REGISTER_NONE;
 1431|      2|                operand->mem.scale = 0;
 1432|      2|            }
 1433|      8|            if ((operand->mem.base == ZYDIS_REGISTER_EBP) ||
  ------------------
  |  Branch (1433:17): [True: 6, False: 2]
  ------------------
 1434|      2|                (operand->mem.base == ZYDIS_REGISTER_R13D) ||
  ------------------
  |  Branch (1434:17): [True: 0, False: 2]
  ------------------
 1435|      2|                (operand->mem.base == ZYDIS_REGISTER_R21D) ||
  ------------------
  |  Branch (1435:17): [True: 0, False: 2]
  ------------------
 1436|      2|                (operand->mem.base == ZYDIS_REGISTER_R29D))
  ------------------
  |  Branch (1436:17): [True: 0, False: 2]
  ------------------
 1437|      6|            {
 1438|      6|                if (instruction->raw.modrm.mod == 0)
  ------------------
  |  Branch (1438:21): [True: 6, False: 0]
  ------------------
 1439|      6|                {
 1440|      6|                    operand->mem.base = ZYDIS_REGISTER_NONE;
 1441|      6|                }
 1442|      6|                displacement_size = (instruction->raw.modrm.mod == 1) ? 8 : 32;
  ------------------
  |  Branch (1442:37): [True: 0, False: 6]
  ------------------
 1443|      6|            }
 1444|      8|        } else
 1445|     20|        {
 1446|     20|            operand->mem.index = ZYDIS_REGISTER_NONE;
 1447|     20|            operand->mem.scale = 0;
 1448|     20|        }
 1449|     28|        break;
 1450|     28|    }
 1451|     28|    case 64:
  ------------------
  |  Branch (1451:5): [True: 22, False: 30]
  ------------------
 1452|     22|    {
 1453|     22|        operand->mem.base = ZYDIS_REGISTER_RAX + ZydisCalcRegisterId(context, instruction,
 1454|     22|            ZYDIS_REG_ENCODING_BASE, ZYDIS_REGCLASS_GPR64);
 1455|     22|        switch (instruction->raw.modrm.mod)
 1456|     22|        {
 1457|     18|        case 0:
  ------------------
  |  Branch (1457:9): [True: 18, False: 4]
  ------------------
 1458|     18|            if (modrm_rm == 5)
  ------------------
  |  Branch (1458:17): [True: 14, False: 4]
  ------------------
 1459|     14|            {
 1460|     14|                if (instruction->machine_mode == ZYDIS_MACHINE_MODE_LONG_64)
  ------------------
  |  Branch (1460:21): [True: 14, False: 0]
  ------------------
 1461|     14|                {
 1462|     14|                    operand->mem.base = ZYDIS_REGISTER_RIP;
 1463|     14|                } else
 1464|      0|                {
 1465|      0|                    operand->mem.base = ZYDIS_REGISTER_NONE;
 1466|      0|                }
 1467|     14|                displacement_size = 32;
 1468|     14|            }
 1469|     18|            break;
 1470|      2|        case 1:
  ------------------
  |  Branch (1470:9): [True: 2, False: 20]
  ------------------
 1471|      2|            displacement_size = 8;
 1472|      2|            break;
 1473|      2|        case 2:
  ------------------
  |  Branch (1473:9): [True: 2, False: 20]
  ------------------
 1474|      2|            displacement_size = 32;
 1475|      2|            break;
 1476|      0|        default:
  ------------------
  |  Branch (1476:9): [True: 0, False: 22]
  ------------------
 1477|      0|            ZYAN_UNREACHABLE;
  ------------------
  |  |  431|      0|#   define ZYAN_UNREACHABLE { assert(0); abort(); }
  ------------------
  |  Branch (1477:13): [Folded, False: 0]
  |  Branch (1477:13): [Folded, False: 0]
  ------------------
 1478|     22|        }
 1479|     22|        if ((modrm_rm & 0x07) == 4)
  ------------------
  |  Branch (1479:13): [True: 6, False: 16]
  ------------------
 1480|      6|        {
 1481|      6|            ZYAN_ASSERT(instruction->attributes & ZYDIS_ATTRIB_HAS_SIB);
  ------------------
  |  |  381|      6|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (1481:13): [True: 0, False: 6]
  |  Branch (1481:13): [True: 6, False: 0]
  ------------------
 1482|      6|            operand->mem.index =
 1483|      6|                ZydisRegisterEncode(vidx_register_class ? vidx_register_class : ZYDIS_REGCLASS_GPR64,
  ------------------
  |  Branch (1483:37): [True: 0, False: 6]
  ------------------
 1484|      6|                    ZydisCalcRegisterId(context, instruction,
 1485|      6|                        vidx_register_class ? ZYDIS_REG_ENCODING_VIDX : ZYDIS_REG_ENCODING_INDEX,
  ------------------
  |  Branch (1485:25): [True: 0, False: 6]
  ------------------
 1486|      6|                        vidx_register_class ? vidx_register_class : ZYDIS_REGCLASS_GPR64));
  ------------------
  |  Branch (1486:25): [True: 0, False: 6]
  ------------------
 1487|      6|            operand->mem.scale = (1 << instruction->raw.sib.scale);
 1488|      6|            if (operand->mem.index == ZYDIS_REGISTER_RSP)
  ------------------
  |  Branch (1488:17): [True: 4, False: 2]
  ------------------
 1489|      4|            {
 1490|      4|                operand->mem.index = ZYDIS_REGISTER_NONE;
 1491|      4|                operand->mem.scale = 0;
 1492|      4|            }
 1493|      6|            if ((operand->mem.base == ZYDIS_REGISTER_RBP) ||
  ------------------
  |  Branch (1493:17): [True: 4, False: 2]
  ------------------
 1494|      2|                (operand->mem.base == ZYDIS_REGISTER_R13) ||
  ------------------
  |  Branch (1494:17): [True: 0, False: 2]
  ------------------
 1495|      2|                (operand->mem.base == ZYDIS_REGISTER_R21) ||
  ------------------
  |  Branch (1495:17): [True: 2, False: 0]
  ------------------
 1496|      0|                (operand->mem.base == ZYDIS_REGISTER_R29))
  ------------------
  |  Branch (1496:17): [True: 0, False: 0]
  ------------------
 1497|      6|            {
 1498|      6|                if (instruction->raw.modrm.mod == 0)
  ------------------
  |  Branch (1498:21): [True: 4, False: 2]
  ------------------
 1499|      4|                {
 1500|      4|                    operand->mem.base = ZYDIS_REGISTER_NONE;
 1501|      4|                }
 1502|      6|                displacement_size = (instruction->raw.modrm.mod == 1) ? 8 : 32;
  ------------------
  |  Branch (1502:37): [True: 2, False: 4]
  ------------------
 1503|      6|            }
 1504|      6|        } else
 1505|     16|        {
 1506|     16|            operand->mem.index = ZYDIS_REGISTER_NONE;
 1507|     16|            operand->mem.scale = 0;
 1508|     16|        }
 1509|     22|        break;
 1510|     22|    }
 1511|     22|    default:
  ------------------
  |  Branch (1511:5): [True: 0, False: 52]
  ------------------
 1512|      0|        ZYAN_UNREACHABLE;
  ------------------
  |  |  431|      0|#   define ZYAN_UNREACHABLE { assert(0); abort(); }
  ------------------
  |  Branch (1512:9): [Folded, False: 0]
  |  Branch (1512:9): [Folded, False: 0]
  ------------------
 1513|     52|    }
 1514|     52|    if (displacement_size)
  ------------------
  |  Branch (1514:9): [True: 48, False: 4]
  ------------------
 1515|     48|    {
 1516|     48|        ZYAN_ASSERT(instruction->raw.disp.size == displacement_size);
  ------------------
  |  |  381|     48|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (1516:9): [True: 0, False: 48]
  |  Branch (1516:9): [True: 48, False: 0]
  ------------------
 1517|     48|        operand->mem.disp.value = instruction->raw.disp.value;
 1518|     48|        operand->mem.disp.size = displacement_size;
 1519|     48|        operand->mem.disp.offset = instruction->raw.disp.offset;
 1520|     48|    }
 1521|     52|    return ZYAN_STATUS_SUCCESS;
  ------------------
  |  |  164|     52|    ZYAN_MAKE_STATUS(0u, ZYAN_MODULE_ZYCORE, 0x00u)
  |  |  ------------------
  |  |  |  |   68|     52|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
 1522|     52|}
Decoder.c:ZydisSetOperandSizeAndElementInfo:
 1024|    442|{
 1025|    442|    ZYAN_ASSERT(context);
  ------------------
  |  |  381|    442|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (1025:5): [True: 0, False: 442]
  |  Branch (1025:5): [True: 442, False: 0]
  ------------------
 1026|    442|    ZYAN_ASSERT(instruction);
  ------------------
  |  |  381|    442|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (1026:5): [True: 0, False: 442]
  |  Branch (1026:5): [True: 442, False: 0]
  ------------------
 1027|    442|    ZYAN_ASSERT(operand);
  ------------------
  |  |  381|    442|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (1027:5): [True: 0, False: 442]
  |  Branch (1027:5): [True: 442, False: 0]
  ------------------
 1028|    442|    ZYAN_ASSERT(definition);
  ------------------
  |  |  381|    442|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (1028:5): [True: 0, False: 442]
  |  Branch (1028:5): [True: 442, False: 0]
  ------------------
 1029|       |
 1030|       |    // Operand size
 1031|    442|    const ZyanU16* size = ZydisGetOperandSizes(definition);
 1032|    442|    switch (operand->type)
 1033|    442|    {
 1034|    284|    case ZYDIS_OPERAND_TYPE_REGISTER:
  ------------------
  |  Branch (1034:5): [True: 284, False: 158]
  ------------------
 1035|    284|    {
 1036|    284|        if (size[context->eosz_index])
  ------------------
  |  Branch (1036:13): [True: 74, False: 210]
  ------------------
 1037|     74|        {
 1038|     74|            operand->size = size[context->eosz_index] * 8;
 1039|     74|        } else
 1040|    210|        {
 1041|       |            // TODO: TMM register size should probably be 0
 1042|    210|            operand->size = ZydisRegisterGetWidth(instruction->machine_mode,
 1043|    210|                operand->reg.value);
 1044|    210|        }
 1045|    284|        operand->element_type = ZYDIS_ELEMENT_TYPE_INT;
 1046|    284|        operand->element_size = operand->size;
 1047|    284|        break;
 1048|      0|    }
 1049|     68|    case ZYDIS_OPERAND_TYPE_MEMORY:
  ------------------
  |  Branch (1049:5): [True: 68, False: 374]
  ------------------
 1050|     68|        switch (instruction->encoding)
 1051|     68|        {
 1052|     36|        case ZYDIS_INSTRUCTION_ENCODING_LEGACY:
  ------------------
  |  Branch (1052:9): [True: 36, False: 32]
  ------------------
 1053|     42|        case ZYDIS_INSTRUCTION_ENCODING_REX2:
  ------------------
  |  Branch (1053:9): [True: 6, False: 62]
  ------------------
 1054|     42|        case ZYDIS_INSTRUCTION_ENCODING_3DNOW:
  ------------------
  |  Branch (1054:9): [True: 0, False: 68]
  ------------------
 1055|     44|        case ZYDIS_INSTRUCTION_ENCODING_XOP:
  ------------------
  |  Branch (1055:9): [True: 2, False: 66]
  ------------------
 1056|     44|        case ZYDIS_INSTRUCTION_ENCODING_VEX:
  ------------------
  |  Branch (1056:9): [True: 0, False: 68]
  ------------------
 1057|     44|            if (operand->mem.type == ZYDIS_MEMOP_TYPE_AGEN)
  ------------------
  |  Branch (1057:17): [True: 0, False: 44]
  ------------------
 1058|      0|            {
 1059|      0|                ZYAN_ASSERT(size[context->eosz_index] == 0);
  ------------------
  |  |  381|      0|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (1059:17): [True: 0, False: 0]
  |  Branch (1059:17): [True: 0, False: 0]
  ------------------
 1060|      0|                operand->size = instruction->address_width;
 1061|      0|                operand->element_type = ZYDIS_ELEMENT_TYPE_INT;
 1062|      0|            } else
 1063|     44|            {
 1064|     44|                ZYAN_ASSERT(size[context->eosz_index] ||
  ------------------
  |  |  381|     44|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (1064:17): [True: 44, False: 0]
  |  Branch (1064:17): [True: 0, False: 0]
  |  Branch (1064:17): [True: 44, False: 0]
  |  Branch (1064:17): [True: 0, False: 0]
  ------------------
 1065|     44|                    (instruction->meta.category == ZYDIS_CATEGORY_AMX_TILE));
 1066|     44|                operand->size = size[context->eosz_index] * 8;
 1067|     44|            }
 1068|     44|            break;
 1069|     44|        case ZYDIS_INSTRUCTION_ENCODING_EVEX:
  ------------------
  |  Branch (1069:9): [True: 24, False: 44]
  ------------------
 1070|     24|#ifndef ZYDIS_DISABLE_AVX512
 1071|     24|            if (size[context->eosz_index])
  ------------------
  |  Branch (1071:17): [True: 22, False: 2]
  ------------------
 1072|     22|            {
 1073|       |                // Operand size is hardcoded
 1074|     22|                operand->size = size[context->eosz_index] * 8;
 1075|     22|                ZYAN_ASSERT(operand->size);
  ------------------
  |  |  381|     22|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (1075:17): [True: 0, False: 22]
  |  Branch (1075:17): [True: 22, False: 0]
  ------------------
 1076|     22|            } else if (!context->evex.element_size)
  ------------------
  |  Branch (1076:24): [True: 0, False: 2]
  ------------------
 1077|      0|            {
 1078|       |                // AMX tile memory operands
 1079|      0|                operand->size = 0;
 1080|      0|            } else
 1081|      2|            {
 1082|       |                // Operand size depends on the tuple-type, the element-size and the number of
 1083|       |                // elements
 1084|      2|                ZYAN_ASSERT(instruction->avx.vector_length);
  ------------------
  |  |  381|      2|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (1084:17): [True: 0, False: 2]
  |  Branch (1084:17): [True: 2, False: 0]
  ------------------
 1085|      2|                ZYAN_ASSERT(context->evex.element_size);
  ------------------
  |  |  381|      2|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (1085:17): [True: 0, False: 2]
  |  Branch (1085:17): [True: 2, False: 0]
  ------------------
 1086|      2|                switch (context->evex.tuple_type)
 1087|      2|                {
 1088|      2|                case ZYDIS_TUPLETYPE_FV:
  ------------------
  |  Branch (1088:17): [True: 2, False: 0]
  ------------------
 1089|      2|                    if (instruction->avx.broadcast.mode)
  ------------------
  |  Branch (1089:25): [True: 0, False: 2]
  ------------------
 1090|      0|                    {
 1091|      0|                        operand->size = context->evex.element_size;
 1092|      0|                    } else
 1093|      2|                    {
 1094|      2|                        operand->size = instruction->avx.vector_length;
 1095|      2|                    }
 1096|      2|                    break;
 1097|      0|                case ZYDIS_TUPLETYPE_HV:
  ------------------
  |  Branch (1097:17): [True: 0, False: 2]
  ------------------
 1098|      0|                    if (instruction->avx.broadcast.mode)
  ------------------
  |  Branch (1098:25): [True: 0, False: 0]
  ------------------
 1099|      0|                    {
 1100|      0|                        operand->size = context->evex.element_size;
 1101|      0|                    } else
 1102|      0|                    {
 1103|      0|                        operand->size = (ZyanU16)instruction->avx.vector_length / 2;
 1104|      0|                    }
 1105|      0|                    break;
 1106|      0|                case ZYDIS_TUPLETYPE_QUARTER:
  ------------------
  |  Branch (1106:17): [True: 0, False: 2]
  ------------------
 1107|      0|                    if (instruction->avx.broadcast.mode)
  ------------------
  |  Branch (1107:25): [True: 0, False: 0]
  ------------------
 1108|      0|                    {
 1109|      0|                        operand->size = context->evex.element_size;
 1110|      0|                    }
 1111|      0|                    else
 1112|      0|                    {
 1113|      0|                        operand->size = (ZyanU16)instruction->avx.vector_length / 4;
 1114|      0|                    }
 1115|      0|                    break;
 1116|      0|                default:
  ------------------
  |  Branch (1116:17): [True: 0, False: 2]
  ------------------
 1117|      0|                    ZYAN_UNREACHABLE;
  ------------------
  |  |  431|      0|#   define ZYAN_UNREACHABLE { assert(0); abort(); }
  ------------------
  |  Branch (1117:21): [Folded, False: 0]
  |  Branch (1117:21): [Folded, False: 0]
  ------------------
 1118|      2|                }
 1119|       |
 1120|      2|                ZYAN_ASSERT(operand->size);
  ------------------
  |  |  381|      2|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (1120:17): [True: 0, False: 2]
  |  Branch (1120:17): [True: 2, False: 0]
  ------------------
 1121|      2|            }
 1122|       |#else
 1123|       |            ZYAN_UNREACHABLE;
 1124|       |#endif
 1125|     24|            break;
 1126|     24|        case ZYDIS_INSTRUCTION_ENCODING_MVEX:
  ------------------
  |  Branch (1126:9): [True: 0, False: 68]
  ------------------
 1127|      0|#ifndef ZYDIS_DISABLE_KNC
 1128|      0|            if (size[context->eosz_index])
  ------------------
  |  Branch (1128:17): [True: 0, False: 0]
  ------------------
 1129|      0|            {
 1130|       |                // Operand size is hardcoded
 1131|      0|                operand->size = size[context->eosz_index] * 8;
 1132|      0|            } else
 1133|      0|            {
 1134|      0|                ZYAN_ASSERT(definition->element_type == ZYDIS_IELEMENT_TYPE_VARIABLE);
  ------------------
  |  |  381|      0|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (1134:17): [True: 0, False: 0]
  |  Branch (1134:17): [True: 0, False: 0]
  ------------------
 1135|      0|                ZYAN_ASSERT(instruction->avx.vector_length == 512);
  ------------------
  |  |  381|      0|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (1135:17): [True: 0, False: 0]
  |  Branch (1135:17): [True: 0, False: 0]
  ------------------
 1136|       |
 1137|      0|                switch (instruction->avx.conversion.mode)
 1138|      0|                {
 1139|      0|                case ZYDIS_CONVERSION_MODE_NONE:
  ------------------
  |  Branch (1139:17): [True: 0, False: 0]
  ------------------
 1140|      0|                    operand->size = 512;
 1141|      0|                    switch (context->mvex.functionality)
 1142|      0|                    {
 1143|      0|                    case ZYDIS_MVEX_FUNC_SF_32:
  ------------------
  |  Branch (1143:21): [True: 0, False: 0]
  ------------------
 1144|      0|                    case ZYDIS_MVEX_FUNC_SF_32_BCST_4TO16:
  ------------------
  |  Branch (1144:21): [True: 0, False: 0]
  ------------------
 1145|      0|                    case ZYDIS_MVEX_FUNC_UF_32:
  ------------------
  |  Branch (1145:21): [True: 0, False: 0]
  ------------------
 1146|      0|                    case ZYDIS_MVEX_FUNC_DF_32:
  ------------------
  |  Branch (1146:21): [True: 0, False: 0]
  ------------------
 1147|      0|                        operand->element_type = ZYDIS_ELEMENT_TYPE_FLOAT32;
 1148|      0|                        operand->element_size = 32;
 1149|      0|                        break;
 1150|      0|                    case ZYDIS_MVEX_FUNC_SF_32_BCST:
  ------------------
  |  Branch (1150:21): [True: 0, False: 0]
  ------------------
 1151|      0|                        operand->size = 256;
 1152|      0|                        operand->element_type = ZYDIS_ELEMENT_TYPE_FLOAT32;
 1153|      0|                        operand->element_size = 32;
 1154|      0|                        break;
 1155|      0|                    case ZYDIS_MVEX_FUNC_SI_32:
  ------------------
  |  Branch (1155:21): [True: 0, False: 0]
  ------------------
 1156|      0|                    case ZYDIS_MVEX_FUNC_SI_32_BCST_4TO16:
  ------------------
  |  Branch (1156:21): [True: 0, False: 0]
  ------------------
 1157|      0|                    case ZYDIS_MVEX_FUNC_UI_32:
  ------------------
  |  Branch (1157:21): [True: 0, False: 0]
  ------------------
 1158|      0|                    case ZYDIS_MVEX_FUNC_DI_32:
  ------------------
  |  Branch (1158:21): [True: 0, False: 0]
  ------------------
 1159|      0|                        operand->element_type = ZYDIS_ELEMENT_TYPE_INT;
 1160|      0|                        operand->element_size = 32;
 1161|      0|                        break;
 1162|      0|                    case ZYDIS_MVEX_FUNC_SI_32_BCST:
  ------------------
  |  Branch (1162:21): [True: 0, False: 0]
  ------------------
 1163|      0|                        operand->size = 256;
 1164|      0|                        operand->element_type = ZYDIS_ELEMENT_TYPE_INT;
 1165|      0|                        operand->element_size = 32;
 1166|      0|                        break;
 1167|      0|                    case ZYDIS_MVEX_FUNC_SF_64:
  ------------------
  |  Branch (1167:21): [True: 0, False: 0]
  ------------------
 1168|      0|                    case ZYDIS_MVEX_FUNC_UF_64:
  ------------------
  |  Branch (1168:21): [True: 0, False: 0]
  ------------------
 1169|      0|                    case ZYDIS_MVEX_FUNC_DF_64:
  ------------------
  |  Branch (1169:21): [True: 0, False: 0]
  ------------------
 1170|      0|                        operand->element_type = ZYDIS_ELEMENT_TYPE_FLOAT64;
 1171|      0|                        operand->element_size = 64;
 1172|      0|                        break;
 1173|      0|                    case ZYDIS_MVEX_FUNC_SI_64:
  ------------------
  |  Branch (1173:21): [True: 0, False: 0]
  ------------------
 1174|      0|                    case ZYDIS_MVEX_FUNC_UI_64:
  ------------------
  |  Branch (1174:21): [True: 0, False: 0]
  ------------------
 1175|      0|                    case ZYDIS_MVEX_FUNC_DI_64:
  ------------------
  |  Branch (1175:21): [True: 0, False: 0]
  ------------------
 1176|      0|                        operand->element_type = ZYDIS_ELEMENT_TYPE_INT;
 1177|      0|                        operand->element_size = 64;
 1178|      0|                        break;
 1179|      0|                    default:
  ------------------
  |  Branch (1179:21): [True: 0, False: 0]
  ------------------
 1180|      0|                        ZYAN_UNREACHABLE;
  ------------------
  |  |  431|      0|#   define ZYAN_UNREACHABLE { assert(0); abort(); }
  ------------------
  |  Branch (1180:25): [Folded, False: 0]
  |  Branch (1180:25): [Folded, False: 0]
  ------------------
 1181|      0|                    }
 1182|      0|                    break;
 1183|      0|                case ZYDIS_CONVERSION_MODE_FLOAT16:
  ------------------
  |  Branch (1183:17): [True: 0, False: 0]
  ------------------
 1184|      0|                    operand->size = 256;
 1185|      0|                    operand->element_type = ZYDIS_ELEMENT_TYPE_FLOAT16;
 1186|      0|                    operand->element_size = 16;
 1187|      0|                    break;
 1188|      0|                case ZYDIS_CONVERSION_MODE_SINT16:
  ------------------
  |  Branch (1188:17): [True: 0, False: 0]
  ------------------
 1189|      0|                    operand->size = 256;
 1190|      0|                    operand->element_type = ZYDIS_ELEMENT_TYPE_INT;
 1191|      0|                    operand->element_size = 16;
 1192|      0|                    break;
 1193|      0|                case ZYDIS_CONVERSION_MODE_UINT16:
  ------------------
  |  Branch (1193:17): [True: 0, False: 0]
  ------------------
 1194|      0|                    operand->size = 256;
 1195|      0|                    operand->element_type = ZYDIS_ELEMENT_TYPE_UINT;
 1196|      0|                    operand->element_size = 16;
 1197|      0|                    break;
 1198|      0|                case ZYDIS_CONVERSION_MODE_SINT8:
  ------------------
  |  Branch (1198:17): [True: 0, False: 0]
  ------------------
 1199|      0|                    operand->size = 128;
 1200|      0|                    operand->element_type = ZYDIS_ELEMENT_TYPE_INT;
 1201|      0|                    operand->element_size = 8;
 1202|      0|                    break;
 1203|      0|                case ZYDIS_CONVERSION_MODE_UINT8:
  ------------------
  |  Branch (1203:17): [True: 0, False: 0]
  ------------------
 1204|      0|                    operand->size = 128;
 1205|      0|                    operand->element_type = ZYDIS_ELEMENT_TYPE_UINT;
 1206|      0|                    operand->element_size = 8;
 1207|      0|                    break;
 1208|      0|                default:
  ------------------
  |  Branch (1208:17): [True: 0, False: 0]
  ------------------
 1209|      0|                    ZYAN_UNREACHABLE;
  ------------------
  |  |  431|      0|#   define ZYAN_UNREACHABLE { assert(0); abort(); }
  ------------------
  |  Branch (1209:21): [Folded, False: 0]
  |  Branch (1209:21): [Folded, False: 0]
  ------------------
 1210|      0|                }
 1211|       |
 1212|      0|                switch (instruction->avx.broadcast.mode)
 1213|      0|                {
 1214|      0|                case ZYDIS_BROADCAST_MODE_NONE:
  ------------------
  |  Branch (1214:17): [True: 0, False: 0]
  ------------------
 1215|       |                    // Nothing to do here
 1216|      0|                    break;
 1217|      0|                case ZYDIS_BROADCAST_MODE_1_TO_8:
  ------------------
  |  Branch (1217:17): [True: 0, False: 0]
  ------------------
 1218|      0|                case ZYDIS_BROADCAST_MODE_1_TO_16:
  ------------------
  |  Branch (1218:17): [True: 0, False: 0]
  ------------------
 1219|      0|                    operand->size = operand->element_size;
 1220|      0|                    break;
 1221|      0|                case ZYDIS_BROADCAST_MODE_4_TO_8:
  ------------------
  |  Branch (1221:17): [True: 0, False: 0]
  ------------------
 1222|      0|                case ZYDIS_BROADCAST_MODE_4_TO_16:
  ------------------
  |  Branch (1222:17): [True: 0, False: 0]
  ------------------
 1223|      0|                    operand->size = operand->element_size * 4;
 1224|      0|                    break;
 1225|      0|                default:
  ------------------
  |  Branch (1225:17): [True: 0, False: 0]
  ------------------
 1226|      0|                    ZYAN_UNREACHABLE;
  ------------------
  |  |  431|      0|#   define ZYAN_UNREACHABLE { assert(0); abort(); }
  ------------------
  |  Branch (1226:21): [Folded, False: 0]
  |  Branch (1226:21): [Folded, False: 0]
  ------------------
 1227|      0|                }
 1228|      0|            }
 1229|       |#else
 1230|       |            ZYAN_UNREACHABLE;
 1231|       |#endif
 1232|      0|            break;
 1233|      0|        default:
  ------------------
  |  Branch (1233:9): [True: 0, False: 68]
  ------------------
 1234|      0|            ZYAN_UNREACHABLE;
  ------------------
  |  |  431|      0|#   define ZYAN_UNREACHABLE { assert(0); abort(); }
  ------------------
  |  Branch (1234:13): [Folded, False: 0]
  |  Branch (1234:13): [Folded, False: 0]
  ------------------
 1235|     68|        }
 1236|     68|        break;
 1237|     68|    case ZYDIS_OPERAND_TYPE_POINTER:
  ------------------
  |  Branch (1237:5): [True: 8, False: 434]
  ------------------
 1238|      8|        ZYAN_ASSERT((instruction->raw.imm[0].size == 16) ||
  ------------------
  |  |  381|      8|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (1238:9): [True: 8, False: 0]
  |  Branch (1238:9): [True: 0, False: 0]
  |  Branch (1238:9): [True: 2, False: 6]
  |  Branch (1238:9): [True: 6, False: 0]
  ------------------
 1239|      8|                    (instruction->raw.imm[0].size == 32));
 1240|      8|        ZYAN_ASSERT( instruction->raw.imm[1].size == 16);
  ------------------
  |  |  381|      8|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (1240:9): [True: 0, False: 8]
  |  Branch (1240:9): [True: 8, False: 0]
  ------------------
 1241|      8|        operand->size = instruction->raw.imm[0].size + instruction->raw.imm[1].size;
 1242|      8|        break;
 1243|     82|    case ZYDIS_OPERAND_TYPE_IMMEDIATE:
  ------------------
  |  Branch (1243:5): [True: 82, False: 360]
  ------------------
 1244|     82|        operand->size = size[context->eosz_index] * 8;
 1245|     82|        break;
 1246|      0|    default:
  ------------------
  |  Branch (1246:5): [True: 0, False: 442]
  ------------------
 1247|      0|        ZYAN_UNREACHABLE;
  ------------------
  |  |  431|      0|#   define ZYAN_UNREACHABLE { assert(0); abort(); }
  ------------------
  |  Branch (1247:9): [Folded, False: 0]
  |  Branch (1247:9): [Folded, False: 0]
  ------------------
 1248|    442|    }
 1249|       |
 1250|       |    // Element-type and -size
 1251|    442|    ZydisElementSize element_slot = 0;
 1252|    442|    if (definition->element_type && (definition->element_type != ZYDIS_IELEMENT_TYPE_VARIABLE))
  ------------------
  |  Branch (1252:9): [True: 292, False: 150]
  |  Branch (1252:37): [True: 292, False: 0]
  ------------------
 1253|    292|    {
 1254|    292|        ZydisGetElementInfo(definition->element_type, &operand->element_type,
 1255|    292|            &operand->element_size, &element_slot);
 1256|    292|        if (!operand->element_size)
  ------------------
  |  Branch (1256:13): [True: 128, False: 164]
  ------------------
 1257|    128|        {
 1258|       |            // The element size is the same as the operand size. This is used for single element
 1259|       |            // scaling operands
 1260|    128|            operand->element_size = operand->size;
 1261|    128|        }
 1262|    292|    }
 1263|       |
 1264|       |    // Element count
 1265|    442|    if (operand->element_size && operand->size && (operand->element_type != ZYDIS_ELEMENT_TYPE_CC))
  ------------------
  |  Branch (1265:9): [True: 442, False: 0]
  |  Branch (1265:34): [True: 442, False: 0]
  |  Branch (1265:51): [True: 442, False: 0]
  ------------------
 1266|    442|    {
 1267|    442|        if (!element_slot)
  ------------------
  |  Branch (1267:13): [True: 442, False: 0]
  ------------------
 1268|    442|        {
 1269|    442|            element_slot = operand->element_size;
 1270|    442|        }
 1271|    442|        operand->element_count = operand->size / element_slot;
 1272|    442|    } else
 1273|      0|    {
 1274|      0|        operand->element_count = 1; // TODO: Should probably be 0
 1275|      0|    }
 1276|    442|}

ZydisGetOpcodeTableRootNode:
  128|    276|{
  129|    276|    ZYAN_ASSERT((ZyanUSize)opcode_table_id < ZYAN_ARRAY_LENGTH(OPCODE_TABLE_TREES));
  ------------------
  |  |  381|    276|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (129:5): [True: 0, False: 276]
  |  Branch (129:5): [True: 276, False: 0]
  ------------------
  130|       |
  131|    276|    return OPCODE_TABLE_TREES[opcode_table_id];
  132|    276|}
ZydisGetInstructionEncodingInfo:
  136|    174|{
  137|    174|    ZYAN_ASSERT(ZYDIS_DT_GET_TYPE(node) == ZYDIS_NODETYPE_DEFINITION);
  ------------------
  |  |  381|    174|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (137:5): [True: 0, False: 174]
  |  Branch (137:5): [True: 174, False: 0]
  ------------------
  138|    174|    const ZyanU8 encoding_id = ZYDIS_DT_GET_ARG0(node);
  ------------------
  |  |  359|    174|    ((ZyanU8)(((*(node)) >> 8) & 0xFF))
  ------------------
  139|       |
  140|    174|    ZYAN_ASSERT((ZyanUSize)encoding_id < ZYAN_ARRAY_LENGTH(INSTR_ENCODINGS));
  ------------------
  |  |  381|    174|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (140:5): [True: 0, False: 174]
  |  Branch (140:5): [True: 174, False: 0]
  ------------------
  141|    174|    *info = &INSTR_ENCODINGS[encoding_id];
  142|    174|}

ZydisEncoderEncodeInstruction:
 4635|  3.16k|{
 4636|  3.16k|    if (!request || !buffer || !length)
  ------------------
  |  Branch (4636:9): [True: 0, False: 3.16k]
  |  Branch (4636:21): [True: 0, False: 3.16k]
  |  Branch (4636:32): [True: 0, False: 3.16k]
  ------------------
 4637|      0|    {
 4638|      0|        return ZYAN_STATUS_INVALID_ARGUMENT;
  ------------------
  |  |  188|      0|    ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ZYCORE, 0x04u)
  |  |  ------------------
  |  |  |  |   68|      0|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
 4639|      0|    }
 4640|  3.16k|    ZYAN_CHECK(ZydisEncoderCheckRequestSanity(request));
  ------------------
  |  |  100|  3.16k|    do \
  |  |  101|  3.16k|    { \
  |  |  102|  3.16k|        const ZyanStatus status_047620348 = (status); \
  |  |  103|  3.16k|        if (!ZYAN_SUCCESS(status_047620348)) \
  |  |  ------------------
  |  |  |  |   82|  3.16k|    (!((status) & 0x80000000u))
  |  |  ------------------
  |  |  |  Branch (103:13): [True: 55, False: 3.11k]
  |  |  ------------------
  |  |  104|  3.16k|        { \
  |  |  105|     55|            return status_047620348; \
  |  |  106|     55|        } \
  |  |  107|  3.16k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (107:14): [Folded, False: 3.11k]
  |  |  ------------------
  ------------------
 4641|       |
 4642|  3.11k|    ZydisEncoderInstruction instruction;
 4643|  3.11k|    return ZydisEncoderEncodeInstructionInternal(request, buffer, length, &instruction);
 4644|  3.16k|}
ZydisEncoderEncodeInstructionAbsolute:
 4648|     27|{
 4649|     27|    if (!request || !buffer || !length)
  ------------------
  |  Branch (4649:9): [True: 0, False: 27]
  |  Branch (4649:21): [True: 0, False: 27]
  |  Branch (4649:32): [True: 0, False: 27]
  ------------------
 4650|      0|    {
 4651|      0|        return ZYAN_STATUS_INVALID_ARGUMENT;
  ------------------
  |  |  188|      0|    ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ZYCORE, 0x04u)
  |  |  ------------------
  |  |  |  |   68|      0|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
 4652|      0|    }
 4653|     27|    ZYAN_CHECK(ZydisEncoderCheckRequestSanity(request));
  ------------------
  |  |  100|     27|    do \
  |  |  101|     27|    { \
  |  |  102|     27|        const ZyanStatus status_047620348 = (status); \
  |  |  103|     27|        if (!ZYAN_SUCCESS(status_047620348)) \
  |  |  ------------------
  |  |  |  |   82|     27|    (!((status) & 0x80000000u))
  |  |  ------------------
  |  |  |  Branch (103:13): [True: 0, False: 27]
  |  |  ------------------
  |  |  104|     27|        { \
  |  |  105|      0|            return status_047620348; \
  |  |  106|      0|        } \
  |  |  107|     27|    } while (0)
  |  |  ------------------
  |  |  |  Branch (107:14): [Folded, False: 27]
  |  |  ------------------
  ------------------
 4654|       |
 4655|     27|    const ZydisEncoderRelInfo *rel_info = ZydisGetRelInfo(request->mnemonic);
 4656|     27|    ZydisEncoderOperand *op_rip_rel = ZYAN_NULL;
  ------------------
  |  |  277|     27|#define ZYAN_NULL ((void*)0)
  ------------------
 4657|     27|    ZyanBool adjusted_rel = ZYAN_FALSE;
  ------------------
  |  |  287|     27|#define ZYAN_FALSE 0u
  ------------------
 4658|     27|    ZyanU64 absolute_address = 0;
 4659|     27|    ZyanU8 mode_index = ZydisGetMachineModeWidth(request->machine_mode) >> 5;
 4660|     70|    for (ZyanU8 i = 0; i < request->operand_count; ++i)
  ------------------
  |  Branch (4660:24): [True: 43, False: 27]
  ------------------
 4661|     43|    {
 4662|     43|        ZydisEncoderOperand *op = &request->operands[i];
 4663|     43|        if ((op->type == ZYDIS_OPERAND_TYPE_IMMEDIATE) && rel_info)
  ------------------
  |  Branch (4663:13): [True: 15, False: 28]
  |  Branch (4663:59): [True: 13, False: 2]
  ------------------
 4664|     13|        {
 4665|     13|            if (adjusted_rel)
  ------------------
  |  Branch (4665:17): [True: 0, False: 13]
  ------------------
 4666|      0|            {
 4667|      0|                return ZYAN_STATUS_INVALID_ARGUMENT;
  ------------------
  |  |  188|      0|    ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ZYCORE, 0x04u)
  |  |  ------------------
  |  |  |  |   68|      0|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
 4668|      0|            }
 4669|       |
 4670|     13|            switch (rel_info->accepts_scaling_hints)
 4671|     13|            {
 4672|     11|            case ZYDIS_SIZE_HINT_NONE:
  ------------------
  |  Branch (4672:13): [True: 11, False: 2]
  ------------------
 4673|     11|            case ZYDIS_SIZE_HINT_OSZ:
  ------------------
  |  Branch (4673:13): [True: 0, False: 13]
  ------------------
 4674|     11|            {
 4675|     11|                static const ZyanI8 asz_priority[3][3] =
 4676|     11|                {
 4677|     11|                    { 0, 1, 2 },
 4678|     11|                    { 0, 2, 1 },
 4679|     11|                    { 0, 2, -1 },
 4680|     11|                };
 4681|     11|                static const ZyanI8 osz_priority[3][3] =
 4682|     11|                {
 4683|     11|                    { 0, 1, 2 },
 4684|     11|                    { 0, 2, 1 },
 4685|     11|                    { 0, 2, 1 },
 4686|     11|                };
 4687|     11|                ZyanI8 forced_priority_row[3] = { -1, -1, -1 };
 4688|     11|                ZyanI8 *priority_row = ZYAN_NULL;
  ------------------
  |  |  277|     11|#define ZYAN_NULL ((void*)0)
  ------------------
 4689|     11|                ZyanU8 extra_length = 0;
 4690|     11|                ZyanU8 start_offset = 0;
 4691|     11|                if (rel_info->accepts_scaling_hints == ZYDIS_SIZE_HINT_NONE)
  ------------------
  |  Branch (4691:21): [True: 11, False: 0]
  ------------------
 4692|     11|                {
 4693|     11|                    if ((request->branch_type == ZYDIS_BRANCH_TYPE_FAR) ||
  ------------------
  |  Branch (4693:25): [True: 0, False: 11]
  ------------------
 4694|     11|                        (request->branch_width == ZYDIS_BRANCH_WIDTH_64))
  ------------------
  |  Branch (4694:25): [True: 0, False: 11]
  ------------------
 4695|      0|                    {
 4696|      0|                        return ZYAN_STATUS_INVALID_ARGUMENT;
  ------------------
  |  |  188|      0|    ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ZYCORE, 0x04u)
  |  |  ------------------
  |  |  |  |   68|      0|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
 4697|      0|                    }
 4698|     11|                    if ((rel_info->accepts_branch_hints) &&
  ------------------
  |  Branch (4698:25): [True: 8, False: 3]
  ------------------
 4699|      8|                        (request->prefixes & (ZYDIS_ATTRIB_HAS_BRANCH_NOT_TAKEN |
  ------------------
  |  |  692|      8|#define ZYDIS_ATTRIB_HAS_BRANCH_NOT_TAKEN       (1ULL << 34)
  ------------------
  |  Branch (4699:25): [True: 0, False: 8]
  ------------------
 4700|      8|                                              ZYDIS_ATTRIB_HAS_BRANCH_TAKEN)))
  ------------------
  |  |  696|      8|#define ZYDIS_ATTRIB_HAS_BRANCH_TAKEN           (1ULL << 35)
  ------------------
 4701|      0|                    {
 4702|      0|                        extra_length += 1;
 4703|      0|                    }
 4704|     11|                    if ((rel_info->accepts_bound) && (request->prefixes & ZYDIS_ATTRIB_HAS_BND))
  ------------------
  |  |  680|     11|#define ZYDIS_ATTRIB_HAS_BND                    (1ULL << 31)
  ------------------
  |  Branch (4704:25): [True: 11, False: 0]
  |  Branch (4704:54): [True: 1, False: 10]
  ------------------
 4705|      1|                    {
 4706|      1|                        extra_length += 1;
 4707|       |                        // `BND` prefix is not accepted for short `JMP` (Intel SDM Vol. 1)
 4708|      1|                        if ((request->mnemonic == ZYDIS_MNEMONIC_JMP) &&
  ------------------
  |  Branch (4708:29): [True: 1, False: 0]
  ------------------
 4709|      1|                            (request->branch_type == ZYDIS_BRANCH_TYPE_NONE) &&
  ------------------
  |  Branch (4709:29): [True: 0, False: 1]
  ------------------
 4710|      0|                            (request->branch_width == ZYDIS_BRANCH_WIDTH_NONE))
  ------------------
  |  Branch (4710:29): [True: 0, False: 0]
  ------------------
 4711|      0|                        {
 4712|      0|                            start_offset = 1;
 4713|      0|                        }
 4714|      1|                    }
 4715|     11|                    if (request->branch_width == ZYDIS_BRANCH_WIDTH_NONE)
  ------------------
  |  Branch (4715:25): [True: 0, False: 11]
  ------------------
 4716|      0|                    {
 4717|      0|                        if (request->branch_type == ZYDIS_BRANCH_TYPE_NEAR)
  ------------------
  |  Branch (4717:29): [True: 0, False: 0]
  ------------------
 4718|      0|                        {
 4719|      0|                            start_offset = 1;
 4720|      0|                        }
 4721|      0|                        priority_row = (ZyanI8 *)&asz_priority[mode_index];
 4722|      0|                    }
 4723|     11|                    else
 4724|     11|                    {
 4725|     11|                        forced_priority_row[0] = (ZyanI8)(request->branch_width - 1);
 4726|     11|                        priority_row = (ZyanI8 *)&forced_priority_row;
 4727|     11|                    }
 4728|     11|                }
 4729|      0|                else
 4730|      0|                {
 4731|      0|                    if (request->operand_size_hint == ZYDIS_OPERAND_SIZE_HINT_NONE)
  ------------------
  |  Branch (4731:25): [True: 0, False: 0]
  ------------------
 4732|      0|                    {
 4733|      0|                        priority_row = (ZyanI8 *)&osz_priority[mode_index];
 4734|      0|                    }
 4735|      0|                    else
 4736|      0|                    {
 4737|      0|                        if (request->operand_size_hint == ZYDIS_OPERAND_SIZE_HINT_64)
  ------------------
  |  Branch (4737:29): [True: 0, False: 0]
  ------------------
 4738|      0|                        {
 4739|      0|                            extra_length = 1;
 4740|      0|                            forced_priority_row[0] = 2;
 4741|      0|                        }
 4742|      0|                        else
 4743|      0|                        {
 4744|      0|                            forced_priority_row[0] = (ZyanI8)(request->operand_size_hint - 1);
 4745|      0|                        }
 4746|      0|                        priority_row = (ZyanI8 *)&forced_priority_row;
 4747|      0|                    }
 4748|      0|                }
 4749|     11|                ZYAN_ASSERT(ZYAN_ARRAY_LENGTH(asz_priority[0]) ==
  ------------------
  |  |  381|     11|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (4749:17): [True: 0, Folded]
  |  Branch (4749:17): [True: 11, Folded]
  ------------------
 4750|     11|                            ZYAN_ARRAY_LENGTH(osz_priority[0]));
 4751|     11|                for (ZyanU8 j = start_offset; j < ZYAN_ARRAY_LENGTH(asz_priority[0]); ++j)
  ------------------
  |  |  510|     11|#define ZYAN_ARRAY_LENGTH(a) (sizeof(a) / sizeof((a)[0]))
  ------------------
  |  Branch (4751:47): [True: 11, False: 0]
  ------------------
 4752|     11|                {
 4753|     11|                    ZyanI8 size_index = priority_row[j];
 4754|     11|                    if (size_index < 0)
  ------------------
  |  Branch (4754:25): [True: 0, False: 11]
  ------------------
 4755|      0|                    {
 4756|      0|                        break;
 4757|      0|                    }
 4758|     11|                    ZyanU8 base_size = rel_info->size[mode_index][size_index];
 4759|     11|                    if (base_size == 0)
  ------------------
  |  Branch (4759:25): [True: 0, False: 11]
  ------------------
 4760|      0|                    {
 4761|      0|                        continue;
 4762|      0|                    }
 4763|     11|                    ZyanU8 predicted_size = base_size + extra_length;
 4764|     11|                    if (runtime_address > ZYAN_UINT64_MAX - predicted_size + 1)
  ------------------
  |  |  240|     11|#   define ZYAN_UINT64_MAX       UINT64_MAX
  ------------------
  |  Branch (4764:25): [True: 0, False: 11]
  ------------------
 4765|      0|                    {
 4766|      0|                        continue;
 4767|      0|                    }
 4768|     11|                    ZyanI64 rel = (ZyanI64)(op->imm.u - (runtime_address + predicted_size));
 4769|     11|                    ZyanU8 rel_size = ZydisGetSignedImmSize(rel);
 4770|     11|                    if (rel_size > (8 << size_index))
  ------------------
  |  Branch (4770:25): [True: 0, False: 11]
  ------------------
 4771|      0|                    {
 4772|      0|                        continue;
 4773|      0|                    }
 4774|     11|                    op->imm.s = rel;
 4775|     11|                    adjusted_rel = ZYAN_TRUE;
  ------------------
  |  |  288|     11|#define ZYAN_TRUE  1u
  ------------------
 4776|     11|                    if (rel_info->accepts_scaling_hints == ZYDIS_SIZE_HINT_NONE)
  ------------------
  |  Branch (4776:25): [True: 11, False: 0]
  ------------------
 4777|     11|                    {
 4778|     11|                        if (request->branch_width == ZYDIS_BRANCH_WIDTH_NONE)
  ------------------
  |  Branch (4778:29): [True: 0, False: 11]
  ------------------
 4779|      0|                        {
 4780|      0|                            request->branch_width =
 4781|      0|                                (ZydisBranchWidth)(ZYDIS_BRANCH_WIDTH_8 + size_index);
 4782|      0|                        }
 4783|     11|                    }
 4784|      0|                    else
 4785|      0|                    {
 4786|      0|                        if (request->operand_size_hint == ZYDIS_OPERAND_SIZE_HINT_NONE)
  ------------------
  |  Branch (4786:29): [True: 0, False: 0]
  ------------------
 4787|      0|                        {
 4788|      0|                            request->operand_size_hint =
 4789|      0|                                (ZydisOperandSizeHint)(ZYDIS_OPERAND_SIZE_HINT_8 + size_index);
 4790|      0|                        }
 4791|      0|                    }
 4792|     11|                    break;
 4793|     11|                }
 4794|     11|                break;
 4795|     11|            }
 4796|      2|            case ZYDIS_SIZE_HINT_ASZ:
  ------------------
  |  Branch (4796:13): [True: 2, False: 11]
  ------------------
 4797|      2|            {
 4798|      2|                static const ZyanI8 asz_prefix_lookup[3][ZYDIS_ADDRESS_SIZE_HINT_MAX_VALUE + 1] =
 4799|      2|                {
 4800|      2|                    { 0, 0, 1, -1 },
 4801|      2|                    { 0, 1, 0, -1 },
 4802|      2|                    { 0, -1, 1, 0 },
 4803|      2|                };
 4804|      2|                ZyanI8 extra_length = asz_prefix_lookup[mode_index][request->address_size_hint];
 4805|      2|                if (extra_length < 0)
  ------------------
  |  Branch (4805:21): [True: 0, False: 2]
  ------------------
 4806|      0|                {
 4807|      0|                    return ZYAN_STATUS_INVALID_ARGUMENT;
  ------------------
  |  |  188|      0|    ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ZYCORE, 0x04u)
  |  |  ------------------
  |  |  |  |   68|      0|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
 4808|      0|                }
 4809|      2|                ZyanU8 asz_index = (request->address_size_hint == ZYDIS_ADDRESS_SIZE_HINT_NONE)
  ------------------
  |  Branch (4809:36): [True: 0, False: 2]
  ------------------
 4810|      2|                    ? mode_index
 4811|      2|                    : ZydisGetAszFromHint(request->address_size_hint) >> 5;
 4812|      2|                ZYAN_ASSERT((rel_info->size[asz_index][0] != 0) &&
  ------------------
  |  |  381|      2|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (4812:17): [True: 0, False: 2]
  |  Branch (4812:17): [True: 0, False: 0]
  |  Branch (4812:17): [True: 0, False: 0]
  |  Branch (4812:17): [True: 0, False: 0]
  |  Branch (4812:17): [True: 2, False: 0]
  |  Branch (4812:17): [True: 2, False: 0]
  |  Branch (4812:17): [True: 2, False: 0]
  |  Branch (4812:17): [True: 2, False: 0]
  ------------------
 4813|      2|                            (rel_info->size[asz_index][1] == 0) &&
 4814|      2|                            (rel_info->size[asz_index][2] == 0) &&
 4815|      2|                            !rel_info->accepts_branch_hints);
 4816|      2|                ZyanU8 predicted_size = rel_info->size[asz_index][0] + extra_length;
 4817|      2|                if (runtime_address > ZYAN_UINT64_MAX - predicted_size + 1)
  ------------------
  |  |  240|      2|#   define ZYAN_UINT64_MAX       UINT64_MAX
  ------------------
  |  Branch (4817:21): [True: 0, False: 2]
  ------------------
 4818|      0|                {
 4819|      0|                    return ZYAN_STATUS_INVALID_ARGUMENT;
  ------------------
  |  |  188|      0|    ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ZYCORE, 0x04u)
  |  |  ------------------
  |  |  |  |   68|      0|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
 4820|      0|                }
 4821|      2|                ZyanI64 rel = (ZyanI64)(op->imm.u - (runtime_address + predicted_size));
 4822|      2|                ZyanU8 rel_size = ZydisGetSignedImmSize(rel);
 4823|      2|                if (rel_size > 8)
  ------------------
  |  Branch (4823:21): [True: 0, False: 2]
  ------------------
 4824|      0|                {
 4825|      0|                    return ZYAN_STATUS_INVALID_ARGUMENT;
  ------------------
  |  |  188|      0|    ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ZYCORE, 0x04u)
  |  |  ------------------
  |  |  |  |   68|      0|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
 4826|      0|                }
 4827|      2|                op->imm.s = rel;
 4828|      2|                adjusted_rel = ZYAN_TRUE;
  ------------------
  |  |  288|      2|#define ZYAN_TRUE  1u
  ------------------
 4829|      2|                break;
 4830|      2|            }
 4831|      0|            default:
  ------------------
  |  Branch (4831:13): [True: 0, False: 13]
  ------------------
 4832|      0|                ZYAN_UNREACHABLE;
  ------------------
  |  |  431|      0|#   define ZYAN_UNREACHABLE { assert(0); abort(); }
  ------------------
  |  Branch (4832:17): [Folded, False: 0]
  |  Branch (4832:17): [Folded, False: 0]
  ------------------
 4833|     13|            }
 4834|     13|            if (!adjusted_rel)
  ------------------
  |  Branch (4834:17): [True: 0, False: 13]
  ------------------
 4835|      0|            {
 4836|      0|                return ZYAN_STATUS_INVALID_ARGUMENT;
  ------------------
  |  |  188|      0|    ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ZYCORE, 0x04u)
  |  |  ------------------
  |  |  |  |   68|      0|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
 4837|      0|            }
 4838|     13|        }
 4839|     30|        else if ((op->type == ZYDIS_OPERAND_TYPE_MEMORY) &&
  ------------------
  |  Branch (4839:18): [True: 14, False: 16]
  ------------------
 4840|     14|                 ((op->mem.base == ZYDIS_REGISTER_EIP) ||
  ------------------
  |  Branch (4840:19): [True: 7, False: 7]
  ------------------
 4841|      7|                  (op->mem.base == ZYDIS_REGISTER_RIP)))
  ------------------
  |  Branch (4841:19): [True: 7, False: 0]
  ------------------
 4842|     14|        {
 4843|     14|            if (op_rip_rel)
  ------------------
  |  Branch (4843:17): [True: 0, False: 14]
  ------------------
 4844|      0|            {
 4845|      0|                return ZYAN_STATUS_INVALID_ARGUMENT;
  ------------------
  |  |  188|      0|    ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ZYCORE, 0x04u)
  |  |  ------------------
  |  |  |  |   68|      0|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
 4846|      0|            }
 4847|       |
 4848|     14|            absolute_address = op->mem.displacement;
 4849|     14|            op->mem.displacement = 0;
 4850|     14|            op_rip_rel = op;
 4851|     14|        }
 4852|     43|    }
 4853|       |
 4854|     27|    ZydisEncoderInstruction instruction;
 4855|     27|    ZYAN_CHECK(ZydisEncoderEncodeInstructionInternal(request, buffer, length, &instruction));
  ------------------
  |  |  100|     27|    do \
  |  |  101|     27|    { \
  |  |  102|     27|        const ZyanStatus status_047620348 = (status); \
  |  |  103|     27|        if (!ZYAN_SUCCESS(status_047620348)) \
  |  |  ------------------
  |  |  |  |   82|     27|    (!((status) & 0x80000000u))
  |  |  ------------------
  |  |  |  Branch (103:13): [True: 0, False: 27]
  |  |  ------------------
  |  |  104|     27|        { \
  |  |  105|      0|            return status_047620348; \
  |  |  106|      0|        } \
  |  |  107|     27|    } while (0)
  |  |  ------------------
  |  |  |  Branch (107:14): [Folded, False: 27]
  |  |  ------------------
  ------------------
 4856|     27|    if (op_rip_rel)
  ------------------
  |  Branch (4856:9): [True: 14, False: 13]
  ------------------
 4857|     14|    {
 4858|     14|        ZyanUSize instruction_size = *length;
 4859|     14|        if (runtime_address > ZYAN_UINT64_MAX - instruction_size + 1)
  ------------------
  |  |  240|     14|#   define ZYAN_UINT64_MAX       UINT64_MAX
  ------------------
  |  Branch (4859:13): [True: 0, False: 14]
  ------------------
 4860|      0|        {
 4861|      0|            return ZYAN_STATUS_INVALID_ARGUMENT;
  ------------------
  |  |  188|      0|    ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ZYCORE, 0x04u)
  |  |  ------------------
  |  |  |  |   68|      0|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
 4862|      0|        }
 4863|     14|        ZyanI64 rip_rel = (ZyanI64)(absolute_address - (runtime_address + instruction_size));
 4864|     14|        if (ZydisGetSignedImmSize(rip_rel) > 32)
  ------------------
  |  Branch (4864:13): [True: 0, False: 14]
  ------------------
 4865|      0|        {
 4866|      0|            return ZYAN_STATUS_INVALID_ARGUMENT;
  ------------------
  |  |  188|      0|    ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ZYCORE, 0x04u)
  |  |  ------------------
  |  |  |  |   68|      0|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
 4867|      0|        }
 4868|     14|        ZYAN_ASSERT(instruction.disp_size != 0);
  ------------------
  |  |  381|     14|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (4868:9): [True: 0, False: 14]
  |  Branch (4868:9): [True: 14, False: 0]
  ------------------
 4869|     14|        ZyanU8 disp_offset = (instruction.disp_size >> 3) + (instruction.imm_size >> 3);
 4870|     14|        if (instruction.encoding == ZYDIS_INSTRUCTION_ENCODING_3DNOW)
  ------------------
  |  Branch (4870:13): [True: 0, False: 14]
  ------------------
 4871|      0|        {
 4872|      0|            disp_offset += 1;
 4873|      0|        }
 4874|     14|        ZYAN_ASSERT(instruction_size > disp_offset);
  ------------------
  |  |  381|     14|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (4874:9): [True: 0, False: 14]
  |  Branch (4874:9): [True: 14, False: 0]
  ------------------
 4875|     14|#if ZYAN_ENDIAN == ZYAN_LITTLE_ENDIAN
 4876|     14|        ZYAN_MEMCPY((ZyanU8 *)buffer + instruction_size - disp_offset, &rip_rel, sizeof(ZyanI32));
  ------------------
  |  |  113|     14|#define ZYAN_MEMCPY     memcpy
  ------------------
 4877|       |#else
 4878|       |        const ZyanU32 rip_rel_le = ZYAN_BYTESWAP32((ZyanU32)rip_rel);
 4879|       |        ZYAN_MEMCPY((ZyanU8 *)buffer + instruction_size - disp_offset, &rip_rel_le,
 4880|       |            sizeof(rip_rel_le));
 4881|       |#endif
 4882|     14|        op_rip_rel->mem.displacement = rip_rel;
 4883|     14|    }
 4884|       |
 4885|     27|    return ZYAN_STATUS_SUCCESS;
  ------------------
  |  |  164|     27|    ZYAN_MAKE_STATUS(0u, ZYAN_MODULE_ZYCORE, 0x00u)
  |  |  ------------------
  |  |  |  |   68|     27|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
 4886|     27|}
ZydisEncoderDecodedInstructionToEncoderRequest:
 4891|     87|{
 4892|     87|    if (!instruction || !request || (operand_count_visible && !operands) ||
  ------------------
  |  Branch (4892:9): [True: 0, False: 87]
  |  Branch (4892:25): [True: 0, False: 87]
  |  Branch (4892:38): [True: 81, False: 6]
  |  Branch (4892:63): [True: 0, False: 81]
  ------------------
 4893|     87|        operand_count_visible != instruction->operand_count_visible)
  ------------------
  |  Branch (4893:9): [True: 0, False: 87]
  ------------------
 4894|      0|    {
 4895|      0|        return ZYAN_STATUS_INVALID_ARGUMENT;
  ------------------
  |  |  188|      0|    ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ZYCORE, 0x04u)
  |  |  ------------------
  |  |  |  |   68|      0|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
 4896|      0|    }
 4897|       |
 4898|     87|    ZYAN_MEMSET(request, 0, sizeof(ZydisEncoderRequest));
  ------------------
  |  |  115|     87|#define ZYAN_MEMSET     memset
  ------------------
 4899|     87|    request->machine_mode = instruction->machine_mode;
 4900|     87|    request->mnemonic = instruction->mnemonic;
 4901|     87|    request->prefixes = instruction->attributes & ZYDIS_ENCODABLE_PREFIXES;
  ------------------
  |  |   65|     87|#define ZYDIS_ENCODABLE_PREFIXES   (ZYDIS_ATTRIB_HAS_LOCK | \
  |  |  ------------------
  |  |  |  |  656|     87|#define ZYDIS_ATTRIB_HAS_LOCK                   (1ULL << 27)
  |  |  ------------------
  |  |   66|     87|                                    ZYDIS_ATTRIB_HAS_REP | \
  |  |  ------------------
  |  |  |  |  660|     87|#define ZYDIS_ATTRIB_HAS_REP                    (1ULL << 28)
  |  |  ------------------
  |  |   67|     87|                                    ZYDIS_ATTRIB_HAS_REPE | \
  |  |  ------------------
  |  |  |  |  664|     87|#define ZYDIS_ATTRIB_HAS_REPE                   (1ULL << 29)
  |  |  ------------------
  |  |   68|     87|                                    ZYDIS_ATTRIB_HAS_REPNE | \
  |  |  ------------------
  |  |  |  |  672|     87|#define ZYDIS_ATTRIB_HAS_REPNE                  (1ULL << 30)
  |  |  ------------------
  |  |   69|     87|                                    ZYDIS_ATTRIB_HAS_BND | \
  |  |  ------------------
  |  |  |  |  680|     87|#define ZYDIS_ATTRIB_HAS_BND                    (1ULL << 31)
  |  |  ------------------
  |  |   70|     87|                                    ZYDIS_ATTRIB_HAS_XACQUIRE | \
  |  |  ------------------
  |  |  |  |  684|     87|#define ZYDIS_ATTRIB_HAS_XACQUIRE               (1ULL << 32)
  |  |  ------------------
  |  |   71|     87|                                    ZYDIS_ATTRIB_HAS_XRELEASE | \
  |  |  ------------------
  |  |  |  |  688|     87|#define ZYDIS_ATTRIB_HAS_XRELEASE               (1ULL << 33)
  |  |  ------------------
  |  |   72|     87|                                    ZYDIS_ATTRIB_HAS_BRANCH_NOT_TAKEN | \
  |  |  ------------------
  |  |  |  |  692|     87|#define ZYDIS_ATTRIB_HAS_BRANCH_NOT_TAKEN       (1ULL << 34)
  |  |  ------------------
  |  |   73|     87|                                    ZYDIS_ATTRIB_HAS_BRANCH_TAKEN | \
  |  |  ------------------
  |  |  |  |  696|     87|#define ZYDIS_ATTRIB_HAS_BRANCH_TAKEN           (1ULL << 35)
  |  |  ------------------
  |  |   74|     87|                                    ZYDIS_ATTRIB_HAS_NOTRACK | \
  |  |  ------------------
  |  |  |  |  700|     87|#define ZYDIS_ATTRIB_HAS_NOTRACK                (1ULL << 36)
  |  |  ------------------
  |  |   75|     87|                                    ZYDIS_ATTRIB_HAS_SEGMENT_CS | \
  |  |  ------------------
  |  |  |  |  704|     87|#define ZYDIS_ATTRIB_HAS_SEGMENT_CS             (1ULL << 37)
  |  |  ------------------
  |  |   76|     87|                                    ZYDIS_ATTRIB_HAS_SEGMENT_SS | \
  |  |  ------------------
  |  |  |  |  708|     87|#define ZYDIS_ATTRIB_HAS_SEGMENT_SS             (1ULL << 38)
  |  |  ------------------
  |  |   77|     87|                                    ZYDIS_ATTRIB_HAS_SEGMENT_DS | \
  |  |  ------------------
  |  |  |  |  712|     87|#define ZYDIS_ATTRIB_HAS_SEGMENT_DS             (1ULL << 39)
  |  |  ------------------
  |  |   78|     87|                                    ZYDIS_ATTRIB_HAS_SEGMENT_ES | \
  |  |  ------------------
  |  |  |  |  716|     87|#define ZYDIS_ATTRIB_HAS_SEGMENT_ES             (1ULL << 40)
  |  |  ------------------
  |  |   79|     87|                                    ZYDIS_ATTRIB_HAS_SEGMENT_FS | \
  |  |  ------------------
  |  |  |  |  720|     87|#define ZYDIS_ATTRIB_HAS_SEGMENT_FS             (1ULL << 41)
  |  |  ------------------
  |  |   80|     87|                                    ZYDIS_ATTRIB_HAS_SEGMENT_GS)
  |  |  ------------------
  |  |  |  |  724|     87|#define ZYDIS_ATTRIB_HAS_SEGMENT_GS             (1ULL << 42)
  |  |  ------------------
  ------------------
 4902|     87|    request->branch_type = (instruction->meta.branch_type != ZYDIS_BRANCH_TYPE_ABSOLUTE)
  ------------------
  |  Branch (4902:28): [True: 87, False: 0]
  ------------------
 4903|     87|        ? instruction->meta.branch_type
 4904|     87|        : ZYDIS_BRANCH_TYPE_NONE;
 4905|     87|    if (!(instruction->attributes & ZYDIS_ATTRIB_ACCEPTS_SEGMENT))
  ------------------
  |  |  652|     87|#define ZYDIS_ATTRIB_ACCEPTS_SEGMENT            (1ULL << 26)
  ------------------
  |  Branch (4905:9): [True: 57, False: 30]
  ------------------
 4906|     57|    {
 4907|     57|        request->prefixes &= ~ZYDIS_ATTRIB_HAS_SEGMENT;
  ------------------
  |  |  728|     57|#define ZYDIS_ATTRIB_HAS_SEGMENT                (ZYDIS_ATTRIB_HAS_SEGMENT_CS | \
  |  |  ------------------
  |  |  |  |  704|     57|#define ZYDIS_ATTRIB_HAS_SEGMENT_CS             (1ULL << 37)
  |  |  ------------------
  |  |  729|     57|                                                 ZYDIS_ATTRIB_HAS_SEGMENT_SS | \
  |  |  ------------------
  |  |  |  |  708|     57|#define ZYDIS_ATTRIB_HAS_SEGMENT_SS             (1ULL << 38)
  |  |  ------------------
  |  |  730|     57|                                                 ZYDIS_ATTRIB_HAS_SEGMENT_DS | \
  |  |  ------------------
  |  |  |  |  712|     57|#define ZYDIS_ATTRIB_HAS_SEGMENT_DS             (1ULL << 39)
  |  |  ------------------
  |  |  731|     57|                                                 ZYDIS_ATTRIB_HAS_SEGMENT_ES | \
  |  |  ------------------
  |  |  |  |  716|     57|#define ZYDIS_ATTRIB_HAS_SEGMENT_ES             (1ULL << 40)
  |  |  ------------------
  |  |  732|     57|                                                 ZYDIS_ATTRIB_HAS_SEGMENT_FS | \
  |  |  ------------------
  |  |  |  |  720|     57|#define ZYDIS_ATTRIB_HAS_SEGMENT_FS             (1ULL << 41)
  |  |  ------------------
  |  |  733|     57|                                                 ZYDIS_ATTRIB_HAS_SEGMENT_GS)
  |  |  ------------------
  |  |  |  |  724|     57|#define ZYDIS_ATTRIB_HAS_SEGMENT_GS             (1ULL << 42)
  |  |  ------------------
  ------------------
 4908|     57|    }
 4909|       |
 4910|     87|    switch (instruction->address_width)
 4911|     87|    {
 4912|     22|    case 16:
  ------------------
  |  Branch (4912:5): [True: 22, False: 65]
  ------------------
 4913|     22|        request->address_size_hint = ZYDIS_ADDRESS_SIZE_HINT_16;
 4914|     22|        break;
 4915|     15|    case 32:
  ------------------
  |  Branch (4915:5): [True: 15, False: 72]
  ------------------
 4916|     15|        request->address_size_hint = ZYDIS_ADDRESS_SIZE_HINT_32;
 4917|     15|        break;
 4918|     50|    case 64:
  ------------------
  |  Branch (4918:5): [True: 50, False: 37]
  ------------------
 4919|     50|        request->address_size_hint = ZYDIS_ADDRESS_SIZE_HINT_64;
 4920|     50|        break;
 4921|      0|    default:
  ------------------
  |  Branch (4921:5): [True: 0, False: 87]
  ------------------
 4922|      0|        return ZYAN_STATUS_INVALID_ARGUMENT;
  ------------------
  |  |  188|      0|    ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ZYCORE, 0x04u)
  |  |  ------------------
  |  |  |  |   68|      0|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
 4923|     87|    }
 4924|       |
 4925|     87|    switch (instruction->operand_width)
 4926|     87|    {
 4927|      8|    case 8:
  ------------------
  |  Branch (4927:5): [True: 8, False: 79]
  ------------------
 4928|      8|        request->operand_size_hint = ZYDIS_OPERAND_SIZE_HINT_8;
 4929|      8|        break;
 4930|     14|    case 16:
  ------------------
  |  Branch (4930:5): [True: 14, False: 73]
  ------------------
 4931|     14|        request->operand_size_hint = ZYDIS_OPERAND_SIZE_HINT_16;
 4932|     14|        break;
 4933|     31|    case 32:
  ------------------
  |  Branch (4933:5): [True: 31, False: 56]
  ------------------
 4934|     31|        request->operand_size_hint = ZYDIS_OPERAND_SIZE_HINT_32;
 4935|     31|        break;
 4936|     34|    case 64:
  ------------------
  |  Branch (4936:5): [True: 34, False: 53]
  ------------------
 4937|     34|        request->operand_size_hint = ZYDIS_OPERAND_SIZE_HINT_64;
 4938|     34|        break;
 4939|      0|    default:
  ------------------
  |  Branch (4939:5): [True: 0, False: 87]
  ------------------
 4940|      0|        return ZYAN_STATUS_INVALID_ARGUMENT;
  ------------------
  |  |  188|      0|    ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ZYCORE, 0x04u)
  |  |  ------------------
  |  |  |  |   68|      0|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
 4941|     87|    }
 4942|       |
 4943|     87|    switch (request->branch_type)
 4944|     87|    {
 4945|     68|    case ZYDIS_BRANCH_TYPE_NONE:
  ------------------
  |  Branch (4945:5): [True: 68, False: 19]
  ------------------
 4946|     68|    case ZYDIS_BRANCH_TYPE_ABSOLUTE:
  ------------------
  |  Branch (4946:5): [True: 0, False: 87]
  ------------------
 4947|     68|        request->branch_width = ZYDIS_BRANCH_WIDTH_NONE;
 4948|     68|        break;
 4949|      2|    case ZYDIS_BRANCH_TYPE_SHORT:
  ------------------
  |  Branch (4949:5): [True: 2, False: 85]
  ------------------
 4950|      2|        request->branch_width = ZYDIS_BRANCH_WIDTH_8;
 4951|      2|        break;
 4952|     12|    case ZYDIS_BRANCH_TYPE_NEAR:
  ------------------
  |  Branch (4952:5): [True: 12, False: 75]
  ------------------
 4953|     17|    case ZYDIS_BRANCH_TYPE_FAR:
  ------------------
  |  Branch (4953:5): [True: 5, False: 82]
  ------------------
 4954|     17|        switch (instruction->operand_width)
 4955|     17|        {
 4956|      1|        case 16:
  ------------------
  |  Branch (4956:9): [True: 1, False: 16]
  ------------------
 4957|      1|            request->branch_width = ZYDIS_BRANCH_WIDTH_16;
 4958|      1|            break;
 4959|     12|        case 32:
  ------------------
  |  Branch (4959:9): [True: 12, False: 5]
  ------------------
 4960|     12|            request->branch_width = ZYDIS_BRANCH_WIDTH_32;
 4961|     12|            break;
 4962|      4|        case 64:
  ------------------
  |  Branch (4962:9): [True: 4, False: 13]
  ------------------
 4963|      4|            request->branch_width = ZYDIS_BRANCH_WIDTH_64;
 4964|      4|            break;
 4965|      0|        default:
  ------------------
  |  Branch (4965:9): [True: 0, False: 17]
  ------------------
 4966|      0|            ZYAN_UNREACHABLE;
  ------------------
  |  |  431|      0|#   define ZYAN_UNREACHABLE { assert(0); abort(); }
  ------------------
  |  Branch (4966:13): [Folded, False: 0]
  |  Branch (4966:13): [Folded, False: 0]
  ------------------
 4967|     17|        }
 4968|     17|        break;
 4969|     17|    default:
  ------------------
  |  Branch (4969:5): [True: 0, False: 87]
  ------------------
 4970|      0|        return ZYAN_STATUS_INVALID_ARGUMENT;
  ------------------
  |  |  188|      0|    ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ZYCORE, 0x04u)
  |  |  ------------------
  |  |  |  |   68|      0|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
 4971|     87|    }
 4972|       |
 4973|     87|    switch (instruction->encoding)
 4974|     87|    {
 4975|     59|    case ZYDIS_INSTRUCTION_ENCODING_LEGACY:
  ------------------
  |  Branch (4975:5): [True: 59, False: 28]
  ------------------
 4976|     59|    case ZYDIS_INSTRUCTION_ENCODING_3DNOW:
  ------------------
  |  Branch (4976:5): [True: 0, False: 87]
  ------------------
 4977|     60|    case ZYDIS_INSTRUCTION_ENCODING_XOP:
  ------------------
  |  Branch (4977:5): [True: 1, False: 86]
  ------------------
 4978|     60|    case ZYDIS_INSTRUCTION_ENCODING_VEX:
  ------------------
  |  Branch (4978:5): [True: 0, False: 87]
  ------------------
 4979|     71|    case ZYDIS_INSTRUCTION_ENCODING_REX2:
  ------------------
  |  Branch (4979:5): [True: 11, False: 76]
  ------------------
 4980|     71|        break;
 4981|     16|    case ZYDIS_INSTRUCTION_ENCODING_EVEX:
  ------------------
  |  Branch (4981:5): [True: 16, False: 71]
  ------------------
 4982|     16|        request->evex.broadcast = !instruction->avx.broadcast.is_static ?
  ------------------
  |  Branch (4982:35): [True: 16, False: 0]
  ------------------
 4983|     16|            instruction->avx.broadcast.mode : ZYDIS_BROADCAST_MODE_NONE;
 4984|     16|        request->evex.rounding = instruction->avx.rounding.mode;
 4985|     16|        request->evex.sae = instruction->avx.has_sae;
 4986|     16|        request->evex.zeroing_mask = (instruction->avx.mask.mode == ZYDIS_MASK_MODE_ZEROING ||
  ------------------
  |  Branch (4986:39): [True: 1, False: 15]
  ------------------
 4987|     15|            instruction->avx.mask.mode == ZYDIS_MASK_MODE_CONTROL_ZEROING) &&
  ------------------
  |  Branch (4987:13): [True: 0, False: 15]
  ------------------
 4988|     15|            (instruction->raw.evex.z) ? ZYAN_TRUE : ZYAN_FALSE;
  ------------------
  |  |  288|      1|#define ZYAN_TRUE  1u
  ------------------
                          (instruction->raw.evex.z) ? ZYAN_TRUE : ZYAN_FALSE;
  ------------------
  |  |  287|     31|#define ZYAN_FALSE 0u
  ------------------
  |  Branch (4988:13): [True: 1, False: 0]
  ------------------
 4989|     16|        request->evex.no_flags = instruction->apx.has_nf;
 4990|     16|        if (instruction->apx.scc != ZYDIS_SCC_NONE)
  ------------------
  |  Branch (4990:13): [True: 2, False: 14]
  ------------------
 4991|      2|        {
 4992|      2|            request->evex.default_flags = instruction->apx.default_flags;
 4993|      2|        }
 4994|     16|        break;
 4995|      0|    case ZYDIS_INSTRUCTION_ENCODING_MVEX:
  ------------------
  |  Branch (4995:5): [True: 0, False: 87]
  ------------------
 4996|      0|        request->mvex.broadcast = !instruction->avx.broadcast.is_static ?
  ------------------
  |  Branch (4996:35): [True: 0, False: 0]
  ------------------
 4997|      0|            instruction->avx.broadcast.mode : ZYDIS_BROADCAST_MODE_NONE;
 4998|      0|        request->mvex.conversion = instruction->avx.conversion.mode;
 4999|      0|        request->mvex.rounding = instruction->avx.rounding.mode;
 5000|      0|        request->mvex.swizzle = instruction->avx.swizzle.mode;
 5001|      0|        request->mvex.sae = instruction->avx.has_sae;
 5002|      0|        request->mvex.eviction_hint = instruction->avx.has_eviction_hint;
 5003|      0|        break;
 5004|      0|    default:
  ------------------
  |  Branch (5004:5): [True: 0, False: 87]
  ------------------
 5005|      0|        return ZYAN_STATUS_INVALID_ARGUMENT;
  ------------------
  |  |  188|      0|    ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ZYCORE, 0x04u)
  |  |  ------------------
  |  |  |  |   68|      0|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
 5006|     87|    }
 5007|     87|    request->allowed_encodings = (instruction->encoding != ZYDIS_INSTRUCTION_ENCODING_REX2)
  ------------------
  |  Branch (5007:34): [True: 76, False: 11]
  ------------------
 5008|     87|        ? 1 << instruction->encoding
 5009|     87|        : ZYDIS_ENCODABLE_ENCODING_LEGACY;
 5010|       |
 5011|     87|    request->operand_count = operand_count_visible;
 5012|    237|    for (ZyanU8 i = 0; i < operand_count_visible; ++i)
  ------------------
  |  Branch (5012:24): [True: 150, False: 87]
  ------------------
 5013|    150|    {
 5014|    150|        const ZydisDecodedOperand *dec_op = &operands[i];
 5015|    150|        ZydisEncoderOperand *enc_op = &request->operands[i];
 5016|       |
 5017|    150|        enc_op->type = dec_op->type;
 5018|    150|        switch (dec_op->type)
 5019|    150|        {
 5020|     79|        case ZYDIS_OPERAND_TYPE_REGISTER:
  ------------------
  |  Branch (5020:9): [True: 79, False: 71]
  ------------------
 5021|     79|            enc_op->reg.value = dec_op->reg.value;
 5022|     79|            enc_op->reg.is4 = dec_op->encoding == ZYDIS_OPERAND_ENCODING_IS4;
 5023|     79|            break;
 5024|     26|        case ZYDIS_OPERAND_TYPE_MEMORY:
  ------------------
  |  Branch (5024:9): [True: 26, False: 124]
  ------------------
 5025|     26|            enc_op->mem.base = dec_op->mem.base;
 5026|     26|            enc_op->mem.index = dec_op->mem.index;
 5027|     26|            enc_op->mem.scale = dec_op->mem.type != ZYDIS_MEMOP_TYPE_MIB ? dec_op->mem.scale : 0;
  ------------------
  |  Branch (5027:33): [True: 26, False: 0]
  ------------------
 5028|     26|            if (dec_op->mem.disp.size)
  ------------------
  |  Branch (5028:17): [True: 24, False: 2]
  ------------------
 5029|     24|            {
 5030|     24|                enc_op->mem.displacement = dec_op->mem.disp.value;
 5031|     24|            }
 5032|     26|            enc_op->mem.size = dec_op->size / 8;
 5033|     26|            break;
 5034|      4|        case ZYDIS_OPERAND_TYPE_POINTER:
  ------------------
  |  Branch (5034:9): [True: 4, False: 146]
  ------------------
 5035|      4|            enc_op->ptr.segment = dec_op->ptr.segment;
 5036|      4|            enc_op->ptr.offset = dec_op->ptr.offset;
 5037|      4|            break;
 5038|     41|        case ZYDIS_OPERAND_TYPE_IMMEDIATE:
  ------------------
  |  Branch (5038:9): [True: 41, False: 109]
  ------------------
 5039|     41|            enc_op->imm.u = dec_op->imm.value.u;
 5040|       |            // `XBEGIN` is an ISA-wide unique instruction because it's not a branching instruction
 5041|       |            // but it has a relative operand which behaves differently from all other relatives
 5042|       |            // (no truncating behavior in 16-bit mode). Encoder treats it as non-branching
 5043|       |            // instruction that scales with hidden operand size.
 5044|     41|            if ((dec_op->imm.is_relative) &&
  ------------------
  |  Branch (5044:17): [True: 13, False: 28]
  ------------------
 5045|     13|                (instruction->mnemonic != ZYDIS_MNEMONIC_XBEGIN))
  ------------------
  |  Branch (5045:17): [True: 13, False: 0]
  ------------------
 5046|     13|            {
 5047|     13|                switch (instruction->raw.imm->size)
 5048|     13|                {
 5049|      2|                case 8:
  ------------------
  |  Branch (5049:17): [True: 2, False: 11]
  ------------------
 5050|      2|                    request->branch_width = ZYDIS_BRANCH_WIDTH_8;
 5051|      2|                    break;
 5052|      0|                case 16:
  ------------------
  |  Branch (5052:17): [True: 0, False: 13]
  ------------------
 5053|      0|                    request->branch_width = ZYDIS_BRANCH_WIDTH_16;
 5054|      0|                    break;
 5055|     11|                case 32:
  ------------------
  |  Branch (5055:17): [True: 11, False: 2]
  ------------------
 5056|     11|                    request->branch_width = ZYDIS_BRANCH_WIDTH_32;
 5057|     11|                    break;
 5058|      0|                default:
  ------------------
  |  Branch (5058:17): [True: 0, False: 13]
  ------------------
 5059|      0|                    return ZYAN_STATUS_INVALID_ARGUMENT;
  ------------------
  |  |  188|      0|    ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ZYCORE, 0x04u)
  |  |  ------------------
  |  |  |  |   68|      0|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
 5060|     13|                }
 5061|     13|            }
 5062|     41|            break;
 5063|     41|        default:
  ------------------
  |  Branch (5063:9): [True: 0, False: 150]
  ------------------
 5064|      0|            return ZYAN_STATUS_INVALID_ARGUMENT;
  ------------------
  |  |  188|      0|    ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ZYCORE, 0x04u)
  |  |  ------------------
  |  |  |  |   68|      0|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
 5065|    150|        }
 5066|    150|    }
 5067|       |
 5068|     87|    return ZYAN_STATUS_SUCCESS;
  ------------------
  |  |  164|     87|    ZYAN_MAKE_STATUS(0u, ZYAN_MODULE_ZYCORE, 0x00u)
  |  |  ------------------
  |  |  |  |   68|     87|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
 5069|     87|}
Encoder.c:ZydisEncoderCheckRequestSanity:
 4424|  3.19k|{
 4425|  3.19k|    if (((ZyanUSize)request->machine_mode > ZYDIS_MACHINE_MODE_MAX_VALUE) ||
  ------------------
  |  Branch (4425:9): [True: 0, False: 3.19k]
  ------------------
 4426|  3.19k|        ((ZyanUSize)request->allowed_encodings > ZYDIS_ENCODABLE_ENCODING_MAX_VALUE) ||
  ------------------
  |  Branch (4426:9): [True: 0, False: 3.19k]
  ------------------
 4427|  3.19k|        ((ZyanUSize)request->mnemonic > ZYDIS_MNEMONIC_MAX_VALUE) ||
  ------------------
  |  Branch (4427:9): [True: 0, False: 3.19k]
  ------------------
 4428|  3.19k|        ((ZyanUSize)request->branch_type > ZYDIS_BRANCH_TYPE_MAX_VALUE) ||
  ------------------
  |  Branch (4428:9): [True: 0, False: 3.19k]
  ------------------
 4429|  3.19k|        ((ZyanUSize)request->branch_width > ZYDIS_BRANCH_WIDTH_MAX_VALUE) ||
  ------------------
  |  Branch (4429:9): [True: 0, False: 3.19k]
  ------------------
 4430|  3.19k|        ((ZyanUSize)request->address_size_hint > ZYDIS_ADDRESS_SIZE_HINT_MAX_VALUE) ||
  ------------------
  |  Branch (4430:9): [True: 0, False: 3.19k]
  ------------------
 4431|  3.19k|        ((ZyanUSize)request->operand_size_hint > ZYDIS_OPERAND_SIZE_HINT_MAX_VALUE) ||
  ------------------
  |  Branch (4431:9): [True: 0, False: 3.19k]
  ------------------
 4432|  3.19k|        ((ZyanUSize)request->evex.broadcast > ZYDIS_BROADCAST_MODE_MAX_VALUE) ||
  ------------------
  |  Branch (4432:9): [True: 0, False: 3.19k]
  ------------------
 4433|  3.19k|        ((ZyanUSize)request->evex.rounding > ZYDIS_ROUNDING_MODE_MAX_VALUE) ||
  ------------------
  |  Branch (4433:9): [True: 0, False: 3.19k]
  ------------------
 4434|  3.19k|        ((ZyanUSize)request->mvex.broadcast > ZYDIS_BROADCAST_MODE_MAX_VALUE) ||
  ------------------
  |  Branch (4434:9): [True: 0, False: 3.19k]
  ------------------
 4435|  3.19k|        ((ZyanUSize)request->mvex.conversion > ZYDIS_CONVERSION_MODE_MAX_VALUE) ||
  ------------------
  |  Branch (4435:9): [True: 0, False: 3.19k]
  ------------------
 4436|  3.19k|        ((ZyanUSize)request->mvex.rounding > ZYDIS_ROUNDING_MODE_MAX_VALUE) ||
  ------------------
  |  Branch (4436:9): [True: 0, False: 3.19k]
  ------------------
 4437|  3.19k|        ((ZyanUSize)request->mvex.swizzle > ZYDIS_SWIZZLE_MODE_MAX_VALUE) ||
  ------------------
  |  Branch (4437:9): [True: 0, False: 3.19k]
  ------------------
 4438|  3.19k|        (request->operand_count > ZYDIS_ENCODER_MAX_OPERANDS) ||
  ------------------
  |  |   57|  3.19k|#define ZYDIS_ENCODER_MAX_OPERANDS 5
  ------------------
  |  Branch (4438:9): [True: 0, False: 3.19k]
  ------------------
 4439|  3.19k|        (request->mnemonic == ZYDIS_MNEMONIC_INVALID) ||
  ------------------
  |  Branch (4439:9): [True: 1, False: 3.19k]
  ------------------
 4440|  3.19k|        (request->prefixes & ~ZYDIS_ENCODABLE_PREFIXES) ||
  ------------------
  |  |   65|  3.19k|#define ZYDIS_ENCODABLE_PREFIXES   (ZYDIS_ATTRIB_HAS_LOCK | \
  |  |  ------------------
  |  |  |  |  656|  3.19k|#define ZYDIS_ATTRIB_HAS_LOCK                   (1ULL << 27)
  |  |  ------------------
  |  |   66|  3.19k|                                    ZYDIS_ATTRIB_HAS_REP | \
  |  |  ------------------
  |  |  |  |  660|  3.19k|#define ZYDIS_ATTRIB_HAS_REP                    (1ULL << 28)
  |  |  ------------------
  |  |   67|  3.19k|                                    ZYDIS_ATTRIB_HAS_REPE | \
  |  |  ------------------
  |  |  |  |  664|  3.19k|#define ZYDIS_ATTRIB_HAS_REPE                   (1ULL << 29)
  |  |  ------------------
  |  |   68|  3.19k|                                    ZYDIS_ATTRIB_HAS_REPNE | \
  |  |  ------------------
  |  |  |  |  672|  3.19k|#define ZYDIS_ATTRIB_HAS_REPNE                  (1ULL << 30)
  |  |  ------------------
  |  |   69|  3.19k|                                    ZYDIS_ATTRIB_HAS_BND | \
  |  |  ------------------
  |  |  |  |  680|  3.19k|#define ZYDIS_ATTRIB_HAS_BND                    (1ULL << 31)
  |  |  ------------------
  |  |   70|  3.19k|                                    ZYDIS_ATTRIB_HAS_XACQUIRE | \
  |  |  ------------------
  |  |  |  |  684|  3.19k|#define ZYDIS_ATTRIB_HAS_XACQUIRE               (1ULL << 32)
  |  |  ------------------
  |  |   71|  3.19k|                                    ZYDIS_ATTRIB_HAS_XRELEASE | \
  |  |  ------------------
  |  |  |  |  688|  3.19k|#define ZYDIS_ATTRIB_HAS_XRELEASE               (1ULL << 33)
  |  |  ------------------
  |  |   72|  3.19k|                                    ZYDIS_ATTRIB_HAS_BRANCH_NOT_TAKEN | \
  |  |  ------------------
  |  |  |  |  692|  3.19k|#define ZYDIS_ATTRIB_HAS_BRANCH_NOT_TAKEN       (1ULL << 34)
  |  |  ------------------
  |  |   73|  3.19k|                                    ZYDIS_ATTRIB_HAS_BRANCH_TAKEN | \
  |  |  ------------------
  |  |  |  |  696|  3.19k|#define ZYDIS_ATTRIB_HAS_BRANCH_TAKEN           (1ULL << 35)
  |  |  ------------------
  |  |   74|  3.19k|                                    ZYDIS_ATTRIB_HAS_NOTRACK | \
  |  |  ------------------
  |  |  |  |  700|  3.19k|#define ZYDIS_ATTRIB_HAS_NOTRACK                (1ULL << 36)
  |  |  ------------------
  |  |   75|  3.19k|                                    ZYDIS_ATTRIB_HAS_SEGMENT_CS | \
  |  |  ------------------
  |  |  |  |  704|  3.19k|#define ZYDIS_ATTRIB_HAS_SEGMENT_CS             (1ULL << 37)
  |  |  ------------------
  |  |   76|  3.19k|                                    ZYDIS_ATTRIB_HAS_SEGMENT_SS | \
  |  |  ------------------
  |  |  |  |  708|  3.19k|#define ZYDIS_ATTRIB_HAS_SEGMENT_SS             (1ULL << 38)
  |  |  ------------------
  |  |   77|  3.19k|                                    ZYDIS_ATTRIB_HAS_SEGMENT_DS | \
  |  |  ------------------
  |  |  |  |  712|  3.19k|#define ZYDIS_ATTRIB_HAS_SEGMENT_DS             (1ULL << 39)
  |  |  ------------------
  |  |   78|  3.19k|                                    ZYDIS_ATTRIB_HAS_SEGMENT_ES | \
  |  |  ------------------
  |  |  |  |  716|  3.19k|#define ZYDIS_ATTRIB_HAS_SEGMENT_ES             (1ULL << 40)
  |  |  ------------------
  |  |   79|  3.19k|                                    ZYDIS_ATTRIB_HAS_SEGMENT_FS | \
  |  |  ------------------
  |  |  |  |  720|  3.19k|#define ZYDIS_ATTRIB_HAS_SEGMENT_FS             (1ULL << 41)
  |  |  ------------------
  |  |   80|  3.19k|                                    ZYDIS_ATTRIB_HAS_SEGMENT_GS)
  |  |  ------------------
  |  |  |  |  724|  3.19k|#define ZYDIS_ATTRIB_HAS_SEGMENT_GS             (1ULL << 42)
  |  |  ------------------
  ------------------
  |  Branch (4440:9): [True: 0, False: 3.19k]
  ------------------
 4441|  3.19k|        ((request->evex.default_flags & (~ZYDIS_DFV_ALL)) != 0))
  ------------------
  |  |  784|  3.19k|#define ZYDIS_DFV_ALL   (ZYDIS_DFV_CF | ZYDIS_DFV_ZF | ZYDIS_DFV_SF | ZYDIS_DFV_OF)
  |  |  ------------------
  |  |  |  |  763|  3.19k|#define ZYDIS_DFV_CF    (1u << 0)
  |  |  ------------------
  |  |               #define ZYDIS_DFV_ALL   (ZYDIS_DFV_CF | ZYDIS_DFV_ZF | ZYDIS_DFV_SF | ZYDIS_DFV_OF)
  |  |  ------------------
  |  |  |  |  767|  3.19k|#define ZYDIS_DFV_ZF    (1u << 1)
  |  |  ------------------
  |  |               #define ZYDIS_DFV_ALL   (ZYDIS_DFV_CF | ZYDIS_DFV_ZF | ZYDIS_DFV_SF | ZYDIS_DFV_OF)
  |  |  ------------------
  |  |  |  |  771|  3.19k|#define ZYDIS_DFV_SF    (1u << 2)
  |  |  ------------------
  |  |               #define ZYDIS_DFV_ALL   (ZYDIS_DFV_CF | ZYDIS_DFV_ZF | ZYDIS_DFV_SF | ZYDIS_DFV_OF)
  |  |  ------------------
  |  |  |  |  775|  3.19k|#define ZYDIS_DFV_OF    (1u << 3)
  |  |  ------------------
  ------------------
  |  Branch (4441:9): [True: 6, False: 3.18k]
  ------------------
 4442|      7|    {
 4443|      7|        return ZYAN_STATUS_INVALID_ARGUMENT;
  ------------------
  |  |  188|      7|    ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ZYCORE, 0x04u)
  |  |  ------------------
  |  |  |  |   68|      7|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
 4444|      7|    }
 4445|       |
 4446|  3.18k|    static const ZydisEncodableEncoding mutually_exclusive_encodings =
 4447|  3.18k|        ZYDIS_ENCODABLE_ENCODING_EVEX | ZYDIS_ENCODABLE_ENCODING_MVEX;
 4448|  3.18k|    if ((request->allowed_encodings & mutually_exclusive_encodings) == mutually_exclusive_encodings)
  ------------------
  |  Branch (4448:9): [True: 0, False: 3.18k]
  ------------------
 4449|      0|    {
 4450|      0|        return ZYAN_STATUS_INVALID_ARGUMENT;
  ------------------
  |  |  188|      0|    ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ZYCORE, 0x04u)
  |  |  ------------------
  |  |  |  |   68|      0|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
 4451|      0|    }
 4452|       |
 4453|  3.18k|    if (request->prefixes & ZYDIS_ATTRIB_HAS_SEGMENT)
  ------------------
  |  |  728|  3.18k|#define ZYDIS_ATTRIB_HAS_SEGMENT                (ZYDIS_ATTRIB_HAS_SEGMENT_CS | \
  |  |  ------------------
  |  |  |  |  704|  3.18k|#define ZYDIS_ATTRIB_HAS_SEGMENT_CS             (1ULL << 37)
  |  |  ------------------
  |  |  729|  3.18k|                                                 ZYDIS_ATTRIB_HAS_SEGMENT_SS | \
  |  |  ------------------
  |  |  |  |  708|  3.18k|#define ZYDIS_ATTRIB_HAS_SEGMENT_SS             (1ULL << 38)
  |  |  ------------------
  |  |  730|  3.18k|                                                 ZYDIS_ATTRIB_HAS_SEGMENT_DS | \
  |  |  ------------------
  |  |  |  |  712|  3.18k|#define ZYDIS_ATTRIB_HAS_SEGMENT_DS             (1ULL << 39)
  |  |  ------------------
  |  |  731|  3.18k|                                                 ZYDIS_ATTRIB_HAS_SEGMENT_ES | \
  |  |  ------------------
  |  |  |  |  716|  3.18k|#define ZYDIS_ATTRIB_HAS_SEGMENT_ES             (1ULL << 40)
  |  |  ------------------
  |  |  732|  3.18k|                                                 ZYDIS_ATTRIB_HAS_SEGMENT_FS | \
  |  |  ------------------
  |  |  |  |  720|  3.18k|#define ZYDIS_ATTRIB_HAS_SEGMENT_FS             (1ULL << 41)
  |  |  ------------------
  |  |  733|  3.18k|                                                 ZYDIS_ATTRIB_HAS_SEGMENT_GS)
  |  |  ------------------
  |  |  |  |  724|  3.18k|#define ZYDIS_ATTRIB_HAS_SEGMENT_GS             (1ULL << 42)
  |  |  ------------------
  ------------------
  |  Branch (4453:9): [True: 604, False: 2.58k]
  ------------------
 4454|    604|    {
 4455|    604|        if ((request->machine_mode == ZYDIS_MACHINE_MODE_LONG_64) &&
  ------------------
  |  Branch (4455:13): [True: 352, False: 252]
  ------------------
 4456|    352|            (request->prefixes & ZYDIS_LEGACY_SEGMENTS))
  ------------------
  |  |   49|    352|#define ZYDIS_LEGACY_SEGMENTS                   (ZYDIS_ATTRIB_HAS_SEGMENT_CS | \
  |  |  ------------------
  |  |  |  |  704|    352|#define ZYDIS_ATTRIB_HAS_SEGMENT_CS             (1ULL << 37)
  |  |  ------------------
  |  |   50|    352|                                                 ZYDIS_ATTRIB_HAS_SEGMENT_SS | \
  |  |  ------------------
  |  |  |  |  708|    352|#define ZYDIS_ATTRIB_HAS_SEGMENT_SS             (1ULL << 38)
  |  |  ------------------
  |  |   51|    352|                                                 ZYDIS_ATTRIB_HAS_SEGMENT_DS | \
  |  |  ------------------
  |  |  |  |  712|    352|#define ZYDIS_ATTRIB_HAS_SEGMENT_DS             (1ULL << 39)
  |  |  ------------------
  |  |   52|    352|                                                 ZYDIS_ATTRIB_HAS_SEGMENT_ES)
  |  |  ------------------
  |  |  |  |  716|    352|#define ZYDIS_ATTRIB_HAS_SEGMENT_ES             (1ULL << 40)
  |  |  ------------------
  ------------------
  |  Branch (4456:13): [True: 6, False: 346]
  ------------------
 4457|      6|        {
 4458|      6|            return ZYAN_STATUS_INVALID_ARGUMENT;
  ------------------
  |  |  188|      6|    ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ZYCORE, 0x04u)
  |  |  ------------------
  |  |  |  |   68|      6|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
 4459|      6|        }
 4460|       |
 4461|    598|        ZyanU8 seg_override_count = 0;
 4462|    598|        if (request->prefixes & ZYDIS_ATTRIB_HAS_SEGMENT_CS)
  ------------------
  |  |  704|    598|#define ZYDIS_ATTRIB_HAS_SEGMENT_CS             (1ULL << 37)
  ------------------
  |  Branch (4462:13): [True: 38, False: 560]
  ------------------
 4463|     38|        {
 4464|     38|            ++seg_override_count;
 4465|     38|        }
 4466|    598|        if (request->prefixes & ZYDIS_ATTRIB_HAS_SEGMENT_SS)
  ------------------
  |  |  708|    598|#define ZYDIS_ATTRIB_HAS_SEGMENT_SS             (1ULL << 38)
  ------------------
  |  Branch (4466:13): [True: 38, False: 560]
  ------------------
 4467|     38|        {
 4468|     38|            ++seg_override_count;
 4469|     38|        }
 4470|    598|        if (request->prefixes & ZYDIS_ATTRIB_HAS_SEGMENT_DS)
  ------------------
  |  |  712|    598|#define ZYDIS_ATTRIB_HAS_SEGMENT_DS             (1ULL << 39)
  ------------------
  |  Branch (4470:13): [True: 54, False: 544]
  ------------------
 4471|     54|        {
 4472|     54|            ++seg_override_count;
 4473|     54|        }
 4474|    598|        if (request->prefixes & ZYDIS_ATTRIB_HAS_SEGMENT_ES)
  ------------------
  |  |  716|    598|#define ZYDIS_ATTRIB_HAS_SEGMENT_ES             (1ULL << 40)
  ------------------
  |  Branch (4474:13): [True: 60, False: 538]
  ------------------
 4475|     60|        {
 4476|     60|            ++seg_override_count;
 4477|     60|        }
 4478|    598|        if (request->prefixes & ZYDIS_ATTRIB_HAS_SEGMENT_FS)
  ------------------
  |  |  720|    598|#define ZYDIS_ATTRIB_HAS_SEGMENT_FS             (1ULL << 41)
  ------------------
  |  Branch (4478:13): [True: 277, False: 321]
  ------------------
 4479|    277|        {
 4480|    277|            ++seg_override_count;
 4481|    277|        }
 4482|    598|        if (request->prefixes & ZYDIS_ATTRIB_HAS_SEGMENT_GS)
  ------------------
  |  |  724|    598|#define ZYDIS_ATTRIB_HAS_SEGMENT_GS             (1ULL << 42)
  ------------------
  |  Branch (4482:13): [True: 205, False: 393]
  ------------------
 4483|    205|        {
 4484|    205|            ++seg_override_count;
 4485|    205|        }
 4486|    598|        if (seg_override_count != 1)
  ------------------
  |  Branch (4486:13): [True: 20, False: 578]
  ------------------
 4487|     20|        {
 4488|     20|            return ZYAN_STATUS_INVALID_ARGUMENT;
  ------------------
  |  |  188|     20|    ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ZYCORE, 0x04u)
  |  |  ------------------
  |  |  |  |   68|     20|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
 4489|     20|        }
 4490|    598|    }
 4491|  3.16k|    ZyanU8 rep_family_count = 0;
 4492|  3.16k|    if (request->prefixes & ZYDIS_ATTRIB_HAS_REP)
  ------------------
  |  |  660|  3.16k|#define ZYDIS_ATTRIB_HAS_REP                    (1ULL << 28)
  ------------------
  |  Branch (4492:9): [True: 22, False: 3.13k]
  ------------------
 4493|     22|    {
 4494|     22|        ++rep_family_count;
 4495|     22|    }
 4496|  3.16k|    if (request->prefixes & ZYDIS_ATTRIB_HAS_REPE)
  ------------------
  |  |  664|  3.16k|#define ZYDIS_ATTRIB_HAS_REPE                   (1ULL << 29)
  ------------------
  |  Branch (4496:9): [True: 14, False: 3.14k]
  ------------------
 4497|     14|    {
 4498|     14|        ++rep_family_count;
 4499|     14|    }
 4500|  3.16k|    if (request->prefixes & ZYDIS_ATTRIB_HAS_REPNE)
  ------------------
  |  |  672|  3.16k|#define ZYDIS_ATTRIB_HAS_REPNE                  (1ULL << 30)
  ------------------
  |  Branch (4500:9): [True: 18, False: 3.14k]
  ------------------
 4501|     18|    {
 4502|     18|        ++rep_family_count;
 4503|     18|    }
 4504|  3.16k|    if (rep_family_count > 1)
  ------------------
  |  Branch (4504:9): [True: 6, False: 3.15k]
  ------------------
 4505|      6|    {
 4506|      6|        return ZYAN_STATUS_INVALID_ARGUMENT;
  ------------------
  |  |  188|      6|    ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ZYCORE, 0x04u)
  |  |  ------------------
  |  |  |  |   68|      6|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
 4507|      6|    }
 4508|  3.15k|    if ((request->prefixes & ZYDIS_ATTRIB_HAS_XACQUIRE) &&
  ------------------
  |  |  684|  3.15k|#define ZYDIS_ATTRIB_HAS_XACQUIRE               (1ULL << 32)
  ------------------
  |  Branch (4508:9): [True: 46, False: 3.10k]
  ------------------
 4509|     46|        (request->prefixes & ZYDIS_ATTRIB_HAS_XRELEASE))
  ------------------
  |  |  688|     46|#define ZYDIS_ATTRIB_HAS_XRELEASE               (1ULL << 33)
  ------------------
  |  Branch (4509:9): [True: 2, False: 44]
  ------------------
 4510|      2|    {
 4511|      2|        return ZYAN_STATUS_INVALID_ARGUMENT;
  ------------------
  |  |  188|      2|    ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ZYCORE, 0x04u)
  |  |  ------------------
  |  |  |  |   68|      2|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
 4512|      2|    }
 4513|  3.15k|    if ((request->prefixes & ZYDIS_ATTRIB_HAS_BRANCH_NOT_TAKEN) &&
  ------------------
  |  |  692|  3.15k|#define ZYDIS_ATTRIB_HAS_BRANCH_NOT_TAKEN       (1ULL << 34)
  ------------------
  |  Branch (4513:9): [True: 32, False: 3.12k]
  ------------------
 4514|     32|        (request->prefixes & ZYDIS_ATTRIB_HAS_BRANCH_TAKEN))
  ------------------
  |  |  696|     32|#define ZYDIS_ATTRIB_HAS_BRANCH_TAKEN           (1ULL << 35)
  ------------------
  |  Branch (4514:9): [True: 2, False: 30]
  ------------------
 4515|      2|    {
 4516|      2|        return ZYAN_STATUS_INVALID_ARGUMENT;
  ------------------
  |  |  188|      2|    ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ZYCORE, 0x04u)
  |  |  ------------------
  |  |  |  |   68|      2|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
 4517|      2|    }
 4518|  3.15k|    if ((request->prefixes & ZYDIS_ATTRIB_HAS_NOTRACK) &&
  ------------------
  |  |  700|  3.15k|#define ZYDIS_ATTRIB_HAS_NOTRACK                (1ULL << 36)
  ------------------
  |  Branch (4518:9): [True: 21, False: 3.13k]
  ------------------
 4519|     21|        (request->prefixes & ZYDIS_ATTRIB_HAS_SEGMENT))
  ------------------
  |  |  728|     21|#define ZYDIS_ATTRIB_HAS_SEGMENT                (ZYDIS_ATTRIB_HAS_SEGMENT_CS | \
  |  |  ------------------
  |  |  |  |  704|     21|#define ZYDIS_ATTRIB_HAS_SEGMENT_CS             (1ULL << 37)
  |  |  ------------------
  |  |  729|     21|                                                 ZYDIS_ATTRIB_HAS_SEGMENT_SS | \
  |  |  ------------------
  |  |  |  |  708|     21|#define ZYDIS_ATTRIB_HAS_SEGMENT_SS             (1ULL << 38)
  |  |  ------------------
  |  |  730|     21|                                                 ZYDIS_ATTRIB_HAS_SEGMENT_DS | \
  |  |  ------------------
  |  |  |  |  712|     21|#define ZYDIS_ATTRIB_HAS_SEGMENT_DS             (1ULL << 39)
  |  |  ------------------
  |  |  731|     21|                                                 ZYDIS_ATTRIB_HAS_SEGMENT_ES | \
  |  |  ------------------
  |  |  |  |  716|     21|#define ZYDIS_ATTRIB_HAS_SEGMENT_ES             (1ULL << 40)
  |  |  ------------------
  |  |  732|     21|                                                 ZYDIS_ATTRIB_HAS_SEGMENT_FS | \
  |  |  ------------------
  |  |  |  |  720|     21|#define ZYDIS_ATTRIB_HAS_SEGMENT_FS             (1ULL << 41)
  |  |  ------------------
  |  |  733|     21|                                                 ZYDIS_ATTRIB_HAS_SEGMENT_GS)
  |  |  ------------------
  |  |  |  |  724|     21|#define ZYDIS_ATTRIB_HAS_SEGMENT_GS             (1ULL << 42)
  |  |  ------------------
  ------------------
  |  Branch (4519:9): [True: 1, False: 20]
  ------------------
 4520|      1|    {
 4521|      1|        return ZYAN_STATUS_INVALID_ARGUMENT;
  ------------------
  |  |  188|      1|    ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ZYCORE, 0x04u)
  |  |  ------------------
  |  |  |  |   68|      1|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
 4522|      1|    }
 4523|       |
 4524|  3.15k|    static const ZyanBool branch_lookup
 4525|  3.15k|        [ZYDIS_BRANCH_WIDTH_MAX_VALUE + 1][ZYDIS_BRANCH_TYPE_MAX_VALUE + 1] =
 4526|  3.15k|    {
 4527|  3.15k|        /* NONE */ { ZYAN_TRUE,  ZYAN_TRUE,  ZYAN_TRUE,  ZYAN_TRUE,  ZYAN_FALSE },
  ------------------
  |  |  288|  3.15k|#define ZYAN_TRUE  1u
  ------------------
                      /* NONE */ { ZYAN_TRUE,  ZYAN_TRUE,  ZYAN_TRUE,  ZYAN_TRUE,  ZYAN_FALSE },
  ------------------
  |  |  288|  3.15k|#define ZYAN_TRUE  1u
  ------------------
                      /* NONE */ { ZYAN_TRUE,  ZYAN_TRUE,  ZYAN_TRUE,  ZYAN_TRUE,  ZYAN_FALSE },
  ------------------
  |  |  288|  3.15k|#define ZYAN_TRUE  1u
  ------------------
                      /* NONE */ { ZYAN_TRUE,  ZYAN_TRUE,  ZYAN_TRUE,  ZYAN_TRUE,  ZYAN_FALSE },
  ------------------
  |  |  288|  3.15k|#define ZYAN_TRUE  1u
  ------------------
                      /* NONE */ { ZYAN_TRUE,  ZYAN_TRUE,  ZYAN_TRUE,  ZYAN_TRUE,  ZYAN_FALSE },
  ------------------
  |  |  287|  3.15k|#define ZYAN_FALSE 0u
  ------------------
 4528|  3.15k|        /* 8    */ { ZYAN_TRUE,  ZYAN_TRUE,  ZYAN_FALSE, ZYAN_FALSE, ZYAN_FALSE },
  ------------------
  |  |  288|  3.15k|#define ZYAN_TRUE  1u
  ------------------
                      /* 8    */ { ZYAN_TRUE,  ZYAN_TRUE,  ZYAN_FALSE, ZYAN_FALSE, ZYAN_FALSE },
  ------------------
  |  |  288|  3.15k|#define ZYAN_TRUE  1u
  ------------------
                      /* 8    */ { ZYAN_TRUE,  ZYAN_TRUE,  ZYAN_FALSE, ZYAN_FALSE, ZYAN_FALSE },
  ------------------
  |  |  287|  3.15k|#define ZYAN_FALSE 0u
  ------------------
                      /* 8    */ { ZYAN_TRUE,  ZYAN_TRUE,  ZYAN_FALSE, ZYAN_FALSE, ZYAN_FALSE },
  ------------------
  |  |  287|  3.15k|#define ZYAN_FALSE 0u
  ------------------
                      /* 8    */ { ZYAN_TRUE,  ZYAN_TRUE,  ZYAN_FALSE, ZYAN_FALSE, ZYAN_FALSE },
  ------------------
  |  |  287|  3.15k|#define ZYAN_FALSE 0u
  ------------------
 4529|  3.15k|        /* 16   */ { ZYAN_TRUE,  ZYAN_FALSE, ZYAN_TRUE,  ZYAN_TRUE,  ZYAN_FALSE },
  ------------------
  |  |  288|  3.15k|#define ZYAN_TRUE  1u
  ------------------
                      /* 16   */ { ZYAN_TRUE,  ZYAN_FALSE, ZYAN_TRUE,  ZYAN_TRUE,  ZYAN_FALSE },
  ------------------
  |  |  287|  3.15k|#define ZYAN_FALSE 0u
  ------------------
                      /* 16   */ { ZYAN_TRUE,  ZYAN_FALSE, ZYAN_TRUE,  ZYAN_TRUE,  ZYAN_FALSE },
  ------------------
  |  |  288|  3.15k|#define ZYAN_TRUE  1u
  ------------------
                      /* 16   */ { ZYAN_TRUE,  ZYAN_FALSE, ZYAN_TRUE,  ZYAN_TRUE,  ZYAN_FALSE },
  ------------------
  |  |  288|  3.15k|#define ZYAN_TRUE  1u
  ------------------
                      /* 16   */ { ZYAN_TRUE,  ZYAN_FALSE, ZYAN_TRUE,  ZYAN_TRUE,  ZYAN_FALSE },
  ------------------
  |  |  287|  3.15k|#define ZYAN_FALSE 0u
  ------------------
 4530|  3.15k|        /* 32   */ { ZYAN_TRUE,  ZYAN_FALSE, ZYAN_TRUE,  ZYAN_TRUE,  ZYAN_FALSE },
  ------------------
  |  |  288|  3.15k|#define ZYAN_TRUE  1u
  ------------------
                      /* 32   */ { ZYAN_TRUE,  ZYAN_FALSE, ZYAN_TRUE,  ZYAN_TRUE,  ZYAN_FALSE },
  ------------------
  |  |  287|  3.15k|#define ZYAN_FALSE 0u
  ------------------
                      /* 32   */ { ZYAN_TRUE,  ZYAN_FALSE, ZYAN_TRUE,  ZYAN_TRUE,  ZYAN_FALSE },
  ------------------
  |  |  288|  3.15k|#define ZYAN_TRUE  1u
  ------------------
                      /* 32   */ { ZYAN_TRUE,  ZYAN_FALSE, ZYAN_TRUE,  ZYAN_TRUE,  ZYAN_FALSE },
  ------------------
  |  |  288|  3.15k|#define ZYAN_TRUE  1u
  ------------------
                      /* 32   */ { ZYAN_TRUE,  ZYAN_FALSE, ZYAN_TRUE,  ZYAN_TRUE,  ZYAN_FALSE },
  ------------------
  |  |  287|  3.15k|#define ZYAN_FALSE 0u
  ------------------
 4531|  3.15k|        /* 64   */ { ZYAN_TRUE,  ZYAN_FALSE, ZYAN_TRUE,  ZYAN_TRUE,  ZYAN_FALSE },
  ------------------
  |  |  288|  3.15k|#define ZYAN_TRUE  1u
  ------------------
                      /* 64   */ { ZYAN_TRUE,  ZYAN_FALSE, ZYAN_TRUE,  ZYAN_TRUE,  ZYAN_FALSE },
  ------------------
  |  |  287|  3.15k|#define ZYAN_FALSE 0u
  ------------------
                      /* 64   */ { ZYAN_TRUE,  ZYAN_FALSE, ZYAN_TRUE,  ZYAN_TRUE,  ZYAN_FALSE },
  ------------------
  |  |  288|  3.15k|#define ZYAN_TRUE  1u
  ------------------
                      /* 64   */ { ZYAN_TRUE,  ZYAN_FALSE, ZYAN_TRUE,  ZYAN_TRUE,  ZYAN_FALSE },
  ------------------
  |  |  288|  3.15k|#define ZYAN_TRUE  1u
  ------------------
                      /* 64   */ { ZYAN_TRUE,  ZYAN_FALSE, ZYAN_TRUE,  ZYAN_TRUE,  ZYAN_FALSE },
  ------------------
  |  |  287|  3.15k|#define ZYAN_FALSE 0u
  ------------------
 4532|  3.15k|    };
 4533|  3.15k|    if (!branch_lookup[request->branch_width][request->branch_type])
  ------------------
  |  Branch (4533:9): [True: 4, False: 3.14k]
  ------------------
 4534|      4|    {
 4535|      4|        return ZYAN_STATUS_INVALID_ARGUMENT;
  ------------------
  |  |  188|      4|    ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ZYCORE, 0x04u)
  |  |  ------------------
  |  |  |  |   68|      4|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
 4536|      4|    }
 4537|       |
 4538|  3.14k|    if (request->machine_mode == ZYDIS_MACHINE_MODE_LONG_64)
  ------------------
  |  Branch (4538:9): [True: 2.36k, False: 778]
  ------------------
 4539|  2.36k|    {
 4540|  2.36k|        if (request->address_size_hint == ZYDIS_ADDRESS_SIZE_HINT_16)
  ------------------
  |  Branch (4540:13): [True: 2, False: 2.36k]
  ------------------
 4541|      2|        {
 4542|      2|            return ZYAN_STATUS_INVALID_ARGUMENT;
  ------------------
  |  |  188|      2|    ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ZYCORE, 0x04u)
  |  |  ------------------
  |  |  |  |   68|      2|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
 4543|      2|        }
 4544|  2.36k|    }
 4545|    778|    else
 4546|    778|    {
 4547|    778|        if ((request->branch_width == ZYDIS_BRANCH_WIDTH_64) ||
  ------------------
  |  Branch (4547:13): [True: 1, False: 777]
  ------------------
 4548|    777|            (request->address_size_hint == ZYDIS_ADDRESS_SIZE_HINT_64) ||
  ------------------
  |  Branch (4548:13): [True: 1, False: 776]
  ------------------
 4549|    776|            (request->operand_size_hint == ZYDIS_OPERAND_SIZE_HINT_64))
  ------------------
  |  Branch (4549:13): [True: 1, False: 775]
  ------------------
 4550|      3|        {
 4551|      3|            return ZYAN_STATUS_INVALID_ARGUMENT;
  ------------------
  |  |  188|      3|    ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ZYCORE, 0x04u)
  |  |  ------------------
  |  |  |  |   68|      3|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
 4552|      3|        }
 4553|    778|    }
 4554|       |
 4555|  10.1k|    for (ZyanU8 i = 0; i < request->operand_count; ++i)
  ------------------
  |  Branch (4555:24): [True: 7.03k, False: 3.13k]
  ------------------
 4556|  7.03k|    {
 4557|  7.03k|        const ZydisEncoderOperand *op = &request->operands[i];
 4558|  7.03k|        if ((op->type == ZYDIS_OPERAND_TYPE_UNUSED) ||
  ------------------
  |  Branch (4558:13): [True: 0, False: 7.03k]
  ------------------
 4559|  7.03k|            ((ZyanUSize)op->type > ZYDIS_OPERAND_TYPE_MAX_VALUE))
  ------------------
  |  Branch (4559:13): [True: 0, False: 7.03k]
  ------------------
 4560|      0|        {
 4561|      0|            return ZYAN_STATUS_INVALID_ARGUMENT;
  ------------------
  |  |  188|      0|    ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ZYCORE, 0x04u)
  |  |  ------------------
  |  |  |  |   68|      0|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
 4562|      0|        }
 4563|       |
 4564|  7.03k|        switch (op->type)
 4565|  7.03k|        {
 4566|  3.95k|        case ZYDIS_OPERAND_TYPE_REGISTER:
  ------------------
  |  Branch (4566:9): [True: 3.95k, False: 3.07k]
  ------------------
 4567|  3.95k|            if (op->reg.value > ZYDIS_REGISTER_MAX_VALUE)
  ------------------
  |  Branch (4567:17): [True: 0, False: 3.95k]
  ------------------
 4568|      0|            {
 4569|      0|                return ZYAN_STATUS_INVALID_ARGUMENT;
  ------------------
  |  |  188|      0|    ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ZYCORE, 0x04u)
  |  |  ------------------
  |  |  |  |   68|      0|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
 4570|      0|            }
 4571|  3.95k|            break;
 4572|  3.95k|        case ZYDIS_OPERAND_TYPE_MEMORY:
  ------------------
  |  Branch (4572:9): [True: 1.87k, False: 5.16k]
  ------------------
 4573|  1.87k|            if (((ZyanUSize)op->mem.base > ZYDIS_REGISTER_MAX_VALUE) ||
  ------------------
  |  Branch (4573:17): [True: 0, False: 1.87k]
  ------------------
 4574|  1.87k|                ((ZyanUSize)op->mem.index > ZYDIS_REGISTER_MAX_VALUE) ||
  ------------------
  |  Branch (4574:17): [True: 0, False: 1.87k]
  ------------------
 4575|  1.87k|                !ZydisIsScaleValid(op->mem.scale))
  ------------------
  |  Branch (4575:17): [True: 2, False: 1.86k]
  ------------------
 4576|      2|            {
 4577|      2|                return ZYAN_STATUS_INVALID_ARGUMENT;
  ------------------
  |  |  188|      2|    ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ZYCORE, 0x04u)
  |  |  ------------------
  |  |  |  |   68|      2|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
 4578|      2|            }
 4579|  1.86k|            break;
 4580|  1.86k|        case ZYDIS_OPERAND_TYPE_POINTER:
  ------------------
  |  Branch (4580:9): [True: 75, False: 6.96k]
  ------------------
 4581|  1.20k|        case ZYDIS_OPERAND_TYPE_IMMEDIATE:
  ------------------
  |  Branch (4581:9): [True: 1.13k, False: 5.90k]
  ------------------
 4582|  1.20k|            break;
 4583|      0|        default:
  ------------------
  |  Branch (4583:9): [True: 0, False: 7.03k]
  ------------------
 4584|      0|            return ZYAN_STATUS_INVALID_ARGUMENT;
  ------------------
  |  |  188|      0|    ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ZYCORE, 0x04u)
  |  |  ------------------
  |  |  |  |   68|      0|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
 4585|  7.03k|        }
 4586|  7.03k|    }
 4587|       |
 4588|  3.13k|    return ZYAN_STATUS_SUCCESS;
  ------------------
  |  |  164|  3.13k|    ZYAN_MAKE_STATUS(0u, ZYAN_MODULE_ZYCORE, 0x00u)
  |  |  ------------------
  |  |  |  |   68|  3.13k|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
 4589|  3.14k|}
Encoder.c:ZydisIsScaleValid:
  806|  1.87k|{
  807|  1.87k|    switch (scale)
  808|  1.87k|    {
  809|  1.54k|    case 0:
  ------------------
  |  Branch (809:5): [True: 1.54k, False: 321]
  ------------------
  810|  1.72k|    case 1:
  ------------------
  |  Branch (810:5): [True: 176, False: 1.69k]
  ------------------
  811|  1.77k|    case 2:
  ------------------
  |  Branch (811:5): [True: 48, False: 1.82k]
  ------------------
  812|  1.83k|    case 4:
  ------------------
  |  Branch (812:5): [True: 57, False: 1.81k]
  ------------------
  813|  1.86k|    case 8:
  ------------------
  |  Branch (813:5): [True: 38, False: 1.83k]
  ------------------
  814|  1.86k|        return ZYAN_TRUE;
  ------------------
  |  |  288|  1.86k|#define ZYAN_TRUE  1u
  ------------------
  815|      2|    default:
  ------------------
  |  Branch (815:5): [True: 2, False: 1.86k]
  ------------------
  816|      2|        return ZYAN_FALSE;
  ------------------
  |  |  287|      2|#define ZYAN_FALSE 0u
  ------------------
  817|  1.87k|    }
  818|  1.87k|}
Encoder.c:ZydisEncoderEncodeInstructionInternal:
 4605|  3.13k|{
 4606|  3.13k|    ZydisEncoderInstructionMatch match;
 4607|  3.13k|    ZYAN_CHECK(ZydisFindMatchingDefinition(request, &match));
  ------------------
  |  |  100|  3.13k|    do \
  |  |  101|  3.13k|    { \
  |  |  102|  3.13k|        const ZyanStatus status_047620348 = (status); \
  |  |  103|  3.13k|        if (!ZYAN_SUCCESS(status_047620348)) \
  |  |  ------------------
  |  |  |  |   82|  3.13k|    (!((status) & 0x80000000u))
  |  |  ------------------
  |  |  |  Branch (103:13): [True: 2.93k, False: 203]
  |  |  ------------------
  |  |  104|  3.13k|        { \
  |  |  105|  2.93k|            return status_047620348; \
  |  |  106|  2.93k|        } \
  |  |  107|  3.13k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (107:14): [Folded, False: 203]
  |  |  ------------------
  ------------------
 4608|    203|    ZydisEncoderBuffer output;
 4609|    203|    output.buffer = (ZyanU8 *)buffer;
 4610|    203|    output.size = *length > ZYDIS_MAX_INSTRUCTION_LENGTH
  ------------------
  |  |   49|    203|#define ZYDIS_MAX_INSTRUCTION_LENGTH    15
  ------------------
  |  Branch (4610:19): [True: 0, False: 203]
  ------------------
 4611|    203|        ? ZYDIS_MAX_INSTRUCTION_LENGTH
  ------------------
  |  |   49|      0|#define ZYDIS_MAX_INSTRUCTION_LENGTH    15
  ------------------
 4612|    203|        : *length;
 4613|    203|    output.offset = 0;
 4614|    203|    ZYAN_CHECK(ZydisBuildInstruction(&match, instruction));
  ------------------
  |  |  100|    203|    do \
  |  |  101|    203|    { \
  |  |  102|    203|        const ZyanStatus status_047620348 = (status); \
  |  |  103|    203|        if (!ZYAN_SUCCESS(status_047620348)) \
  |  |  ------------------
  |  |  |  |   82|    203|    (!((status) & 0x80000000u))
  |  |  ------------------
  |  |  |  Branch (103:13): [True: 0, False: 203]
  |  |  ------------------
  |  |  104|    203|        { \
  |  |  105|      0|            return status_047620348; \
  |  |  106|      0|        } \
  |  |  107|    203|    } while (0)
  |  |  ------------------
  |  |  |  Branch (107:14): [Folded, False: 203]
  |  |  ------------------
  ------------------
 4615|    203|    ZyanStatus status = ZydisEmitInstruction(instruction, &output);
 4616|    203|    if ((status == ZYAN_STATUS_INSUFFICIENT_BUFFER_SIZE) &&
  ------------------
  |  |  218|    203|    ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ZYCORE, 0x09u)
  |  |  ------------------
  |  |  |  |   68|    203|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
  |  Branch (4616:9): [True: 2, False: 201]
  ------------------
 4617|      2|        (output.size == ZYDIS_MAX_INSTRUCTION_LENGTH))
  ------------------
  |  |   49|      2|#define ZYDIS_MAX_INSTRUCTION_LENGTH    15
  ------------------
  |  Branch (4617:9): [True: 2, False: 0]
  ------------------
 4618|      2|    {
 4619|      2|        return ZYDIS_STATUS_INSTRUCTION_TOO_LONG;
  ------------------
  |  |   80|      2|    ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ZYDIS, 0x02u)
  |  |  ------------------
  |  |  |  |   68|      2|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
 4620|      2|    }
 4621|    201|    else if (ZYAN_FAILED(status))
  ------------------
  |  |   92|    201|    (!!((status) & 0x80000000u))
  |  |  ------------------
  |  |  |  Branch (92:5): [True: 0, False: 201]
  |  |  ------------------
  ------------------
 4622|      0|    {
 4623|      0|        return status;
 4624|      0|    }
 4625|    201|    *length = output.offset;
 4626|    201|    return ZYAN_STATUS_SUCCESS;
  ------------------
  |  |  164|    201|    ZYAN_MAKE_STATUS(0u, ZYAN_MODULE_ZYCORE, 0x00u)
  |  |  ------------------
  |  |  |  |   68|    201|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
 4627|    203|}
Encoder.c:ZydisFindMatchingDefinition:
 3161|  3.13k|{
 3162|  3.13k|    ZYAN_MEMSET(match, 0, sizeof(ZydisEncoderInstructionMatch));
  ------------------
  |  |  115|  3.13k|#define ZYAN_MEMSET     memset
  ------------------
 3163|  3.13k|    match->request = request;
 3164|  3.13k|    match->attributes = request->prefixes;
 3165|       |
 3166|  3.13k|    const ZydisEncodableInstruction *definition = ZYAN_NULL;
  ------------------
  |  |  277|  3.13k|#define ZYAN_NULL ((void*)0)
  ------------------
 3167|  3.13k|    const ZyanU8 definition_count = ZydisGetEncodableInstructions(request->mnemonic, &definition);
 3168|  3.13k|    ZYAN_ASSERT(definition && definition_count);
  ------------------
  |  |  381|  3.13k|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (3168:5): [True: 0, False: 3.13k]
  |  Branch (3168:5): [True: 0, False: 0]
  |  Branch (3168:5): [True: 3.13k, False: 0]
  |  Branch (3168:5): [True: 3.13k, False: 0]
  ------------------
 3169|  3.13k|    const ZydisWidthFlag mode_width = ZydisGetMachineModeWidth(request->machine_mode) >> 4;
 3170|  3.13k|    const ZyanBool is_compat =
 3171|  3.13k|        (request->machine_mode == ZYDIS_MACHINE_MODE_LONG_COMPAT_16) ||
  ------------------
  |  Branch (3171:9): [True: 237, False: 2.90k]
  ------------------
 3172|  2.90k|        (request->machine_mode == ZYDIS_MACHINE_MODE_LONG_COMPAT_32);
  ------------------
  |  Branch (3172:9): [True: 114, False: 2.78k]
  ------------------
 3173|  3.13k|    const ZyanU8 default_asz = ZydisGetAszFromHint(request->address_size_hint);
 3174|  3.13k|    const ZyanU8 default_osz = ZydisGetOszFromHint(request->operand_size_hint);
 3175|  3.13k|    const ZyanU16 operand_mask = ZydisGetOperandMask(request);
 3176|  3.13k|    const ZydisEncodableEncoding allowed_encodings = ZydisGetViableEncodings(request);
 3177|  3.13k|    if (allowed_encodings == ZYDIS_ENCODABLE_ENCODING_DEFAULT)
  ------------------
  |  Branch (3177:9): [True: 15, False: 3.12k]
  ------------------
 3178|     15|    {
 3179|     15|        return ZYDIS_STATUS_IMPOSSIBLE_INSTRUCTION;
  ------------------
  |  |  162|     15|    ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ZYDIS, 0x0Du)
  |  |  ------------------
  |  |  |  |   68|     15|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
 3180|     15|    }
 3181|       |
 3182|  19.1k|    for (ZyanU8 i = 0; i < definition_count; ++i, ++definition)
  ------------------
  |  Branch (3182:24): [True: 16.2k, False: 2.92k]
  ------------------
 3183|  16.2k|    {
 3184|  16.2k|        if (definition->operand_mask != operand_mask)
  ------------------
  |  Branch (3184:13): [True: 14.9k, False: 1.32k]
  ------------------
 3185|  14.9k|        {
 3186|  14.9k|            continue;
 3187|  14.9k|        }
 3188|  1.32k|        const ZydisInstructionDefinition *base_definition = ZYAN_NULL;
  ------------------
  |  |  277|  1.32k|#define ZYAN_NULL ((void*)0)
  ------------------
 3189|  1.32k|        ZydisGetInstructionDefinition(definition->encoding, definition->instruction_reference,
 3190|  1.32k|            &base_definition);
 3191|  1.32k|        if (!(definition->modes & mode_width))
  ------------------
  |  Branch (3191:13): [True: 120, False: 1.20k]
  ------------------
 3192|    120|        {
 3193|    120|            continue;
 3194|    120|        }
 3195|  1.20k|        if (!(ZydisGetEncodableEncoding(definition->encoding) & allowed_encodings))
  ------------------
  |  Branch (3195:13): [True: 263, False: 940]
  ------------------
 3196|    263|        {
 3197|    263|            continue;
 3198|    263|        }
 3199|    940|        if (request->machine_mode == ZYDIS_MACHINE_MODE_REAL_16)
  ------------------
  |  Branch (3199:13): [True: 23, False: 917]
  ------------------
 3200|     23|        {
 3201|     23|            if (base_definition->requires_protected_mode)
  ------------------
  |  Branch (3201:17): [True: 0, False: 23]
  ------------------
 3202|      0|            {
 3203|      0|                continue;
 3204|      0|            }
 3205|     23|            switch (definition->encoding)
 3206|     23|            {
 3207|      0|            case ZYDIS_INSTRUCTION_ENCODING_XOP:
  ------------------
  |  Branch (3207:13): [True: 0, False: 23]
  ------------------
 3208|      3|            case ZYDIS_INSTRUCTION_ENCODING_VEX:
  ------------------
  |  Branch (3208:13): [True: 3, False: 20]
  ------------------
 3209|      3|            case ZYDIS_INSTRUCTION_ENCODING_EVEX:
  ------------------
  |  Branch (3209:13): [True: 0, False: 23]
  ------------------
 3210|      3|            case ZYDIS_INSTRUCTION_ENCODING_MVEX:
  ------------------
  |  Branch (3210:13): [True: 0, False: 23]
  ------------------
 3211|      3|                continue;
 3212|     20|            default:
  ------------------
  |  Branch (3212:13): [True: 20, False: 3]
  ------------------
 3213|     20|                break;
 3214|     23|            }
 3215|     23|        }
 3216|    917|        else if ((request->machine_mode != ZYDIS_MACHINE_MODE_LONG_64) &&
  ------------------
  |  Branch (3216:18): [True: 163, False: 754]
  ------------------
 3217|    163|                 (definition->encoding == ZYDIS_INSTRUCTION_ENCODING_MVEX))
  ------------------
  |  Branch (3217:18): [True: 0, False: 163]
  ------------------
 3218|      0|        {
 3219|      0|            continue;
 3220|      0|        }
 3221|    937|        if (is_compat && base_definition->no_compat_mode)
  ------------------
  |  Branch (3221:13): [True: 82, False: 855]
  |  Branch (3221:26): [True: 0, False: 82]
  ------------------
 3222|      0|        {
 3223|      0|            continue;
 3224|      0|        }
 3225|    937|        if ((request->branch_type != ZYDIS_BRANCH_TYPE_NONE) &&
  ------------------
  |  Branch (3225:13): [True: 70, False: 867]
  ------------------
 3226|     70|            (request->branch_type != base_definition->branch_type))
  ------------------
  |  Branch (3226:13): [True: 32, False: 38]
  ------------------
 3227|     32|        {
 3228|     32|            continue;
 3229|     32|        }
 3230|    905|        if (((base_definition->branch_type == ZYDIS_BRANCH_TYPE_NONE) ||
  ------------------
  |  Branch (3230:14): [True: 837, False: 68]
  ------------------
 3231|     68|             (base_definition->branch_type == ZYDIS_BRANCH_TYPE_ABSOLUTE)) &&
  ------------------
  |  Branch (3231:14): [True: 0, False: 68]
  ------------------
 3232|    837|             (request->branch_width != ZYDIS_BRANCH_WIDTH_NONE))
  ------------------
  |  Branch (3232:14): [True: 3, False: 834]
  ------------------
 3233|      3|        {
 3234|      3|            continue;
 3235|      3|        }
 3236|       |
 3237|    902|        match->definition = definition;
 3238|    902|        match->base_definition = base_definition;
 3239|    902|        match->operands = ZYAN_NULL;
  ------------------
  |  |  277|    902|#define ZYAN_NULL ((void*)0)
  ------------------
 3240|    902|        match->easz = definition->accepts_hint == ZYDIS_SIZE_HINT_ASZ ? default_asz : 0;
  ------------------
  |  Branch (3240:23): [True: 8, False: 894]
  ------------------
 3241|    902|        match->eosz = definition->accepts_hint == ZYDIS_SIZE_HINT_OSZ ? default_osz : 0;
  ------------------
  |  Branch (3241:23): [True: 0, False: 902]
  ------------------
 3242|    902|        match->disp_size = match->imm_size = match->cd8_scale = 0;
 3243|    902|        match->rex_type = ZYDIS_REX_TYPE_UNKNOWN;
 3244|    902|        match->eosz64_forbidden = ZYAN_FALSE;
  ------------------
  |  |  287|    902|#define ZYAN_FALSE 0u
  ------------------
 3245|    902|        match->has_rel_operand = ZYAN_FALSE;
  ------------------
  |  |  287|    902|#define ZYAN_FALSE 0u
  ------------------
 3246|    902|        if ((base_definition->operand_size_map != ZYDIS_OPSIZE_MAP_BYTEOP) &&
  ------------------
  |  |   45|    902|#define ZYDIS_OPSIZE_MAP_BYTEOP                 1
  ------------------
  |  Branch (3246:13): [True: 708, False: 194]
  ------------------
 3247|    708|            (match->eosz == 8))
  ------------------
  |  Branch (3247:13): [True: 0, False: 708]
  ------------------
 3248|      0|        {
 3249|      0|            continue;
 3250|      0|        }
 3251|    902|        if (!ZydisArePrefixesCompatible(match))
  ------------------
  |  Branch (3251:13): [True: 38, False: 864]
  ------------------
 3252|     38|        {
 3253|     38|            continue;
 3254|     38|        }
 3255|    864|        if (!ZydisIsDefinitionCompatible(match, request))
  ------------------
  |  Branch (3255:13): [True: 652, False: 212]
  ------------------
 3256|    652|        {
 3257|    652|            continue;
 3258|    652|        }
 3259|    212|        if (ZydisHandleSwappableDefinition(match))
  ------------------
  |  Branch (3259:13): [True: 8, False: 204]
  ------------------
 3260|      8|        {
 3261|      8|            if (definition == match->definition)
  ------------------
  |  Branch (3261:17): [True: 8, False: 0]
  ------------------
 3262|      8|            {
 3263|      8|                continue;
 3264|      8|            }
 3265|      0|            ++i;
 3266|      0|            definition = match->definition;
 3267|      0|            base_definition = match->base_definition;
 3268|      0|        }
 3269|       |
 3270|    204|        if (match->easz == 0)
  ------------------
  |  Branch (3270:13): [True: 130, False: 74]
  ------------------
 3271|    130|        {
 3272|    130|            if (definition->address_sizes & mode_width)
  ------------------
  |  Branch (3272:17): [True: 130, False: 0]
  ------------------
 3273|    130|            {
 3274|    130|                match->easz = (ZyanU8)(mode_width << 4);
 3275|    130|            }
 3276|      0|            else if (mode_width == ZYDIS_WIDTH_16)
  ------------------
  |  Branch (3276:22): [True: 0, False: 0]
  ------------------
 3277|      0|            {
 3278|      0|                match->easz = 32;
 3279|      0|            }
 3280|      0|            else if (mode_width == ZYDIS_WIDTH_32)
  ------------------
  |  Branch (3280:22): [True: 0, False: 0]
  ------------------
 3281|      0|            {
 3282|      0|                match->easz = 16;
 3283|      0|            }
 3284|      0|            else
 3285|      0|            {
 3286|      0|                match->easz = 32;
 3287|      0|            }
 3288|    130|            ZYAN_ASSERT(definition->address_sizes & (match->easz >> 4));
  ------------------
  |  |  381|    130|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (3288:13): [True: 0, False: 130]
  |  Branch (3288:13): [True: 130, False: 0]
  ------------------
 3289|    130|        }
 3290|     74|        else if (!(definition->address_sizes & (match->easz >> 4)))
  ------------------
  |  Branch (3290:18): [True: 1, False: 73]
  ------------------
 3291|      1|        {
 3292|      1|            continue;
 3293|      1|        }
 3294|       |
 3295|    203|        if (mode_width == ZYDIS_WIDTH_64)
  ------------------
  |  Branch (3295:13): [True: 142, False: 61]
  ------------------
 3296|    142|        {
 3297|    142|            if (base_definition->operand_size_map == ZYDIS_OPSIZE_MAP_DEFAULT64)
  ------------------
  |  |   46|    142|#define ZYDIS_OPSIZE_MAP_DEFAULT64              4
  ------------------
  |  Branch (3297:17): [True: 0, False: 142]
  ------------------
 3298|      0|            {
 3299|      0|                if (match->eosz == 0)
  ------------------
  |  Branch (3299:21): [True: 0, False: 0]
  ------------------
 3300|      0|                {
 3301|      0|                    ZYAN_ASSERT(definition->operand_sizes & (ZYDIS_WIDTH_16 | ZYDIS_WIDTH_64));
  ------------------
  |  |  381|      0|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (3301:21): [True: 0, False: 0]
  |  Branch (3301:21): [True: 0, False: 0]
  ------------------
 3302|      0|                    if (definition->operand_sizes & ZYDIS_WIDTH_64)
  ------------------
  |  Branch (3302:25): [True: 0, False: 0]
  ------------------
 3303|      0|                    {
 3304|      0|                        match->eosz = 64;
 3305|      0|                    }
 3306|      0|                    else
 3307|      0|                    {
 3308|      0|                        match->eosz = 16;
 3309|      0|                    }
 3310|      0|                }
 3311|      0|                else if (match->eosz == 32)
  ------------------
  |  Branch (3311:26): [True: 0, False: 0]
  ------------------
 3312|      0|                {
 3313|      0|                    continue;
 3314|      0|                }
 3315|      0|            }
 3316|    142|            else if (base_definition->operand_size_map == ZYDIS_OPSIZE_MAP_FORCE64)
  ------------------
  |  |   47|    142|#define ZYDIS_OPSIZE_MAP_FORCE64                5
  ------------------
  |  Branch (3316:22): [True: 12, False: 130]
  ------------------
 3317|     12|            {
 3318|     12|                if (match->eosz == 0)
  ------------------
  |  Branch (3318:21): [True: 1, False: 11]
  ------------------
 3319|      1|                {
 3320|      1|                    match->eosz = 64;
 3321|      1|                }
 3322|     11|                else if (match->eosz != 64)
  ------------------
  |  Branch (3322:26): [True: 0, False: 11]
  ------------------
 3323|      0|                {
 3324|      0|                    continue;
 3325|      0|                }
 3326|     12|            }
 3327|    142|        }
 3328|    203|        if (match->eosz == 0)
  ------------------
  |  Branch (3328:13): [True: 60, False: 143]
  ------------------
 3329|     60|        {
 3330|     60|            const ZydisWidthFlag default_width = (mode_width == ZYDIS_WIDTH_64)
  ------------------
  |  Branch (3330:50): [True: 36, False: 24]
  ------------------
 3331|     60|                ? ZYDIS_WIDTH_32
 3332|     60|                : mode_width;
 3333|     60|            if (definition->operand_sizes & default_width)
  ------------------
  |  Branch (3333:17): [True: 58, False: 2]
  ------------------
 3334|     58|            {
 3335|     58|                match->eosz = (ZyanU8)(default_width << 4);
 3336|     58|            }
 3337|      2|            else if (definition->operand_sizes & ZYDIS_WIDTH_16)
  ------------------
  |  Branch (3337:22): [True: 0, False: 2]
  ------------------
 3338|      0|            {
 3339|      0|                match->eosz = 16;
 3340|      0|            }
 3341|      2|            else if (definition->operand_sizes & ZYDIS_WIDTH_32)
  ------------------
  |  Branch (3341:22): [True: 2, False: 0]
  ------------------
 3342|      2|            {
 3343|      2|                match->eosz = 32;
 3344|      2|            }
 3345|      0|            else
 3346|      0|            {
 3347|      0|                match->eosz = 64;
 3348|      0|            }
 3349|     60|        }
 3350|    143|        else if (match->eosz64_forbidden && match->eosz == 64)
  ------------------
  |  Branch (3350:18): [True: 2, False: 141]
  |  Branch (3350:45): [True: 0, False: 2]
  ------------------
 3351|      0|        {
 3352|      0|            continue;
 3353|      0|        }
 3354|    143|        else if (!(definition->operand_sizes & (match->eosz >> 4)))
  ------------------
  |  Branch (3354:18): [True: 0, False: 143]
  ------------------
 3355|      0|        {
 3356|      0|            continue;
 3357|      0|        }
 3358|       |
 3359|    203|        return ZYAN_STATUS_SUCCESS;
  ------------------
  |  |  164|    203|    ZYAN_MAKE_STATUS(0u, ZYAN_MODULE_ZYCORE, 0x00u)
  |  |  ------------------
  |  |  |  |   68|    203|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
 3360|    203|    }
 3361|       |
 3362|  2.92k|    return ZYDIS_STATUS_IMPOSSIBLE_INSTRUCTION;
  ------------------
  |  |  162|  2.92k|    ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ZYDIS, 0x0Du)
  |  |  ------------------
  |  |  |  |   68|  2.92k|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
 3363|  3.12k|}
Encoder.c:ZydisGetOszFromHint:
  340|  3.13k|{
  341|  3.13k|    ZYAN_ASSERT((ZyanUSize)hint <= ZYDIS_OPERAND_SIZE_HINT_MAX_VALUE);
  ------------------
  |  |  381|  3.13k|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (341:5): [True: 0, False: 3.13k]
  |  Branch (341:5): [True: 3.13k, False: 0]
  ------------------
  342|  3.13k|    static const ZyanU8 lookup[ZYDIS_OPERAND_SIZE_HINT_MAX_VALUE + 1] = { 0, 8, 16, 32, 64 };
  343|  3.13k|    return lookup[hint];
  344|  3.13k|}
Encoder.c:ZydisGetOperandMask:
 3015|  3.13k|{
 3016|  3.13k|    ZyanU16 operand_mask = request->operand_count;
 3017|  3.13k|    ZyanU8 bit_offset = ZYAN_BITS_TO_REPRESENT(ZYDIS_ENCODER_MAX_OPERANDS);
  ------------------
  |  |  628|  3.13k|    ( \
  |  |  629|  3.13k|        ZYAN_NEEDS_BIT(n,  0) + ZYAN_NEEDS_BIT(n,  1) + \
  |  |  ------------------
  |  |  |  |  616|  3.13k|#define ZYAN_NEEDS_BIT(n, b) (((unsigned long)(n) >> (b)) > 0)
  |  |  ------------------
  |  |                       ZYAN_NEEDS_BIT(n,  0) + ZYAN_NEEDS_BIT(n,  1) + \
  |  |  ------------------
  |  |  |  |  616|  3.13k|#define ZYAN_NEEDS_BIT(n, b) (((unsigned long)(n) >> (b)) > 0)
  |  |  ------------------
  |  |  630|  3.13k|        ZYAN_NEEDS_BIT(n,  2) + ZYAN_NEEDS_BIT(n,  3) + \
  |  |  ------------------
  |  |  |  |  616|  3.13k|#define ZYAN_NEEDS_BIT(n, b) (((unsigned long)(n) >> (b)) > 0)
  |  |  ------------------
  |  |                       ZYAN_NEEDS_BIT(n,  2) + ZYAN_NEEDS_BIT(n,  3) + \
  |  |  ------------------
  |  |  |  |  616|  3.13k|#define ZYAN_NEEDS_BIT(n, b) (((unsigned long)(n) >> (b)) > 0)
  |  |  ------------------
  |  |  631|  3.13k|        ZYAN_NEEDS_BIT(n,  4) + ZYAN_NEEDS_BIT(n,  5) + \
  |  |  ------------------
  |  |  |  |  616|  3.13k|#define ZYAN_NEEDS_BIT(n, b) (((unsigned long)(n) >> (b)) > 0)
  |  |  ------------------
  |  |                       ZYAN_NEEDS_BIT(n,  4) + ZYAN_NEEDS_BIT(n,  5) + \
  |  |  ------------------
  |  |  |  |  616|  3.13k|#define ZYAN_NEEDS_BIT(n, b) (((unsigned long)(n) >> (b)) > 0)
  |  |  ------------------
  |  |  632|  3.13k|        ZYAN_NEEDS_BIT(n,  6) + ZYAN_NEEDS_BIT(n,  7) + \
  |  |  ------------------
  |  |  |  |  616|  3.13k|#define ZYAN_NEEDS_BIT(n, b) (((unsigned long)(n) >> (b)) > 0)
  |  |  ------------------
  |  |                       ZYAN_NEEDS_BIT(n,  6) + ZYAN_NEEDS_BIT(n,  7) + \
  |  |  ------------------
  |  |  |  |  616|  3.13k|#define ZYAN_NEEDS_BIT(n, b) (((unsigned long)(n) >> (b)) > 0)
  |  |  ------------------
  |  |  633|  3.13k|        ZYAN_NEEDS_BIT(n,  8) + ZYAN_NEEDS_BIT(n,  9) + \
  |  |  ------------------
  |  |  |  |  616|  3.13k|#define ZYAN_NEEDS_BIT(n, b) (((unsigned long)(n) >> (b)) > 0)
  |  |  ------------------
  |  |                       ZYAN_NEEDS_BIT(n,  8) + ZYAN_NEEDS_BIT(n,  9) + \
  |  |  ------------------
  |  |  |  |  616|  3.13k|#define ZYAN_NEEDS_BIT(n, b) (((unsigned long)(n) >> (b)) > 0)
  |  |  ------------------
  |  |  634|  3.13k|        ZYAN_NEEDS_BIT(n, 10) + ZYAN_NEEDS_BIT(n, 11) + \
  |  |  ------------------
  |  |  |  |  616|  3.13k|#define ZYAN_NEEDS_BIT(n, b) (((unsigned long)(n) >> (b)) > 0)
  |  |  ------------------
  |  |                       ZYAN_NEEDS_BIT(n, 10) + ZYAN_NEEDS_BIT(n, 11) + \
  |  |  ------------------
  |  |  |  |  616|  3.13k|#define ZYAN_NEEDS_BIT(n, b) (((unsigned long)(n) >> (b)) > 0)
  |  |  ------------------
  |  |  635|  3.13k|        ZYAN_NEEDS_BIT(n, 12) + ZYAN_NEEDS_BIT(n, 13) + \
  |  |  ------------------
  |  |  |  |  616|  3.13k|#define ZYAN_NEEDS_BIT(n, b) (((unsigned long)(n) >> (b)) > 0)
  |  |  ------------------
  |  |                       ZYAN_NEEDS_BIT(n, 12) + ZYAN_NEEDS_BIT(n, 13) + \
  |  |  ------------------
  |  |  |  |  616|  3.13k|#define ZYAN_NEEDS_BIT(n, b) (((unsigned long)(n) >> (b)) > 0)
  |  |  ------------------
  |  |  636|  3.13k|        ZYAN_NEEDS_BIT(n, 14) + ZYAN_NEEDS_BIT(n, 15) + \
  |  |  ------------------
  |  |  |  |  616|  3.13k|#define ZYAN_NEEDS_BIT(n, b) (((unsigned long)(n) >> (b)) > 0)
  |  |  ------------------
  |  |                       ZYAN_NEEDS_BIT(n, 14) + ZYAN_NEEDS_BIT(n, 15) + \
  |  |  ------------------
  |  |  |  |  616|  3.13k|#define ZYAN_NEEDS_BIT(n, b) (((unsigned long)(n) >> (b)) > 0)
  |  |  ------------------
  |  |  637|  3.13k|        ZYAN_NEEDS_BIT(n, 16) + ZYAN_NEEDS_BIT(n, 17) + \
  |  |  ------------------
  |  |  |  |  616|  3.13k|#define ZYAN_NEEDS_BIT(n, b) (((unsigned long)(n) >> (b)) > 0)
  |  |  ------------------
  |  |                       ZYAN_NEEDS_BIT(n, 16) + ZYAN_NEEDS_BIT(n, 17) + \
  |  |  ------------------
  |  |  |  |  616|  3.13k|#define ZYAN_NEEDS_BIT(n, b) (((unsigned long)(n) >> (b)) > 0)
  |  |  ------------------
  |  |  638|  3.13k|        ZYAN_NEEDS_BIT(n, 18) + ZYAN_NEEDS_BIT(n, 19) + \
  |  |  ------------------
  |  |  |  |  616|  3.13k|#define ZYAN_NEEDS_BIT(n, b) (((unsigned long)(n) >> (b)) > 0)
  |  |  ------------------
  |  |                       ZYAN_NEEDS_BIT(n, 18) + ZYAN_NEEDS_BIT(n, 19) + \
  |  |  ------------------
  |  |  |  |  616|  3.13k|#define ZYAN_NEEDS_BIT(n, b) (((unsigned long)(n) >> (b)) > 0)
  |  |  ------------------
  |  |  639|  3.13k|        ZYAN_NEEDS_BIT(n, 20) + ZYAN_NEEDS_BIT(n, 21) + \
  |  |  ------------------
  |  |  |  |  616|  3.13k|#define ZYAN_NEEDS_BIT(n, b) (((unsigned long)(n) >> (b)) > 0)
  |  |  ------------------
  |  |                       ZYAN_NEEDS_BIT(n, 20) + ZYAN_NEEDS_BIT(n, 21) + \
  |  |  ------------------
  |  |  |  |  616|  3.13k|#define ZYAN_NEEDS_BIT(n, b) (((unsigned long)(n) >> (b)) > 0)
  |  |  ------------------
  |  |  640|  3.13k|        ZYAN_NEEDS_BIT(n, 22) + ZYAN_NEEDS_BIT(n, 23) + \
  |  |  ------------------
  |  |  |  |  616|  3.13k|#define ZYAN_NEEDS_BIT(n, b) (((unsigned long)(n) >> (b)) > 0)
  |  |  ------------------
  |  |                       ZYAN_NEEDS_BIT(n, 22) + ZYAN_NEEDS_BIT(n, 23) + \
  |  |  ------------------
  |  |  |  |  616|  3.13k|#define ZYAN_NEEDS_BIT(n, b) (((unsigned long)(n) >> (b)) > 0)
  |  |  ------------------
  |  |  641|  3.13k|        ZYAN_NEEDS_BIT(n, 24) + ZYAN_NEEDS_BIT(n, 25) + \
  |  |  ------------------
  |  |  |  |  616|  3.13k|#define ZYAN_NEEDS_BIT(n, b) (((unsigned long)(n) >> (b)) > 0)
  |  |  ------------------
  |  |                       ZYAN_NEEDS_BIT(n, 24) + ZYAN_NEEDS_BIT(n, 25) + \
  |  |  ------------------
  |  |  |  |  616|  3.13k|#define ZYAN_NEEDS_BIT(n, b) (((unsigned long)(n) >> (b)) > 0)
  |  |  ------------------
  |  |  642|  3.13k|        ZYAN_NEEDS_BIT(n, 26) + ZYAN_NEEDS_BIT(n, 27) + \
  |  |  ------------------
  |  |  |  |  616|  3.13k|#define ZYAN_NEEDS_BIT(n, b) (((unsigned long)(n) >> (b)) > 0)
  |  |  ------------------
  |  |                       ZYAN_NEEDS_BIT(n, 26) + ZYAN_NEEDS_BIT(n, 27) + \
  |  |  ------------------
  |  |  |  |  616|  3.13k|#define ZYAN_NEEDS_BIT(n, b) (((unsigned long)(n) >> (b)) > 0)
  |  |  ------------------
  |  |  643|  3.13k|        ZYAN_NEEDS_BIT(n, 28) + ZYAN_NEEDS_BIT(n, 29) + \
  |  |  ------------------
  |  |  |  |  616|  3.13k|#define ZYAN_NEEDS_BIT(n, b) (((unsigned long)(n) >> (b)) > 0)
  |  |  ------------------
  |  |                       ZYAN_NEEDS_BIT(n, 28) + ZYAN_NEEDS_BIT(n, 29) + \
  |  |  ------------------
  |  |  |  |  616|  3.13k|#define ZYAN_NEEDS_BIT(n, b) (((unsigned long)(n) >> (b)) > 0)
  |  |  ------------------
  |  |  644|  3.13k|        ZYAN_NEEDS_BIT(n, 30) + ZYAN_NEEDS_BIT(n, 31)   \
  |  |  ------------------
  |  |  |  |  616|  3.13k|#define ZYAN_NEEDS_BIT(n, b) (((unsigned long)(n) >> (b)) > 0)
  |  |  ------------------
  |  |                       ZYAN_NEEDS_BIT(n, 30) + ZYAN_NEEDS_BIT(n, 31)   \
  |  |  ------------------
  |  |  |  |  616|  3.13k|#define ZYAN_NEEDS_BIT(n, b) (((unsigned long)(n) >> (b)) > 0)
  |  |  ------------------
  |  |  645|  3.13k|    )
  ------------------
 3018|  10.1k|    for (ZyanU8 i = 0; i < request->operand_count; ++i)
  ------------------
  |  Branch (3018:24): [True: 7.03k, False: 3.13k]
  ------------------
 3019|  7.03k|    {
 3020|  7.03k|        operand_mask |= (request->operands[i].type - ZYDIS_OPERAND_TYPE_REGISTER) << bit_offset;
 3021|  7.03k|        bit_offset += ZYAN_BITS_TO_REPRESENT(
  ------------------
  |  |  628|  7.03k|    ( \
  |  |  629|  7.03k|        ZYAN_NEEDS_BIT(n,  0) + ZYAN_NEEDS_BIT(n,  1) + \
  |  |  ------------------
  |  |  |  |  616|  7.03k|#define ZYAN_NEEDS_BIT(n, b) (((unsigned long)(n) >> (b)) > 0)
  |  |  ------------------
  |  |                       ZYAN_NEEDS_BIT(n,  0) + ZYAN_NEEDS_BIT(n,  1) + \
  |  |  ------------------
  |  |  |  |  616|  7.03k|#define ZYAN_NEEDS_BIT(n, b) (((unsigned long)(n) >> (b)) > 0)
  |  |  ------------------
  |  |  630|  7.03k|        ZYAN_NEEDS_BIT(n,  2) + ZYAN_NEEDS_BIT(n,  3) + \
  |  |  ------------------
  |  |  |  |  616|  7.03k|#define ZYAN_NEEDS_BIT(n, b) (((unsigned long)(n) >> (b)) > 0)
  |  |  ------------------
  |  |                       ZYAN_NEEDS_BIT(n,  2) + ZYAN_NEEDS_BIT(n,  3) + \
  |  |  ------------------
  |  |  |  |  616|  7.03k|#define ZYAN_NEEDS_BIT(n, b) (((unsigned long)(n) >> (b)) > 0)
  |  |  ------------------
  |  |  631|  7.03k|        ZYAN_NEEDS_BIT(n,  4) + ZYAN_NEEDS_BIT(n,  5) + \
  |  |  ------------------
  |  |  |  |  616|  7.03k|#define ZYAN_NEEDS_BIT(n, b) (((unsigned long)(n) >> (b)) > 0)
  |  |  ------------------
  |  |                       ZYAN_NEEDS_BIT(n,  4) + ZYAN_NEEDS_BIT(n,  5) + \
  |  |  ------------------
  |  |  |  |  616|  7.03k|#define ZYAN_NEEDS_BIT(n, b) (((unsigned long)(n) >> (b)) > 0)
  |  |  ------------------
  |  |  632|  7.03k|        ZYAN_NEEDS_BIT(n,  6) + ZYAN_NEEDS_BIT(n,  7) + \
  |  |  ------------------
  |  |  |  |  616|  7.03k|#define ZYAN_NEEDS_BIT(n, b) (((unsigned long)(n) >> (b)) > 0)
  |  |  ------------------
  |  |                       ZYAN_NEEDS_BIT(n,  6) + ZYAN_NEEDS_BIT(n,  7) + \
  |  |  ------------------
  |  |  |  |  616|  7.03k|#define ZYAN_NEEDS_BIT(n, b) (((unsigned long)(n) >> (b)) > 0)
  |  |  ------------------
  |  |  633|  7.03k|        ZYAN_NEEDS_BIT(n,  8) + ZYAN_NEEDS_BIT(n,  9) + \
  |  |  ------------------
  |  |  |  |  616|  7.03k|#define ZYAN_NEEDS_BIT(n, b) (((unsigned long)(n) >> (b)) > 0)
  |  |  ------------------
  |  |                       ZYAN_NEEDS_BIT(n,  8) + ZYAN_NEEDS_BIT(n,  9) + \
  |  |  ------------------
  |  |  |  |  616|  7.03k|#define ZYAN_NEEDS_BIT(n, b) (((unsigned long)(n) >> (b)) > 0)
  |  |  ------------------
  |  |  634|  7.03k|        ZYAN_NEEDS_BIT(n, 10) + ZYAN_NEEDS_BIT(n, 11) + \
  |  |  ------------------
  |  |  |  |  616|  7.03k|#define ZYAN_NEEDS_BIT(n, b) (((unsigned long)(n) >> (b)) > 0)
  |  |  ------------------
  |  |                       ZYAN_NEEDS_BIT(n, 10) + ZYAN_NEEDS_BIT(n, 11) + \
  |  |  ------------------
  |  |  |  |  616|  7.03k|#define ZYAN_NEEDS_BIT(n, b) (((unsigned long)(n) >> (b)) > 0)
  |  |  ------------------
  |  |  635|  7.03k|        ZYAN_NEEDS_BIT(n, 12) + ZYAN_NEEDS_BIT(n, 13) + \
  |  |  ------------------
  |  |  |  |  616|  7.03k|#define ZYAN_NEEDS_BIT(n, b) (((unsigned long)(n) >> (b)) > 0)
  |  |  ------------------
  |  |                       ZYAN_NEEDS_BIT(n, 12) + ZYAN_NEEDS_BIT(n, 13) + \
  |  |  ------------------
  |  |  |  |  616|  7.03k|#define ZYAN_NEEDS_BIT(n, b) (((unsigned long)(n) >> (b)) > 0)
  |  |  ------------------
  |  |  636|  7.03k|        ZYAN_NEEDS_BIT(n, 14) + ZYAN_NEEDS_BIT(n, 15) + \
  |  |  ------------------
  |  |  |  |  616|  7.03k|#define ZYAN_NEEDS_BIT(n, b) (((unsigned long)(n) >> (b)) > 0)
  |  |  ------------------
  |  |                       ZYAN_NEEDS_BIT(n, 14) + ZYAN_NEEDS_BIT(n, 15) + \
  |  |  ------------------
  |  |  |  |  616|  7.03k|#define ZYAN_NEEDS_BIT(n, b) (((unsigned long)(n) >> (b)) > 0)
  |  |  ------------------
  |  |  637|  7.03k|        ZYAN_NEEDS_BIT(n, 16) + ZYAN_NEEDS_BIT(n, 17) + \
  |  |  ------------------
  |  |  |  |  616|  7.03k|#define ZYAN_NEEDS_BIT(n, b) (((unsigned long)(n) >> (b)) > 0)
  |  |  ------------------
  |  |                       ZYAN_NEEDS_BIT(n, 16) + ZYAN_NEEDS_BIT(n, 17) + \
  |  |  ------------------
  |  |  |  |  616|  7.03k|#define ZYAN_NEEDS_BIT(n, b) (((unsigned long)(n) >> (b)) > 0)
  |  |  ------------------
  |  |  638|  7.03k|        ZYAN_NEEDS_BIT(n, 18) + ZYAN_NEEDS_BIT(n, 19) + \
  |  |  ------------------
  |  |  |  |  616|  7.03k|#define ZYAN_NEEDS_BIT(n, b) (((unsigned long)(n) >> (b)) > 0)
  |  |  ------------------
  |  |                       ZYAN_NEEDS_BIT(n, 18) + ZYAN_NEEDS_BIT(n, 19) + \
  |  |  ------------------
  |  |  |  |  616|  7.03k|#define ZYAN_NEEDS_BIT(n, b) (((unsigned long)(n) >> (b)) > 0)
  |  |  ------------------
  |  |  639|  7.03k|        ZYAN_NEEDS_BIT(n, 20) + ZYAN_NEEDS_BIT(n, 21) + \
  |  |  ------------------
  |  |  |  |  616|  7.03k|#define ZYAN_NEEDS_BIT(n, b) (((unsigned long)(n) >> (b)) > 0)
  |  |  ------------------
  |  |                       ZYAN_NEEDS_BIT(n, 20) + ZYAN_NEEDS_BIT(n, 21) + \
  |  |  ------------------
  |  |  |  |  616|  7.03k|#define ZYAN_NEEDS_BIT(n, b) (((unsigned long)(n) >> (b)) > 0)
  |  |  ------------------
  |  |  640|  7.03k|        ZYAN_NEEDS_BIT(n, 22) + ZYAN_NEEDS_BIT(n, 23) + \
  |  |  ------------------
  |  |  |  |  616|  7.03k|#define ZYAN_NEEDS_BIT(n, b) (((unsigned long)(n) >> (b)) > 0)
  |  |  ------------------
  |  |                       ZYAN_NEEDS_BIT(n, 22) + ZYAN_NEEDS_BIT(n, 23) + \
  |  |  ------------------
  |  |  |  |  616|  7.03k|#define ZYAN_NEEDS_BIT(n, b) (((unsigned long)(n) >> (b)) > 0)
  |  |  ------------------
  |  |  641|  7.03k|        ZYAN_NEEDS_BIT(n, 24) + ZYAN_NEEDS_BIT(n, 25) + \
  |  |  ------------------
  |  |  |  |  616|  7.03k|#define ZYAN_NEEDS_BIT(n, b) (((unsigned long)(n) >> (b)) > 0)
  |  |  ------------------
  |  |                       ZYAN_NEEDS_BIT(n, 24) + ZYAN_NEEDS_BIT(n, 25) + \
  |  |  ------------------
  |  |  |  |  616|  7.03k|#define ZYAN_NEEDS_BIT(n, b) (((unsigned long)(n) >> (b)) > 0)
  |  |  ------------------
  |  |  642|  7.03k|        ZYAN_NEEDS_BIT(n, 26) + ZYAN_NEEDS_BIT(n, 27) + \
  |  |  ------------------
  |  |  |  |  616|  7.03k|#define ZYAN_NEEDS_BIT(n, b) (((unsigned long)(n) >> (b)) > 0)
  |  |  ------------------
  |  |                       ZYAN_NEEDS_BIT(n, 26) + ZYAN_NEEDS_BIT(n, 27) + \
  |  |  ------------------
  |  |  |  |  616|  7.03k|#define ZYAN_NEEDS_BIT(n, b) (((unsigned long)(n) >> (b)) > 0)
  |  |  ------------------
  |  |  643|  7.03k|        ZYAN_NEEDS_BIT(n, 28) + ZYAN_NEEDS_BIT(n, 29) + \
  |  |  ------------------
  |  |  |  |  616|  7.03k|#define ZYAN_NEEDS_BIT(n, b) (((unsigned long)(n) >> (b)) > 0)
  |  |  ------------------
  |  |                       ZYAN_NEEDS_BIT(n, 28) + ZYAN_NEEDS_BIT(n, 29) + \
  |  |  ------------------
  |  |  |  |  616|  7.03k|#define ZYAN_NEEDS_BIT(n, b) (((unsigned long)(n) >> (b)) > 0)
  |  |  ------------------
  |  |  644|  7.03k|        ZYAN_NEEDS_BIT(n, 30) + ZYAN_NEEDS_BIT(n, 31)   \
  |  |  ------------------
  |  |  |  |  616|  7.03k|#define ZYAN_NEEDS_BIT(n, b) (((unsigned long)(n) >> (b)) > 0)
  |  |  ------------------
  |  |                       ZYAN_NEEDS_BIT(n, 30) + ZYAN_NEEDS_BIT(n, 31)   \
  |  |  ------------------
  |  |  |  |  616|  7.03k|#define ZYAN_NEEDS_BIT(n, b) (((unsigned long)(n) >> (b)) > 0)
  |  |  ------------------
  |  |  645|  7.03k|    )
  ------------------
 3022|  7.03k|            ZYDIS_OPERAND_TYPE_MAX_VALUE - ZYDIS_OPERAND_TYPE_REGISTER);
 3023|  7.03k|    }
 3024|       |
 3025|  3.13k|    return operand_mask;
 3026|  3.13k|}
Encoder.c:ZydisGetViableEncodings:
 3104|  3.13k|{
 3105|  3.13k|    const ZyanBool needs_evex =
 3106|  3.13k|        (request->evex.broadcast != ZYDIS_BROADCAST_MODE_NONE) ||
  ------------------
  |  Branch (3106:9): [True: 63, False: 3.07k]
  ------------------
 3107|  3.07k|        (request->evex.rounding != ZYDIS_ROUNDING_MODE_NONE) ||
  ------------------
  |  Branch (3107:9): [True: 27, False: 3.04k]
  ------------------
 3108|  3.04k|        (request->evex.sae) ||
  ------------------
  |  Branch (3108:9): [True: 21, False: 3.02k]
  ------------------
 3109|  3.02k|        (request->evex.zeroing_mask) ||
  ------------------
  |  Branch (3109:9): [True: 32, False: 2.99k]
  ------------------
 3110|  2.99k|        (request->evex.no_flags) ||
  ------------------
  |  Branch (3110:9): [True: 16, False: 2.98k]
  ------------------
 3111|  2.98k|        (request->evex.default_flags != ZYDIS_DFV_NONE);
  ------------------
  |  |  780|  2.98k|#define ZYDIS_DFV_NONE  0
  ------------------
  |  Branch (3111:9): [True: 31, False: 2.94k]
  ------------------
 3112|  3.13k|    const ZyanBool needs_mvex =
 3113|  3.13k|        (request->mvex.broadcast != ZYDIS_BROADCAST_MODE_NONE) ||
  ------------------
  |  Branch (3113:9): [True: 81, False: 3.05k]
  ------------------
 3114|  3.05k|        (request->mvex.conversion != ZYDIS_CONVERSION_MODE_NONE) ||
  ------------------
  |  Branch (3114:9): [True: 85, False: 2.97k]
  ------------------
 3115|  2.97k|        (request->mvex.rounding != ZYDIS_ROUNDING_MODE_NONE) ||
  ------------------
  |  Branch (3115:9): [True: 20, False: 2.95k]
  ------------------
 3116|  2.95k|        (request->mvex.swizzle != ZYDIS_SWIZZLE_MODE_NONE) ||
  ------------------
  |  Branch (3116:9): [True: 19, False: 2.93k]
  ------------------
 3117|  2.93k|        (request->mvex.sae) ||
  ------------------
  |  Branch (3117:9): [True: 39, False: 2.89k]
  ------------------
 3118|  2.89k|        (request->mvex.eviction_hint);
  ------------------
  |  Branch (3118:9): [True: 59, False: 2.83k]
  ------------------
 3119|  3.13k|    if (needs_evex && needs_mvex)
  ------------------
  |  Branch (3119:9): [True: 190, False: 2.94k]
  |  Branch (3119:23): [True: 12, False: 178]
  ------------------
 3120|     12|    {
 3121|     12|        return ZYDIS_ENCODABLE_ENCODING_DEFAULT;
 3122|     12|    }
 3123|  3.12k|    ZydisEncodableEncoding allowed_encodings = request->allowed_encodings;
 3124|  3.12k|    if (allowed_encodings == ZYDIS_ENCODABLE_ENCODING_DEFAULT)
  ------------------
  |  Branch (3124:9): [True: 192, False: 2.93k]
  ------------------
 3125|    192|    {
 3126|    192|        static const ZydisEncodableEncoding excluded_encodings[] =
 3127|    192|        {
 3128|    192|            /* none */          ZYDIS_ENCODABLE_ENCODING_DEFAULT,
 3129|    192|            /* needs_evex */    ZYDIS_ENCODABLE_ENCODING_MVEX,
 3130|    192|            /* needs_mvex */    ZYDIS_ENCODABLE_ENCODING_EVEX,
 3131|    192|        };
 3132|    192|        const ZyanU8 index = (needs_mvex << 1) | needs_evex;
 3133|    192|        allowed_encodings = ZYDIS_ENCODABLE_ENCODING_MAX_VALUE;
 3134|    192|        allowed_encodings =
 3135|    192|            (ZydisEncodableEncoding)(allowed_encodings & (~excluded_encodings[index]));
 3136|    192|    }
 3137|  3.12k|    if (!needs_evex && !needs_mvex)
  ------------------
  |  Branch (3137:9): [True: 2.94k, False: 178]
  |  Branch (3137:24): [True: 2.65k, False: 291]
  ------------------
 3138|  2.65k|    {
 3139|  2.65k|        return allowed_encodings;
 3140|  2.65k|    }
 3141|    469|    const ZydisEncodableEncoding required_encoding = needs_mvex
  ------------------
  |  Branch (3141:54): [True: 291, False: 178]
  ------------------
 3142|    469|        ? ZYDIS_ENCODABLE_ENCODING_MVEX
 3143|    469|        : ZYDIS_ENCODABLE_ENCODING_EVEX;
 3144|    469|    if (!(allowed_encodings & required_encoding))
  ------------------
  |  Branch (3144:9): [True: 3, False: 466]
  ------------------
 3145|      3|    {
 3146|      3|        return ZYDIS_ENCODABLE_ENCODING_DEFAULT;
 3147|      3|    }
 3148|    466|    return required_encoding;
 3149|    469|}
Encoder.c:ZydisGetEncodableEncoding:
  282|  1.20k|{
  283|  1.20k|    static const ZydisEncodableEncoding encoding_lookup[6] =
  284|  1.20k|    {
  285|  1.20k|        ZYDIS_ENCODABLE_ENCODING_LEGACY,
  286|  1.20k|        ZYDIS_ENCODABLE_ENCODING_3DNOW,
  287|  1.20k|        ZYDIS_ENCODABLE_ENCODING_XOP,
  288|  1.20k|        ZYDIS_ENCODABLE_ENCODING_VEX,
  289|  1.20k|        ZYDIS_ENCODABLE_ENCODING_EVEX,
  290|  1.20k|        ZYDIS_ENCODABLE_ENCODING_MVEX,
  291|  1.20k|    };
  292|  1.20k|    ZYAN_ASSERT((ZyanUSize)encoding <= ZYDIS_INSTRUCTION_ENCODING_MAX_VALUE);
  ------------------
  |  |  381|  1.20k|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (292:5): [True: 0, False: 1.20k]
  |  Branch (292:5): [True: 1.20k, False: 0]
  ------------------
  293|  1.20k|    return encoding_lookup[encoding];
  294|  1.20k|}
Encoder.c:ZydisArePrefixesCompatible:
 2931|    902|{
 2932|       |    // Early-exit optimization for when no prefixes are requested at all.
 2933|    902|    if (!(match->attributes & ZYDIS_ENCODABLE_PREFIXES))
  ------------------
  |  |   65|    902|#define ZYDIS_ENCODABLE_PREFIXES   (ZYDIS_ATTRIB_HAS_LOCK | \
  |  |  ------------------
  |  |  |  |  656|    902|#define ZYDIS_ATTRIB_HAS_LOCK                   (1ULL << 27)
  |  |  ------------------
  |  |   66|    902|                                    ZYDIS_ATTRIB_HAS_REP | \
  |  |  ------------------
  |  |  |  |  660|    902|#define ZYDIS_ATTRIB_HAS_REP                    (1ULL << 28)
  |  |  ------------------
  |  |   67|    902|                                    ZYDIS_ATTRIB_HAS_REPE | \
  |  |  ------------------
  |  |  |  |  664|    902|#define ZYDIS_ATTRIB_HAS_REPE                   (1ULL << 29)
  |  |  ------------------
  |  |   68|    902|                                    ZYDIS_ATTRIB_HAS_REPNE | \
  |  |  ------------------
  |  |  |  |  672|    902|#define ZYDIS_ATTRIB_HAS_REPNE                  (1ULL << 30)
  |  |  ------------------
  |  |   69|    902|                                    ZYDIS_ATTRIB_HAS_BND | \
  |  |  ------------------
  |  |  |  |  680|    902|#define ZYDIS_ATTRIB_HAS_BND                    (1ULL << 31)
  |  |  ------------------
  |  |   70|    902|                                    ZYDIS_ATTRIB_HAS_XACQUIRE | \
  |  |  ------------------
  |  |  |  |  684|    902|#define ZYDIS_ATTRIB_HAS_XACQUIRE               (1ULL << 32)
  |  |  ------------------
  |  |   71|    902|                                    ZYDIS_ATTRIB_HAS_XRELEASE | \
  |  |  ------------------
  |  |  |  |  688|    902|#define ZYDIS_ATTRIB_HAS_XRELEASE               (1ULL << 33)
  |  |  ------------------
  |  |   72|    902|                                    ZYDIS_ATTRIB_HAS_BRANCH_NOT_TAKEN | \
  |  |  ------------------
  |  |  |  |  692|    902|#define ZYDIS_ATTRIB_HAS_BRANCH_NOT_TAKEN       (1ULL << 34)
  |  |  ------------------
  |  |   73|    902|                                    ZYDIS_ATTRIB_HAS_BRANCH_TAKEN | \
  |  |  ------------------
  |  |  |  |  696|    902|#define ZYDIS_ATTRIB_HAS_BRANCH_TAKEN           (1ULL << 35)
  |  |  ------------------
  |  |   74|    902|                                    ZYDIS_ATTRIB_HAS_NOTRACK | \
  |  |  ------------------
  |  |  |  |  700|    902|#define ZYDIS_ATTRIB_HAS_NOTRACK                (1ULL << 36)
  |  |  ------------------
  |  |   75|    902|                                    ZYDIS_ATTRIB_HAS_SEGMENT_CS | \
  |  |  ------------------
  |  |  |  |  704|    902|#define ZYDIS_ATTRIB_HAS_SEGMENT_CS             (1ULL << 37)
  |  |  ------------------
  |  |   76|    902|                                    ZYDIS_ATTRIB_HAS_SEGMENT_SS | \
  |  |  ------------------
  |  |  |  |  708|    902|#define ZYDIS_ATTRIB_HAS_SEGMENT_SS             (1ULL << 38)
  |  |  ------------------
  |  |   77|    902|                                    ZYDIS_ATTRIB_HAS_SEGMENT_DS | \
  |  |  ------------------
  |  |  |  |  712|    902|#define ZYDIS_ATTRIB_HAS_SEGMENT_DS             (1ULL << 39)
  |  |  ------------------
  |  |   78|    902|                                    ZYDIS_ATTRIB_HAS_SEGMENT_ES | \
  |  |  ------------------
  |  |  |  |  716|    902|#define ZYDIS_ATTRIB_HAS_SEGMENT_ES             (1ULL << 40)
  |  |  ------------------
  |  |   79|    902|                                    ZYDIS_ATTRIB_HAS_SEGMENT_FS | \
  |  |  ------------------
  |  |  |  |  720|    902|#define ZYDIS_ATTRIB_HAS_SEGMENT_FS             (1ULL << 41)
  |  |  ------------------
  |  |   80|    902|                                    ZYDIS_ATTRIB_HAS_SEGMENT_GS)
  |  |  ------------------
  |  |  |  |  724|    902|#define ZYDIS_ATTRIB_HAS_SEGMENT_GS             (1ULL << 42)
  |  |  ------------------
  ------------------
  |  Branch (2933:9): [True: 743, False: 159]
  ------------------
 2934|    743|    {
 2935|    743|        return ZYAN_TRUE;
  ------------------
  |  |  288|    743|#define ZYAN_TRUE  1u
  ------------------
 2936|    743|    }
 2937|       |
 2938|    159|    if ((!match->base_definition->accepts_segment) &&
  ------------------
  |  Branch (2938:9): [True: 24, False: 135]
  ------------------
 2939|     24|        (match->attributes & ZYDIS_ATTRIB_HAS_SEGMENT))
  ------------------
  |  |  728|     24|#define ZYDIS_ATTRIB_HAS_SEGMENT                (ZYDIS_ATTRIB_HAS_SEGMENT_CS | \
  |  |  ------------------
  |  |  |  |  704|     24|#define ZYDIS_ATTRIB_HAS_SEGMENT_CS             (1ULL << 37)
  |  |  ------------------
  |  |  729|     24|                                                 ZYDIS_ATTRIB_HAS_SEGMENT_SS | \
  |  |  ------------------
  |  |  |  |  708|     24|#define ZYDIS_ATTRIB_HAS_SEGMENT_SS             (1ULL << 38)
  |  |  ------------------
  |  |  730|     24|                                                 ZYDIS_ATTRIB_HAS_SEGMENT_DS | \
  |  |  ------------------
  |  |  |  |  712|     24|#define ZYDIS_ATTRIB_HAS_SEGMENT_DS             (1ULL << 39)
  |  |  ------------------
  |  |  731|     24|                                                 ZYDIS_ATTRIB_HAS_SEGMENT_ES | \
  |  |  ------------------
  |  |  |  |  716|     24|#define ZYDIS_ATTRIB_HAS_SEGMENT_ES             (1ULL << 40)
  |  |  ------------------
  |  |  732|     24|                                                 ZYDIS_ATTRIB_HAS_SEGMENT_FS | \
  |  |  ------------------
  |  |  |  |  720|     24|#define ZYDIS_ATTRIB_HAS_SEGMENT_FS             (1ULL << 41)
  |  |  ------------------
  |  |  733|     24|                                                 ZYDIS_ATTRIB_HAS_SEGMENT_GS)
  |  |  ------------------
  |  |  |  |  724|     24|#define ZYDIS_ATTRIB_HAS_SEGMENT_GS             (1ULL << 42)
  |  |  ------------------
  ------------------
  |  Branch (2939:9): [True: 2, False: 22]
  ------------------
 2940|      2|    {
 2941|      2|        return ZYAN_FALSE;
  ------------------
  |  |  287|      2|#define ZYAN_FALSE 0u
  ------------------
 2942|      2|    }
 2943|    157|    if (match->definition->encoding != ZYDIS_INSTRUCTION_ENCODING_LEGACY)
  ------------------
  |  Branch (2943:9): [True: 54, False: 103]
  ------------------
 2944|     54|    {
 2945|     54|        return !(match->attributes & ZYDIS_ENCODABLE_PREFIXES_NO_SEGMENTS);
  ------------------
  |  |   53|     54|#define ZYDIS_ENCODABLE_PREFIXES_NO_SEGMENTS    (ZYDIS_ENCODABLE_PREFIXES ^ \
  |  |  ------------------
  |  |  |  |   65|     54|#define ZYDIS_ENCODABLE_PREFIXES   (ZYDIS_ATTRIB_HAS_LOCK | \
  |  |  |  |  ------------------
  |  |  |  |  |  |  656|     54|#define ZYDIS_ATTRIB_HAS_LOCK                   (1ULL << 27)
  |  |  |  |  ------------------
  |  |  |  |   66|     54|                                    ZYDIS_ATTRIB_HAS_REP | \
  |  |  |  |  ------------------
  |  |  |  |  |  |  660|     54|#define ZYDIS_ATTRIB_HAS_REP                    (1ULL << 28)
  |  |  |  |  ------------------
  |  |  |  |   67|     54|                                    ZYDIS_ATTRIB_HAS_REPE | \
  |  |  |  |  ------------------
  |  |  |  |  |  |  664|     54|#define ZYDIS_ATTRIB_HAS_REPE                   (1ULL << 29)
  |  |  |  |  ------------------
  |  |  |  |   68|     54|                                    ZYDIS_ATTRIB_HAS_REPNE | \
  |  |  |  |  ------------------
  |  |  |  |  |  |  672|     54|#define ZYDIS_ATTRIB_HAS_REPNE                  (1ULL << 30)
  |  |  |  |  ------------------
  |  |  |  |   69|     54|                                    ZYDIS_ATTRIB_HAS_BND | \
  |  |  |  |  ------------------
  |  |  |  |  |  |  680|     54|#define ZYDIS_ATTRIB_HAS_BND                    (1ULL << 31)
  |  |  |  |  ------------------
  |  |  |  |   70|     54|                                    ZYDIS_ATTRIB_HAS_XACQUIRE | \
  |  |  |  |  ------------------
  |  |  |  |  |  |  684|     54|#define ZYDIS_ATTRIB_HAS_XACQUIRE               (1ULL << 32)
  |  |  |  |  ------------------
  |  |  |  |   71|     54|                                    ZYDIS_ATTRIB_HAS_XRELEASE | \
  |  |  |  |  ------------------
  |  |  |  |  |  |  688|     54|#define ZYDIS_ATTRIB_HAS_XRELEASE               (1ULL << 33)
  |  |  |  |  ------------------
  |  |  |  |   72|     54|                                    ZYDIS_ATTRIB_HAS_BRANCH_NOT_TAKEN | \
  |  |  |  |  ------------------
  |  |  |  |  |  |  692|     54|#define ZYDIS_ATTRIB_HAS_BRANCH_NOT_TAKEN       (1ULL << 34)
  |  |  |  |  ------------------
  |  |  |  |   73|     54|                                    ZYDIS_ATTRIB_HAS_BRANCH_TAKEN | \
  |  |  |  |  ------------------
  |  |  |  |  |  |  696|     54|#define ZYDIS_ATTRIB_HAS_BRANCH_TAKEN           (1ULL << 35)
  |  |  |  |  ------------------
  |  |  |  |   74|     54|                                    ZYDIS_ATTRIB_HAS_NOTRACK | \
  |  |  |  |  ------------------
  |  |  |  |  |  |  700|     54|#define ZYDIS_ATTRIB_HAS_NOTRACK                (1ULL << 36)
  |  |  |  |  ------------------
  |  |  |  |   75|     54|                                    ZYDIS_ATTRIB_HAS_SEGMENT_CS | \
  |  |  |  |  ------------------
  |  |  |  |  |  |  704|     54|#define ZYDIS_ATTRIB_HAS_SEGMENT_CS             (1ULL << 37)
  |  |  |  |  ------------------
  |  |  |  |   76|     54|                                    ZYDIS_ATTRIB_HAS_SEGMENT_SS | \
  |  |  |  |  ------------------
  |  |  |  |  |  |  708|     54|#define ZYDIS_ATTRIB_HAS_SEGMENT_SS             (1ULL << 38)
  |  |  |  |  ------------------
  |  |  |  |   77|     54|                                    ZYDIS_ATTRIB_HAS_SEGMENT_DS | \
  |  |  |  |  ------------------
  |  |  |  |  |  |  712|     54|#define ZYDIS_ATTRIB_HAS_SEGMENT_DS             (1ULL << 39)
  |  |  |  |  ------------------
  |  |  |  |   78|     54|                                    ZYDIS_ATTRIB_HAS_SEGMENT_ES | \
  |  |  |  |  ------------------
  |  |  |  |  |  |  716|     54|#define ZYDIS_ATTRIB_HAS_SEGMENT_ES             (1ULL << 40)
  |  |  |  |  ------------------
  |  |  |  |   79|     54|                                    ZYDIS_ATTRIB_HAS_SEGMENT_FS | \
  |  |  |  |  ------------------
  |  |  |  |  |  |  720|     54|#define ZYDIS_ATTRIB_HAS_SEGMENT_FS             (1ULL << 41)
  |  |  |  |  ------------------
  |  |  |  |   80|     54|                                    ZYDIS_ATTRIB_HAS_SEGMENT_GS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  724|     54|#define ZYDIS_ATTRIB_HAS_SEGMENT_GS             (1ULL << 42)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   54|     54|                                                 ZYDIS_ATTRIB_HAS_SEGMENT)
  |  |  ------------------
  |  |  |  |  728|     54|#define ZYDIS_ATTRIB_HAS_SEGMENT                (ZYDIS_ATTRIB_HAS_SEGMENT_CS | \
  |  |  |  |  ------------------
  |  |  |  |  |  |  704|     54|#define ZYDIS_ATTRIB_HAS_SEGMENT_CS             (1ULL << 37)
  |  |  |  |  ------------------
  |  |  |  |  729|     54|                                                 ZYDIS_ATTRIB_HAS_SEGMENT_SS | \
  |  |  |  |  ------------------
  |  |  |  |  |  |  708|     54|#define ZYDIS_ATTRIB_HAS_SEGMENT_SS             (1ULL << 38)
  |  |  |  |  ------------------
  |  |  |  |  730|     54|                                                 ZYDIS_ATTRIB_HAS_SEGMENT_DS | \
  |  |  |  |  ------------------
  |  |  |  |  |  |  712|     54|#define ZYDIS_ATTRIB_HAS_SEGMENT_DS             (1ULL << 39)
  |  |  |  |  ------------------
  |  |  |  |  731|     54|                                                 ZYDIS_ATTRIB_HAS_SEGMENT_ES | \
  |  |  |  |  ------------------
  |  |  |  |  |  |  716|     54|#define ZYDIS_ATTRIB_HAS_SEGMENT_ES             (1ULL << 40)
  |  |  |  |  ------------------
  |  |  |  |  732|     54|                                                 ZYDIS_ATTRIB_HAS_SEGMENT_FS | \
  |  |  |  |  ------------------
  |  |  |  |  |  |  720|     54|#define ZYDIS_ATTRIB_HAS_SEGMENT_FS             (1ULL << 41)
  |  |  |  |  ------------------
  |  |  |  |  733|     54|                                                 ZYDIS_ATTRIB_HAS_SEGMENT_GS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  724|     54|#define ZYDIS_ATTRIB_HAS_SEGMENT_GS             (1ULL << 42)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2946|     54|    }
 2947|       |
 2948|    103|    const ZydisInstructionDefinitionLEGACY *legacy_def =
 2949|    103|        (const ZydisInstructionDefinitionLEGACY *)match->base_definition;
 2950|    103|    if ((!legacy_def->accepts_LOCK) &&
  ------------------
  |  Branch (2950:9): [True: 80, False: 23]
  ------------------
 2951|     80|        (match->attributes & ZYDIS_ATTRIB_HAS_LOCK))
  ------------------
  |  |  656|     80|#define ZYDIS_ATTRIB_HAS_LOCK                   (1ULL << 27)
  ------------------
  |  Branch (2951:9): [True: 4, False: 76]
  ------------------
 2952|      4|    {
 2953|      4|        return ZYAN_FALSE;
  ------------------
  |  |  287|      4|#define ZYAN_FALSE 0u
  ------------------
 2954|      4|    }
 2955|     99|    if ((!legacy_def->accepts_REP) &&
  ------------------
  |  Branch (2955:9): [True: 99, False: 0]
  ------------------
 2956|     99|        (match->attributes & ZYDIS_ATTRIB_HAS_REP))
  ------------------
  |  |  660|     99|#define ZYDIS_ATTRIB_HAS_REP                    (1ULL << 28)
  ------------------
  |  Branch (2956:9): [True: 1, False: 98]
  ------------------
 2957|      1|    {
 2958|      1|        return ZYAN_FALSE;
  ------------------
  |  |  287|      1|#define ZYAN_FALSE 0u
  ------------------
 2959|      1|    }
 2960|     98|    if ((!legacy_def->accepts_REPEREPZ) &&
  ------------------
  |  Branch (2960:9): [True: 98, False: 0]
  ------------------
 2961|     98|        (match->attributes & ZYDIS_ATTRIB_HAS_REPE))
  ------------------
  |  |  664|     98|#define ZYDIS_ATTRIB_HAS_REPE                   (1ULL << 29)
  ------------------
  |  Branch (2961:9): [True: 0, False: 98]
  ------------------
 2962|      0|    {
 2963|      0|        return ZYAN_FALSE;
  ------------------
  |  |  287|      0|#define ZYAN_FALSE 0u
  ------------------
 2964|      0|    }
 2965|     98|    if ((!legacy_def->accepts_REPNEREPNZ) &&
  ------------------
  |  Branch (2965:9): [True: 98, False: 0]
  ------------------
 2966|     98|        (match->attributes & ZYDIS_ATTRIB_HAS_REPNE))
  ------------------
  |  |  672|     98|#define ZYDIS_ATTRIB_HAS_REPNE                  (1ULL << 30)
  ------------------
  |  Branch (2966:9): [True: 1, False: 97]
  ------------------
 2967|      1|    {
 2968|      1|        return ZYAN_FALSE;
  ------------------
  |  |  287|      1|#define ZYAN_FALSE 0u
  ------------------
 2969|      1|    }
 2970|     97|    if ((!legacy_def->accepts_BOUND) &&
  ------------------
  |  Branch (2970:9): [True: 89, False: 8]
  ------------------
 2971|     89|        (match->attributes & ZYDIS_ATTRIB_HAS_BND))
  ------------------
  |  |  680|     89|#define ZYDIS_ATTRIB_HAS_BND                    (1ULL << 31)
  ------------------
  |  Branch (2971:9): [True: 1, False: 88]
  ------------------
 2972|      1|    {
 2973|      1|        return ZYAN_FALSE;
  ------------------
  |  |  287|      1|#define ZYAN_FALSE 0u
  ------------------
 2974|      1|    }
 2975|     96|    if ((!legacy_def->accepts_XACQUIRE) &&
  ------------------
  |  Branch (2975:9): [True: 74, False: 22]
  ------------------
 2976|     74|        (match->attributes & ZYDIS_ATTRIB_HAS_XACQUIRE))
  ------------------
  |  |  684|     74|#define ZYDIS_ATTRIB_HAS_XACQUIRE               (1ULL << 32)
  ------------------
  |  Branch (2976:9): [True: 0, False: 74]
  ------------------
 2977|      0|    {
 2978|      0|        return ZYAN_FALSE;
  ------------------
  |  |  287|      0|#define ZYAN_FALSE 0u
  ------------------
 2979|      0|    }
 2980|     96|    if ((!legacy_def->accepts_XRELEASE) &&
  ------------------
  |  Branch (2980:9): [True: 63, False: 33]
  ------------------
 2981|     63|        (match->attributes & ZYDIS_ATTRIB_HAS_XRELEASE))
  ------------------
  |  |  688|     63|#define ZYDIS_ATTRIB_HAS_XRELEASE               (1ULL << 33)
  ------------------
  |  Branch (2981:9): [True: 8, False: 55]
  ------------------
 2982|      8|    {
 2983|      8|        return ZYAN_FALSE;
  ------------------
  |  |  287|      8|#define ZYAN_FALSE 0u
  ------------------
 2984|      8|    }
 2985|     88|    if ((!legacy_def->accepts_branch_hints) &&
  ------------------
  |  Branch (2985:9): [True: 86, False: 2]
  ------------------
 2986|     86|        (match->attributes & (ZYDIS_ATTRIB_HAS_BRANCH_NOT_TAKEN |
  ------------------
  |  |  692|     86|#define ZYDIS_ATTRIB_HAS_BRANCH_NOT_TAKEN       (1ULL << 34)
  ------------------
  |  Branch (2986:9): [True: 11, False: 75]
  ------------------
 2987|     86|                              ZYDIS_ATTRIB_HAS_BRANCH_TAKEN)))
  ------------------
  |  |  696|     86|#define ZYDIS_ATTRIB_HAS_BRANCH_TAKEN           (1ULL << 35)
  ------------------
 2988|     11|    {
 2989|     11|        return ZYAN_FALSE;
  ------------------
  |  |  287|     11|#define ZYAN_FALSE 0u
  ------------------
 2990|     11|    }
 2991|     77|    if ((!legacy_def->accepts_NOTRACK) &&
  ------------------
  |  Branch (2991:9): [True: 72, False: 5]
  ------------------
 2992|     72|        (match->attributes & ZYDIS_ATTRIB_HAS_NOTRACK))
  ------------------
  |  |  700|     72|#define ZYDIS_ATTRIB_HAS_NOTRACK                (1ULL << 36)
  ------------------
  |  Branch (2992:9): [True: 0, False: 72]
  ------------------
 2993|      0|    {
 2994|      0|        return ZYAN_FALSE;
  ------------------
  |  |  287|      0|#define ZYAN_FALSE 0u
  ------------------
 2995|      0|    }
 2996|     77|    if ((!legacy_def->accepts_hle_without_lock) &&
  ------------------
  |  Branch (2996:9): [True: 64, False: 13]
  ------------------
 2997|     64|        (match->attributes & (ZYDIS_ATTRIB_HAS_XACQUIRE |
  ------------------
  |  |  684|     64|#define ZYDIS_ATTRIB_HAS_XACQUIRE               (1ULL << 32)
  ------------------
  |  Branch (2997:9): [True: 17, False: 47]
  ------------------
 2998|     64|                              ZYDIS_ATTRIB_HAS_XRELEASE)) &&
  ------------------
  |  |  688|     64|#define ZYDIS_ATTRIB_HAS_XRELEASE               (1ULL << 33)
  ------------------
 2999|     17|        !(match->attributes & ZYDIS_ATTRIB_HAS_LOCK))
  ------------------
  |  |  656|     17|#define ZYDIS_ATTRIB_HAS_LOCK                   (1ULL << 27)
  ------------------
  |  Branch (2999:9): [True: 5, False: 12]
  ------------------
 3000|      5|    {
 3001|      5|        return ZYAN_FALSE;
  ------------------
  |  |  287|      5|#define ZYAN_FALSE 0u
  ------------------
 3002|      5|    }
 3003|       |
 3004|     72|    return ZYAN_TRUE;
  ------------------
  |  |  288|     72|#define ZYAN_TRUE  1u
  ------------------
 3005|     77|}
Encoder.c:ZydisIsDefinitionCompatible:
 2821|    864|{
 2822|    864|    ZYAN_ASSERT(request->operand_count == match->base_definition->operand_count_visible);
  ------------------
  |  |  381|    864|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (2822:5): [True: 0, False: 864]
  |  Branch (2822:5): [True: 864, False: 0]
  ------------------
 2823|    864|    match->operands = ZydisGetOperandDefinitions(match->base_definition);
 2824|       |
 2825|    864|    if (!ZydisAreEvexFeaturesCompatible(match, request))
  ------------------
  |  Branch (2825:9): [True: 47, False: 817]
  ------------------
 2826|     47|    {
 2827|     47|        return ZYAN_FALSE;
  ------------------
  |  |  287|     47|#define ZYAN_FALSE 0u
  ------------------
 2828|     47|    }
 2829|    817|    if (!ZydisAreMvexFeaturesCompatible(match, request))
  ------------------
  |  Branch (2829:9): [True: 9, False: 808]
  ------------------
 2830|      9|    {
 2831|      9|        return ZYAN_FALSE;
  ------------------
  |  |  287|      9|#define ZYAN_FALSE 0u
  ------------------
 2832|      9|    }
 2833|       |
 2834|  1.28k|    for (ZyanU8 i = 0; i < request->operand_count; ++i)
  ------------------
  |  Branch (2834:24): [True: 1.07k, False: 214]
  ------------------
 2835|  1.07k|    {
 2836|  1.07k|        const ZydisEncoderOperand *user_op = &request->operands[i];
 2837|  1.07k|        const ZydisOperandDefinition *def_op = &match->operands[i];
 2838|  1.07k|        ZYAN_ASSERT(def_op->visibility != ZYDIS_OPERAND_VISIBILITY_HIDDEN);
  ------------------
  |  |  381|  1.07k|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (2838:9): [True: 0, False: 1.07k]
  |  Branch (2838:9): [True: 1.07k, False: 0]
  ------------------
 2839|  1.07k|        ZyanBool is_compatible = ZYAN_FALSE;
  ------------------
  |  |  287|  1.07k|#define ZYAN_FALSE 0u
  ------------------
 2840|  1.07k|        switch (user_op->type)
 2841|  1.07k|        {
 2842|    635|        case ZYDIS_OPERAND_TYPE_REGISTER:
  ------------------
  |  Branch (2842:9): [True: 635, False: 438]
  ------------------
 2843|    635|            is_compatible = ZydisIsRegisterOperandCompatible(match, user_op, def_op);
 2844|    635|            break;
 2845|    289|        case ZYDIS_OPERAND_TYPE_MEMORY:
  ------------------
  |  Branch (2845:9): [True: 289, False: 784]
  ------------------
 2846|    289|            is_compatible = ZydisIsMemoryOperandCompatible(match, user_op, def_op);
 2847|    289|            break;
 2848|     10|        case ZYDIS_OPERAND_TYPE_POINTER:
  ------------------
  |  Branch (2848:9): [True: 10, False: 1.06k]
  ------------------
 2849|     10|            is_compatible = ZydisIsPointerOperandCompatible(match, user_op);
 2850|     10|            break;
 2851|    139|        case ZYDIS_OPERAND_TYPE_IMMEDIATE:
  ------------------
  |  Branch (2851:9): [True: 139, False: 934]
  ------------------
 2852|    139|            is_compatible = ZydisIsImmediateOperandCompabile(match, user_op, def_op);
 2853|    139|            break;
 2854|      0|        default:
  ------------------
  |  Branch (2854:9): [True: 0, False: 1.07k]
  ------------------
 2855|      0|            ZYAN_UNREACHABLE;
  ------------------
  |  |  431|      0|#   define ZYAN_UNREACHABLE { assert(0); abort(); }
  ------------------
  |  Branch (2855:13): [Folded, False: 0]
  |  Branch (2855:13): [Folded, False: 0]
  ------------------
 2856|  1.07k|        }
 2857|       |
 2858|  1.07k|        if (!is_compatible)
  ------------------
  |  Branch (2858:13): [True: 594, False: 479]
  ------------------
 2859|    594|        {
 2860|    594|            return ZYAN_FALSE;
  ------------------
  |  |  287|    594|#define ZYAN_FALSE 0u
  ------------------
 2861|    594|        }
 2862|  1.07k|    }
 2863|       |
 2864|    214|    ZyanU8 eosz = 0;
 2865|    214|    if ((match->base_definition->branch_type != ZYDIS_BRANCH_TYPE_NONE) &&
  ------------------
  |  Branch (2865:9): [True: 54, False: 160]
  ------------------
 2866|     54|        (match->base_definition->branch_type != ZYDIS_BRANCH_TYPE_ABSOLUTE))
  ------------------
  |  Branch (2866:9): [True: 54, False: 0]
  ------------------
 2867|     54|    {
 2868|     54|        switch (request->branch_width)
 2869|     54|        {
 2870|      9|        case ZYDIS_BRANCH_WIDTH_NONE:
  ------------------
  |  Branch (2870:9): [True: 9, False: 45]
  ------------------
 2871|      9|            break;
 2872|      7|        case ZYDIS_BRANCH_WIDTH_8:
  ------------------
  |  Branch (2872:9): [True: 7, False: 47]
  ------------------
 2873|      7|            if ((!match->has_rel_operand) ||
  ------------------
  |  Branch (2873:17): [True: 2, False: 5]
  ------------------
 2874|      5|                (match->base_definition->branch_type != ZYDIS_BRANCH_TYPE_SHORT))
  ------------------
  |  Branch (2874:17): [True: 0, False: 5]
  ------------------
 2875|      2|            {
 2876|      2|                return ZYAN_FALSE;
  ------------------
  |  |  287|      2|#define ZYAN_FALSE 0u
  ------------------
 2877|      2|            }
 2878|      5|            break;
 2879|      5|        case ZYDIS_BRANCH_WIDTH_16:
  ------------------
  |  Branch (2879:9): [True: 1, False: 53]
  ------------------
 2880|      1|            eosz = 16;
 2881|      1|            break;
 2882|     34|        case ZYDIS_BRANCH_WIDTH_32:
  ------------------
  |  Branch (2882:9): [True: 34, False: 20]
  ------------------
 2883|     34|            eosz = ((match->has_rel_operand) &&
  ------------------
  |  Branch (2883:21): [True: 27, False: 7]
  ------------------
 2884|     27|                    (match->request->machine_mode == ZYDIS_MACHINE_MODE_LONG_64) &&
  ------------------
  |  Branch (2884:21): [True: 8, False: 19]
  ------------------
 2885|      8|                    (match->base_definition->operand_size_map == ZYDIS_OPSIZE_MAP_FORCE64))
  ------------------
  |  |   47|      8|#define ZYDIS_OPSIZE_MAP_FORCE64                5
  ------------------
  |  Branch (2885:21): [True: 8, False: 0]
  ------------------
 2886|     34|                ? 64
 2887|     34|                : 32;
 2888|     34|            break;
 2889|      3|        case ZYDIS_BRANCH_WIDTH_64:
  ------------------
  |  Branch (2889:9): [True: 3, False: 51]
  ------------------
 2890|      3|            if (match->has_rel_operand)
  ------------------
  |  Branch (2890:17): [True: 0, False: 3]
  ------------------
 2891|      0|            {
 2892|      0|                return ZYAN_FALSE;
  ------------------
  |  |  287|      0|#define ZYAN_FALSE 0u
  ------------------
 2893|      0|            }
 2894|      3|            eosz = 64;
 2895|      3|            break;
 2896|      0|        default:
  ------------------
  |  Branch (2896:9): [True: 0, False: 54]
  ------------------
 2897|      0|            ZYAN_UNREACHABLE;
  ------------------
  |  |  431|      0|#   define ZYAN_UNREACHABLE { assert(0); abort(); }
  ------------------
  |  Branch (2897:13): [Folded, False: 0]
  |  Branch (2897:13): [Folded, False: 0]
  ------------------
 2898|     54|        }
 2899|     54|    }
 2900|    212|    if (eosz)
  ------------------
  |  Branch (2900:9): [True: 38, False: 174]
  ------------------
 2901|     38|    {
 2902|     38|        if (match->eosz != 0)
  ------------------
  |  Branch (2902:13): [True: 10, False: 28]
  ------------------
 2903|     10|        {
 2904|     10|            if (match->eosz != eosz)
  ------------------
  |  Branch (2904:17): [True: 0, False: 10]
  ------------------
 2905|      0|            {
 2906|      0|                return ZYAN_FALSE;
  ------------------
  |  |  287|      0|#define ZYAN_FALSE 0u
  ------------------
 2907|      0|            }
 2908|     10|        }
 2909|     28|        else
 2910|     28|        {
 2911|     28|            match->eosz = eosz;
 2912|     28|        }
 2913|     38|    }
 2914|       |
 2915|    212|    if (!ZydisCheckConstraints(match))
  ------------------
  |  Branch (2915:9): [True: 0, False: 212]
  ------------------
 2916|      0|    {
 2917|      0|        return ZYAN_FALSE;
  ------------------
  |  |  287|      0|#define ZYAN_FALSE 0u
  ------------------
 2918|      0|    }
 2919|       |
 2920|    212|    return ZYAN_TRUE;
  ------------------
  |  |  288|    212|#define ZYAN_TRUE  1u
  ------------------
 2921|    212|}
Encoder.c:ZydisAreEvexFeaturesCompatible:
 2416|    864|{
 2417|    864|    if (match->definition->encoding != ZYDIS_INSTRUCTION_ENCODING_EVEX)
  ------------------
  |  Branch (2417:9): [True: 623, False: 241]
  ------------------
 2418|    623|    {
 2419|    623|        return ZYAN_TRUE;
  ------------------
  |  |  288|    623|#define ZYAN_TRUE  1u
  ------------------
 2420|    623|    }
 2421|    241|    const ZydisInstructionDefinitionEVEX *evex_def =
 2422|    241|        (const ZydisInstructionDefinitionEVEX *)match->base_definition;
 2423|    241|    ZydisSourceConditionCode scc;
 2424|    241|    const ZyanBool is_cc = ZydisGetCcInfo(request->mnemonic, &scc);
 2425|    241|    if (((!is_cc) && (request->evex.no_flags != evex_def->has_apx_nf)) ||
  ------------------
  |  Branch (2425:10): [True: 196, False: 45]
  |  Branch (2425:22): [True: 18, False: 178]
  ------------------
 2426|    223|        ((is_cc) && (request->evex.no_flags)))
  ------------------
  |  Branch (2426:10): [True: 45, False: 178]
  |  Branch (2426:21): [True: 5, False: 40]
  ------------------
 2427|     23|    {
 2428|     23|        return ZYAN_FALSE;
  ------------------
  |  |  287|     23|#define ZYAN_FALSE 0u
  ------------------
 2429|     23|    }
 2430|    218|    if ((!evex_def->accepts_zero_mask) &&
  ------------------
  |  Branch (2430:9): [True: 143, False: 75]
  ------------------
 2431|    143|        (evex_def->mask_override != ZYDIS_MASK_OVERRIDE_ZEROING) &&
  ------------------
  |  Branch (2431:9): [True: 140, False: 3]
  ------------------
 2432|    140|        (request->evex.zeroing_mask))
  ------------------
  |  Branch (2432:9): [True: 5, False: 135]
  ------------------
 2433|      5|    {
 2434|      5|        return ZYAN_FALSE;
  ------------------
  |  |  287|      5|#define ZYAN_FALSE 0u
  ------------------
 2435|      5|    }
 2436|       |
 2437|    213|    switch (evex_def->functionality)
 2438|    213|    {
 2439|    170|    case ZYDIS_EVEX_FUNC_INVALID:
  ------------------
  |  Branch (2439:5): [True: 170, False: 43]
  ------------------
 2440|    170|        if ((request->evex.sae) ||
  ------------------
  |  Branch (2440:13): [True: 11, False: 159]
  ------------------
 2441|    159|            (request->evex.broadcast != ZYDIS_BROADCAST_MODE_NONE) ||
  ------------------
  |  Branch (2441:13): [True: 0, False: 159]
  ------------------
 2442|    159|            (request->evex.rounding != ZYDIS_ROUNDING_MODE_NONE))
  ------------------
  |  Branch (2442:13): [True: 0, False: 159]
  ------------------
 2443|     11|        {
 2444|     11|            return ZYAN_FALSE;
  ------------------
  |  |  287|     11|#define ZYAN_FALSE 0u
  ------------------
 2445|     11|        }
 2446|    159|        break;
 2447|    159|    case ZYDIS_EVEX_FUNC_BC:
  ------------------
  |  Branch (2447:5): [True: 24, False: 189]
  ------------------
 2448|     24|        if ((request->evex.sae) ||
  ------------------
  |  Branch (2448:13): [True: 0, False: 24]
  ------------------
 2449|     24|            (request->evex.rounding != ZYDIS_ROUNDING_MODE_NONE))
  ------------------
  |  Branch (2449:13): [True: 0, False: 24]
  ------------------
 2450|      0|        {
 2451|      0|            return ZYAN_FALSE;
  ------------------
  |  |  287|      0|#define ZYAN_FALSE 0u
  ------------------
 2452|      0|        }
 2453|     24|        if (!ZydisIsBroadcastModeCompatible(evex_def, match->definition->vector_length,
  ------------------
  |  Branch (2453:13): [True: 8, False: 16]
  ------------------
 2454|     24|            request->evex.broadcast))
 2455|      8|        {
 2456|      8|            return ZYAN_FALSE;
  ------------------
  |  |  287|      8|#define ZYAN_FALSE 0u
  ------------------
 2457|      8|        }
 2458|     16|        break;
 2459|     16|    case ZYDIS_EVEX_FUNC_RC:
  ------------------
  |  Branch (2459:5): [True: 15, False: 198]
  ------------------
 2460|     15|        if (request->evex.broadcast != ZYDIS_BROADCAST_MODE_NONE)
  ------------------
  |  Branch (2460:13): [True: 0, False: 15]
  ------------------
 2461|      0|        {
 2462|      0|            return ZYAN_FALSE;
  ------------------
  |  |  287|      0|#define ZYAN_FALSE 0u
  ------------------
 2463|      0|        }
 2464|     15|        if (request->evex.rounding == ZYDIS_ROUNDING_MODE_NONE)
  ------------------
  |  Branch (2464:13): [True: 9, False: 6]
  ------------------
 2465|      9|        {
 2466|      9|            if (request->evex.sae)
  ------------------
  |  Branch (2466:17): [True: 0, False: 9]
  ------------------
 2467|      0|            {
 2468|      0|                return ZYAN_FALSE;
  ------------------
  |  |  287|      0|#define ZYAN_FALSE 0u
  ------------------
 2469|      0|            }
 2470|      9|        }
 2471|      6|        else
 2472|      6|        {
 2473|      6|            if (!request->evex.sae)
  ------------------
  |  Branch (2473:17): [True: 0, False: 6]
  ------------------
 2474|      0|            {
 2475|      0|                return ZYAN_FALSE;
  ------------------
  |  |  287|      0|#define ZYAN_FALSE 0u
  ------------------
 2476|      0|            }
 2477|      6|        }
 2478|     15|        break;
 2479|     15|    case ZYDIS_EVEX_FUNC_SAE:
  ------------------
  |  Branch (2479:5): [True: 4, False: 209]
  ------------------
 2480|      4|        if ((request->evex.broadcast != ZYDIS_BROADCAST_MODE_NONE) ||
  ------------------
  |  Branch (2480:13): [True: 0, False: 4]
  ------------------
 2481|      4|            (request->evex.rounding != ZYDIS_ROUNDING_MODE_NONE))
  ------------------
  |  Branch (2481:13): [True: 0, False: 4]
  ------------------
 2482|      0|        {
 2483|      0|            return ZYAN_FALSE;
  ------------------
  |  |  287|      0|#define ZYAN_FALSE 0u
  ------------------
 2484|      0|        }
 2485|      4|        break;
 2486|      4|    default:
  ------------------
  |  Branch (2486:5): [True: 0, False: 213]
  ------------------
 2487|      0|        ZYAN_UNREACHABLE;
  ------------------
  |  |  431|      0|#   define ZYAN_UNREACHABLE { assert(0); abort(); }
  ------------------
  |  Branch (2487:9): [Folded, False: 0]
  |  Branch (2487:9): [Folded, False: 0]
  ------------------
 2488|    213|    }
 2489|       |
 2490|    194|    return ZYAN_TRUE;
  ------------------
  |  |  288|    194|#define ZYAN_TRUE  1u
  ------------------
 2491|    213|}
Encoder.c:ZydisIsBroadcastModeCompatible:
 2323|     24|{
 2324|     24|    if (broadcast == ZYDIS_BROADCAST_MODE_NONE)
  ------------------
  |  Branch (2324:9): [True: 15, False: 9]
  ------------------
 2325|     15|    {
 2326|     15|        return ZYAN_TRUE;
  ------------------
  |  |  288|     15|#define ZYAN_TRUE  1u
  ------------------
 2327|     15|    }
 2328|       |
 2329|      9|    ZyanU8 vector_size = 0;
 2330|      9|    ZYAN_ASSERT(vector_length != ZYDIS_VECTOR_LENGTH_INVALID);
  ------------------
  |  |  381|      9|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (2330:5): [True: 0, False: 9]
  |  Branch (2330:5): [True: 9, False: 0]
  ------------------
 2331|      9|    switch (vector_length)
 2332|      9|    {
 2333|      3|    case ZYDIS_VECTOR_LENGTH_128:
  ------------------
  |  Branch (2333:5): [True: 3, False: 6]
  ------------------
 2334|      3|        vector_size = 16;
 2335|      3|        break;
 2336|      3|    case ZYDIS_VECTOR_LENGTH_256:
  ------------------
  |  Branch (2336:5): [True: 3, False: 6]
  ------------------
 2337|      3|        vector_size = 32;
 2338|      3|        break;
 2339|      3|    case ZYDIS_VECTOR_LENGTH_512:
  ------------------
  |  Branch (2339:5): [True: 3, False: 6]
  ------------------
 2340|      3|        vector_size = 64;
 2341|      3|        break;
 2342|      0|    default:
  ------------------
  |  Branch (2342:5): [True: 0, False: 9]
  ------------------
 2343|      0|        ZYAN_UNREACHABLE;
  ------------------
  |  |  431|      0|#   define ZYAN_UNREACHABLE { assert(0); abort(); }
  ------------------
  |  Branch (2343:9): [Folded, False: 0]
  |  Branch (2343:9): [Folded, False: 0]
  ------------------
 2344|      9|    }
 2345|      9|    switch (evex_def->tuple_type)
 2346|      9|    {
 2347|      9|    case ZYDIS_TUPLETYPE_FV:
  ------------------
  |  Branch (2347:5): [True: 9, False: 0]
  ------------------
 2348|      9|        break;
 2349|      0|    case ZYDIS_TUPLETYPE_HV:
  ------------------
  |  Branch (2349:5): [True: 0, False: 9]
  ------------------
 2350|      0|        vector_size /= 2;
 2351|      0|        break;
 2352|      0|    case ZYDIS_TUPLETYPE_QUARTER:
  ------------------
  |  Branch (2352:5): [True: 0, False: 9]
  ------------------
 2353|      0|        vector_size /= 4;
 2354|      0|        break;
 2355|      0|    default:
  ------------------
  |  Branch (2355:5): [True: 0, False: 9]
  ------------------
 2356|      0|        ZYAN_UNREACHABLE;
  ------------------
  |  |  431|      0|#   define ZYAN_UNREACHABLE { assert(0); abort(); }
  ------------------
  |  Branch (2356:9): [Folded, False: 0]
  |  Branch (2356:9): [Folded, False: 0]
  ------------------
 2357|      9|    }
 2358|       |
 2359|      9|    ZyanU8 element_size;
 2360|      9|    switch (evex_def->element_size)
 2361|      9|    {
 2362|      6|    case ZYDIS_IELEMENT_SIZE_16:
  ------------------
  |  Branch (2362:5): [True: 6, False: 3]
  ------------------
 2363|      6|        element_size = 2;
 2364|      6|        break;
 2365|      0|    case ZYDIS_IELEMENT_SIZE_32:
  ------------------
  |  Branch (2365:5): [True: 0, False: 9]
  ------------------
 2366|      0|        element_size = 4;
 2367|      0|        break;
 2368|      3|    case ZYDIS_IELEMENT_SIZE_64:
  ------------------
  |  Branch (2368:5): [True: 3, False: 6]
  ------------------
 2369|      3|        element_size = 8;
 2370|      3|        break;
 2371|      0|    default:
  ------------------
  |  Branch (2371:5): [True: 0, False: 9]
  ------------------
 2372|      0|        ZYAN_UNREACHABLE;
  ------------------
  |  |  431|      0|#   define ZYAN_UNREACHABLE { assert(0); abort(); }
  ------------------
  |  Branch (2372:9): [Folded, False: 0]
  |  Branch (2372:9): [Folded, False: 0]
  ------------------
 2373|      9|    }
 2374|       |
 2375|      9|    ZydisBroadcastMode allowed_mode;
 2376|      9|    const ZyanU8 element_count = vector_size / element_size;
 2377|      9|    switch (element_count)
 2378|      9|    {
 2379|      1|    case 2:
  ------------------
  |  Branch (2379:5): [True: 1, False: 8]
  ------------------
 2380|      1|        allowed_mode = ZYDIS_BROADCAST_MODE_1_TO_2;
 2381|      1|        break;
 2382|      1|    case 4:
  ------------------
  |  Branch (2382:5): [True: 1, False: 8]
  ------------------
 2383|      1|        allowed_mode = ZYDIS_BROADCAST_MODE_1_TO_4;
 2384|      1|        break;
 2385|      3|    case 8:
  ------------------
  |  Branch (2385:5): [True: 3, False: 6]
  ------------------
 2386|      3|        allowed_mode = ZYDIS_BROADCAST_MODE_1_TO_8;
 2387|      3|        break;
 2388|      2|    case 16:
  ------------------
  |  Branch (2388:5): [True: 2, False: 7]
  ------------------
 2389|      2|        allowed_mode = ZYDIS_BROADCAST_MODE_1_TO_16;
 2390|      2|        break;
 2391|      2|    case 32:
  ------------------
  |  Branch (2391:5): [True: 2, False: 7]
  ------------------
 2392|      2|        allowed_mode = ZYDIS_BROADCAST_MODE_1_TO_32;
 2393|      2|        break;
 2394|      0|    default:
  ------------------
  |  Branch (2394:5): [True: 0, False: 9]
  ------------------
 2395|      0|        ZYAN_UNREACHABLE;
  ------------------
  |  |  431|      0|#   define ZYAN_UNREACHABLE { assert(0); abort(); }
  ------------------
  |  Branch (2395:9): [Folded, False: 0]
  |  Branch (2395:9): [Folded, False: 0]
  ------------------
 2396|      9|    }
 2397|       |
 2398|      9|    if (broadcast != allowed_mode)
  ------------------
  |  Branch (2398:9): [True: 8, False: 1]
  ------------------
 2399|      8|    {
 2400|      8|        return ZYAN_FALSE;
  ------------------
  |  |  287|      8|#define ZYAN_FALSE 0u
  ------------------
 2401|      8|    }
 2402|       |
 2403|      1|    return ZYAN_TRUE;
  ------------------
  |  |  288|      1|#define ZYAN_TRUE  1u
  ------------------
 2404|      9|}
Encoder.c:ZydisAreMvexFeaturesCompatible:
 2503|    817|{
 2504|    817|    if (match->definition->encoding != ZYDIS_INSTRUCTION_ENCODING_MVEX)
  ------------------
  |  Branch (2504:9): [True: 806, False: 11]
  ------------------
 2505|    806|    {
 2506|    806|        return ZYAN_TRUE;
  ------------------
  |  |  288|    806|#define ZYAN_TRUE  1u
  ------------------
 2507|    806|    }
 2508|     11|    if (((match->definition->modrm >> 6) == 3) &&
  ------------------
  |  Branch (2508:9): [True: 4, False: 7]
  ------------------
 2509|      4|        (request->mvex.eviction_hint))
  ------------------
  |  Branch (2509:9): [True: 0, False: 4]
  ------------------
 2510|      0|    {
 2511|      0|        return ZYAN_FALSE;
  ------------------
  |  |  287|      0|#define ZYAN_FALSE 0u
  ------------------
 2512|      0|    }
 2513|       |
 2514|     11|    const ZydisInstructionDefinitionMVEX *mvex_def =
 2515|     11|        (const ZydisInstructionDefinitionMVEX *)match->base_definition;
 2516|     11|    switch (mvex_def->functionality)
 2517|     11|    {
 2518|      0|    case ZYDIS_MVEX_FUNC_IGNORED:
  ------------------
  |  Branch (2518:5): [True: 0, False: 11]
  ------------------
 2519|      0|    case ZYDIS_MVEX_FUNC_INVALID:
  ------------------
  |  Branch (2519:5): [True: 0, False: 11]
  ------------------
 2520|      0|    case ZYDIS_MVEX_FUNC_F_32:
  ------------------
  |  Branch (2520:5): [True: 0, False: 11]
  ------------------
 2521|      0|    case ZYDIS_MVEX_FUNC_I_32:
  ------------------
  |  Branch (2521:5): [True: 0, False: 11]
  ------------------
 2522|      0|    case ZYDIS_MVEX_FUNC_F_64:
  ------------------
  |  Branch (2522:5): [True: 0, False: 11]
  ------------------
 2523|      0|    case ZYDIS_MVEX_FUNC_I_64:
  ------------------
  |  Branch (2523:5): [True: 0, False: 11]
  ------------------
 2524|      0|    case ZYDIS_MVEX_FUNC_UF_64:
  ------------------
  |  Branch (2524:5): [True: 0, False: 11]
  ------------------
 2525|      0|    case ZYDIS_MVEX_FUNC_UI_64:
  ------------------
  |  Branch (2525:5): [True: 0, False: 11]
  ------------------
 2526|      0|    case ZYDIS_MVEX_FUNC_DF_64:
  ------------------
  |  Branch (2526:5): [True: 0, False: 11]
  ------------------
 2527|      0|    case ZYDIS_MVEX_FUNC_DI_64:
  ------------------
  |  Branch (2527:5): [True: 0, False: 11]
  ------------------
 2528|      0|        if ((request->mvex.broadcast != ZYDIS_BROADCAST_MODE_NONE) ||
  ------------------
  |  Branch (2528:13): [True: 0, False: 0]
  ------------------
 2529|      0|            (request->mvex.conversion != ZYDIS_CONVERSION_MODE_NONE) ||
  ------------------
  |  Branch (2529:13): [True: 0, False: 0]
  ------------------
 2530|      0|            (request->mvex.rounding != ZYDIS_ROUNDING_MODE_NONE) ||
  ------------------
  |  Branch (2530:13): [True: 0, False: 0]
  ------------------
 2531|      0|            (request->mvex.swizzle != ZYDIS_SWIZZLE_MODE_NONE) ||
  ------------------
  |  Branch (2531:13): [True: 0, False: 0]
  ------------------
 2532|      0|            (request->mvex.sae))
  ------------------
  |  Branch (2532:13): [True: 0, False: 0]
  ------------------
 2533|      0|        {
 2534|      0|            return ZYAN_FALSE;
  ------------------
  |  |  287|      0|#define ZYAN_FALSE 0u
  ------------------
 2535|      0|        }
 2536|      0|        break;
 2537|      2|    case ZYDIS_MVEX_FUNC_RC:
  ------------------
  |  Branch (2537:5): [True: 2, False: 9]
  ------------------
 2538|      2|        if ((request->mvex.broadcast != ZYDIS_BROADCAST_MODE_NONE) ||
  ------------------
  |  Branch (2538:13): [True: 1, False: 1]
  ------------------
 2539|      1|            (request->mvex.conversion != ZYDIS_CONVERSION_MODE_NONE) ||
  ------------------
  |  Branch (2539:13): [True: 0, False: 1]
  ------------------
 2540|      1|            (request->mvex.swizzle != ZYDIS_SWIZZLE_MODE_NONE) ||
  ------------------
  |  Branch (2540:13): [True: 0, False: 1]
  ------------------
 2541|      1|            (request->mvex.eviction_hint))
  ------------------
  |  Branch (2541:13): [True: 0, False: 1]
  ------------------
 2542|      1|        {
 2543|      1|            return ZYAN_FALSE;
  ------------------
  |  |  287|      1|#define ZYAN_FALSE 0u
  ------------------
 2544|      1|        }
 2545|      1|        break;
 2546|      1|    case ZYDIS_MVEX_FUNC_SAE:
  ------------------
  |  Branch (2546:5): [True: 0, False: 11]
  ------------------
 2547|      0|        if ((request->mvex.broadcast != ZYDIS_BROADCAST_MODE_NONE) ||
  ------------------
  |  Branch (2547:13): [True: 0, False: 0]
  ------------------
 2548|      0|            (request->mvex.conversion != ZYDIS_CONVERSION_MODE_NONE) ||
  ------------------
  |  Branch (2548:13): [True: 0, False: 0]
  ------------------
 2549|      0|            (request->mvex.rounding != ZYDIS_ROUNDING_MODE_NONE) ||
  ------------------
  |  Branch (2549:13): [True: 0, False: 0]
  ------------------
 2550|      0|            (request->mvex.swizzle != ZYDIS_SWIZZLE_MODE_NONE) ||
  ------------------
  |  Branch (2550:13): [True: 0, False: 0]
  ------------------
 2551|      0|            (request->mvex.eviction_hint))
  ------------------
  |  Branch (2551:13): [True: 0, False: 0]
  ------------------
 2552|      0|        {
 2553|      0|            return ZYAN_FALSE;
  ------------------
  |  |  287|      0|#define ZYAN_FALSE 0u
  ------------------
 2554|      0|        }
 2555|      0|        break;
 2556|      0|    case ZYDIS_MVEX_FUNC_SWIZZLE_32:
  ------------------
  |  Branch (2556:5): [True: 0, False: 11]
  ------------------
 2557|      2|    case ZYDIS_MVEX_FUNC_SWIZZLE_64:
  ------------------
  |  Branch (2557:5): [True: 2, False: 9]
  ------------------
 2558|      2|        if ((request->mvex.broadcast != ZYDIS_BROADCAST_MODE_NONE) ||
  ------------------
  |  Branch (2558:13): [True: 1, False: 1]
  ------------------
 2559|      1|            (request->mvex.conversion != ZYDIS_CONVERSION_MODE_NONE) ||
  ------------------
  |  Branch (2559:13): [True: 0, False: 1]
  ------------------
 2560|      1|            (request->mvex.rounding != ZYDIS_ROUNDING_MODE_NONE) ||
  ------------------
  |  Branch (2560:13): [True: 0, False: 1]
  ------------------
 2561|      1|            (request->mvex.sae))
  ------------------
  |  Branch (2561:13): [True: 0, False: 1]
  ------------------
 2562|      1|        {
 2563|      1|            return ZYAN_FALSE;
  ------------------
  |  |  287|      1|#define ZYAN_FALSE 0u
  ------------------
 2564|      1|        }
 2565|      1|        break;
 2566|      2|    case ZYDIS_MVEX_FUNC_SF_32:
  ------------------
  |  Branch (2566:5): [True: 2, False: 9]
  ------------------
 2567|      2|        if ((request->mvex.rounding != ZYDIS_ROUNDING_MODE_NONE) ||
  ------------------
  |  Branch (2567:13): [True: 0, False: 2]
  ------------------
 2568|      2|            (request->mvex.swizzle != ZYDIS_SWIZZLE_MODE_NONE) ||
  ------------------
  |  Branch (2568:13): [True: 0, False: 2]
  ------------------
 2569|      2|            (request->mvex.sae))
  ------------------
  |  Branch (2569:13): [True: 1, False: 1]
  ------------------
 2570|      1|        {
 2571|      1|            return ZYAN_FALSE;
  ------------------
  |  |  287|      1|#define ZYAN_FALSE 0u
  ------------------
 2572|      1|        }
 2573|      1|        if ((request->mvex.broadcast != ZYDIS_BROADCAST_MODE_NONE) &&
  ------------------
  |  Branch (2573:13): [True: 1, False: 0]
  ------------------
 2574|      1|            (request->mvex.broadcast != ZYDIS_BROADCAST_MODE_1_TO_16) &&
  ------------------
  |  Branch (2574:13): [True: 1, False: 0]
  ------------------
 2575|      1|            (request->mvex.broadcast != ZYDIS_BROADCAST_MODE_4_TO_16))
  ------------------
  |  Branch (2575:13): [True: 0, False: 1]
  ------------------
 2576|      0|        {
 2577|      0|            return ZYAN_FALSE;
  ------------------
  |  |  287|      0|#define ZYAN_FALSE 0u
  ------------------
 2578|      0|        }
 2579|      1|        if ((request->mvex.conversion != ZYDIS_CONVERSION_MODE_NONE) &&
  ------------------
  |  Branch (2579:13): [True: 1, False: 0]
  ------------------
 2580|      1|            (request->mvex.conversion != ZYDIS_CONVERSION_MODE_FLOAT16) &&
  ------------------
  |  Branch (2580:13): [True: 1, False: 0]
  ------------------
 2581|      1|            (request->mvex.conversion != ZYDIS_CONVERSION_MODE_UINT8) &&
  ------------------
  |  Branch (2581:13): [True: 1, False: 0]
  ------------------
 2582|      1|            (request->mvex.conversion != ZYDIS_CONVERSION_MODE_UINT16) &&
  ------------------
  |  Branch (2582:13): [True: 1, False: 0]
  ------------------
 2583|      1|            (request->mvex.conversion != ZYDIS_CONVERSION_MODE_SINT16))
  ------------------
  |  Branch (2583:13): [True: 1, False: 0]
  ------------------
 2584|      1|        {
 2585|      1|            return ZYAN_FALSE;
  ------------------
  |  |  287|      1|#define ZYAN_FALSE 0u
  ------------------
 2586|      1|        }
 2587|      0|        if ((request->mvex.broadcast != ZYDIS_BROADCAST_MODE_NONE) &&
  ------------------
  |  Branch (2587:13): [True: 0, False: 0]
  ------------------
 2588|      0|            (request->mvex.conversion != ZYDIS_CONVERSION_MODE_NONE))
  ------------------
  |  Branch (2588:13): [True: 0, False: 0]
  ------------------
 2589|      0|        {
 2590|      0|            return ZYAN_FALSE;
  ------------------
  |  |  287|      0|#define ZYAN_FALSE 0u
  ------------------
 2591|      0|        }
 2592|      0|        break;
 2593|      0|    case ZYDIS_MVEX_FUNC_SI_32:
  ------------------
  |  Branch (2593:5): [True: 0, False: 11]
  ------------------
 2594|      0|        if ((request->mvex.rounding != ZYDIS_ROUNDING_MODE_NONE) ||
  ------------------
  |  Branch (2594:13): [True: 0, False: 0]
  ------------------
 2595|      0|            (request->mvex.swizzle != ZYDIS_SWIZZLE_MODE_NONE) ||
  ------------------
  |  Branch (2595:13): [True: 0, False: 0]
  ------------------
 2596|      0|            (request->mvex.sae))
  ------------------
  |  Branch (2596:13): [True: 0, False: 0]
  ------------------
 2597|      0|        {
 2598|      0|            return ZYAN_FALSE;
  ------------------
  |  |  287|      0|#define ZYAN_FALSE 0u
  ------------------
 2599|      0|        }
 2600|      0|        if ((request->mvex.broadcast != ZYDIS_BROADCAST_MODE_NONE) &&
  ------------------
  |  Branch (2600:13): [True: 0, False: 0]
  ------------------
 2601|      0|            (request->mvex.broadcast != ZYDIS_BROADCAST_MODE_1_TO_16) &&
  ------------------
  |  Branch (2601:13): [True: 0, False: 0]
  ------------------
 2602|      0|            (request->mvex.broadcast != ZYDIS_BROADCAST_MODE_4_TO_16))
  ------------------
  |  Branch (2602:13): [True: 0, False: 0]
  ------------------
 2603|      0|        {
 2604|      0|            return ZYAN_FALSE;
  ------------------
  |  |  287|      0|#define ZYAN_FALSE 0u
  ------------------
 2605|      0|        }
 2606|      0|        if ((request->mvex.conversion != ZYDIS_CONVERSION_MODE_NONE) &&
  ------------------
  |  Branch (2606:13): [True: 0, False: 0]
  ------------------
 2607|      0|            (request->mvex.conversion != ZYDIS_CONVERSION_MODE_UINT8) &&
  ------------------
  |  Branch (2607:13): [True: 0, False: 0]
  ------------------
 2608|      0|            (request->mvex.conversion != ZYDIS_CONVERSION_MODE_SINT8) &&
  ------------------
  |  Branch (2608:13): [True: 0, False: 0]
  ------------------
 2609|      0|            (request->mvex.conversion != ZYDIS_CONVERSION_MODE_UINT16) &&
  ------------------
  |  Branch (2609:13): [True: 0, False: 0]
  ------------------
 2610|      0|            (request->mvex.conversion != ZYDIS_CONVERSION_MODE_SINT16))
  ------------------
  |  Branch (2610:13): [True: 0, False: 0]
  ------------------
 2611|      0|        {
 2612|      0|            return ZYAN_FALSE;
  ------------------
  |  |  287|      0|#define ZYAN_FALSE 0u
  ------------------
 2613|      0|        }
 2614|      0|        if ((request->mvex.broadcast != ZYDIS_BROADCAST_MODE_NONE) &&
  ------------------
  |  Branch (2614:13): [True: 0, False: 0]
  ------------------
 2615|      0|            (request->mvex.conversion != ZYDIS_CONVERSION_MODE_NONE))
  ------------------
  |  Branch (2615:13): [True: 0, False: 0]
  ------------------
 2616|      0|        {
 2617|      0|            return ZYAN_FALSE;
  ------------------
  |  |  287|      0|#define ZYAN_FALSE 0u
  ------------------
 2618|      0|        }
 2619|      0|        break;
 2620|      0|    case ZYDIS_MVEX_FUNC_SF_32_BCST:
  ------------------
  |  Branch (2620:5): [True: 0, False: 11]
  ------------------
 2621|      0|    case ZYDIS_MVEX_FUNC_SI_32_BCST:
  ------------------
  |  Branch (2621:5): [True: 0, False: 11]
  ------------------
 2622|      0|        if ((request->mvex.conversion != ZYDIS_CONVERSION_MODE_NONE) ||
  ------------------
  |  Branch (2622:13): [True: 0, False: 0]
  ------------------
 2623|      0|            (request->mvex.rounding != ZYDIS_ROUNDING_MODE_NONE) ||
  ------------------
  |  Branch (2623:13): [True: 0, False: 0]
  ------------------
 2624|      0|            (request->mvex.swizzle != ZYDIS_SWIZZLE_MODE_NONE) ||
  ------------------
  |  Branch (2624:13): [True: 0, False: 0]
  ------------------
 2625|      0|            (request->mvex.sae))
  ------------------
  |  Branch (2625:13): [True: 0, False: 0]
  ------------------
 2626|      0|        {
 2627|      0|            return ZYAN_FALSE;
  ------------------
  |  |  287|      0|#define ZYAN_FALSE 0u
  ------------------
 2628|      0|        }
 2629|      0|        if ((request->mvex.broadcast != ZYDIS_BROADCAST_MODE_NONE) &&
  ------------------
  |  Branch (2629:13): [True: 0, False: 0]
  ------------------
 2630|      0|            (request->mvex.broadcast != ZYDIS_BROADCAST_MODE_1_TO_16) &&
  ------------------
  |  Branch (2630:13): [True: 0, False: 0]
  ------------------
 2631|      0|            (request->mvex.broadcast != ZYDIS_BROADCAST_MODE_4_TO_16))
  ------------------
  |  Branch (2631:13): [True: 0, False: 0]
  ------------------
 2632|      0|        {
 2633|      0|            return ZYAN_FALSE;
  ------------------
  |  |  287|      0|#define ZYAN_FALSE 0u
  ------------------
 2634|      0|        }
 2635|      0|        break;
 2636|      0|    case ZYDIS_MVEX_FUNC_SF_32_BCST_4TO16:
  ------------------
  |  Branch (2636:5): [True: 0, False: 11]
  ------------------
 2637|      0|    case ZYDIS_MVEX_FUNC_SI_32_BCST_4TO16:
  ------------------
  |  Branch (2637:5): [True: 0, False: 11]
  ------------------
 2638|      0|        if ((request->mvex.conversion != ZYDIS_CONVERSION_MODE_NONE) ||
  ------------------
  |  Branch (2638:13): [True: 0, False: 0]
  ------------------
 2639|      0|            (request->mvex.rounding != ZYDIS_ROUNDING_MODE_NONE) ||
  ------------------
  |  Branch (2639:13): [True: 0, False: 0]
  ------------------
 2640|      0|            (request->mvex.swizzle != ZYDIS_SWIZZLE_MODE_NONE) ||
  ------------------
  |  Branch (2640:13): [True: 0, False: 0]
  ------------------
 2641|      0|            (request->mvex.sae))
  ------------------
  |  Branch (2641:13): [True: 0, False: 0]
  ------------------
 2642|      0|        {
 2643|      0|            return ZYAN_FALSE;
  ------------------
  |  |  287|      0|#define ZYAN_FALSE 0u
  ------------------
 2644|      0|        }
 2645|      0|        if ((request->mvex.broadcast != ZYDIS_BROADCAST_MODE_NONE) &&
  ------------------
  |  Branch (2645:13): [True: 0, False: 0]
  ------------------
 2646|      0|            (request->mvex.broadcast != ZYDIS_BROADCAST_MODE_4_TO_16))
  ------------------
  |  Branch (2646:13): [True: 0, False: 0]
  ------------------
 2647|      0|        {
 2648|      0|            return ZYAN_FALSE;
  ------------------
  |  |  287|      0|#define ZYAN_FALSE 0u
  ------------------
 2649|      0|        }
 2650|      0|        break;
 2651|      4|    case ZYDIS_MVEX_FUNC_SF_64:
  ------------------
  |  Branch (2651:5): [True: 4, False: 7]
  ------------------
 2652|      4|    case ZYDIS_MVEX_FUNC_SI_64:
  ------------------
  |  Branch (2652:5): [True: 0, False: 11]
  ------------------
 2653|      4|        if ((request->mvex.conversion != ZYDIS_CONVERSION_MODE_NONE) ||
  ------------------
  |  Branch (2653:13): [True: 2, False: 2]
  ------------------
 2654|      2|            (request->mvex.rounding != ZYDIS_ROUNDING_MODE_NONE) ||
  ------------------
  |  Branch (2654:13): [True: 0, False: 2]
  ------------------
 2655|      2|            (request->mvex.swizzle != ZYDIS_SWIZZLE_MODE_NONE) ||
  ------------------
  |  Branch (2655:13): [True: 0, False: 2]
  ------------------
 2656|      2|            (request->mvex.sae))
  ------------------
  |  Branch (2656:13): [True: 1, False: 1]
  ------------------
 2657|      3|        {
 2658|      3|            return ZYAN_FALSE;
  ------------------
  |  |  287|      3|#define ZYAN_FALSE 0u
  ------------------
 2659|      3|        }
 2660|      1|        if ((request->mvex.broadcast != ZYDIS_BROADCAST_MODE_NONE) &&
  ------------------
  |  Branch (2660:13): [True: 1, False: 0]
  ------------------
 2661|      1|            (request->mvex.broadcast != ZYDIS_BROADCAST_MODE_1_TO_8) &&
  ------------------
  |  Branch (2661:13): [True: 1, False: 0]
  ------------------
 2662|      1|            (request->mvex.broadcast != ZYDIS_BROADCAST_MODE_4_TO_8))
  ------------------
  |  Branch (2662:13): [True: 1, False: 0]
  ------------------
 2663|      1|        {
 2664|      1|            return ZYAN_FALSE;
  ------------------
  |  |  287|      1|#define ZYAN_FALSE 0u
  ------------------
 2665|      1|        }
 2666|      0|        break;
 2667|      0|    case ZYDIS_MVEX_FUNC_UF_32:
  ------------------
  |  Branch (2667:5): [True: 0, False: 11]
  ------------------
 2668|      0|    case ZYDIS_MVEX_FUNC_DF_32:
  ------------------
  |  Branch (2668:5): [True: 0, False: 11]
  ------------------
 2669|      0|        if ((request->mvex.broadcast != ZYDIS_BROADCAST_MODE_NONE) ||
  ------------------
  |  Branch (2669:13): [True: 0, False: 0]
  ------------------
 2670|      0|            (request->mvex.rounding != ZYDIS_ROUNDING_MODE_NONE) ||
  ------------------
  |  Branch (2670:13): [True: 0, False: 0]
  ------------------
 2671|      0|            (request->mvex.swizzle != ZYDIS_SWIZZLE_MODE_NONE) ||
  ------------------
  |  Branch (2671:13): [True: 0, False: 0]
  ------------------
 2672|      0|            (request->mvex.sae))
  ------------------
  |  Branch (2672:13): [True: 0, False: 0]
  ------------------
 2673|      0|        {
 2674|      0|            return ZYAN_FALSE;
  ------------------
  |  |  287|      0|#define ZYAN_FALSE 0u
  ------------------
 2675|      0|        }
 2676|      0|        break;
 2677|      1|    case ZYDIS_MVEX_FUNC_UI_32:
  ------------------
  |  Branch (2677:5): [True: 1, False: 10]
  ------------------
 2678|      1|    case ZYDIS_MVEX_FUNC_DI_32:
  ------------------
  |  Branch (2678:5): [True: 0, False: 11]
  ------------------
 2679|      1|        if ((request->mvex.broadcast != ZYDIS_BROADCAST_MODE_NONE) ||
  ------------------
  |  Branch (2679:13): [True: 0, False: 1]
  ------------------
 2680|      1|            (request->mvex.rounding != ZYDIS_ROUNDING_MODE_NONE) ||
  ------------------
  |  Branch (2680:13): [True: 0, False: 1]
  ------------------
 2681|      1|            (request->mvex.swizzle != ZYDIS_SWIZZLE_MODE_NONE) ||
  ------------------
  |  Branch (2681:13): [True: 0, False: 1]
  ------------------
 2682|      1|            (request->mvex.sae))
  ------------------
  |  Branch (2682:13): [True: 1, False: 0]
  ------------------
 2683|      1|        {
 2684|      1|            return ZYAN_FALSE;
  ------------------
  |  |  287|      1|#define ZYAN_FALSE 0u
  ------------------
 2685|      1|        }
 2686|      0|        if ((request->mvex.conversion != ZYDIS_CONVERSION_MODE_NONE) &&
  ------------------
  |  Branch (2686:13): [True: 0, False: 0]
  ------------------
 2687|      0|            (request->mvex.conversion != ZYDIS_CONVERSION_MODE_UINT8) &&
  ------------------
  |  Branch (2687:13): [True: 0, False: 0]
  ------------------
 2688|      0|            (request->mvex.conversion != ZYDIS_CONVERSION_MODE_SINT8) &&
  ------------------
  |  Branch (2688:13): [True: 0, False: 0]
  ------------------
 2689|      0|            (request->mvex.conversion != ZYDIS_CONVERSION_MODE_UINT16) &&
  ------------------
  |  Branch (2689:13): [True: 0, False: 0]
  ------------------
 2690|      0|            (request->mvex.conversion != ZYDIS_CONVERSION_MODE_SINT16))
  ------------------
  |  Branch (2690:13): [True: 0, False: 0]
  ------------------
 2691|      0|        {
 2692|      0|            return ZYAN_FALSE;
  ------------------
  |  |  287|      0|#define ZYAN_FALSE 0u
  ------------------
 2693|      0|        }
 2694|      0|        break;
 2695|      0|    default:
  ------------------
  |  Branch (2695:5): [True: 0, False: 11]
  ------------------
 2696|      0|        ZYAN_UNREACHABLE;
  ------------------
  |  |  431|      0|#   define ZYAN_UNREACHABLE { assert(0); abort(); }
  ------------------
  |  Branch (2696:9): [Folded, False: 0]
  |  Branch (2696:9): [Folded, False: 0]
  ------------------
 2697|     11|    }
 2698|       |
 2699|      2|    return ZYAN_TRUE;
  ------------------
  |  |  288|      2|#define ZYAN_TRUE  1u
  ------------------
 2700|     11|}
Encoder.c:ZydisIsRegisterOperandCompatible:
 1335|    635|{
 1336|    635|    const ZydisOperandDetails *details = ZydisGetOperandDetails(def_op);
 1337|    635|    const ZydisRegisterClass reg_class = ZydisRegisterGetClass(user_op->reg.value);
 1338|    635|    const ZydisRegisterWidth reg_width = ZydisRegisterClassGetWidth(match->request->machine_mode,
 1339|    635|        reg_class);
 1340|    635|    if (reg_width == 0)
  ------------------
  |  Branch (1340:9): [True: 0, False: 635]
  ------------------
 1341|      0|    {
 1342|      0|        return ZYAN_FALSE;
  ------------------
  |  |  287|      0|#define ZYAN_FALSE 0u
  ------------------
 1343|      0|    }
 1344|       |
 1345|    635|    ZyanBool is4_expected_value = ZYAN_FALSE;
  ------------------
  |  |  287|    635|#define ZYAN_FALSE 0u
  ------------------
 1346|    635|    switch (def_op->type)
 1347|    635|    {
 1348|     30|    case ZYDIS_SEMANTIC_OPTYPE_IMPLICIT_REG:
  ------------------
  |  Branch (1348:5): [True: 30, False: 605]
  ------------------
 1349|     30|        switch (details->reg.type)
 1350|     30|        {
 1351|     18|        case ZYDIS_IMPLREG_TYPE_STATIC:
  ------------------
  |  Branch (1351:9): [True: 18, False: 12]
  ------------------
 1352|     18|            if (details->reg.reg.reg != user_op->reg.value)
  ------------------
  |  Branch (1352:17): [True: 17, False: 1]
  ------------------
 1353|     17|            {
 1354|     17|                return ZYAN_FALSE;
  ------------------
  |  |  287|     17|#define ZYAN_FALSE 0u
  ------------------
 1355|     17|            }
 1356|      1|            break;
 1357|     11|        case ZYDIS_IMPLREG_TYPE_GPR_OSZ:
  ------------------
  |  Branch (1357:9): [True: 11, False: 19]
  ------------------
 1358|     11|            if ((reg_class != ZYDIS_REGCLASS_GPR8) &&
  ------------------
  |  Branch (1358:17): [True: 7, False: 4]
  ------------------
 1359|      7|                (reg_class != ZYDIS_REGCLASS_GPR16) &&
  ------------------
  |  Branch (1359:17): [True: 6, False: 1]
  ------------------
 1360|      6|                (reg_class != ZYDIS_REGCLASS_GPR32) &&
  ------------------
  |  Branch (1360:17): [True: 6, False: 0]
  ------------------
 1361|      6|                (reg_class != ZYDIS_REGCLASS_GPR64))
  ------------------
  |  Branch (1361:17): [True: 0, False: 6]
  ------------------
 1362|      0|            {
 1363|      0|                return ZYAN_FALSE;
  ------------------
  |  |  287|      0|#define ZYAN_FALSE 0u
  ------------------
 1364|      0|            }
 1365|     11|            if (details->reg.reg.id != ZydisRegisterGetId(user_op->reg.value))
  ------------------
  |  Branch (1365:17): [True: 8, False: 3]
  ------------------
 1366|      8|            {
 1367|      8|                return ZYAN_FALSE;
  ------------------
  |  |  287|      8|#define ZYAN_FALSE 0u
  ------------------
 1368|      8|            }
 1369|      3|            if (!ZydisCheckOsz(match, reg_width))
  ------------------
  |  Branch (1369:17): [True: 1, False: 2]
  ------------------
 1370|      1|            {
 1371|      1|                return ZYAN_FALSE;
  ------------------
  |  |  287|      1|#define ZYAN_FALSE 0u
  ------------------
 1372|      1|            }
 1373|      2|            break;
 1374|      2|        case ZYDIS_IMPLREG_TYPE_GPR_ASZ:
  ------------------
  |  Branch (1374:9): [True: 1, False: 29]
  ------------------
 1375|      1|            if ((reg_class != ZYDIS_REGCLASS_GPR8) &&
  ------------------
  |  Branch (1375:17): [True: 0, False: 1]
  ------------------
 1376|      0|                (reg_class != ZYDIS_REGCLASS_GPR16) &&
  ------------------
  |  Branch (1376:17): [True: 0, False: 0]
  ------------------
 1377|      0|                (reg_class != ZYDIS_REGCLASS_GPR32) &&
  ------------------
  |  Branch (1377:17): [True: 0, False: 0]
  ------------------
 1378|      0|                (reg_class != ZYDIS_REGCLASS_GPR64))
  ------------------
  |  Branch (1378:17): [True: 0, False: 0]
  ------------------
 1379|      0|            {
 1380|      0|                return ZYAN_FALSE;
  ------------------
  |  |  287|      0|#define ZYAN_FALSE 0u
  ------------------
 1381|      0|            }
 1382|      1|            if (details->reg.reg.id != ZydisRegisterGetId(user_op->reg.value))
  ------------------
  |  Branch (1382:17): [True: 0, False: 1]
  ------------------
 1383|      0|            {
 1384|      0|                return ZYAN_FALSE;
  ------------------
  |  |  287|      0|#define ZYAN_FALSE 0u
  ------------------
 1385|      0|            }
 1386|      1|            if (!ZydisCheckAsz(match, reg_width))
  ------------------
  |  Branch (1386:17): [True: 0, False: 1]
  ------------------
 1387|      0|            {
 1388|      0|                return ZYAN_FALSE;
  ------------------
  |  |  287|      0|#define ZYAN_FALSE 0u
  ------------------
 1389|      0|            }
 1390|      1|            break;
 1391|      1|        default:
  ------------------
  |  Branch (1391:9): [True: 0, False: 30]
  ------------------
 1392|      0|            ZYAN_UNREACHABLE;
  ------------------
  |  |  431|      0|#   define ZYAN_UNREACHABLE { assert(0); abort(); }
  ------------------
  |  Branch (1392:13): [Folded, False: 0]
  |  Branch (1392:13): [Folded, False: 0]
  ------------------
 1393|     30|        }
 1394|      4|        break;
 1395|    145|    case ZYDIS_SEMANTIC_OPTYPE_GPR8:
  ------------------
  |  Branch (1395:5): [True: 145, False: 490]
  ------------------
 1396|    145|        if (reg_class != ZYDIS_REGCLASS_GPR8)
  ------------------
  |  Branch (1396:13): [True: 114, False: 31]
  ------------------
 1397|    114|        {
 1398|    114|            return ZYAN_FALSE;
  ------------------
  |  |  287|    114|#define ZYAN_FALSE 0u
  ------------------
 1399|    114|        }
 1400|     31|        if (!ZydisIsRegisterAllowed(match, user_op->reg.value, reg_class))
  ------------------
  |  Branch (1400:13): [True: 0, False: 31]
  ------------------
 1401|      0|        {
 1402|      0|            return ZYAN_FALSE;
  ------------------
  |  |  287|      0|#define ZYAN_FALSE 0u
  ------------------
 1403|      0|        }
 1404|     31|        if (!ZydisValidateRexType(match, user_op->reg.value, ZYAN_FALSE))
  ------------------
  |  |  287|     31|#define ZYAN_FALSE 0u
  ------------------
  |  Branch (1404:13): [True: 0, False: 31]
  ------------------
 1405|      0|        {
 1406|      0|            return ZYAN_FALSE;
  ------------------
  |  |  287|      0|#define ZYAN_FALSE 0u
  ------------------
 1407|      0|        }
 1408|     31|        break;
 1409|     31|    case ZYDIS_SEMANTIC_OPTYPE_GPR16:
  ------------------
  |  Branch (1409:5): [True: 8, False: 627]
  ------------------
 1410|      8|        if (reg_class != ZYDIS_REGCLASS_GPR16)
  ------------------
  |  Branch (1410:13): [True: 0, False: 8]
  ------------------
 1411|      0|        {
 1412|      0|            return ZYAN_FALSE;
  ------------------
  |  |  287|      0|#define ZYAN_FALSE 0u
  ------------------
 1413|      0|        }
 1414|      8|        if (!ZydisIsRegisterAllowed(match, user_op->reg.value, reg_class))
  ------------------
  |  Branch (1414:13): [True: 0, False: 8]
  ------------------
 1415|      0|        {
 1416|      0|            return ZYAN_FALSE;
  ------------------
  |  |  287|      0|#define ZYAN_FALSE 0u
  ------------------
 1417|      0|        }
 1418|      8|        break;
 1419|     32|    case ZYDIS_SEMANTIC_OPTYPE_GPR32:
  ------------------
  |  Branch (1419:5): [True: 32, False: 603]
  ------------------
 1420|     32|        if (reg_class != ZYDIS_REGCLASS_GPR32)
  ------------------
  |  Branch (1420:13): [True: 15, False: 17]
  ------------------
 1421|     15|        {
 1422|     15|            return ZYAN_FALSE;
  ------------------
  |  |  287|     15|#define ZYAN_FALSE 0u
  ------------------
 1423|     15|        }
 1424|     17|        if (!ZydisIsRegisterAllowed(match, user_op->reg.value, reg_class))
  ------------------
  |  Branch (1424:13): [True: 6, False: 11]
  ------------------
 1425|      6|        {
 1426|      6|            return ZYAN_FALSE;
  ------------------
  |  |  287|      6|#define ZYAN_FALSE 0u
  ------------------
 1427|      6|        }
 1428|     11|        break;
 1429|     18|    case ZYDIS_SEMANTIC_OPTYPE_GPR64:
  ------------------
  |  Branch (1429:5): [True: 18, False: 617]
  ------------------
 1430|     18|        if (reg_class != ZYDIS_REGCLASS_GPR64)
  ------------------
  |  Branch (1430:13): [True: 11, False: 7]
  ------------------
 1431|     11|        {
 1432|     11|            return ZYAN_FALSE;
  ------------------
  |  |  287|     11|#define ZYAN_FALSE 0u
  ------------------
 1433|     11|        }
 1434|      7|        if (!ZydisIsRegisterAllowed(match, user_op->reg.value, reg_class))
  ------------------
  |  Branch (1434:13): [True: 0, False: 7]
  ------------------
 1435|      0|        {
 1436|      0|            return ZYAN_FALSE;
  ------------------
  |  |  287|      0|#define ZYAN_FALSE 0u
  ------------------
 1437|      0|        }
 1438|      7|        break;
 1439|    122|    case ZYDIS_SEMANTIC_OPTYPE_GPR16_32_64:
  ------------------
  |  Branch (1439:5): [True: 122, False: 513]
  ------------------
 1440|    122|        if ((reg_class != ZYDIS_REGCLASS_GPR16) &&
  ------------------
  |  Branch (1440:13): [True: 110, False: 12]
  ------------------
 1441|    110|            (reg_class != ZYDIS_REGCLASS_GPR32) &&
  ------------------
  |  Branch (1441:13): [True: 90, False: 20]
  ------------------
 1442|     90|            (reg_class != ZYDIS_REGCLASS_GPR64))
  ------------------
  |  Branch (1442:13): [True: 24, False: 66]
  ------------------
 1443|     24|        {
 1444|     24|            return ZYAN_FALSE;
  ------------------
  |  |  287|     24|#define ZYAN_FALSE 0u
  ------------------
 1445|     24|        }
 1446|     98|        if (!ZydisCheckOsz(match, reg_width))
  ------------------
  |  Branch (1446:13): [True: 4, False: 94]
  ------------------
 1447|      4|        {
 1448|      4|            return ZYAN_FALSE;
  ------------------
  |  |  287|      4|#define ZYAN_FALSE 0u
  ------------------
 1449|      4|        }
 1450|     94|        if (!ZydisIsRegisterAllowed(match, user_op->reg.value, reg_class))
  ------------------
  |  Branch (1450:13): [True: 1, False: 93]
  ------------------
 1451|      1|        {
 1452|      1|            return ZYAN_FALSE;
  ------------------
  |  |  287|      1|#define ZYAN_FALSE 0u
  ------------------
 1453|      1|        }
 1454|     93|        if (!ZydisValidateRexType(match, user_op->reg.value, ZYAN_FALSE))
  ------------------
  |  |  287|     93|#define ZYAN_FALSE 0u
  ------------------
  |  Branch (1454:13): [True: 0, False: 93]
  ------------------
 1455|      0|        {
 1456|      0|            return ZYAN_FALSE;
  ------------------
  |  |  287|      0|#define ZYAN_FALSE 0u
  ------------------
 1457|      0|        }
 1458|     93|        break;
 1459|     93|    case ZYDIS_SEMANTIC_OPTYPE_GPR32_32_64:
  ------------------
  |  Branch (1459:5): [True: 21, False: 614]
  ------------------
 1460|     21|        if ((reg_class != ZYDIS_REGCLASS_GPR32) &&
  ------------------
  |  Branch (1460:13): [True: 11, False: 10]
  ------------------
 1461|     11|            (reg_class != ZYDIS_REGCLASS_GPR64))
  ------------------
  |  Branch (1461:13): [True: 5, False: 6]
  ------------------
 1462|      5|        {
 1463|      5|            return ZYAN_FALSE;
  ------------------
  |  |  287|      5|#define ZYAN_FALSE 0u
  ------------------
 1464|      5|        }
 1465|     16|        if (match->eosz == 0)
  ------------------
  |  Branch (1465:13): [True: 14, False: 2]
  ------------------
 1466|     14|        {
 1467|     14|            if (reg_class == ZYDIS_REGCLASS_GPR64)
  ------------------
  |  Branch (1467:17): [True: 4, False: 10]
  ------------------
 1468|      4|            {
 1469|      4|                match->eosz = 64;
 1470|      4|            }
 1471|     10|            else
 1472|     10|            {
 1473|     10|                match->eosz64_forbidden = ZYAN_TRUE;
  ------------------
  |  |  288|     10|#define ZYAN_TRUE  1u
  ------------------
 1474|     10|            }
 1475|     14|        }
 1476|      2|        else if (match->eosz != (ZyanU8)reg_width)
  ------------------
  |  Branch (1476:18): [True: 0, False: 2]
  ------------------
 1477|      0|        {
 1478|      0|            return ZYAN_FALSE;
  ------------------
  |  |  287|      0|#define ZYAN_FALSE 0u
  ------------------
 1479|      0|        }
 1480|     16|        if (!ZydisIsRegisterAllowed(match, user_op->reg.value, reg_class))
  ------------------
  |  Branch (1480:13): [True: 1, False: 15]
  ------------------
 1481|      1|        {
 1482|      1|            return ZYAN_FALSE;
  ------------------
  |  |  287|      1|#define ZYAN_FALSE 0u
  ------------------
 1483|      1|        }
 1484|     15|        if (!ZydisValidateRexType(match, user_op->reg.value, ZYAN_FALSE))
  ------------------
  |  |  287|     15|#define ZYAN_FALSE 0u
  ------------------
  |  Branch (1484:13): [True: 0, False: 15]
  ------------------
 1485|      0|        {
 1486|      0|            return ZYAN_FALSE;
  ------------------
  |  |  287|      0|#define ZYAN_FALSE 0u
  ------------------
 1487|      0|        }
 1488|     15|        break;
 1489|     15|    case ZYDIS_SEMANTIC_OPTYPE_GPR16_32_32:
  ------------------
  |  Branch (1489:5): [True: 0, False: 635]
  ------------------
 1490|      0|        if ((reg_class != ZYDIS_REGCLASS_GPR16) &&
  ------------------
  |  Branch (1490:13): [True: 0, False: 0]
  ------------------
 1491|      0|            (reg_class != ZYDIS_REGCLASS_GPR32))
  ------------------
  |  Branch (1491:13): [True: 0, False: 0]
  ------------------
 1492|      0|        {
 1493|      0|            return ZYAN_FALSE;
  ------------------
  |  |  287|      0|#define ZYAN_FALSE 0u
  ------------------
 1494|      0|        }
 1495|      0|        if (!ZydisCheckOsz(match, reg_width))
  ------------------
  |  Branch (1495:13): [True: 0, False: 0]
  ------------------
 1496|      0|        {
 1497|      0|            if (match->eosz != 64 || reg_class != ZYDIS_REGCLASS_GPR32)
  ------------------
  |  Branch (1497:17): [True: 0, False: 0]
  |  Branch (1497:38): [True: 0, False: 0]
  ------------------
 1498|      0|            {
 1499|      0|                return ZYAN_FALSE;
  ------------------
  |  |  287|      0|#define ZYAN_FALSE 0u
  ------------------
 1500|      0|            }
 1501|      0|        }
 1502|      0|        if (!ZydisIsRegisterAllowed(match, user_op->reg.value, reg_class))
  ------------------
  |  Branch (1502:13): [True: 0, False: 0]
  ------------------
 1503|      0|        {
 1504|      0|            return ZYAN_FALSE;
  ------------------
  |  |  287|      0|#define ZYAN_FALSE 0u
  ------------------
 1505|      0|        }
 1506|      0|        break;
 1507|      8|    case ZYDIS_SEMANTIC_OPTYPE_GPR_ASZ:
  ------------------
  |  Branch (1507:5): [True: 8, False: 627]
  ------------------
 1508|      8|        if ((reg_class != ZYDIS_REGCLASS_GPR16) &&
  ------------------
  |  Branch (1508:13): [True: 8, False: 0]
  ------------------
 1509|      8|            (reg_class != ZYDIS_REGCLASS_GPR32) &&
  ------------------
  |  Branch (1509:13): [True: 3, False: 5]
  ------------------
 1510|      3|            (reg_class != ZYDIS_REGCLASS_GPR64))
  ------------------
  |  Branch (1510:13): [True: 1, False: 2]
  ------------------
 1511|      1|        {
 1512|      1|            return ZYAN_FALSE;
  ------------------
  |  |  287|      1|#define ZYAN_FALSE 0u
  ------------------
 1513|      1|        }
 1514|      7|        if (!ZydisCheckAsz(match, reg_width))
  ------------------
  |  Branch (1514:13): [True: 0, False: 7]
  ------------------
 1515|      0|        {
 1516|      0|            return ZYAN_FALSE;
  ------------------
  |  |  287|      0|#define ZYAN_FALSE 0u
  ------------------
 1517|      0|        }
 1518|      7|        if (!ZydisIsRegisterAllowed(match, user_op->reg.value, reg_class))
  ------------------
  |  Branch (1518:13): [True: 1, False: 6]
  ------------------
 1519|      1|        {
 1520|      1|            return ZYAN_FALSE;
  ------------------
  |  |  287|      1|#define ZYAN_FALSE 0u
  ------------------
 1521|      1|        }
 1522|      6|        break;
 1523|      6|    case ZYDIS_SEMANTIC_OPTYPE_FPR:
  ------------------
  |  Branch (1523:5): [True: 5, False: 630]
  ------------------
 1524|      5|        if (reg_class != ZYDIS_REGCLASS_X87)
  ------------------
  |  Branch (1524:13): [True: 3, False: 2]
  ------------------
 1525|      3|        {
 1526|      3|            return ZYAN_FALSE;
  ------------------
  |  |  287|      3|#define ZYAN_FALSE 0u
  ------------------
 1527|      3|        }
 1528|      2|        break;
 1529|     12|    case ZYDIS_SEMANTIC_OPTYPE_MMX:
  ------------------
  |  Branch (1529:5): [True: 12, False: 623]
  ------------------
 1530|     12|        if (reg_class != ZYDIS_REGCLASS_MMX)
  ------------------
  |  Branch (1530:13): [True: 8, False: 4]
  ------------------
 1531|      8|        {
 1532|      8|            return ZYAN_FALSE;
  ------------------
  |  |  287|      8|#define ZYAN_FALSE 0u
  ------------------
 1533|      8|        }
 1534|      4|        break;
 1535|    112|    case ZYDIS_SEMANTIC_OPTYPE_XMM:
  ------------------
  |  Branch (1535:5): [True: 112, False: 523]
  ------------------
 1536|    112|        if (reg_class != ZYDIS_REGCLASS_XMM)
  ------------------
  |  Branch (1536:13): [True: 82, False: 30]
  ------------------
 1537|     82|        {
 1538|     82|            return ZYAN_FALSE;
  ------------------
  |  |  287|     82|#define ZYAN_FALSE 0u
  ------------------
 1539|     82|        }
 1540|     30|        if (!ZydisIsRegisterAllowed(match, user_op->reg.value, reg_class))
  ------------------
  |  Branch (1540:13): [True: 5, False: 25]
  ------------------
 1541|      5|        {
 1542|      5|            return ZYAN_FALSE;
  ------------------
  |  |  287|      5|#define ZYAN_FALSE 0u
  ------------------
 1543|      5|        }
 1544|     25|        is4_expected_value = details->encoding == ZYDIS_OPERAND_ENCODING_IS4;
 1545|     25|        break;
 1546|     41|    case ZYDIS_SEMANTIC_OPTYPE_YMM:
  ------------------
  |  Branch (1546:5): [True: 41, False: 594]
  ------------------
 1547|     41|        if (reg_class != ZYDIS_REGCLASS_YMM)
  ------------------
  |  Branch (1547:13): [True: 33, False: 8]
  ------------------
 1548|     33|        {
 1549|     33|            return ZYAN_FALSE;
  ------------------
  |  |  287|     33|#define ZYAN_FALSE 0u
  ------------------
 1550|     33|        }
 1551|      8|        if (!ZydisIsRegisterAllowed(match, user_op->reg.value, reg_class))
  ------------------
  |  Branch (1551:13): [True: 0, False: 8]
  ------------------
 1552|      0|        {
 1553|      0|            return ZYAN_FALSE;
  ------------------
  |  |  287|      0|#define ZYAN_FALSE 0u
  ------------------
 1554|      0|        }
 1555|      8|        is4_expected_value = details->encoding == ZYDIS_OPERAND_ENCODING_IS4;
 1556|      8|        break;
 1557|     25|    case ZYDIS_SEMANTIC_OPTYPE_ZMM:
  ------------------
  |  Branch (1557:5): [True: 25, False: 610]
  ------------------
 1558|     25|        if (reg_class != ZYDIS_REGCLASS_ZMM)
  ------------------
  |  Branch (1558:13): [True: 11, False: 14]
  ------------------
 1559|     11|        {
 1560|     11|            return ZYAN_FALSE;
  ------------------
  |  |  287|     11|#define ZYAN_FALSE 0u
  ------------------
 1561|     11|        }
 1562|     14|        if (!ZydisIsRegisterAllowed(match, user_op->reg.value, reg_class))
  ------------------
  |  Branch (1562:13): [True: 0, False: 14]
  ------------------
 1563|      0|        {
 1564|      0|            return ZYAN_FALSE;
  ------------------
  |  |  287|      0|#define ZYAN_FALSE 0u
  ------------------
 1565|      0|        }
 1566|     14|        break;
 1567|     14|    case ZYDIS_SEMANTIC_OPTYPE_TMM:
  ------------------
  |  Branch (1567:5): [True: 0, False: 635]
  ------------------
 1568|      0|        if (reg_class != ZYDIS_REGCLASS_TMM)
  ------------------
  |  Branch (1568:13): [True: 0, False: 0]
  ------------------
 1569|      0|        {
 1570|      0|            return ZYAN_FALSE;
  ------------------
  |  |  287|      0|#define ZYAN_FALSE 0u
  ------------------
 1571|      0|        }
 1572|      0|        break;
 1573|      7|    case ZYDIS_SEMANTIC_OPTYPE_BND:
  ------------------
  |  Branch (1573:5): [True: 7, False: 628]
  ------------------
 1574|      7|        if (reg_class != ZYDIS_REGCLASS_BOUND)
  ------------------
  |  Branch (1574:13): [True: 2, False: 5]
  ------------------
 1575|      2|        {
 1576|      2|            return ZYAN_FALSE;
  ------------------
  |  |  287|      2|#define ZYAN_FALSE 0u
  ------------------
 1577|      2|        }
 1578|      5|        break;
 1579|      8|    case ZYDIS_SEMANTIC_OPTYPE_SREG:
  ------------------
  |  Branch (1579:5): [True: 8, False: 627]
  ------------------
 1580|      8|        if (reg_class != ZYDIS_REGCLASS_SEGMENT)
  ------------------
  |  Branch (1580:13): [True: 8, False: 0]
  ------------------
 1581|      8|        {
 1582|      8|            return ZYAN_FALSE;
  ------------------
  |  |  287|      8|#define ZYAN_FALSE 0u
  ------------------
 1583|      8|        }
 1584|      0|        if ((def_op->actions & ZYDIS_OPERAND_ACTION_MASK_WRITE) &&
  ------------------
  |  Branch (1584:13): [True: 0, False: 0]
  ------------------
 1585|      0|            (user_op->reg.value == ZYDIS_REGISTER_CS))
  ------------------
  |  Branch (1585:13): [True: 0, False: 0]
  ------------------
 1586|      0|        {
 1587|      0|            return ZYAN_FALSE;
  ------------------
  |  |  287|      0|#define ZYAN_FALSE 0u
  ------------------
 1588|      0|        }
 1589|      0|        break;
 1590|      0|    case ZYDIS_SEMANTIC_OPTYPE_CR:
  ------------------
  |  Branch (1590:5): [True: 0, False: 635]
  ------------------
 1591|      0|    {
 1592|      0|        if (reg_class != ZYDIS_REGCLASS_CONTROL)
  ------------------
  |  Branch (1592:13): [True: 0, False: 0]
  ------------------
 1593|      0|        {
 1594|      0|            return ZYAN_FALSE;
  ------------------
  |  |  287|      0|#define ZYAN_FALSE 0u
  ------------------
 1595|      0|        }
 1596|      0|        static const ZyanU8 cr_lookup[16] =
 1597|      0|        {
 1598|      0|            1, 0, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0
 1599|      0|        };
 1600|      0|        const ZyanI8 reg_id = ZydisRegisterGetId(user_op->reg.value);
 1601|      0|        if ((match->request->machine_mode != ZYDIS_MACHINE_MODE_LONG_64) &&
  ------------------
  |  Branch (1601:13): [True: 0, False: 0]
  ------------------
 1602|      0|            (reg_id == 8))
  ------------------
  |  Branch (1602:13): [True: 0, False: 0]
  ------------------
 1603|      0|        {
 1604|      0|            return ZYAN_FALSE;
  ------------------
  |  |  287|      0|#define ZYAN_FALSE 0u
  ------------------
 1605|      0|        }
 1606|      0|        if (!cr_lookup[reg_id])
  ------------------
  |  Branch (1606:13): [True: 0, False: 0]
  ------------------
 1607|      0|        {
 1608|      0|            return ZYAN_FALSE;
  ------------------
  |  |  287|      0|#define ZYAN_FALSE 0u
  ------------------
 1609|      0|        }
 1610|      0|        break;
 1611|      0|    }
 1612|      0|    case ZYDIS_SEMANTIC_OPTYPE_DR:
  ------------------
  |  Branch (1612:5): [True: 0, False: 635]
  ------------------
 1613|      0|        if (reg_class != ZYDIS_REGCLASS_DEBUG)
  ------------------
  |  Branch (1613:13): [True: 0, False: 0]
  ------------------
 1614|      0|        {
 1615|      0|            return ZYAN_FALSE;
  ------------------
  |  |  287|      0|#define ZYAN_FALSE 0u
  ------------------
 1616|      0|        }
 1617|      0|        if (user_op->reg.value >= ZYDIS_REGISTER_DR8)
  ------------------
  |  Branch (1617:13): [True: 0, False: 0]
  ------------------
 1618|      0|        {
 1619|      0|            return ZYAN_FALSE;
  ------------------
  |  |  287|      0|#define ZYAN_FALSE 0u
  ------------------
 1620|      0|        }
 1621|      0|        break;
 1622|     41|    case ZYDIS_SEMANTIC_OPTYPE_MASK:
  ------------------
  |  Branch (1622:5): [True: 41, False: 594]
  ------------------
 1623|     41|        if (reg_class != ZYDIS_REGCLASS_MASK)
  ------------------
  |  Branch (1623:13): [True: 11, False: 30]
  ------------------
 1624|     11|        {
 1625|     11|            return ZYAN_FALSE;
  ------------------
  |  |  287|     11|#define ZYAN_FALSE 0u
  ------------------
 1626|     11|        }
 1627|       |
 1628|       |        // MVEX does not require similar policy check
 1629|     30|        if ((match->definition->encoding == ZYDIS_INSTRUCTION_ENCODING_EVEX) &&
  ------------------
  |  Branch (1629:13): [True: 29, False: 1]
  ------------------
 1630|     29|            (details->encoding == ZYDIS_OPERAND_ENCODING_MASK))
  ------------------
  |  Branch (1630:13): [True: 28, False: 1]
  ------------------
 1631|     28|        {
 1632|     28|            const ZydisInstructionDefinitionEVEX *evex_def =
 1633|     28|                (const ZydisInstructionDefinitionEVEX *)match->base_definition;
 1634|     28|            ZYAN_ASSERT((evex_def->mask_policy != ZYDIS_MASK_POLICY_INVALID) &&
  ------------------
  |  |  381|     28|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (1634:13): [True: 0, False: 28]
  |  Branch (1634:13): [True: 0, False: 0]
  |  Branch (1634:13): [True: 28, False: 0]
  |  Branch (1634:13): [True: 28, False: 0]
  ------------------
 1635|     28|                        (evex_def->mask_policy != ZYDIS_MASK_POLICY_FORBIDDEN));
 1636|     28|            if ((evex_def->mask_policy == ZYDIS_MASK_POLICY_REQUIRED) &&
  ------------------
  |  Branch (1636:17): [True: 6, False: 22]
  ------------------
 1637|      6|                (user_op->reg.value == ZYDIS_REGISTER_K0))
  ------------------
  |  Branch (1637:17): [True: 0, False: 6]
  ------------------
 1638|      0|            {
 1639|      0|                return ZYAN_FALSE;
  ------------------
  |  |  287|      0|#define ZYAN_FALSE 0u
  ------------------
 1640|      0|            }
 1641|     28|            if ((evex_def->mask_policy == ZYDIS_MASK_POLICY_ALLOWED) &&
  ------------------
  |  Branch (1641:17): [True: 22, False: 6]
  ------------------
 1642|     22|                (match->request->evex.zeroing_mask) &&
  ------------------
  |  Branch (1642:17): [True: 6, False: 16]
  ------------------
 1643|      6|                (user_op->reg.value == ZYDIS_REGISTER_K0))
  ------------------
  |  Branch (1643:17): [True: 4, False: 2]
  ------------------
 1644|      4|            {
 1645|      4|                return ZYAN_FALSE;
  ------------------
  |  |  287|      4|#define ZYAN_FALSE 0u
  ------------------
 1646|      4|            }
 1647|     28|        }
 1648|     26|        break;
 1649|     26|    default:
  ------------------
  |  Branch (1649:5): [True: 0, False: 635]
  ------------------
 1650|      0|        ZYAN_UNREACHABLE;
  ------------------
  |  |  431|      0|#   define ZYAN_UNREACHABLE { assert(0); abort(); }
  ------------------
  |  Branch (1650:9): [Folded, False: 0]
  |  Branch (1650:9): [Folded, False: 0]
  ------------------
 1651|    635|    }
 1652|       |
 1653|    259|    if (user_op->reg.is4 != is4_expected_value)
  ------------------
  |  Branch (1653:9): [True: 6, False: 253]
  ------------------
 1654|      6|    {
 1655|      6|        return ZYAN_FALSE;
  ------------------
  |  |  287|      6|#define ZYAN_FALSE 0u
  ------------------
 1656|      6|    }
 1657|       |
 1658|    253|    return ZYAN_TRUE;
  ------------------
  |  |  288|    253|#define ZYAN_TRUE  1u
  ------------------
 1659|    259|}
Encoder.c:ZydisCheckOsz:
  685|    101|{
  686|    101|    ZYAN_ASSERT(reg_width <= ZYAN_UINT8_MAX);
  ------------------
  |  |  381|    101|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (686:5): [True: 0, False: 101]
  |  Branch (686:5): [True: 101, False: 0]
  ------------------
  687|    101|    if (match->eosz == 0)
  ------------------
  |  Branch (687:9): [True: 86, False: 15]
  ------------------
  688|     86|    {
  689|     86|        if (reg_width == 8)
  ------------------
  |  Branch (689:13): [True: 1, False: 85]
  ------------------
  690|      1|        {
  691|      1|            return ZYAN_FALSE;
  ------------------
  |  |  287|      1|#define ZYAN_FALSE 0u
  ------------------
  692|      1|        }
  693|     85|        match->eosz = (ZyanU8)reg_width;
  694|     85|        return ZYAN_TRUE;
  ------------------
  |  |  288|     85|#define ZYAN_TRUE  1u
  ------------------
  695|     86|    }
  696|       |
  697|     15|    return match->eosz == (ZyanU8)reg_width ? ZYAN_TRUE : ZYAN_FALSE;
  ------------------
  |  |  288|     11|#define ZYAN_TRUE  1u
  ------------------
                  return match->eosz == (ZyanU8)reg_width ? ZYAN_TRUE : ZYAN_FALSE;
  ------------------
  |  |  287|     19|#define ZYAN_FALSE 0u
  ------------------
  |  Branch (697:12): [True: 11, False: 4]
  ------------------
  698|    101|}
Encoder.c:ZydisCheckAsz:
  709|      8|{
  710|      8|    ZYAN_ASSERT(reg_width <= ZYAN_UINT8_MAX);
  ------------------
  |  |  381|      8|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (710:5): [True: 0, False: 8]
  |  Branch (710:5): [True: 8, False: 0]
  ------------------
  711|      8|    if (match->easz == 0)
  ------------------
  |  Branch (711:9): [True: 8, False: 0]
  ------------------
  712|      8|    {
  713|      8|        if ((match->request->machine_mode == ZYDIS_MACHINE_MODE_LONG_64) &&
  ------------------
  |  Branch (713:13): [True: 8, False: 0]
  ------------------
  714|      8|            (reg_width == 16))
  ------------------
  |  Branch (714:13): [True: 0, False: 8]
  ------------------
  715|      0|        {
  716|      0|            return ZYAN_FALSE;
  ------------------
  |  |  287|      0|#define ZYAN_FALSE 0u
  ------------------
  717|      0|        }
  718|      8|        match->easz = (ZyanU8)reg_width;
  719|      8|        return ZYAN_TRUE;
  ------------------
  |  |  288|      8|#define ZYAN_TRUE  1u
  ------------------
  720|      8|    }
  721|       |
  722|      0|    return match->easz == (ZyanU8)reg_width ? ZYAN_TRUE : ZYAN_FALSE;
  ------------------
  |  |  288|      0|#define ZYAN_TRUE  1u
  ------------------
                  return match->easz == (ZyanU8)reg_width ? ZYAN_TRUE : ZYAN_FALSE;
  ------------------
  |  |  287|      0|#define ZYAN_FALSE 0u
  ------------------
  |  Branch (722:12): [True: 0, False: 0]
  ------------------
  723|      8|}
Encoder.c:ZydisIsRegisterAllowed:
  768|    232|{
  769|    232|    const ZyanI8 reg_id = ZydisRegisterGetId(reg);
  770|    232|    ZYAN_ASSERT(reg_id >= 0);
  ------------------
  |  |  381|    232|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (770:5): [True: 0, False: 232]
  |  Branch (770:5): [True: 232, False: 0]
  ------------------
  771|    232|    if (match->request->machine_mode != ZYDIS_MACHINE_MODE_LONG_64)
  ------------------
  |  Branch (771:9): [True: 28, False: 204]
  ------------------
  772|     28|    {
  773|     28|        return (reg_class != ZYDIS_REGCLASS_GPR64) && (reg_id < 8);
  ------------------
  |  Branch (773:16): [True: 28, False: 0]
  |  Branch (773:55): [True: 20, False: 8]
  ------------------
  774|     28|    }
  775|    204|    switch (match->definition->encoding)
  776|    204|    {
  777|    117|    case ZYDIS_INSTRUCTION_ENCODING_LEGACY:
  ------------------
  |  Branch (777:5): [True: 117, False: 87]
  ------------------
  778|    117|        switch (reg_class)
  779|    117|        {
  780|     24|        case ZYDIS_REGCLASS_GPR8:
  ------------------
  |  Branch (780:9): [True: 24, False: 93]
  ------------------
  781|     30|        case ZYDIS_REGCLASS_GPR16:
  ------------------
  |  Branch (781:9): [True: 6, False: 111]
  ------------------
  782|     50|        case ZYDIS_REGCLASS_GPR32:
  ------------------
  |  Branch (782:9): [True: 20, False: 97]
  ------------------
  783|    112|        case ZYDIS_REGCLASS_GPR64:
  ------------------
  |  Branch (783:9): [True: 62, False: 55]
  ------------------
  784|    112|            return (match->definition->rex2 != ZYDIS_REX2_TYPE_FORBIDDEN) ||
  ------------------
  |  Branch (784:20): [True: 93, False: 19]
  ------------------
  785|     19|                   (ZydisGetPhysicalId(reg, reg_class) < 16);
  ------------------
  |  Branch (785:20): [True: 17, False: 2]
  ------------------
  786|      5|        default:
  ------------------
  |  Branch (786:9): [True: 5, False: 112]
  ------------------
  787|      5|            return reg_id < 16;
  788|    117|        }
  789|     71|    case ZYDIS_INSTRUCTION_ENCODING_EVEX:
  ------------------
  |  Branch (789:5): [True: 71, False: 133]
  ------------------
  790|     71|        return (reg < ZYDIS_REGISTER_AH) || (reg > ZYDIS_REGISTER_BH);
  ------------------
  |  Branch (790:16): [True: 3, False: 68]
  |  Branch (790:45): [True: 68, False: 0]
  ------------------
  791|      0|    case ZYDIS_INSTRUCTION_ENCODING_MVEX:
  ------------------
  |  Branch (791:5): [True: 0, False: 204]
  ------------------
  792|      0|        return ZYAN_TRUE;
  ------------------
  |  |  288|      0|#define ZYAN_TRUE  1u
  ------------------
  793|     16|    default:
  ------------------
  |  Branch (793:5): [True: 16, False: 188]
  ------------------
  794|     16|        return reg_id < 16;
  795|    204|    }
  796|    204|}
Encoder.c:ZydisGetPhysicalId:
  734|    191|{
  735|    191|    ZyanU8 reg_id;
  736|    191|    if (reg_class != ZYDIS_REGCLASS_GPR8)
  ------------------
  |  Branch (736:9): [True: 169, False: 22]
  ------------------
  737|    169|    {
  738|    169|        reg_id = (ZyanU8)ZydisRegisterGetId(reg);
  739|    169|        ZYAN_ASSERT(reg_id != 0xFF);
  ------------------
  |  |  381|    169|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (739:9): [True: 0, False: 169]
  |  Branch (739:9): [True: 169, False: 0]
  ------------------
  740|    169|    }
  741|     22|    else
  742|     22|    {
  743|     22|        static const ZyanU8 reg8_lookup[] = {
  744|     22|            0,  1,  2,  3,                     // AL, CL, DL, BL
  745|     22|            4,  5,  6,  7,                     // AH, CH, DH, BH
  746|     22|            4,  5,  6,  7,                     // SPL, BPL, SIL, DIL
  747|     22|            8,  9,  10, 11, 12, 13, 14, 15,    // R8B-R31B
  748|     22|            16, 17, 18, 19, 20, 21, 22, 23,
  749|     22|            24, 25, 26, 27, 28, 29, 30, 31,
  750|     22|        };
  751|     22|        ZYAN_ASSERT(((ZyanUSize)reg - ZYDIS_REGISTER_AL) < ZYAN_ARRAY_LENGTH(reg8_lookup));
  ------------------
  |  |  381|     22|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (751:9): [True: 0, False: 22]
  |  Branch (751:9): [True: 22, False: 0]
  ------------------
  752|     22|        reg_id = reg8_lookup[reg - ZYDIS_REGISTER_AL];
  753|     22|    }
  754|    191|    return reg_id;
  755|    191|}
Encoder.c:ZydisValidateRexType:
  832|    173|{
  833|    173|    switch (reg)
  834|    173|    {
  835|      1|    case ZYDIS_REGISTER_AL:
  ------------------
  |  Branch (835:5): [True: 1, False: 172]
  ------------------
  836|      4|    case ZYDIS_REGISTER_CL:
  ------------------
  |  Branch (836:5): [True: 3, False: 170]
  ------------------
  837|      6|    case ZYDIS_REGISTER_DL:
  ------------------
  |  Branch (837:5): [True: 2, False: 171]
  ------------------
  838|      9|    case ZYDIS_REGISTER_BL:
  ------------------
  |  Branch (838:5): [True: 3, False: 170]
  ------------------
  839|      9|        return ZYAN_TRUE;
  ------------------
  |  |  288|      9|#define ZYAN_TRUE  1u
  ------------------
  840|      0|    case ZYDIS_REGISTER_AH:
  ------------------
  |  Branch (840:5): [True: 0, False: 173]
  ------------------
  841|      0|    case ZYDIS_REGISTER_CH:
  ------------------
  |  Branch (841:5): [True: 0, False: 173]
  ------------------
  842|      0|    case ZYDIS_REGISTER_DH:
  ------------------
  |  Branch (842:5): [True: 0, False: 173]
  ------------------
  843|      3|    case ZYDIS_REGISTER_BH:
  ------------------
  |  Branch (843:5): [True: 3, False: 170]
  ------------------
  844|      3|        if (match->rex_type == ZYDIS_REX_TYPE_UNKNOWN)
  ------------------
  |  Branch (844:13): [True: 3, False: 0]
  ------------------
  845|      3|        {
  846|      3|            match->rex_type = ZYDIS_REX_TYPE_FORBIDDEN;
  847|      3|        }
  848|      0|        else if (match->rex_type == ZYDIS_REX_TYPE_REQUIRED)
  ------------------
  |  Branch (848:18): [True: 0, False: 0]
  ------------------
  849|      0|        {
  850|      0|            return ZYAN_FALSE;
  ------------------
  |  |  287|      0|#define ZYAN_FALSE 0u
  ------------------
  851|      0|        }
  852|      3|        break;
  853|      3|    case ZYDIS_REGISTER_SPL:
  ------------------
  |  Branch (853:5): [True: 3, False: 170]
  ------------------
  854|      3|    case ZYDIS_REGISTER_BPL:
  ------------------
  |  Branch (854:5): [True: 0, False: 173]
  ------------------
  855|      3|    case ZYDIS_REGISTER_SIL:
  ------------------
  |  Branch (855:5): [True: 0, False: 173]
  ------------------
  856|      4|    case ZYDIS_REGISTER_DIL:
  ------------------
  |  Branch (856:5): [True: 1, False: 172]
  ------------------
  857|      8|    case ZYDIS_REGISTER_R8B:
  ------------------
  |  Branch (857:5): [True: 4, False: 169]
  ------------------
  858|      8|    case ZYDIS_REGISTER_R9B:
  ------------------
  |  Branch (858:5): [True: 0, False: 173]
  ------------------
  859|      8|    case ZYDIS_REGISTER_R10B:
  ------------------
  |  Branch (859:5): [True: 0, False: 173]
  ------------------
  860|      9|    case ZYDIS_REGISTER_R11B:
  ------------------
  |  Branch (860:5): [True: 1, False: 172]
  ------------------
  861|      9|    case ZYDIS_REGISTER_R12B:
  ------------------
  |  Branch (861:5): [True: 0, False: 173]
  ------------------
  862|     11|    case ZYDIS_REGISTER_R13B:
  ------------------
  |  Branch (862:5): [True: 2, False: 171]
  ------------------
  863|     11|    case ZYDIS_REGISTER_R14B:
  ------------------
  |  Branch (863:5): [True: 0, False: 173]
  ------------------
  864|     13|    case ZYDIS_REGISTER_R15B:
  ------------------
  |  Branch (864:5): [True: 2, False: 171]
  ------------------
  865|     13|    case ZYDIS_REGISTER_R16B:
  ------------------
  |  Branch (865:5): [True: 0, False: 173]
  ------------------
  866|     13|    case ZYDIS_REGISTER_R17B:
  ------------------
  |  Branch (866:5): [True: 0, False: 173]
  ------------------
  867|     14|    case ZYDIS_REGISTER_R18B:
  ------------------
  |  Branch (867:5): [True: 1, False: 172]
  ------------------
  868|     14|    case ZYDIS_REGISTER_R19B:
  ------------------
  |  Branch (868:5): [True: 0, False: 173]
  ------------------
  869|     14|    case ZYDIS_REGISTER_R20B:
  ------------------
  |  Branch (869:5): [True: 0, False: 173]
  ------------------
  870|     14|    case ZYDIS_REGISTER_R21B:
  ------------------
  |  Branch (870:5): [True: 0, False: 173]
  ------------------
  871|     14|    case ZYDIS_REGISTER_R22B:
  ------------------
  |  Branch (871:5): [True: 0, False: 173]
  ------------------
  872|     14|    case ZYDIS_REGISTER_R23B:
  ------------------
  |  Branch (872:5): [True: 0, False: 173]
  ------------------
  873|     14|    case ZYDIS_REGISTER_R24B:
  ------------------
  |  Branch (873:5): [True: 0, False: 173]
  ------------------
  874|     15|    case ZYDIS_REGISTER_R25B:
  ------------------
  |  Branch (874:5): [True: 1, False: 172]
  ------------------
  875|     15|    case ZYDIS_REGISTER_R26B:
  ------------------
  |  Branch (875:5): [True: 0, False: 173]
  ------------------
  876|     15|    case ZYDIS_REGISTER_R27B:
  ------------------
  |  Branch (876:5): [True: 0, False: 173]
  ------------------
  877|     15|    case ZYDIS_REGISTER_R28B:
  ------------------
  |  Branch (877:5): [True: 0, False: 173]
  ------------------
  878|     15|    case ZYDIS_REGISTER_R29B:
  ------------------
  |  Branch (878:5): [True: 0, False: 173]
  ------------------
  879|     17|    case ZYDIS_REGISTER_R30B:
  ------------------
  |  Branch (879:5): [True: 2, False: 171]
  ------------------
  880|     19|    case ZYDIS_REGISTER_R31B:
  ------------------
  |  Branch (880:5): [True: 2, False: 171]
  ------------------
  881|     19|        if (match->rex_type == ZYDIS_REX_TYPE_UNKNOWN)
  ------------------
  |  Branch (881:13): [True: 19, False: 0]
  ------------------
  882|     19|        {
  883|     19|            match->rex_type = ZYDIS_REX_TYPE_REQUIRED;
  884|     19|        }
  885|      0|        else if (match->rex_type == ZYDIS_REX_TYPE_FORBIDDEN)
  ------------------
  |  Branch (885:18): [True: 0, False: 0]
  ------------------
  886|      0|        {
  887|      0|            return ZYAN_FALSE;
  ------------------
  |  |  287|      0|#define ZYAN_FALSE 0u
  ------------------
  888|      0|        }
  889|     19|        break;
  890|    142|    default:
  ------------------
  |  Branch (890:5): [True: 142, False: 31]
  ------------------
  891|    142|        if ((ZydisRegisterGetId(reg) > 7) ||
  ------------------
  |  Branch (891:13): [True: 85, False: 57]
  ------------------
  892|     57|            (!addressing_mode && (ZydisRegisterGetClass(reg) == ZYDIS_REGCLASS_GPR64)))
  ------------------
  |  Branch (892:14): [True: 43, False: 14]
  |  Branch (892:34): [True: 29, False: 14]
  ------------------
  893|    114|        {
  894|    114|            if (match->rex_type == ZYDIS_REX_TYPE_UNKNOWN)
  ------------------
  |  Branch (894:17): [True: 97, False: 17]
  ------------------
  895|     97|            {
  896|     97|                match->rex_type = ZYDIS_REX_TYPE_REQUIRED;
  897|     97|            }
  898|     17|            else if (match->rex_type == ZYDIS_REX_TYPE_FORBIDDEN)
  ------------------
  |  Branch (898:22): [True: 0, False: 17]
  ------------------
  899|      0|            {
  900|      0|                return ZYAN_FALSE;
  ------------------
  |  |  287|      0|#define ZYAN_FALSE 0u
  ------------------
  901|      0|            }
  902|    114|        }
  903|    142|        break;
  904|    173|    }
  905|       |
  906|    164|    return ZYAN_TRUE;
  ------------------
  |  |  288|    164|#define ZYAN_TRUE  1u
  ------------------
  907|    173|}
Encoder.c:ZydisIsMemoryOperandCompatible:
 1844|    289|{
 1845|    289|    switch (def_op->type)
 1846|    289|    {
 1847|    225|    case ZYDIS_SEMANTIC_OPTYPE_MEM:
  ------------------
  |  Branch (1847:5): [True: 225, False: 64]
  ------------------
 1848|    227|    case ZYDIS_SEMANTIC_OPTYPE_AGEN:
  ------------------
  |  Branch (1848:5): [True: 2, False: 287]
  ------------------
 1849|    227|    case ZYDIS_SEMANTIC_OPTYPE_MIB:
  ------------------
  |  Branch (1849:5): [True: 0, False: 289]
  ------------------
 1850|    227|    case ZYDIS_SEMANTIC_OPTYPE_MEM_VSIBX:
  ------------------
  |  Branch (1850:5): [True: 0, False: 289]
  ------------------
 1851|    229|    case ZYDIS_SEMANTIC_OPTYPE_MEM_VSIBY:
  ------------------
  |  Branch (1851:5): [True: 2, False: 287]
  ------------------
 1852|    234|    case ZYDIS_SEMANTIC_OPTYPE_MEM_VSIBZ:
  ------------------
  |  Branch (1852:5): [True: 5, False: 284]
  ------------------
 1853|    234|    {
 1854|    234|        if ((def_op->type == ZYDIS_SEMANTIC_OPTYPE_MIB) &&
  ------------------
  |  Branch (1854:13): [True: 0, False: 234]
  ------------------
 1855|      0|            (user_op->mem.scale != 0))
  ------------------
  |  Branch (1855:13): [True: 0, False: 0]
  ------------------
 1856|      0|        {
 1857|      0|            return ZYAN_FALSE;
  ------------------
  |  |  287|      0|#define ZYAN_FALSE 0u
  ------------------
 1858|      0|        }
 1859|    234|        const ZyanI64 displacement = user_op->mem.displacement;
 1860|    234|        ZyanU8 disp_size = 0;
 1861|    234|        if (displacement)
  ------------------
  |  Branch (1861:13): [True: 204, False: 30]
  ------------------
 1862|    204|        {
 1863|    204|            disp_size = ZydisGetSignedImmSize(displacement);
 1864|    204|            if (disp_size > 32)
  ------------------
  |  Branch (1864:17): [True: 36, False: 168]
  ------------------
 1865|     36|            {
 1866|     36|                return ZYAN_FALSE;
  ------------------
  |  |  287|     36|#define ZYAN_FALSE 0u
  ------------------
 1867|     36|            }
 1868|       |
 1869|    168|            match->cd8_scale = ZydisGetCompDispScale(match);
 1870|    168|            if (match->cd8_scale)
  ------------------
  |  Branch (1870:17): [True: 23, False: 145]
  ------------------
 1871|     23|            {
 1872|     23|                const ZyanI64 mask = (1 << match->cd8_scale) - 1;
 1873|     23|                if (!(displacement & mask))
  ------------------
  |  Branch (1873:21): [True: 12, False: 11]
  ------------------
 1874|     12|                {
 1875|     12|                    if (ZydisGetSignedImmSize(displacement >> match->cd8_scale) == 8)
  ------------------
  |  Branch (1875:25): [True: 3, False: 9]
  ------------------
 1876|      3|                    {
 1877|      3|                        disp_size = 8;
 1878|      3|                    }
 1879|     12|                }
 1880|     11|                else if (disp_size == 8)
  ------------------
  |  Branch (1880:26): [True: 5, False: 6]
  ------------------
 1881|      5|                {
 1882|      5|                    disp_size = 16;
 1883|      5|                }
 1884|     23|            }
 1885|    168|        }
 1886|       |
 1887|    198|        if (def_op->type != ZYDIS_SEMANTIC_OPTYPE_AGEN)
  ------------------
  |  Branch (1887:13): [True: 196, False: 2]
  ------------------
 1888|    196|        {
 1889|    196|            const ZyanU16 *size = ZydisGetOperandSizes(def_op);
 1890|    196|            if (match->eosz != 0)
  ------------------
  |  Branch (1890:17): [True: 13, False: 183]
  ------------------
 1891|     13|            {
 1892|     13|                const ZyanU8 eosz_index = match->eosz >> 5;
 1893|     13|                if (size[eosz_index] != user_op->mem.size)
  ------------------
  |  Branch (1893:21): [True: 3, False: 10]
  ------------------
 1894|      3|                {
 1895|      3|                    return ZYAN_FALSE;
  ------------------
  |  |  287|      3|#define ZYAN_FALSE 0u
  ------------------
 1896|      3|                }
 1897|     13|            }
 1898|    183|            else if ((!match->definition->apx_osz) &&
  ------------------
  |  Branch (1898:22): [True: 172, False: 11]
  ------------------
 1899|    172|                     ((match->definition->vector_length != ZYDIS_VECTOR_LENGTH_INVALID) ||
  ------------------
  |  Branch (1899:23): [True: 59, False: 113]
  ------------------
 1900|    113|                      (match->definition->encoding == ZYDIS_INSTRUCTION_ENCODING_MVEX)))
  ------------------
  |  Branch (1900:23): [True: 0, False: 113]
  ------------------
 1901|     59|            {
 1902|     59|                if (!ZydisCheckVectorMemorySize(match, user_op, size))
  ------------------
  |  Branch (1902:21): [True: 32, False: 27]
  ------------------
 1903|     32|                {
 1904|     32|                    return ZYAN_FALSE;
  ------------------
  |  |  287|     32|#define ZYAN_FALSE 0u
  ------------------
 1905|     32|                }
 1906|     59|            }
 1907|    124|            else if (match->definition->rex_w)
  ------------------
  |  Branch (1907:22): [True: 4, False: 120]
  ------------------
 1908|      4|            {
 1909|      4|                match->eosz = 64;
 1910|      4|            }
 1911|    120|            else if ((match->definition->apx_osz) ||
  ------------------
  |  Branch (1911:22): [True: 11, False: 109]
  ------------------
 1912|    109|                     (match->definition->vector_length == ZYDIS_VECTOR_LENGTH_INVALID))
  ------------------
  |  Branch (1912:22): [True: 109, False: 0]
  ------------------
 1913|    120|            {
 1914|    120|                match->eosz = ZydisGetOperandSizeFromElementSize(match, size,
 1915|    120|                    user_op->mem.size, ZYAN_TRUE);
  ------------------
  |  |  288|    120|#define ZYAN_TRUE  1u
  ------------------
 1916|    120|                if (match->eosz == 0)
  ------------------
  |  Branch (1916:21): [True: 43, False: 77]
  ------------------
 1917|     43|                {
 1918|     43|                    return ZYAN_FALSE;
  ------------------
  |  |  287|     43|#define ZYAN_FALSE 0u
  ------------------
 1919|     43|                }
 1920|    120|            }
 1921|      0|            else
 1922|      0|            {
 1923|      0|                ZYAN_UNREACHABLE;
  ------------------
  |  |  431|      0|#   define ZYAN_UNREACHABLE { assert(0); abort(); }
  ------------------
  |  Branch (1923:17): [Folded, False: 0]
  |  Branch (1923:17): [Folded, False: 0]
  ------------------
 1924|      0|            }
 1925|    196|        }
 1926|      2|        else
 1927|      2|        {
 1928|      2|            if (match->easz != 0)
  ------------------
  |  Branch (1928:17): [True: 0, False: 2]
  ------------------
 1929|      0|            {
 1930|      0|                if (match->easz != user_op->mem.size)
  ------------------
  |  Branch (1930:21): [True: 0, False: 0]
  ------------------
 1931|      0|                {
 1932|      0|                    return ZYAN_FALSE;
  ------------------
  |  |  287|      0|#define ZYAN_FALSE 0u
  ------------------
 1933|      0|                }
 1934|      0|            }
 1935|      2|            else
 1936|      2|            {
 1937|      2|                switch (user_op->mem.size)
 1938|      2|                {
 1939|      0|                case 2:
  ------------------
  |  Branch (1939:17): [True: 0, False: 2]
  ------------------
 1940|      2|                case 4:
  ------------------
  |  Branch (1940:17): [True: 2, False: 0]
  ------------------
 1941|      2|                case 8:
  ------------------
  |  Branch (1941:17): [True: 0, False: 2]
  ------------------
 1942|      2|                    match->easz = (ZyanU8)user_op->mem.size << 3;
 1943|      2|                    break;
 1944|      0|                default:
  ------------------
  |  Branch (1944:17): [True: 0, False: 2]
  ------------------
 1945|      0|                    return ZYAN_FALSE;
  ------------------
  |  |  287|      0|#define ZYAN_FALSE 0u
  ------------------
 1946|      2|                }
 1947|      2|            }
 1948|      2|        }
 1949|       |
 1950|    120|        ZydisRegisterClass vsib_index_class = ZYDIS_REGCLASS_INVALID;
 1951|    120|        ZyanBool is_vsib = ZYAN_TRUE;
  ------------------
  |  |  288|    120|#define ZYAN_TRUE  1u
  ------------------
 1952|    120|        switch (def_op->type)
 1953|    120|        {
 1954|      0|        case ZYDIS_SEMANTIC_OPTYPE_MEM_VSIBX:
  ------------------
  |  Branch (1954:9): [True: 0, False: 120]
  ------------------
 1955|      0|            vsib_index_class = ZYDIS_REGCLASS_XMM;
 1956|      0|            break;
 1957|      2|        case ZYDIS_SEMANTIC_OPTYPE_MEM_VSIBY:
  ------------------
  |  Branch (1957:9): [True: 2, False: 118]
  ------------------
 1958|      2|            vsib_index_class = ZYDIS_REGCLASS_YMM;
 1959|      2|            break;
 1960|      5|        case ZYDIS_SEMANTIC_OPTYPE_MEM_VSIBZ:
  ------------------
  |  Branch (1960:9): [True: 5, False: 115]
  ------------------
 1961|      5|            vsib_index_class = ZYDIS_REGCLASS_ZMM;
 1962|      5|            break;
 1963|    113|        default:
  ------------------
  |  Branch (1963:9): [True: 113, False: 7]
  ------------------
 1964|    113|            is_vsib = ZYAN_FALSE;
  ------------------
  |  |  287|    113|#define ZYAN_FALSE 0u
  ------------------
 1965|    113|            break;
 1966|    120|        }
 1967|    120|        const ZyanBool is_rip_relative = (user_op->mem.base == ZYDIS_REGISTER_RIP) ||
  ------------------
  |  Branch (1967:42): [True: 26, False: 94]
  ------------------
 1968|     94|                                         (user_op->mem.base == ZYDIS_REGISTER_EIP);
  ------------------
  |  Branch (1968:42): [True: 28, False: 66]
  ------------------
 1969|    120|        if (is_rip_relative)
  ------------------
  |  Branch (1969:13): [True: 54, False: 66]
  ------------------
 1970|     54|        {
 1971|     54|            const ZyanBool no_rip_rel = ZYDIS_OPDEF_GET_MEM_HIGH_BIT(match->base_definition->op_rm);
  ------------------
  |  |  727|     54|    (((operand_definition) >> ZYDIS_MEMOP_TYPE_REQUIRED_BITS) & 0x01)
  ------------------
 1972|     54|            if (no_rip_rel || ((match->definition->modrm & 7) == 4))
  ------------------
  |  Branch (1972:17): [True: 0, False: 54]
  |  Branch (1972:31): [True: 0, False: 54]
  ------------------
 1973|      0|            {
 1974|      0|                return ZYAN_FALSE;
  ------------------
  |  |  287|      0|#define ZYAN_FALSE 0u
  ------------------
 1975|      0|            }
 1976|     54|        }
 1977|    120|        const ZydisRegisterClass reg_base_class = ZydisRegisterGetClass(user_op->mem.base);
 1978|    120|        if ((reg_base_class == ZYDIS_REGCLASS_INVALID) &&
  ------------------
  |  Branch (1978:13): [True: 41, False: 79]
  ------------------
 1979|     41|            (user_op->mem.base != ZYDIS_REGISTER_NONE))
  ------------------
  |  Branch (1979:13): [True: 0, False: 41]
  ------------------
 1980|      0|        {
 1981|      0|            return ZYAN_FALSE;
  ------------------
  |  |  287|      0|#define ZYAN_FALSE 0u
  ------------------
 1982|      0|        }
 1983|    120|        const ZydisRegisterClass reg_index_class = ZydisRegisterGetClass(user_op->mem.index);
 1984|    120|        if ((reg_index_class == ZYDIS_REGCLASS_INVALID) &&
  ------------------
  |  Branch (1984:13): [True: 95, False: 25]
  ------------------
 1985|     95|            (user_op->mem.index != ZYDIS_REGISTER_NONE))
  ------------------
  |  Branch (1985:13): [True: 0, False: 95]
  ------------------
 1986|      0|        {
 1987|      0|            return ZYAN_FALSE;
  ------------------
  |  |  287|      0|#define ZYAN_FALSE 0u
  ------------------
 1988|      0|        }
 1989|    120|        if (is_vsib)
  ------------------
  |  Branch (1989:13): [True: 7, False: 113]
  ------------------
 1990|      7|        {
 1991|      7|            const ZyanU8 mode_width = ZydisGetMachineModeWidth(match->request->machine_mode);
 1992|      7|            const ZyanI8 reg_index_id = ZydisRegisterGetId(user_op->mem.index);
 1993|      7|            if (((match->request->machine_mode != ZYDIS_MACHINE_MODE_LONG_64) ||
  ------------------
  |  Branch (1993:18): [True: 4, False: 3]
  ------------------
 1994|      3|                 (reg_base_class != ZYDIS_REGCLASS_GPR64)) &&
  ------------------
  |  Branch (1994:18): [True: 3, False: 0]
  ------------------
 1995|      7|                 (reg_base_class != ZYDIS_REGCLASS_GPR32) &&
  ------------------
  |  Branch (1995:18): [True: 4, False: 3]
  ------------------
 1996|      4|                 (reg_base_class != ZYDIS_REGCLASS_INVALID))
  ------------------
  |  Branch (1996:18): [True: 0, False: 4]
  ------------------
 1997|      0|            {
 1998|      0|                return ZYAN_FALSE;
  ------------------
  |  |  287|      0|#define ZYAN_FALSE 0u
  ------------------
 1999|      0|            }
 2000|      7|            if ((reg_base_class == ZYDIS_REGCLASS_GPR32) &&
  ------------------
  |  Branch (2000:17): [True: 3, False: 4]
  ------------------
 2001|      3|                (mode_width != 64) &&
  ------------------
  |  Branch (2001:17): [True: 0, False: 3]
  ------------------
 2002|      0|                (ZydisRegisterGetId(user_op->mem.base) > 7))
  ------------------
  |  Branch (2002:17): [True: 0, False: 0]
  ------------------
 2003|      0|            {
 2004|      0|                return ZYAN_FALSE;
  ------------------
  |  |  287|      0|#define ZYAN_FALSE 0u
  ------------------
 2005|      0|            }
 2006|      7|            if ((match->definition->encoding != ZYDIS_INSTRUCTION_ENCODING_EVEX) &&
  ------------------
  |  Branch (2006:17): [True: 0, False: 7]
  ------------------
 2007|      0|                (ZydisRegisterGetId(user_op->mem.base) > 15))
  ------------------
  |  Branch (2007:17): [True: 0, False: 0]
  ------------------
 2008|      0|            {
 2009|      0|                return ZYAN_FALSE;
  ------------------
  |  |  287|      0|#define ZYAN_FALSE 0u
  ------------------
 2010|      0|            }
 2011|      7|            ZyanU8 max_reg_id = 7;
 2012|      7|            if (mode_width == 64)
  ------------------
  |  Branch (2012:17): [True: 3, False: 4]
  ------------------
 2013|      3|            {
 2014|      3|                max_reg_id = match->definition->encoding != ZYDIS_INSTRUCTION_ENCODING_VEX ?
  ------------------
  |  Branch (2014:30): [True: 3, False: 0]
  ------------------
 2015|      3|                    31 : 15;
 2016|      3|            }
 2017|      7|            if ((reg_index_class != vsib_index_class) ||
  ------------------
  |  Branch (2017:17): [True: 1, False: 6]
  ------------------
 2018|      6|                (reg_index_id > max_reg_id))
  ------------------
  |  Branch (2018:17): [True: 0, False: 6]
  ------------------
 2019|      1|            {
 2020|      1|                return ZYAN_FALSE;
  ------------------
  |  |  287|      1|#define ZYAN_FALSE 0u
  ------------------
 2021|      1|            }
 2022|      7|        }
 2023|    113|        else
 2024|    113|        {
 2025|    113|            if (!ZydisIsValidAddressingClass(match, reg_base_class, user_op->mem.base))
  ------------------
  |  Branch (2025:17): [True: 57, False: 56]
  ------------------
 2026|     57|            {
 2027|     57|                if (!is_rip_relative || match->request->machine_mode != ZYDIS_MACHINE_MODE_LONG_64)
  ------------------
  |  Branch (2027:21): [True: 3, False: 54]
  |  Branch (2027:41): [True: 1, False: 53]
  ------------------
 2028|      4|                {
 2029|      4|                    return ZYAN_FALSE;
  ------------------
  |  |  287|      4|#define ZYAN_FALSE 0u
  ------------------
 2030|      4|                }
 2031|     57|            }
 2032|    109|            if (!ZydisIsValidAddressingClass(match, reg_index_class, user_op->mem.index))
  ------------------
  |  Branch (2032:17): [True: 1, False: 108]
  ------------------
 2033|      1|            {
 2034|      1|                return ZYAN_FALSE;
  ------------------
  |  |  287|      1|#define ZYAN_FALSE 0u
  ------------------
 2035|      1|            }
 2036|    108|            if (reg_base_class != ZYDIS_REGCLASS_INVALID &&
  ------------------
  |  Branch (2036:17): [True: 71, False: 37]
  ------------------
 2037|     71|                reg_index_class != ZYDIS_REGCLASS_INVALID &&
  ------------------
  |  Branch (2037:17): [True: 8, False: 63]
  ------------------
 2038|      8|                reg_base_class != reg_index_class)
  ------------------
  |  Branch (2038:17): [True: 0, False: 8]
  ------------------
 2039|      0|            {
 2040|      0|                return ZYAN_FALSE;
  ------------------
  |  |  287|      0|#define ZYAN_FALSE 0u
  ------------------
 2041|      0|            }
 2042|    108|            if (user_op->mem.index == ZYDIS_REGISTER_ESP ||
  ------------------
  |  Branch (2042:17): [True: 0, False: 108]
  ------------------
 2043|    108|                user_op->mem.index == ZYDIS_REGISTER_RSP)
  ------------------
  |  Branch (2043:17): [True: 4, False: 104]
  ------------------
 2044|      4|            {
 2045|      4|                return ZYAN_FALSE;
  ------------------
  |  |  287|      4|#define ZYAN_FALSE 0u
  ------------------
 2046|      4|            }
 2047|    108|        }
 2048|    110|        if (reg_index_class != ZYDIS_REGCLASS_INVALID &&
  ------------------
  |  Branch (2048:13): [True: 17, False: 93]
  ------------------
 2049|     17|            user_op->mem.scale == 0 &&
  ------------------
  |  Branch (2049:13): [True: 1, False: 16]
  ------------------
 2050|      1|            def_op->type != ZYDIS_SEMANTIC_OPTYPE_MIB)
  ------------------
  |  Branch (2050:13): [True: 1, False: 0]
  ------------------
 2051|      1|        {
 2052|      1|            return ZYAN_FALSE;
  ------------------
  |  |  287|      1|#define ZYAN_FALSE 0u
  ------------------
 2053|      1|        }
 2054|    109|        if (reg_index_class == ZYDIS_REGCLASS_INVALID &&
  ------------------
  |  Branch (2054:13): [True: 93, False: 16]
  ------------------
 2055|     93|            user_op->mem.scale != 0)
  ------------------
  |  Branch (2055:13): [True: 3, False: 90]
  ------------------
 2056|      3|        {
 2057|      3|            return ZYAN_FALSE;
  ------------------
  |  |  287|      3|#define ZYAN_FALSE 0u
  ------------------
 2058|      3|        }
 2059|    106|        ZyanU8 candidate_easz = 0;
 2060|    106|        ZyanBool disp_only = ZYAN_FALSE;
  ------------------
  |  |  287|    106|#define ZYAN_FALSE 0u
  ------------------
 2061|    106|        if (reg_base_class != ZYDIS_REGCLASS_INVALID)
  ------------------
  |  Branch (2061:13): [True: 71, False: 35]
  ------------------
 2062|     71|        {
 2063|     71|            if (is_rip_relative)
  ------------------
  |  Branch (2063:17): [True: 51, False: 20]
  ------------------
 2064|     51|            {
 2065|     51|                candidate_easz = user_op->mem.base == ZYDIS_REGISTER_RIP ? 64 : 32;
  ------------------
  |  Branch (2065:34): [True: 23, False: 28]
  ------------------
 2066|     51|            }
 2067|     20|            else
 2068|     20|            {
 2069|     20|                candidate_easz = (ZyanU8)ZydisRegisterClassGetWidth(match->request->machine_mode,
 2070|     20|                    reg_base_class);
 2071|     20|            }
 2072|     71|        }
 2073|     35|        else if (reg_index_class != ZYDIS_REGCLASS_INVALID)
  ------------------
  |  Branch (2073:18): [True: 6, False: 29]
  ------------------
 2074|      6|        {
 2075|      6|            if (is_vsib)
  ------------------
  |  Branch (2075:17): [True: 4, False: 2]
  ------------------
 2076|      4|            {
 2077|      4|                candidate_easz = ZydisGetMachineModeWidth(match->request->machine_mode);
 2078|      4|            }
 2079|      2|            else
 2080|      2|            {
 2081|      2|                candidate_easz = (ZyanU8)ZydisRegisterClassGetWidth(match->request->machine_mode,
 2082|      2|                    reg_index_class);
 2083|      2|            }
 2084|      6|        }
 2085|     29|        else
 2086|     29|        {
 2087|     29|            const ZyanU8 addr_size = ZydisGetMaxAddressSize(match->request);
 2088|     29|            if (disp_size > addr_size)
  ------------------
  |  Branch (2088:17): [True: 3, False: 26]
  ------------------
 2089|      3|            {
 2090|      3|                return ZYAN_FALSE;
  ------------------
  |  |  287|      3|#define ZYAN_FALSE 0u
  ------------------
 2091|      3|            }
 2092|     26|            ZyanU8 min_disp_size = match->easz ? match->easz : 16;
  ------------------
  |  Branch (2092:36): [True: 1, False: 25]
  ------------------
 2093|     26|            if (((min_disp_size == 16) && !(match->definition->address_sizes & ZYDIS_WIDTH_16)) ||
  ------------------
  |  Branch (2093:18): [True: 25, False: 1]
  |  Branch (2093:43): [True: 0, False: 25]
  ------------------
 2094|     26|                 (min_disp_size == 64) ||
  ------------------
  |  Branch (2094:18): [True: 1, False: 25]
  ------------------
 2095|     25|                 (match->request->machine_mode == ZYDIS_MACHINE_MODE_LONG_64))
  ------------------
  |  Branch (2095:18): [True: 19, False: 6]
  ------------------
 2096|     20|            {
 2097|     20|                min_disp_size = 32;
 2098|     20|            }
 2099|     26|            if (disp_size < min_disp_size)
  ------------------
  |  Branch (2099:17): [True: 6, False: 20]
  ------------------
 2100|      6|            {
 2101|      6|                disp_size = min_disp_size;
 2102|      6|            }
 2103|     26|            const ZyanI64 disp = user_op->mem.displacement;
 2104|     26|            if (match->request->machine_mode == ZYDIS_MACHINE_MODE_LONG_64)
  ------------------
  |  Branch (2104:17): [True: 20, False: 6]
  ------------------
 2105|     20|            {
 2106|     20|                candidate_easz = addr_size;
 2107|     20|                if (addr_size == 32 && disp >= 0 && match->easz != 32)
  ------------------
  |  Branch (2107:21): [True: 12, False: 8]
  |  Branch (2107:40): [True: 5, False: 7]
  |  Branch (2107:53): [True: 5, False: 0]
  ------------------
 2108|      5|                {
 2109|      5|                    candidate_easz = 64;
 2110|      5|                }
 2111|     20|            }
 2112|      6|            else
 2113|      6|            {
 2114|      6|                const ZyanU64 uimm = disp & (~(0xFFFFFFFFFFFFFFFFULL << (addr_size - 1) << 1));
 2115|      6|                if (disp_size < addr_size && ZydisGetUnsignedImmSize(uimm) > disp_size)
  ------------------
  |  Branch (2115:21): [True: 2, False: 4]
  |  Branch (2115:46): [True: 1, False: 1]
  ------------------
 2116|      1|                {
 2117|      1|                    disp_size = addr_size;
 2118|      1|                }
 2119|      6|                candidate_easz = disp_size;
 2120|      6|            }
 2121|     26|            disp_only = ZYAN_TRUE;
  ------------------
  |  |  288|     26|#define ZYAN_TRUE  1u
  ------------------
 2122|     26|        }
 2123|    103|        if (match->request->machine_mode == ZYDIS_MACHINE_MODE_LONG_64)
  ------------------
  |  Branch (2123:13): [True: 87, False: 16]
  ------------------
 2124|     87|        {
 2125|     87|            if (is_rip_relative && reg_index_class != ZYDIS_REGCLASS_INVALID)
  ------------------
  |  Branch (2125:17): [True: 51, False: 36]
  |  Branch (2125:36): [True: 0, False: 51]
  ------------------
 2126|      0|            {
 2127|      0|                return ZYAN_FALSE;
  ------------------
  |  |  287|      0|#define ZYAN_FALSE 0u
  ------------------
 2128|      0|            }
 2129|     87|        }
 2130|     16|        else if (candidate_easz == 16)
  ------------------
  |  Branch (2130:18): [True: 13, False: 3]
  ------------------
 2131|     13|        {
 2132|     13|            if (is_vsib)
  ------------------
  |  Branch (2132:17): [True: 4, False: 9]
  ------------------
 2133|      4|            {
 2134|      4|                candidate_easz = 32;
 2135|      4|            }
 2136|      9|            else if (!disp_only)
  ------------------
  |  Branch (2136:22): [True: 4, False: 5]
  ------------------
 2137|      4|            {
 2138|      4|                if (disp_size > 16)
  ------------------
  |  Branch (2138:21): [True: 0, False: 4]
  ------------------
 2139|      0|                {
 2140|      0|                    return ZYAN_FALSE;
  ------------------
  |  |  287|      0|#define ZYAN_FALSE 0u
  ------------------
 2141|      0|                }
 2142|      4|                const ZyanI8 rm16 = ZydisGetRm16(user_op->mem.base, user_op->mem.index);
 2143|      4|                if (rm16 == -1)
  ------------------
  |  Branch (2143:21): [True: 3, False: 1]
  ------------------
 2144|      3|                {
 2145|      3|                    return ZYAN_FALSE;
  ------------------
  |  |  287|      3|#define ZYAN_FALSE 0u
  ------------------
 2146|      3|                }
 2147|      1|                const ZyanU8 allowed_scale = rm16 < 4 ? 1 : 0;
  ------------------
  |  Branch (2147:46): [True: 1, False: 0]
  ------------------
 2148|      1|                if (user_op->mem.scale != allowed_scale)
  ------------------
  |  Branch (2148:21): [True: 1, False: 0]
  ------------------
 2149|      1|                {
 2150|      1|                    return ZYAN_FALSE;
  ------------------
  |  |  287|      1|#define ZYAN_FALSE 0u
  ------------------
 2151|      1|                }
 2152|      1|            }
 2153|     13|        }
 2154|     99|        if (match->easz != 0)
  ------------------
  |  Branch (2154:13): [True: 4, False: 95]
  ------------------
 2155|      4|        {
 2156|      4|            if (match->easz != candidate_easz)
  ------------------
  |  Branch (2156:17): [True: 1, False: 3]
  ------------------
 2157|      1|            {
 2158|      1|                return ZYAN_FALSE;
  ------------------
  |  |  287|      1|#define ZYAN_FALSE 0u
  ------------------
 2159|      1|            }
 2160|      4|        }
 2161|     95|        else
 2162|     95|        {
 2163|     95|            match->easz = candidate_easz;
 2164|     95|        }
 2165|     98|        if ((match->base_definition->address_size_map == ZYDIS_ADSIZE_MAP_IGNORED) &&
  ------------------
  |  |   48|     98|#define ZYDIS_ADSIZE_MAP_IGNORED                1
  ------------------
  |  Branch (2165:13): [True: 1, False: 97]
  ------------------
 2166|      1|            (match->easz != ZydisGetMachineModeWidth(match->request->machine_mode)))
  ------------------
  |  Branch (2166:13): [True: 1, False: 0]
  ------------------
 2167|      1|        {
 2168|      1|            return ZYAN_FALSE;
  ------------------
  |  |  287|      1|#define ZYAN_FALSE 0u
  ------------------
 2169|      1|        }
 2170|     97|        match->disp_size = disp_size;
 2171|     97|        break;
 2172|     98|    }
 2173|     55|    case ZYDIS_SEMANTIC_OPTYPE_MOFFS:
  ------------------
  |  Branch (2173:5): [True: 55, False: 234]
  ------------------
 2174|     55|    {
 2175|     55|        if (user_op->mem.base != ZYDIS_REGISTER_NONE ||
  ------------------
  |  Branch (2175:13): [True: 12, False: 43]
  ------------------
 2176|     43|            user_op->mem.index != ZYDIS_REGISTER_NONE ||
  ------------------
  |  Branch (2176:13): [True: 0, False: 43]
  ------------------
 2177|     43|            user_op->mem.scale != 0)
  ------------------
  |  Branch (2177:13): [True: 0, False: 43]
  ------------------
 2178|     12|        {
 2179|     12|            return ZYAN_FALSE;
  ------------------
  |  |  287|     12|#define ZYAN_FALSE 0u
  ------------------
 2180|     12|        }
 2181|     43|        const ZyanU8 min_disp_size = ZydisGetSignedImmSize(user_op->mem.displacement);
 2182|     43|        if (min_disp_size > ZydisGetMaxAddressSize(match->request))
  ------------------
  |  Branch (2182:13): [True: 8, False: 35]
  ------------------
 2183|      8|        {
 2184|      8|            return ZYAN_FALSE;
  ------------------
  |  |  287|      8|#define ZYAN_FALSE 0u
  ------------------
 2185|      8|        }
 2186|     35|        const ZyanU16 *size = ZydisGetOperandSizes(def_op);
 2187|     35|        if (match->eosz != 0)
  ------------------
  |  Branch (2187:13): [True: 2, False: 33]
  ------------------
 2188|      2|        {
 2189|      2|            const ZyanU8 eosz_index = match->eosz >> 5;
 2190|      2|            if (size[eosz_index] != user_op->mem.size)
  ------------------
  |  Branch (2190:17): [True: 2, False: 0]
  ------------------
 2191|      2|            {
 2192|      2|                return ZYAN_FALSE;
  ------------------
  |  |  287|      2|#define ZYAN_FALSE 0u
  ------------------
 2193|      2|            }
 2194|      2|        }
 2195|     33|        else
 2196|     33|        {
 2197|     33|            match->eosz = ZydisGetOperandSizeFromElementSize(match, size,user_op->mem.size,
 2198|     33|                ZYAN_TRUE);
  ------------------
  |  |  288|     33|#define ZYAN_TRUE  1u
  ------------------
 2199|     33|            if (match->eosz == 0)
  ------------------
  |  Branch (2199:17): [True: 19, False: 14]
  ------------------
 2200|     19|            {
 2201|     19|                return ZYAN_FALSE;
  ------------------
  |  |  287|     19|#define ZYAN_FALSE 0u
  ------------------
 2202|     19|            }
 2203|     33|        }
 2204|     14|        match->disp_size = ZydisGetEffectiveImmSize(match, user_op->mem.displacement, def_op);
 2205|     14|        if (match->disp_size == 0)
  ------------------
  |  Branch (2205:13): [True: 0, False: 14]
  ------------------
 2206|      0|        {
 2207|      0|            return ZYAN_FALSE;
  ------------------
  |  |  287|      0|#define ZYAN_FALSE 0u
  ------------------
 2208|      0|        }
 2209|       |        // This is not a standard rejection. It's a special case for `mov` instructions (`moffs`
 2210|       |        // variants only). In 64-bit mode it's possible to get a shorter encoding for addresses
 2211|       |        // that can fit into 32-bit displacements.
 2212|     14|        if (match->disp_size == 64 && min_disp_size < match->disp_size)
  ------------------
  |  Branch (2212:13): [True: 1, False: 13]
  |  Branch (2212:39): [True: 0, False: 1]
  ------------------
 2213|      0|        {
 2214|      0|            return ZYAN_FALSE;
  ------------------
  |  |  287|      0|#define ZYAN_FALSE 0u
  ------------------
 2215|      0|        }
 2216|     14|        break;
 2217|     14|    }
 2218|     14|    default:
  ------------------
  |  Branch (2218:5): [True: 0, False: 289]
  ------------------
 2219|      0|        ZYAN_UNREACHABLE;
  ------------------
  |  |  431|      0|#   define ZYAN_UNREACHABLE { assert(0); abort(); }
  ------------------
  |  Branch (2219:9): [Folded, False: 0]
  |  Branch (2219:9): [Folded, False: 0]
  ------------------
 2220|    289|    }
 2221|       |
 2222|    111|    return ZYAN_TRUE;
  ------------------
  |  |  288|    111|#define ZYAN_TRUE  1u
  ------------------
 2223|    289|}
Encoder.c:ZydisGetCompDispScale:
 1307|    168|{
 1308|    168|    switch (match->definition->encoding)
 1309|    168|    {
 1310|    103|    case ZYDIS_INSTRUCTION_ENCODING_LEGACY:
  ------------------
  |  Branch (1310:5): [True: 103, False: 65]
  ------------------
 1311|    103|    case ZYDIS_INSTRUCTION_ENCODING_3DNOW:
  ------------------
  |  Branch (1311:5): [True: 0, False: 168]
  ------------------
 1312|    107|    case ZYDIS_INSTRUCTION_ENCODING_XOP:
  ------------------
  |  Branch (1312:5): [True: 4, False: 164]
  ------------------
 1313|    110|    case ZYDIS_INSTRUCTION_ENCODING_VEX:
  ------------------
  |  Branch (1313:5): [True: 3, False: 165]
  ------------------
 1314|    110|        return 0;
 1315|     58|    case ZYDIS_INSTRUCTION_ENCODING_EVEX:
  ------------------
  |  Branch (1315:5): [True: 58, False: 110]
  ------------------
 1316|     58|        return ZydisGetCompDispScaleEvex(match);
 1317|      0|    case ZYDIS_INSTRUCTION_ENCODING_MVEX:
  ------------------
  |  Branch (1317:5): [True: 0, False: 168]
  ------------------
 1318|      0|        return ZydisGetCompDispScaleMvex(match);
 1319|      0|    default:
  ------------------
  |  Branch (1319:5): [True: 0, False: 168]
  ------------------
 1320|      0|        ZYAN_UNREACHABLE;
  ------------------
  |  |  431|      0|#   define ZYAN_UNREACHABLE { assert(0); abort(); }
  ------------------
  |  Branch (1320:9): [Folded, False: 0]
  |  Branch (1320:9): [Folded, False: 0]
  ------------------
 1321|    168|    }
 1322|    168|}
Encoder.c:ZydisGetCompDispScaleEvex:
 1055|     58|{
 1056|     58|    const ZydisInstructionDefinitionEVEX *evex_def =
 1057|     58|        (const ZydisInstructionDefinitionEVEX *)match->base_definition;
 1058|       |
 1059|     58|    ZYAN_ASSERT(match->definition->encoding == ZYDIS_INSTRUCTION_ENCODING_EVEX);
  ------------------
  |  |  381|     58|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (1059:5): [True: 0, False: 58]
  |  Branch (1059:5): [True: 58, False: 0]
  ------------------
 1060|     58|    if (evex_def->tuple_type == ZYDIS_TUPLETYPE_NO_SCALE)
  ------------------
  |  Branch (1060:9): [True: 35, False: 23]
  ------------------
 1061|     35|    {
 1062|     35|        return 0;
 1063|     35|    }
 1064|     23|    ZYAN_ASSERT(evex_def->tuple_type != ZYDIS_TUPLETYPE_INVALID);
  ------------------
  |  |  381|     23|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (1064:5): [True: 0, False: 23]
  |  Branch (1064:5): [True: 23, False: 0]
  ------------------
 1065|     23|    ZYAN_ASSERT(evex_def->element_size);
  ------------------
  |  |  381|     23|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (1065:5): [True: 0, False: 23]
  |  Branch (1065:5): [True: 23, False: 0]
  ------------------
 1066|     23|    const ZyanU8 vector_length = match->definition->vector_length - ZYDIS_VECTOR_LENGTH_128;
 1067|     23|    static const ZyanU8 size_indexes[ZYDIS_IELEMENT_SIZE_MAX_VALUE + 1] =
 1068|     23|    {
 1069|     23|        0, 0, 0, 0, 1, 2, 4
 1070|     23|    };
 1071|     23|    ZYAN_ASSERT(evex_def->element_size < ZYAN_ARRAY_LENGTH(size_indexes));
  ------------------
  |  |  381|     23|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (1071:5): [True: 0, False: 23]
  |  Branch (1071:5): [True: 23, False: 0]
  ------------------
 1072|     23|    const ZyanU8 size_index = size_indexes[evex_def->element_size];
 1073|     23|    switch (evex_def->tuple_type)
 1074|     23|    {
 1075|      9|    case ZYDIS_TUPLETYPE_FV:
  ------------------
  |  Branch (1075:5): [True: 9, False: 14]
  ------------------
 1076|      9|    {
 1077|      9|        static const ZyanU8 scales[2][3][3] =
 1078|      9|        {
 1079|      9|            /*B0*/ { /*16*/ { 4, 5, 6 }, /*32*/ { 4, 5, 6 }, /*64*/ { 4, 5, 6 } },
 1080|      9|            /*B1*/ { /*16*/ { 1, 1, 1 }, /*32*/ { 2, 2, 2 }, /*64*/ { 3, 3, 3 } }
 1081|      9|        };
 1082|      9|        const ZyanU8 broadcast = match->request->evex.broadcast ? 1 : 0;
  ------------------
  |  Branch (1082:34): [True: 0, False: 9]
  ------------------
 1083|      9|        ZYAN_ASSERT(size_index < 3);
  ------------------
  |  |  381|      9|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (1083:9): [True: 0, False: 9]
  |  Branch (1083:9): [True: 9, False: 0]
  ------------------
 1084|      9|        return scales[broadcast][size_index][vector_length];
 1085|      9|    }
 1086|      0|    case ZYDIS_TUPLETYPE_HV:
  ------------------
  |  Branch (1086:5): [True: 0, False: 23]
  ------------------
 1087|      0|    {
 1088|      0|        static const ZyanU8 scales[2][2][3] =
 1089|      0|        {
 1090|      0|            /*B0*/ { /*16*/ {  3, 4, 5 }, /*32*/ {  3, 4, 5 } },
 1091|      0|            /*B1*/ { /*16*/ {  1, 1, 1 }, /*32*/ {  2, 2, 2 } }
 1092|      0|        };
 1093|      0|        const ZyanU8 broadcast = match->request->evex.broadcast ? 1 : 0;
  ------------------
  |  Branch (1093:34): [True: 0, False: 0]
  ------------------
 1094|      0|        ZYAN_ASSERT(size_index < 3);
  ------------------
  |  |  381|      0|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (1094:9): [True: 0, False: 0]
  |  Branch (1094:9): [True: 0, False: 0]
  ------------------
 1095|      0|        return scales[broadcast][size_index][vector_length];
 1096|      0|    }
 1097|      3|    case ZYDIS_TUPLETYPE_FVM:
  ------------------
  |  Branch (1097:5): [True: 3, False: 20]
  ------------------
 1098|      3|    {
 1099|      3|        static const ZyanU8 scales[3] =
 1100|      3|        {
 1101|      3|            4, 5, 6
 1102|      3|        };
 1103|      3|        return scales[vector_length];
 1104|      0|    }
 1105|      7|    case ZYDIS_TUPLETYPE_GSCAT:
  ------------------
  |  Branch (1105:5): [True: 7, False: 16]
  ------------------
 1106|      7|    case ZYDIS_TUPLETYPE_T1S:
  ------------------
  |  Branch (1106:5): [True: 0, False: 23]
  ------------------
 1107|      7|    {
 1108|      7|        static const ZyanU8 scales[7] =
 1109|      7|        {
 1110|      7|            /*   */ 0,
 1111|      7|            /*  4*/ 0,
 1112|      7|            /*  8*/ 0,
 1113|      7|            /* 16*/ 1,
 1114|      7|            /* 32*/ 2,
 1115|      7|            /* 64*/ 3,
 1116|      7|            /*128*/ 4
 1117|      7|        };
 1118|      7|        ZYAN_ASSERT(evex_def->element_size < ZYAN_ARRAY_LENGTH(scales));
  ------------------
  |  |  381|      7|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (1118:9): [True: 0, False: 7]
  |  Branch (1118:9): [True: 7, False: 0]
  ------------------
 1119|      7|        return scales[evex_def->element_size];
 1120|      7|    }
 1121|      0|    case ZYDIS_TUPLETYPE_T1F:
  ------------------
  |  Branch (1121:5): [True: 0, False: 23]
  ------------------
 1122|      0|    {
 1123|      0|        static const ZyanU8 scales[3] =
 1124|      0|        {
 1125|      0|            /* 16*/ 1,
 1126|      0|            /* 32*/ 2,
 1127|      0|            /* 64*/ 3
 1128|      0|        };
 1129|      0|        ZYAN_ASSERT(size_index < 3);
  ------------------
  |  |  381|      0|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (1129:9): [True: 0, False: 0]
  |  Branch (1129:9): [True: 0, False: 0]
  ------------------
 1130|      0|        return scales[size_index];
 1131|      0|    }
 1132|      0|    case ZYDIS_TUPLETYPE_T1_4X:
  ------------------
  |  Branch (1132:5): [True: 0, False: 23]
  ------------------
 1133|      0|        return 4;
 1134|      0|    case ZYDIS_TUPLETYPE_T2:
  ------------------
  |  Branch (1134:5): [True: 0, False: 23]
  ------------------
 1135|      0|        return match->definition->rex_w ? 4 : 3;
  ------------------
  |  Branch (1135:16): [True: 0, False: 0]
  ------------------
 1136|      0|    case ZYDIS_TUPLETYPE_T4:
  ------------------
  |  Branch (1136:5): [True: 0, False: 23]
  ------------------
 1137|      0|        return match->definition->rex_w ? 5 : 4;
  ------------------
  |  Branch (1137:16): [True: 0, False: 0]
  ------------------
 1138|      0|    case ZYDIS_TUPLETYPE_T8:
  ------------------
  |  Branch (1138:5): [True: 0, False: 23]
  ------------------
 1139|      0|        return 5;
 1140|      0|    case ZYDIS_TUPLETYPE_HVM:
  ------------------
  |  Branch (1140:5): [True: 0, False: 23]
  ------------------
 1141|      0|    {
 1142|      0|        static const ZyanU8 scales[3] =
 1143|      0|        {
 1144|      0|            3, 4, 5
 1145|      0|        };
 1146|      0|        return scales[vector_length];
 1147|      0|    }
 1148|      1|    case ZYDIS_TUPLETYPE_QVM:
  ------------------
  |  Branch (1148:5): [True: 1, False: 22]
  ------------------
 1149|      1|    {
 1150|      1|        static const ZyanU8 scales[3] =
 1151|      1|        {
 1152|      1|            2, 3, 4
 1153|      1|        };
 1154|      1|        return scales[vector_length];
 1155|      0|    }
 1156|      3|    case ZYDIS_TUPLETYPE_OVM:
  ------------------
  |  Branch (1156:5): [True: 3, False: 20]
  ------------------
 1157|      3|    {
 1158|      3|        static const ZyanU8 scales[3] =
 1159|      3|        {
 1160|      3|            1, 2, 3
 1161|      3|        };
 1162|      3|        return scales[vector_length];
 1163|      0|    }
 1164|      0|    case ZYDIS_TUPLETYPE_M128:
  ------------------
  |  Branch (1164:5): [True: 0, False: 23]
  ------------------
 1165|      0|        return 4;
 1166|      0|    case ZYDIS_TUPLETYPE_DUP:
  ------------------
  |  Branch (1166:5): [True: 0, False: 23]
  ------------------
 1167|      0|    {
 1168|      0|        static const ZyanU8 scales[3] =
 1169|      0|        {
 1170|      0|            3, 5, 6
 1171|      0|        };
 1172|      0|        return scales[vector_length];
 1173|      0|    }
 1174|      0|    case ZYDIS_TUPLETYPE_QUARTER:
  ------------------
  |  Branch (1174:5): [True: 0, False: 23]
  ------------------
 1175|      0|    {
 1176|      0|        static const ZyanU8 scales[2][3] =
 1177|      0|        {
 1178|      0|            /*B0*/ { 2, 3, 4 },
 1179|      0|            /*B1*/ { 1, 1, 1 }
 1180|      0|        };
 1181|      0|        const ZyanU8 broadcast = match->request->evex.broadcast ? 1 : 0;
  ------------------
  |  Branch (1181:34): [True: 0, False: 0]
  ------------------
 1182|      0|        return scales[broadcast][vector_length];
 1183|      0|    }
 1184|      0|    default:
  ------------------
  |  Branch (1184:5): [True: 0, False: 23]
  ------------------
 1185|      0|        ZYAN_UNREACHABLE;
  ------------------
  |  |  431|      0|#   define ZYAN_UNREACHABLE { assert(0); abort(); }
  ------------------
  |  Branch (1185:9): [Folded, False: 0]
  |  Branch (1185:9): [Folded, False: 0]
  ------------------
 1186|     23|    }
 1187|     23|}
Encoder.c:ZydisCheckVectorMemorySize:
 1672|     59|{
 1673|     59|    ZyanU8 eosz_index = ZydisGetMachineModeWidth(match->request->machine_mode) >> 5;
 1674|     59|    if (match->eosz64_forbidden && (eosz_index == 2))
  ------------------
  |  Branch (1674:9): [True: 3, False: 56]
  |  Branch (1674:36): [True: 3, False: 0]
  ------------------
 1675|      3|    {
 1676|      3|        eosz_index = 1;
 1677|      3|    }
 1678|     59|    ZyanU16 allowed_mem_size = size_table[eosz_index];
 1679|     59|    if (allowed_mem_size || (match->definition->encoding == ZYDIS_INSTRUCTION_ENCODING_VEX))
  ------------------
  |  Branch (1679:9): [True: 46, False: 13]
  |  Branch (1679:29): [True: 0, False: 13]
  ------------------
 1680|     46|    {
 1681|     46|        if (user_op->mem.size == allowed_mem_size)
  ------------------
  |  Branch (1681:13): [True: 21, False: 25]
  ------------------
 1682|     21|        {
 1683|     21|            return ZYAN_TRUE;
  ------------------
  |  |  288|     21|#define ZYAN_TRUE  1u
  ------------------
 1684|     21|        }
 1685|     25|        if (!match->eosz64_forbidden && (eosz_index == 2))
  ------------------
  |  Branch (1685:13): [True: 25, False: 0]
  |  Branch (1685:41): [True: 25, False: 0]
  ------------------
 1686|     25|        {
 1687|     25|            ZYAN_ASSERT(size_table[0] == size_table[1]);
  ------------------
  |  |  381|     25|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (1687:13): [True: 0, False: 25]
  |  Branch (1687:13): [True: 25, False: 0]
  ------------------
 1688|     25|            return user_op->mem.size == size_table[1];
 1689|     25|        }
 1690|      0|        return ZYAN_FALSE;
  ------------------
  |  |  287|      0|#define ZYAN_FALSE 0u
  ------------------
 1691|     25|    }
 1692|     13|    ZYAN_ASSERT((match->definition->encoding == ZYDIS_INSTRUCTION_ENCODING_EVEX) ||
  ------------------
  |  |  381|     13|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (1692:5): [True: 13, False: 0]
  |  Branch (1692:5): [True: 0, False: 0]
  |  Branch (1692:5): [True: 13, False: 0]
  |  Branch (1692:5): [True: 0, False: 0]
  ------------------
 1693|     13|                (match->definition->encoding == ZYDIS_INSTRUCTION_ENCODING_MVEX));
 1694|     13|    switch (match->definition->vector_length)
 1695|     13|    {
 1696|      7|    case ZYDIS_VECTOR_LENGTH_128:
  ------------------
  |  Branch (1696:5): [True: 7, False: 6]
  ------------------
 1697|      7|        allowed_mem_size = 16;
 1698|      7|        break;
 1699|      4|    case ZYDIS_VECTOR_LENGTH_256:
  ------------------
  |  Branch (1699:5): [True: 4, False: 9]
  ------------------
 1700|      4|        allowed_mem_size = 32;
 1701|      4|        break;
 1702|      0|    case ZYDIS_VECTOR_LENGTH_INVALID:
  ------------------
  |  Branch (1702:5): [True: 0, False: 13]
  ------------------
 1703|      0|        ZYAN_ASSERT(match->definition->encoding == ZYDIS_INSTRUCTION_ENCODING_MVEX);
  ------------------
  |  |  381|      0|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (1703:9): [True: 0, False: 0]
  |  Branch (1703:9): [True: 0, False: 0]
  ------------------
 1704|      0|        ZYAN_FALLTHROUGH;
 1705|      2|    case ZYDIS_VECTOR_LENGTH_512:
  ------------------
  |  Branch (1705:5): [True: 2, False: 11]
  ------------------
 1706|      2|        allowed_mem_size = 64;
 1707|      2|        break;
 1708|      0|    default:
  ------------------
  |  Branch (1708:5): [True: 0, False: 13]
  ------------------
 1709|      0|        ZYAN_UNREACHABLE;
  ------------------
  |  |  431|      0|#   define ZYAN_UNREACHABLE { assert(0); abort(); }
  ------------------
  |  Branch (1709:9): [Folded, False: 0]
  |  Branch (1709:9): [Folded, False: 0]
  ------------------
 1710|     13|    }
 1711|     13|    if (match->definition->encoding == ZYDIS_INSTRUCTION_ENCODING_EVEX)
  ------------------
  |  Branch (1711:9): [True: 13, False: 0]
  ------------------
 1712|     13|    {
 1713|     13|        const ZydisInstructionDefinitionEVEX *evex_def =
 1714|     13|            (const ZydisInstructionDefinitionEVEX *)match->base_definition;
 1715|     13|        static const ZyanU8 element_sizes[ZYDIS_IELEMENT_SIZE_MAX_VALUE + 1] =
 1716|     13|        {
 1717|     13|                0, 0, 1, 2, 4, 8, 16
 1718|     13|        };
 1719|     13|        ZYAN_ASSERT(evex_def->element_size < ZYAN_ARRAY_LENGTH(element_sizes));
  ------------------
  |  |  381|     13|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (1719:9): [True: 0, False: 13]
  |  Branch (1719:9): [True: 13, False: 0]
  ------------------
 1720|     13|        const ZyanU8 element_size = element_sizes[evex_def->element_size];
 1721|     13|        if (match->request->evex.broadcast || evex_def->broadcast)
  ------------------
  |  Branch (1721:13): [True: 0, False: 13]
  |  Branch (1721:47): [True: 0, False: 13]
  ------------------
 1722|      0|        {
 1723|      0|            allowed_mem_size = element_size;
 1724|      0|        }
 1725|     13|        else
 1726|     13|        {
 1727|     13|            switch (evex_def->tuple_type)
 1728|     13|            {
 1729|      2|            case ZYDIS_TUPLETYPE_NO_SCALE:
  ------------------
  |  Branch (1729:13): [True: 2, False: 11]
  ------------------
 1730|      2|                allowed_mem_size = 0;
 1731|      2|                break;
 1732|     11|            case ZYDIS_TUPLETYPE_FV:
  ------------------
  |  Branch (1732:13): [True: 11, False: 2]
  ------------------
 1733|     11|                break;
 1734|      0|            case ZYDIS_TUPLETYPE_HV:
  ------------------
  |  Branch (1734:13): [True: 0, False: 13]
  ------------------
 1735|      0|                allowed_mem_size /= 2;
 1736|      0|                break;
 1737|      0|            case ZYDIS_TUPLETYPE_QUARTER:
  ------------------
  |  Branch (1737:13): [True: 0, False: 13]
  ------------------
 1738|      0|                allowed_mem_size /= 4;
 1739|      0|                break;
 1740|      0|            default:
  ------------------
  |  Branch (1740:13): [True: 0, False: 13]
  ------------------
 1741|      0|                ZYAN_UNREACHABLE;
  ------------------
  |  |  431|      0|#   define ZYAN_UNREACHABLE { assert(0); abort(); }
  ------------------
  |  Branch (1741:17): [Folded, False: 0]
  |  Branch (1741:17): [Folded, False: 0]
  ------------------
 1742|     13|            }
 1743|     13|        }
 1744|     13|    }
 1745|      0|    else
 1746|      0|    {
 1747|      0|        const ZydisInstructionDefinitionMVEX *mvex_def =
 1748|      0|            (const ZydisInstructionDefinitionMVEX *)match->base_definition;
 1749|      0|        ZyanU16 element_size;
 1750|      0|        switch (match->request->mvex.conversion)
 1751|      0|        {
 1752|      0|        case ZYDIS_CONVERSION_MODE_NONE:
  ------------------
  |  Branch (1752:9): [True: 0, False: 0]
  ------------------
 1753|      0|            switch (mvex_def->functionality)
 1754|      0|            {
 1755|      0|            case ZYDIS_MVEX_FUNC_SF_32:
  ------------------
  |  Branch (1755:13): [True: 0, False: 0]
  ------------------
 1756|      0|            case ZYDIS_MVEX_FUNC_SF_32_BCST_4TO16:
  ------------------
  |  Branch (1756:13): [True: 0, False: 0]
  ------------------
 1757|      0|            case ZYDIS_MVEX_FUNC_UF_32:
  ------------------
  |  Branch (1757:13): [True: 0, False: 0]
  ------------------
 1758|      0|            case ZYDIS_MVEX_FUNC_DF_32:
  ------------------
  |  Branch (1758:13): [True: 0, False: 0]
  ------------------
 1759|      0|            case ZYDIS_MVEX_FUNC_SI_32:
  ------------------
  |  Branch (1759:13): [True: 0, False: 0]
  ------------------
 1760|      0|            case ZYDIS_MVEX_FUNC_SI_32_BCST_4TO16:
  ------------------
  |  Branch (1760:13): [True: 0, False: 0]
  ------------------
 1761|      0|            case ZYDIS_MVEX_FUNC_UI_32:
  ------------------
  |  Branch (1761:13): [True: 0, False: 0]
  ------------------
 1762|      0|            case ZYDIS_MVEX_FUNC_DI_32:
  ------------------
  |  Branch (1762:13): [True: 0, False: 0]
  ------------------
 1763|      0|                allowed_mem_size = 64;
 1764|      0|                element_size = 4;
 1765|      0|                break;
 1766|      0|            case ZYDIS_MVEX_FUNC_SF_64:
  ------------------
  |  Branch (1766:13): [True: 0, False: 0]
  ------------------
 1767|      0|            case ZYDIS_MVEX_FUNC_UF_64:
  ------------------
  |  Branch (1767:13): [True: 0, False: 0]
  ------------------
 1768|      0|            case ZYDIS_MVEX_FUNC_DF_64:
  ------------------
  |  Branch (1768:13): [True: 0, False: 0]
  ------------------
 1769|      0|            case ZYDIS_MVEX_FUNC_SI_64:
  ------------------
  |  Branch (1769:13): [True: 0, False: 0]
  ------------------
 1770|      0|            case ZYDIS_MVEX_FUNC_UI_64:
  ------------------
  |  Branch (1770:13): [True: 0, False: 0]
  ------------------
 1771|      0|            case ZYDIS_MVEX_FUNC_DI_64:
  ------------------
  |  Branch (1771:13): [True: 0, False: 0]
  ------------------
 1772|      0|                allowed_mem_size = 64;
 1773|      0|                element_size = 8;
 1774|      0|                break;
 1775|      0|            case ZYDIS_MVEX_FUNC_SF_32_BCST:
  ------------------
  |  Branch (1775:13): [True: 0, False: 0]
  ------------------
 1776|      0|            case ZYDIS_MVEX_FUNC_SI_32_BCST:
  ------------------
  |  Branch (1776:13): [True: 0, False: 0]
  ------------------
 1777|      0|                allowed_mem_size = 32;
 1778|      0|                element_size = 4;
 1779|      0|                break;
 1780|      0|            default:
  ------------------
  |  Branch (1780:13): [True: 0, False: 0]
  ------------------
 1781|      0|                ZYAN_UNREACHABLE;
  ------------------
  |  |  431|      0|#   define ZYAN_UNREACHABLE { assert(0); abort(); }
  ------------------
  |  Branch (1781:17): [Folded, False: 0]
  |  Branch (1781:17): [Folded, False: 0]
  ------------------
 1782|      0|            }
 1783|      0|            break;
 1784|      0|        case ZYDIS_CONVERSION_MODE_FLOAT16:
  ------------------
  |  Branch (1784:9): [True: 0, False: 0]
  ------------------
 1785|      0|        case ZYDIS_CONVERSION_MODE_SINT16:
  ------------------
  |  Branch (1785:9): [True: 0, False: 0]
  ------------------
 1786|      0|        case ZYDIS_CONVERSION_MODE_UINT16:
  ------------------
  |  Branch (1786:9): [True: 0, False: 0]
  ------------------
 1787|      0|            allowed_mem_size = 32;
 1788|      0|            element_size = 2;
 1789|      0|            break;
 1790|      0|        case ZYDIS_CONVERSION_MODE_SINT8:
  ------------------
  |  Branch (1790:9): [True: 0, False: 0]
  ------------------
 1791|      0|        case ZYDIS_CONVERSION_MODE_UINT8:
  ------------------
  |  Branch (1791:9): [True: 0, False: 0]
  ------------------
 1792|      0|            allowed_mem_size = 16;
 1793|      0|            element_size = 1;
 1794|      0|            break;
 1795|      0|        default:
  ------------------
  |  Branch (1795:9): [True: 0, False: 0]
  ------------------
 1796|      0|            ZYAN_UNREACHABLE;
  ------------------
  |  |  431|      0|#   define ZYAN_UNREACHABLE { assert(0); abort(); }
  ------------------
  |  Branch (1796:13): [Folded, False: 0]
  |  Branch (1796:13): [Folded, False: 0]
  ------------------
 1797|      0|        }
 1798|      0|        ZYAN_ASSERT(!mvex_def->broadcast || !match->request->mvex.broadcast);
  ------------------
  |  |  381|      0|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (1798:9): [True: 0, False: 0]
  |  Branch (1798:9): [True: 0, False: 0]
  |  Branch (1798:9): [True: 0, False: 0]
  |  Branch (1798:9): [True: 0, False: 0]
  ------------------
 1799|      0|        switch (mvex_def->broadcast)
 1800|      0|        {
 1801|      0|        case ZYDIS_MVEX_STATIC_BROADCAST_NONE:
  ------------------
  |  Branch (1801:9): [True: 0, False: 0]
  ------------------
 1802|      0|            break;
 1803|      0|        case ZYDIS_MVEX_STATIC_BROADCAST_1_TO_8:
  ------------------
  |  Branch (1803:9): [True: 0, False: 0]
  ------------------
 1804|      0|        case ZYDIS_MVEX_STATIC_BROADCAST_1_TO_16:
  ------------------
  |  Branch (1804:9): [True: 0, False: 0]
  ------------------
 1805|      0|            allowed_mem_size = element_size;
 1806|      0|            break;
 1807|      0|        case ZYDIS_MVEX_STATIC_BROADCAST_4_TO_8:
  ------------------
  |  Branch (1807:9): [True: 0, False: 0]
  ------------------
 1808|      0|        case ZYDIS_MVEX_STATIC_BROADCAST_4_TO_16:
  ------------------
  |  Branch (1808:9): [True: 0, False: 0]
  ------------------
 1809|      0|            allowed_mem_size = element_size * 4;
 1810|      0|            break;
 1811|      0|        default:
  ------------------
  |  Branch (1811:9): [True: 0, False: 0]
  ------------------
 1812|      0|            ZYAN_UNREACHABLE;
  ------------------
  |  |  431|      0|#   define ZYAN_UNREACHABLE { assert(0); abort(); }
  ------------------
  |  Branch (1812:13): [Folded, False: 0]
  |  Branch (1812:13): [Folded, False: 0]
  ------------------
 1813|      0|        }
 1814|      0|        switch (match->request->mvex.broadcast)
 1815|      0|        {
 1816|      0|        case ZYDIS_BROADCAST_MODE_NONE:
  ------------------
  |  Branch (1816:9): [True: 0, False: 0]
  ------------------
 1817|      0|            break;
 1818|      0|        case ZYDIS_BROADCAST_MODE_1_TO_8:
  ------------------
  |  Branch (1818:9): [True: 0, False: 0]
  ------------------
 1819|      0|        case ZYDIS_BROADCAST_MODE_1_TO_16:
  ------------------
  |  Branch (1819:9): [True: 0, False: 0]
  ------------------
 1820|      0|            allowed_mem_size = element_size;
 1821|      0|            break;
 1822|      0|        case ZYDIS_BROADCAST_MODE_4_TO_8:
  ------------------
  |  Branch (1822:9): [True: 0, False: 0]
  ------------------
 1823|      0|        case ZYDIS_BROADCAST_MODE_4_TO_16:
  ------------------
  |  Branch (1823:9): [True: 0, False: 0]
  ------------------
 1824|      0|            allowed_mem_size = element_size * 4;
 1825|      0|            break;
 1826|      0|        default:
  ------------------
  |  Branch (1826:9): [True: 0, False: 0]
  ------------------
 1827|      0|            ZYAN_UNREACHABLE;
  ------------------
  |  |  431|      0|#   define ZYAN_UNREACHABLE { assert(0); abort(); }
  ------------------
  |  Branch (1827:13): [Folded, False: 0]
  |  Branch (1827:13): [Folded, False: 0]
  ------------------
 1828|      0|        }
 1829|      0|    }
 1830|     13|    return user_op->mem.size == allowed_mem_size;
 1831|     13|}
Encoder.c:ZydisGetOperandSizeFromElementSize:
  376|    158|{
  377|    158|    if ((match->base_definition->operand_size_map == ZYDIS_OPSIZE_MAP_DEFAULT64) &&
  ------------------
  |  |   46|    158|#define ZYDIS_OPSIZE_MAP_DEFAULT64              4
  ------------------
  |  Branch (377:9): [True: 0, False: 158]
  ------------------
  378|      0|        (match->request->machine_mode == ZYDIS_MACHINE_MODE_LONG_64))
  ------------------
  |  Branch (378:9): [True: 0, False: 0]
  ------------------
  379|      0|    {
  380|      0|        if ((exact_match_mode && (size_table[2] == desired_size)) ||
  ------------------
  |  Branch (380:14): [True: 0, False: 0]
  |  Branch (380:34): [True: 0, False: 0]
  ------------------
  381|      0|            (!exact_match_mode && (size_table[2] >= desired_size)))
  ------------------
  |  Branch (381:14): [True: 0, False: 0]
  |  Branch (381:35): [True: 0, False: 0]
  ------------------
  382|      0|        {
  383|      0|            return 64;
  384|      0|        }
  385|      0|        else if (size_table[0] == desired_size)
  ------------------
  |  Branch (385:18): [True: 0, False: 0]
  ------------------
  386|      0|        {
  387|      0|            return 16;
  388|      0|        }
  389|      0|    }
  390|    158|    else if ((match->base_definition->operand_size_map == ZYDIS_OPSIZE_MAP_FORCE64) &&
  ------------------
  |  |   47|    158|#define ZYDIS_OPSIZE_MAP_FORCE64                5
  ------------------
  |  Branch (390:14): [True: 3, False: 155]
  ------------------
  391|      3|             (match->request->machine_mode == ZYDIS_MACHINE_MODE_LONG_64))
  ------------------
  |  Branch (391:14): [True: 3, False: 0]
  ------------------
  392|      3|    {
  393|      3|        if (size_table[2] == desired_size)
  ------------------
  |  Branch (393:13): [True: 3, False: 0]
  ------------------
  394|      3|        {
  395|      3|            return 64;
  396|      3|        }
  397|      3|    }
  398|    155|    else
  399|    155|    {
  400|    155|        static const ZyanI8 eosz_priority_lookup[4][3] =
  401|    155|        {
  402|    155|            {  0,  1, -1 },
  403|    155|            {  1,  0, -1 },
  404|    155|            {  1,  2,  0 },
  405|    155|        };
  406|    155|        const ZyanU8 eosz_index = ZydisGetMachineModeWidth(match->request->machine_mode) >> 5;
  407|    385|        for (int i = 0; i < 3; ++i)
  ------------------
  |  Branch (407:25): [True: 323, False: 62]
  ------------------
  408|    323|        {
  409|    323|            const ZyanI8 eosz_candidate = eosz_priority_lookup[eosz_index][i];
  410|    323|            if ((eosz_candidate == -1) ||
  ------------------
  |  Branch (410:17): [True: 13, False: 310]
  ------------------
  411|    310|                !(match->definition->operand_sizes & (1 << eosz_candidate)))
  ------------------
  |  Branch (411:17): [True: 0, False: 310]
  ------------------
  412|     13|            {
  413|     13|                continue;
  414|     13|            }
  415|    310|            if ((exact_match_mode && (size_table[eosz_candidate] == desired_size)) ||
  ------------------
  |  Branch (415:18): [True: 300, False: 10]
  |  Branch (415:38): [True: 88, False: 212]
  ------------------
  416|    222|                (!exact_match_mode && (size_table[eosz_candidate] >= desired_size)))
  ------------------
  |  Branch (416:18): [True: 10, False: 212]
  |  Branch (416:39): [True: 5, False: 5]
  ------------------
  417|     93|            {
  418|     93|                return 16 << eosz_candidate;
  419|     93|            }
  420|    310|        }
  421|    155|    }
  422|       |
  423|     62|    return 0;
  424|    158|}
Encoder.c:ZydisIsValidAddressingClass:
  920|    222|{
  921|    222|    ZyanBool result;
  922|    222|    const ZyanBool is_64 = (match->request->machine_mode == ZYDIS_MACHINE_MODE_LONG_64);
  923|    222|    switch (reg_class)
  924|    222|    {
  925|    130|    case ZYDIS_REGCLASS_INVALID:
  ------------------
  |  Branch (925:5): [True: 130, False: 92]
  ------------------
  926|    130|        return ZYAN_TRUE;
  ------------------
  |  |  288|    130|#define ZYAN_TRUE  1u
  ------------------
  927|      9|    case ZYDIS_REGCLASS_GPR16:
  ------------------
  |  Branch (927:5): [True: 9, False: 213]
  ------------------
  928|      9|        result = !is_64;
  929|      9|        break;
  930|     13|    case ZYDIS_REGCLASS_GPR32:
  ------------------
  |  Branch (930:5): [True: 13, False: 209]
  ------------------
  931|     28|    case ZYDIS_REGCLASS_GPR64:
  ------------------
  |  Branch (931:5): [True: 15, False: 207]
  ------------------
  932|     28|    {
  933|     28|        const ZyanI8 reg_id = ZydisRegisterGetId(reg);
  934|     28|        result = is_64;
  935|     28|        if (result && reg_id >= 16)
  ------------------
  |  Branch (935:13): [True: 25, False: 3]
  |  Branch (935:23): [True: 16, False: 9]
  ------------------
  936|     16|        {
  937|     16|            switch (match->definition->encoding)
  938|     16|            {
  939|      6|            case ZYDIS_INSTRUCTION_ENCODING_LEGACY:
  ------------------
  |  Branch (939:13): [True: 6, False: 10]
  ------------------
  940|      6|                result &= (match->definition->rex2 != ZYDIS_REX2_TYPE_FORBIDDEN);
  941|      6|                break;
  942|     10|            case ZYDIS_INSTRUCTION_ENCODING_EVEX:
  ------------------
  |  Branch (942:13): [True: 10, False: 6]
  ------------------
  943|     10|                break;
  944|      0|            default:
  ------------------
  |  Branch (944:13): [True: 0, False: 16]
  ------------------
  945|      0|                result = ZYAN_FALSE;
  ------------------
  |  |  287|      0|#define ZYAN_FALSE 0u
  ------------------
  946|      0|                break;
  947|     16|            }
  948|     16|        }
  949|     28|        if (reg_class == ZYDIS_REGCLASS_GPR32)
  ------------------
  |  Branch (949:13): [True: 13, False: 15]
  ------------------
  950|     13|        {
  951|     13|            result |= reg_id < 8;
  952|     13|        }
  953|     28|        break;
  954|     28|    }
  955|     55|    default:
  ------------------
  |  Branch (955:5): [True: 55, False: 167]
  ------------------
  956|     55|        return ZYAN_FALSE;
  ------------------
  |  |  287|     55|#define ZYAN_FALSE 0u
  ------------------
  957|    222|    }
  958|       |
  959|     37|    return result && ZydisValidateRexType(match, reg, ZYAN_TRUE);
  ------------------
  |  |  288|     34|#define ZYAN_TRUE  1u
  ------------------
  |  Branch (959:12): [True: 34, False: 3]
  |  Branch (959:22): [True: 34, False: 0]
  ------------------
  960|    222|}
Encoder.c:ZydisGetMaxAddressSize:
  354|     86|{
  355|     86|    ZyanU8 addr_size = ZydisGetAszFromHint(request->address_size_hint);
  356|     86|    if (addr_size == 0)
  ------------------
  |  Branch (356:9): [True: 27, False: 59]
  ------------------
  357|     27|    {
  358|     27|        addr_size = ZydisGetMachineModeWidth(request->machine_mode);
  359|     27|    }
  360|     86|    return addr_size;
  361|     86|}
Encoder.c:ZydisGetUnsignedImmSize:
  482|     30|{
  483|     30|    if (imm <= ZYAN_UINT8_MAX)
  ------------------
  |  |  237|     30|#   define ZYAN_UINT8_MAX        UINT8_MAX
  ------------------
  |  Branch (483:9): [True: 2, False: 28]
  ------------------
  484|      2|    {
  485|      2|        return 8;
  486|      2|    }
  487|     28|    if (imm <= ZYAN_UINT16_MAX)
  ------------------
  |  |  238|     28|#   define ZYAN_UINT16_MAX       UINT16_MAX
  ------------------
  |  Branch (487:9): [True: 8, False: 20]
  ------------------
  488|      8|    {
  489|      8|        return 16;
  490|      8|    }
  491|     20|    if (imm <= ZYAN_UINT32_MAX)
  ------------------
  |  |  239|     20|#   define ZYAN_UINT32_MAX       UINT32_MAX
  ------------------
  |  Branch (491:9): [True: 18, False: 2]
  ------------------
  492|     18|    {
  493|     18|        return 32;
  494|     18|    }
  495|       |
  496|      2|    return 64;
  497|     20|}
Encoder.c:ZydisGetRm16:
  971|      6|{
  972|      6|    static const ZydisRegister modrm16_lookup[8][2] =
  973|      6|    {
  974|      6|        { ZYDIS_REGISTER_BX, ZYDIS_REGISTER_SI },
  975|      6|        { ZYDIS_REGISTER_BX, ZYDIS_REGISTER_DI },
  976|      6|        { ZYDIS_REGISTER_BP, ZYDIS_REGISTER_SI },
  977|      6|        { ZYDIS_REGISTER_BP, ZYDIS_REGISTER_DI },
  978|      6|        { ZYDIS_REGISTER_SI, ZYDIS_REGISTER_NONE },
  979|      6|        { ZYDIS_REGISTER_DI, ZYDIS_REGISTER_NONE },
  980|      6|        { ZYDIS_REGISTER_BP, ZYDIS_REGISTER_NONE },
  981|      6|        { ZYDIS_REGISTER_BX, ZYDIS_REGISTER_NONE },
  982|      6|    };
  983|     49|    for (ZyanI8 i = 0; i < (ZyanI8)ZYAN_ARRAY_LENGTH(modrm16_lookup); ++i)
  ------------------
  |  |  510|     49|#define ZYAN_ARRAY_LENGTH(a) (sizeof(a) / sizeof((a)[0]))
  ------------------
  |  Branch (983:24): [True: 44, False: 5]
  ------------------
  984|     44|    {
  985|     44|        if ((modrm16_lookup[i][0] == base) &&
  ------------------
  |  Branch (985:13): [True: 11, False: 33]
  ------------------
  986|     11|            (modrm16_lookup[i][1] == index))
  ------------------
  |  Branch (986:13): [True: 1, False: 10]
  ------------------
  987|      1|        {
  988|      1|            return i;
  989|      1|        }
  990|     44|    }
  991|       |
  992|      5|    return -1;
  993|      6|}
Encoder.c:ZydisGetEffectiveImmSize:
  557|    152|{
  558|    152|    const ZydisOperandDetails *details = ZydisGetOperandDetails(def_op);
  559|    152|    ZyanU8 eisz = 0;
  560|    152|    ZyanU8 min_size = ZydisIsImmSigned((ZydisOperandEncoding)details->encoding)
  ------------------
  |  Branch (560:23): [True: 143, False: 9]
  ------------------
  561|    152|        ? ZydisGetSignedImmSize(imm)
  562|    152|        : ZydisGetUnsignedImmSize((ZyanU64)imm);
  563|       |
  564|    152|    switch (details->encoding)
  565|    152|    {
  566|      5|    case ZYDIS_OPERAND_ENCODING_UIMM8:
  ------------------
  |  Branch (566:5): [True: 5, False: 147]
  ------------------
  567|     21|    case ZYDIS_OPERAND_ENCODING_SIMM8:
  ------------------
  |  Branch (567:5): [True: 16, False: 136]
  ------------------
  568|     21|        eisz = 8;
  569|     21|        break;
  570|      0|    case ZYDIS_OPERAND_ENCODING_IS4:
  ------------------
  |  Branch (570:5): [True: 0, False: 152]
  ------------------
  571|      0|        ZYAN_ASSERT(def_op->element_type == ZYDIS_IELEMENT_TYPE_UINT8);
  ------------------
  |  |  381|      0|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (571:9): [True: 0, False: 0]
  |  Branch (571:9): [True: 0, False: 0]
  ------------------
  572|      0|        eisz = ((ZyanU64)imm <= 15) ? 8 : 0;
  ------------------
  |  Branch (572:16): [True: 0, False: 0]
  ------------------
  573|      0|        break;
  574|      0|    case ZYDIS_OPERAND_ENCODING_UIMM16:
  ------------------
  |  Branch (574:5): [True: 0, False: 152]
  ------------------
  575|      0|    case ZYDIS_OPERAND_ENCODING_SIMM16:
  ------------------
  |  Branch (575:5): [True: 0, False: 152]
  ------------------
  576|      0|        eisz = 16;
  577|      0|        break;
  578|      4|    case ZYDIS_OPERAND_ENCODING_UIMM32:
  ------------------
  |  Branch (578:5): [True: 4, False: 148]
  ------------------
  579|      4|    case ZYDIS_OPERAND_ENCODING_SIMM32:
  ------------------
  |  Branch (579:5): [True: 0, False: 152]
  ------------------
  580|      4|        eisz = 32;
  581|      4|        break;
  582|      0|    case ZYDIS_OPERAND_ENCODING_UIMM64:
  ------------------
  |  Branch (582:5): [True: 0, False: 152]
  ------------------
  583|      0|    case ZYDIS_OPERAND_ENCODING_SIMM64:
  ------------------
  |  Branch (583:5): [True: 0, False: 152]
  ------------------
  584|      0|        eisz = 64;
  585|      0|        break;
  586|      0|    case ZYDIS_OPERAND_ENCODING_UIMM16_32_64:
  ------------------
  |  Branch (586:5): [True: 0, False: 152]
  ------------------
  587|     47|    case ZYDIS_OPERAND_ENCODING_SIMM16_32_64:
  ------------------
  |  Branch (587:5): [True: 47, False: 105]
  ------------------
  588|     47|    {
  589|     47|        static const ZyanU16 simm16_32_64_sizes[3] = { 16, 32, 64 };
  590|     47|        return ZydisGetScaledImmSize(match, simm16_32_64_sizes, min_size);
  591|      0|    }
  592|      0|    case ZYDIS_OPERAND_ENCODING_UIMM32_32_64:
  ------------------
  |  Branch (592:5): [True: 0, False: 152]
  ------------------
  593|      0|    case ZYDIS_OPERAND_ENCODING_SIMM32_32_64:
  ------------------
  |  Branch (593:5): [True: 0, False: 152]
  ------------------
  594|      0|    {
  595|      0|        static const ZyanU16 simm32_32_64_sizes[3] = { 32, 32, 64 };
  596|      0|        return ZydisGetScaledImmSize(match, simm32_32_64_sizes, min_size);
  597|      0|    }
  598|      0|    case ZYDIS_OPERAND_ENCODING_UIMM16_32_32:
  ------------------
  |  Branch (598:5): [True: 0, False: 152]
  ------------------
  599|     18|    case ZYDIS_OPERAND_ENCODING_SIMM16_32_32:
  ------------------
  |  Branch (599:5): [True: 18, False: 134]
  ------------------
  600|     18|    {
  601|     18|        static const ZyanU16 simm16_32_32_sizes[3] = { 16, 32, 32 };
  602|     18|        return ZydisGetScaledImmSize(match, simm16_32_32_sizes, min_size);
  603|      0|    }
  604|     14|    case ZYDIS_OPERAND_ENCODING_DISP16_32_64:
  ------------------
  |  Branch (604:5): [True: 14, False: 138]
  ------------------
  605|     14|    {
  606|     14|        ZYAN_ASSERT(match->easz == 0);
  ------------------
  |  |  381|     14|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (606:9): [True: 0, False: 14]
  |  Branch (606:9): [True: 14, False: 0]
  ------------------
  607|     14|        const ZyanU8 addr_size = ZydisGetMaxAddressSize(match->request);
  608|     14|        const ZyanU64 uimm = imm & (~(0xFFFFFFFFFFFFFFFFULL << (addr_size - 1) << 1));
  609|     14|        if (min_size < addr_size && ZydisGetUnsignedImmSize(uimm) > min_size)
  ------------------
  |  Branch (609:13): [True: 9, False: 5]
  |  Branch (609:37): [True: 3, False: 6]
  ------------------
  610|      3|        {
  611|      3|            min_size = addr_size;
  612|      3|        }
  613|     14|        if (match->request->machine_mode == ZYDIS_MACHINE_MODE_LONG_64)
  ------------------
  |  Branch (613:13): [True: 14, False: 0]
  ------------------
  614|     14|        {
  615|     14|            if (min_size < 32)
  ------------------
  |  Branch (615:17): [True: 0, False: 14]
  ------------------
  616|      0|            {
  617|      0|                min_size = 32;
  618|      0|            }
  619|     14|            match->easz = eisz = min_size;
  620|     14|        }
  621|      0|        else
  622|      0|        {
  623|      0|            if (min_size < 16)
  ------------------
  |  Branch (623:17): [True: 0, False: 0]
  ------------------
  624|      0|            {
  625|      0|                min_size = 16;
  626|      0|            }
  627|      0|            if (min_size == 16 || min_size == 32)
  ------------------
  |  Branch (627:17): [True: 0, False: 0]
  |  Branch (627:35): [True: 0, False: 0]
  ------------------
  628|      0|            {
  629|      0|                match->easz = eisz = min_size;
  630|      0|            }
  631|      0|        }
  632|     14|        break;
  633|     14|    }
  634|     14|    case ZYDIS_OPERAND_ENCODING_JIMM8:
  ------------------
  |  Branch (634:5): [True: 14, False: 138]
  ------------------
  635|     14|    case ZYDIS_OPERAND_ENCODING_JIMM16:
  ------------------
  |  Branch (635:5): [True: 0, False: 152]
  ------------------
  636|     23|    case ZYDIS_OPERAND_ENCODING_JIMM32:
  ------------------
  |  Branch (636:5): [True: 9, False: 143]
  ------------------
  637|     23|    case ZYDIS_OPERAND_ENCODING_JIMM64:
  ------------------
  |  Branch (637:5): [True: 0, False: 152]
  ------------------
  638|     23|    {
  639|     23|        ZyanU8 jimm_index = details->encoding - ZYDIS_OPERAND_ENCODING_JIMM8;
  640|     23|        if ((match->request->branch_width != ZYDIS_BRANCH_WIDTH_NONE) &&
  ------------------
  |  Branch (640:13): [True: 17, False: 6]
  ------------------
  641|     17|            (match->request->branch_width != (ZydisBranchWidth)(ZYDIS_BRANCH_WIDTH_8 + jimm_index)))
  ------------------
  |  Branch (641:13): [True: 4, False: 13]
  ------------------
  642|      4|        {
  643|      4|            return 0;
  644|      4|        }
  645|     19|        eisz = 8 << jimm_index;
  646|     19|        break;
  647|     23|    }
  648|     25|    case ZYDIS_OPERAND_ENCODING_JIMM16_32_32:
  ------------------
  |  Branch (648:5): [True: 25, False: 127]
  ------------------
  649|     25|        switch (match->request->branch_width)
  650|     25|        {
  651|      5|        case ZYDIS_BRANCH_WIDTH_NONE:
  ------------------
  |  Branch (651:9): [True: 5, False: 20]
  ------------------
  652|      5|        {
  653|      5|            static const ZyanU16 jimm16_32_32_sizes[3] = { 16, 32, 32 };
  654|      5|            return ZydisGetScaledImmSize(match, jimm16_32_32_sizes, min_size);
  655|      0|        }
  656|      0|        case ZYDIS_BRANCH_WIDTH_16:
  ------------------
  |  Branch (656:9): [True: 0, False: 25]
  ------------------
  657|      0|            eisz = 16;
  658|      0|            break;
  659|     20|        case ZYDIS_BRANCH_WIDTH_32:
  ------------------
  |  Branch (659:9): [True: 20, False: 5]
  ------------------
  660|     20|            eisz = 32;
  661|     20|            break;
  662|      0|        case ZYDIS_BRANCH_WIDTH_8:
  ------------------
  |  Branch (662:9): [True: 0, False: 25]
  ------------------
  663|      0|        case ZYDIS_BRANCH_WIDTH_64:
  ------------------
  |  Branch (663:9): [True: 0, False: 25]
  ------------------
  664|      0|            return 0;
  665|      0|        default:
  ------------------
  |  Branch (665:9): [True: 0, False: 25]
  ------------------
  666|      0|            ZYAN_UNREACHABLE;
  ------------------
  |  |  431|      0|#   define ZYAN_UNREACHABLE { assert(0); abort(); }
  ------------------
  |  Branch (666:13): [Folded, False: 0]
  |  Branch (666:13): [Folded, False: 0]
  ------------------
  667|     25|        }
  668|     20|        break;
  669|     20|    default:
  ------------------
  |  Branch (669:5): [True: 0, False: 152]
  ------------------
  670|      0|        ZYAN_UNREACHABLE;
  ------------------
  |  |  431|      0|#   define ZYAN_UNREACHABLE { assert(0); abort(); }
  ------------------
  |  Branch (670:9): [Folded, False: 0]
  |  Branch (670:9): [Folded, False: 0]
  ------------------
  671|    152|    }
  672|       |
  673|     78|    return eisz >= min_size ? eisz : 0;
  ------------------
  |  Branch (673:12): [True: 56, False: 22]
  ------------------
  674|    152|}
Encoder.c:ZydisIsImmSigned:
  507|    152|{
  508|    152|    switch (encoding)
  509|    152|    {
  510|     16|    case ZYDIS_OPERAND_ENCODING_SIMM8:
  ------------------
  |  Branch (510:5): [True: 16, False: 136]
  ------------------
  511|     16|    case ZYDIS_OPERAND_ENCODING_SIMM16:
  ------------------
  |  Branch (511:5): [True: 0, False: 152]
  ------------------
  512|     16|    case ZYDIS_OPERAND_ENCODING_SIMM32:
  ------------------
  |  Branch (512:5): [True: 0, False: 152]
  ------------------
  513|     16|    case ZYDIS_OPERAND_ENCODING_SIMM64:
  ------------------
  |  Branch (513:5): [True: 0, False: 152]
  ------------------
  514|     63|    case ZYDIS_OPERAND_ENCODING_SIMM16_32_64:
  ------------------
  |  Branch (514:5): [True: 47, False: 105]
  ------------------
  515|     63|    case ZYDIS_OPERAND_ENCODING_SIMM32_32_64:
  ------------------
  |  Branch (515:5): [True: 0, False: 152]
  ------------------
  516|     81|    case ZYDIS_OPERAND_ENCODING_SIMM16_32_32:
  ------------------
  |  Branch (516:5): [True: 18, False: 134]
  ------------------
  517|     95|    case ZYDIS_OPERAND_ENCODING_JIMM8:
  ------------------
  |  Branch (517:5): [True: 14, False: 138]
  ------------------
  518|     95|    case ZYDIS_OPERAND_ENCODING_JIMM16:
  ------------------
  |  Branch (518:5): [True: 0, False: 152]
  ------------------
  519|    104|    case ZYDIS_OPERAND_ENCODING_JIMM32:
  ------------------
  |  Branch (519:5): [True: 9, False: 143]
  ------------------
  520|    104|    case ZYDIS_OPERAND_ENCODING_JIMM64:
  ------------------
  |  Branch (520:5): [True: 0, False: 152]
  ------------------
  521|    104|    case ZYDIS_OPERAND_ENCODING_JIMM16_32_64:
  ------------------
  |  Branch (521:5): [True: 0, False: 152]
  ------------------
  522|    104|    case ZYDIS_OPERAND_ENCODING_JIMM32_32_64:
  ------------------
  |  Branch (522:5): [True: 0, False: 152]
  ------------------
  523|    129|    case ZYDIS_OPERAND_ENCODING_JIMM16_32_32:
  ------------------
  |  Branch (523:5): [True: 25, False: 127]
  ------------------
  524|    129|    case ZYDIS_OPERAND_ENCODING_DISP8:
  ------------------
  |  Branch (524:5): [True: 0, False: 152]
  ------------------
  525|    129|    case ZYDIS_OPERAND_ENCODING_DISP16:
  ------------------
  |  Branch (525:5): [True: 0, False: 152]
  ------------------
  526|    129|    case ZYDIS_OPERAND_ENCODING_DISP32:
  ------------------
  |  Branch (526:5): [True: 0, False: 152]
  ------------------
  527|    129|    case ZYDIS_OPERAND_ENCODING_DISP64:
  ------------------
  |  Branch (527:5): [True: 0, False: 152]
  ------------------
  528|    143|    case ZYDIS_OPERAND_ENCODING_DISP16_32_64:
  ------------------
  |  Branch (528:5): [True: 14, False: 138]
  ------------------
  529|    143|    case ZYDIS_OPERAND_ENCODING_DISP32_32_64:
  ------------------
  |  Branch (529:5): [True: 0, False: 152]
  ------------------
  530|    143|    case ZYDIS_OPERAND_ENCODING_DISP16_32_32:
  ------------------
  |  Branch (530:5): [True: 0, False: 152]
  ------------------
  531|    143|        return ZYAN_TRUE;
  ------------------
  |  |  288|    143|#define ZYAN_TRUE  1u
  ------------------
  532|      5|    case ZYDIS_OPERAND_ENCODING_UIMM8:
  ------------------
  |  Branch (532:5): [True: 5, False: 147]
  ------------------
  533|      5|    case ZYDIS_OPERAND_ENCODING_UIMM16:
  ------------------
  |  Branch (533:5): [True: 0, False: 152]
  ------------------
  534|      9|    case ZYDIS_OPERAND_ENCODING_UIMM32:
  ------------------
  |  Branch (534:5): [True: 4, False: 148]
  ------------------
  535|      9|    case ZYDIS_OPERAND_ENCODING_UIMM64:
  ------------------
  |  Branch (535:5): [True: 0, False: 152]
  ------------------
  536|      9|    case ZYDIS_OPERAND_ENCODING_UIMM16_32_64:
  ------------------
  |  Branch (536:5): [True: 0, False: 152]
  ------------------
  537|      9|    case ZYDIS_OPERAND_ENCODING_UIMM32_32_64:
  ------------------
  |  Branch (537:5): [True: 0, False: 152]
  ------------------
  538|      9|    case ZYDIS_OPERAND_ENCODING_UIMM16_32_32:
  ------------------
  |  Branch (538:5): [True: 0, False: 152]
  ------------------
  539|      9|    case ZYDIS_OPERAND_ENCODING_IS4:
  ------------------
  |  Branch (539:5): [True: 0, False: 152]
  ------------------
  540|      9|        return ZYAN_FALSE;
  ------------------
  |  |  287|      9|#define ZYAN_FALSE 0u
  ------------------
  541|      0|    default:
  ------------------
  |  Branch (541:5): [True: 0, False: 152]
  ------------------
  542|      0|        ZYAN_UNREACHABLE;
  ------------------
  |  |  431|      0|#   define ZYAN_UNREACHABLE { assert(0); abort(); }
  ------------------
  |  Branch (542:9): [Folded, False: 0]
  |  Branch (542:9): [Folded, False: 0]
  ------------------
  543|    152|    }
  544|    152|}
Encoder.c:ZydisGetScaledImmSize:
  437|     70|{
  438|     70|    if (match->eosz == 0)
  ------------------
  |  Branch (438:9): [True: 5, False: 65]
  ------------------
  439|      5|    {
  440|      5|        match->eosz = ZydisGetOperandSizeFromElementSize(match, size_table, min_imm_size,
  441|      5|            ZYAN_FALSE);
  ------------------
  |  |  287|      5|#define ZYAN_FALSE 0u
  ------------------
  442|      5|        return match->eosz != 0 ? (ZyanU8)size_table[match->eosz >> 5] : 0;
  ------------------
  |  Branch (442:16): [True: 5, False: 0]
  ------------------
  443|      5|    }
  444|       |
  445|     65|    const ZyanU8 index = match->eosz >> 5;
  446|     65|    return size_table[index] >= min_imm_size ? (ZyanU8)size_table[index] : 0;
  ------------------
  |  Branch (446:12): [True: 60, False: 5]
  ------------------
  447|     70|}
Encoder.c:ZydisIsPointerOperandCompatible:
 2235|     10|{
 2236|     10|    ZYAN_ASSERT(match->eosz == 0);
  ------------------
  |  |  381|     10|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (2236:5): [True: 0, False: 10]
  |  Branch (2236:5): [True: 10, False: 0]
  ------------------
 2237|     10|    ZYAN_ASSERT(match->request->machine_mode != ZYDIS_MACHINE_MODE_LONG_64);
  ------------------
  |  |  381|     10|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (2237:5): [True: 0, False: 10]
  |  Branch (2237:5): [True: 10, False: 0]
  ------------------
 2238|     10|    ZYAN_ASSERT((match->request->branch_type == ZYDIS_BRANCH_TYPE_NONE) ||
  ------------------
  |  |  381|     10|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (2238:5): [True: 10, False: 0]
  |  Branch (2238:5): [True: 0, False: 0]
  |  Branch (2238:5): [True: 6, False: 4]
  |  Branch (2238:5): [True: 4, False: 0]
  ------------------
 2239|     10|                (match->request->branch_type == ZYDIS_BRANCH_TYPE_FAR));
 2240|     10|    const ZyanU8 min_disp_size = ZydisGetUnsignedImmSize(user_op->ptr.offset);
 2241|     10|    const ZyanU8 desired_disp_size = (match->request->branch_width == ZYDIS_BRANCH_WIDTH_NONE)
  ------------------
  |  Branch (2241:38): [True: 1, False: 9]
  ------------------
 2242|     10|        ? ZydisGetMachineModeWidth(match->request->machine_mode)
 2243|     10|        : (4 << match->request->branch_width);
 2244|     10|    if (min_disp_size > desired_disp_size)
  ------------------
  |  Branch (2244:9): [True: 2, False: 8]
  ------------------
 2245|      2|    {
 2246|      2|        return ZYAN_FALSE;
  ------------------
  |  |  287|      2|#define ZYAN_FALSE 0u
  ------------------
 2247|      2|    }
 2248|      8|    match->eosz = match->disp_size = desired_disp_size;
 2249|      8|    match->imm_size = 16;
 2250|      8|    return ZYAN_TRUE;
  ------------------
  |  |  288|      8|#define ZYAN_TRUE  1u
  ------------------
 2251|     10|}
Encoder.c:ZydisIsImmediateOperandCompabile:
 2264|    139|{
 2265|    139|    switch (def_op->type)
 2266|    139|    {
 2267|      1|    case ZYDIS_SEMANTIC_OPTYPE_IMPLICIT_IMM1:
  ------------------
  |  Branch (2267:5): [True: 1, False: 138]
  ------------------
 2268|      1|        if (user_op->imm.u != 1)
  ------------------
  |  Branch (2268:13): [True: 1, False: 0]
  ------------------
 2269|      1|        {
 2270|      1|            return ZYAN_FALSE;
  ------------------
  |  |  287|      1|#define ZYAN_FALSE 0u
  ------------------
 2271|      1|        }
 2272|      0|        break;
 2273|     90|    case ZYDIS_SEMANTIC_OPTYPE_IMM:
  ------------------
  |  Branch (2273:5): [True: 90, False: 49]
  ------------------
 2274|    138|    case ZYDIS_SEMANTIC_OPTYPE_REL:
  ------------------
  |  Branch (2274:5): [True: 48, False: 91]
  ------------------
 2275|    138|    {
 2276|    138|        const ZyanU8 imm_size = ZydisGetEffectiveImmSize(match, user_op->imm.s, def_op);
 2277|    138|        const ZydisOperandDetails *details = ZydisGetOperandDetails(def_op);
 2278|    138|        if (details->encoding != ZYDIS_OPERAND_ENCODING_IS4)
  ------------------
  |  Branch (2278:13): [True: 138, False: 0]
  ------------------
 2279|    138|        {
 2280|    138|            if (imm_size == 0)
  ------------------
  |  Branch (2280:17): [True: 31, False: 107]
  ------------------
 2281|     31|            {
 2282|     31|                return ZYAN_FALSE;
  ------------------
  |  |  287|     31|#define ZYAN_FALSE 0u
  ------------------
 2283|     31|            }
 2284|    107|            if (match->imm_size)
  ------------------
  |  Branch (2284:17): [True: 0, False: 107]
  ------------------
 2285|      0|            {
 2286|      0|                ZYAN_ASSERT(match->disp_size == 0);
  ------------------
  |  |  381|      0|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (2286:17): [True: 0, False: 0]
  |  Branch (2286:17): [True: 0, False: 0]
  ------------------
 2287|      0|                match->disp_size = match->imm_size;
 2288|      0|            }
 2289|    107|        }
 2290|      0|        else
 2291|      0|        {
 2292|      0|            ZYAN_ASSERT(match->imm_size == 0);
  ------------------
  |  |  381|      0|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (2292:13): [True: 0, False: 0]
  |  Branch (2292:13): [True: 0, False: 0]
  ------------------
 2293|      0|            if (imm_size != 8)
  ------------------
  |  Branch (2293:17): [True: 0, False: 0]
  ------------------
 2294|      0|            {
 2295|      0|                return ZYAN_FALSE;
  ------------------
  |  |  287|      0|#define ZYAN_FALSE 0u
  ------------------
 2296|      0|            }
 2297|      0|        }
 2298|    107|        match->imm_size = imm_size;
 2299|    107|        match->has_rel_operand = (def_op->type == ZYDIS_SEMANTIC_OPTYPE_REL);
 2300|    107|        break;
 2301|    138|    }
 2302|      0|    case ZYDIS_SEMANTIC_OPTYPE_ABS:
  ------------------
  |  Branch (2302:5): [True: 0, False: 139]
  ------------------
 2303|      0|        match->imm_size = 64;
 2304|      0|        break;
 2305|      0|    default:
  ------------------
  |  Branch (2305:5): [True: 0, False: 139]
  ------------------
 2306|      0|        ZYAN_UNREACHABLE;
  ------------------
  |  |  431|      0|#   define ZYAN_UNREACHABLE { assert(0); abort(); }
  ------------------
  |  Branch (2306:9): [Folded, False: 0]
  |  Branch (2306:9): [Folded, False: 0]
  ------------------
 2307|    139|    }
 2308|       |
 2309|    107|    return ZYAN_TRUE;
  ------------------
  |  |  288|    107|#define ZYAN_TRUE  1u
  ------------------
 2310|    139|}
Encoder.c:ZydisCheckConstraints:
 2711|    212|{
 2712|    212|    const ZydisEncoderOperand *operands = match->request->operands;
 2713|    212|    ZyanBool is_gather = ZYAN_FALSE;
  ------------------
  |  |  287|    212|#define ZYAN_FALSE 0u
  ------------------
 2714|    212|    switch (match->definition->encoding)
 2715|    212|    {
 2716|      0|    case ZYDIS_INSTRUCTION_ENCODING_VEX:
  ------------------
  |  Branch (2716:5): [True: 0, False: 212]
  ------------------
 2717|      0|    {
 2718|      0|        const ZydisInstructionDefinitionVEX *vex_def =
 2719|      0|            (const ZydisInstructionDefinitionVEX *)match->base_definition;
 2720|      0|        if (vex_def->is_gather)
  ------------------
  |  Branch (2720:13): [True: 0, False: 0]
  ------------------
 2721|      0|        {
 2722|      0|            ZYAN_ASSERT(match->request->operand_count == 3);
  ------------------
  |  |  381|      0|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (2722:13): [True: 0, False: 0]
  |  Branch (2722:13): [True: 0, False: 0]
  ------------------
 2723|      0|            ZYAN_ASSERT(operands[0].type == ZYDIS_OPERAND_TYPE_REGISTER);
  ------------------
  |  |  381|      0|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (2723:13): [True: 0, False: 0]
  |  Branch (2723:13): [True: 0, False: 0]
  ------------------
 2724|      0|            ZYAN_ASSERT(operands[1].type == ZYDIS_OPERAND_TYPE_MEMORY);
  ------------------
  |  |  381|      0|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (2724:13): [True: 0, False: 0]
  |  Branch (2724:13): [True: 0, False: 0]
  ------------------
 2725|      0|            ZYAN_ASSERT(operands[2].type == ZYDIS_OPERAND_TYPE_REGISTER);
  ------------------
  |  |  381|      0|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (2725:13): [True: 0, False: 0]
  |  Branch (2725:13): [True: 0, False: 0]
  ------------------
 2726|      0|            const ZyanI8 dest = ZydisRegisterGetId(operands[0].reg.value);
 2727|      0|            const ZyanI8 index = ZydisRegisterGetId(operands[1].mem.index);
 2728|      0|            const ZyanI8 mask = ZydisRegisterGetId(operands[2].reg.value);
 2729|       |            // If any pair of the index, mask, or destination registers are the same, the
 2730|       |            // instruction results a UD fault.
 2731|      0|            if ((dest == index) || (dest == mask) || (index == mask))
  ------------------
  |  Branch (2731:17): [True: 0, False: 0]
  |  Branch (2731:36): [True: 0, False: 0]
  |  Branch (2731:54): [True: 0, False: 0]
  ------------------
 2732|      0|            {
 2733|      0|                return ZYAN_FALSE;
  ------------------
  |  |  287|      0|#define ZYAN_FALSE 0u
  ------------------
 2734|      0|            }
 2735|      0|        }
 2736|       |
 2737|      0|        if (vex_def->no_source_source_match)
  ------------------
  |  Branch (2737:13): [True: 0, False: 0]
  ------------------
 2738|      0|        {
 2739|      0|            ZYAN_ASSERT(match->request->operand_count == 3);
  ------------------
  |  |  381|      0|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (2739:13): [True: 0, False: 0]
  |  Branch (2739:13): [True: 0, False: 0]
  ------------------
 2740|      0|            ZYAN_ASSERT(operands[0].type == ZYDIS_OPERAND_TYPE_REGISTER);
  ------------------
  |  |  381|      0|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (2740:13): [True: 0, False: 0]
  |  Branch (2740:13): [True: 0, False: 0]
  ------------------
 2741|      0|            ZYAN_ASSERT(operands[1].type == ZYDIS_OPERAND_TYPE_REGISTER);
  ------------------
  |  |  381|      0|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (2741:13): [True: 0, False: 0]
  |  Branch (2741:13): [True: 0, False: 0]
  ------------------
 2742|      0|            ZYAN_ASSERT(operands[2].type == ZYDIS_OPERAND_TYPE_REGISTER);
  ------------------
  |  |  381|      0|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (2742:13): [True: 0, False: 0]
  |  Branch (2742:13): [True: 0, False: 0]
  ------------------
 2743|      0|            const ZydisRegister dest = operands[0].reg.value;
 2744|      0|            const ZydisRegister source1 = operands[1].reg.value;
 2745|      0|            const ZydisRegister source2 = operands[2].reg.value;
 2746|       |            // AMX-E4: #UD if srcdest == src1 OR src1 == src2 OR srcdest == src2.
 2747|      0|            if ((dest == source1) || (source1 == source2) || (dest == source2))
  ------------------
  |  Branch (2747:17): [True: 0, False: 0]
  |  Branch (2747:38): [True: 0, False: 0]
  |  Branch (2747:62): [True: 0, False: 0]
  ------------------
 2748|      0|            {
 2749|      0|                return ZYAN_FALSE;
  ------------------
  |  |  287|      0|#define ZYAN_FALSE 0u
  ------------------
 2750|      0|            }
 2751|      0|        }
 2752|       |
 2753|      0|        return ZYAN_TRUE;
  ------------------
  |  |  288|      0|#define ZYAN_TRUE  1u
  ------------------
 2754|      0|    }
 2755|     38|    case ZYDIS_INSTRUCTION_ENCODING_EVEX:
  ------------------
  |  Branch (2755:5): [True: 38, False: 174]
  ------------------
 2756|     38|    {
 2757|     38|        const ZydisInstructionDefinitionEVEX *evex_def =
 2758|     38|            (const ZydisInstructionDefinitionEVEX *)match->base_definition;
 2759|     38|        is_gather = evex_def->is_gather;
 2760|     38|        if (evex_def->no_source_dest_match)
  ------------------
  |  Branch (2760:13): [True: 0, False: 38]
  ------------------
 2761|      0|        {
 2762|      0|            ZYAN_ASSERT(operands[0].type == ZYDIS_OPERAND_TYPE_REGISTER);
  ------------------
  |  |  381|      0|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (2762:13): [True: 0, False: 0]
  |  Branch (2762:13): [True: 0, False: 0]
  ------------------
 2763|      0|            ZYAN_ASSERT(operands[2].type == ZYDIS_OPERAND_TYPE_REGISTER);
  ------------------
  |  |  381|      0|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (2763:13): [True: 0, False: 0]
  |  Branch (2763:13): [True: 0, False: 0]
  ------------------
 2764|      0|            ZYAN_ASSERT((operands[3].type == ZYDIS_OPERAND_TYPE_REGISTER) ||
  ------------------
  |  |  381|      0|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (2764:13): [True: 0, False: 0]
  |  Branch (2764:13): [True: 0, False: 0]
  |  Branch (2764:13): [True: 0, False: 0]
  |  Branch (2764:13): [True: 0, False: 0]
  ------------------
 2765|      0|                        (operands[3].type == ZYDIS_OPERAND_TYPE_MEMORY));
 2766|      0|            const ZydisRegister dest = operands[0].reg.value;
 2767|      0|            const ZydisRegister source1 = operands[2].reg.value;
 2768|      0|            const ZydisRegister source2 = (operands[3].type == ZYDIS_OPERAND_TYPE_REGISTER)
  ------------------
  |  Branch (2768:43): [True: 0, False: 0]
  ------------------
 2769|      0|                ? operands[3].reg.value
 2770|      0|                : ZYDIS_REGISTER_NONE;
 2771|       |
 2772|      0|            if ((dest == source1) || (dest == source2))
  ------------------
  |  Branch (2772:17): [True: 0, False: 0]
  |  Branch (2772:38): [True: 0, False: 0]
  ------------------
 2773|      0|            {
 2774|      0|                return ZYAN_FALSE;
  ------------------
  |  |  287|      0|#define ZYAN_FALSE 0u
  ------------------
 2775|      0|            }
 2776|      0|        }
 2777|     38|        break;
 2778|     38|    }
 2779|     38|    case ZYDIS_INSTRUCTION_ENCODING_MVEX:
  ------------------
  |  Branch (2779:5): [True: 0, False: 212]
  ------------------
 2780|      0|    {
 2781|      0|        const ZydisInstructionDefinitionMVEX *mvex_def =
 2782|      0|            (const ZydisInstructionDefinitionMVEX *)match->base_definition;
 2783|      0|        is_gather = mvex_def->is_gather;
 2784|      0|        break;
 2785|     38|    }
 2786|    174|    default:
  ------------------
  |  Branch (2786:5): [True: 174, False: 38]
  ------------------
 2787|    174|        return ZYAN_TRUE;
  ------------------
  |  |  288|    174|#define ZYAN_TRUE  1u
  ------------------
 2788|    212|    }
 2789|       |
 2790|     38|    if ((is_gather) && (operands[0].type == ZYDIS_OPERAND_TYPE_REGISTER))
  ------------------
  |  Branch (2790:9): [True: 0, False: 38]
  |  Branch (2790:24): [True: 0, False: 0]
  ------------------
 2791|      0|    {
 2792|      0|        ZYAN_ASSERT(match->request->operand_count == 3);
  ------------------
  |  |  381|      0|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (2792:9): [True: 0, False: 0]
  |  Branch (2792:9): [True: 0, False: 0]
  ------------------
 2793|      0|        ZYAN_ASSERT(operands[0].type == ZYDIS_OPERAND_TYPE_REGISTER);
  ------------------
  |  |  381|      0|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (2793:9): [True: 0, False: 0]
  |  Branch (2793:9): [True: 0, False: 0]
  ------------------
 2794|      0|        ZYAN_ASSERT(operands[2].type == ZYDIS_OPERAND_TYPE_MEMORY);
  ------------------
  |  |  381|      0|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (2794:9): [True: 0, False: 0]
  |  Branch (2794:9): [True: 0, False: 0]
  ------------------
 2795|      0|        const ZyanI8 dest = ZydisRegisterGetId(operands[0].reg.value);
 2796|      0|        const ZyanI8 index = ZydisRegisterGetId(operands[2].mem.index);
 2797|       |        // EVEX: The instruction will #UD fault if the destination vector zmm1 is the same as
 2798|       |        // index vector VINDEX.
 2799|       |        // MVEX: The KNC GATHER instructions forbid using the same vector register for destination
 2800|       |        // and for the index. (https://github.com/intelxed/xed/issues/281#issuecomment-970074554)
 2801|      0|        if (dest == index)
  ------------------
  |  Branch (2801:13): [True: 0, False: 0]
  ------------------
 2802|      0|        {
 2803|      0|            return ZYAN_FALSE;
  ------------------
  |  |  287|      0|#define ZYAN_FALSE 0u
  ------------------
 2804|      0|        }
 2805|      0|    }
 2806|       |
 2807|     38|    return ZYAN_TRUE;
  ------------------
  |  |  288|     38|#define ZYAN_TRUE  1u
  ------------------
 2808|     38|}
Encoder.c:ZydisHandleSwappableDefinition:
 3037|    212|{
 3038|    212|    if (!match->definition->swappable)
  ------------------
  |  Branch (3038:9): [True: 166, False: 46]
  ------------------
 3039|    166|    {
 3040|    166|        return ZYAN_FALSE;
  ------------------
  |  |  287|    166|#define ZYAN_FALSE 0u
  ------------------
 3041|    166|    }
 3042|       |
 3043|       |    // Special case for ISA-wide unique conflict between two `mov` variants
 3044|       |    // mov gpr16_32_64(encoding=opcode), imm(encoding=simm16_32_64,scale_factor=osz)
 3045|       |    // mov gpr16_32_64(encoding=modrm_rm), imm(encoding=simm16_32_32,scale_factor=osz)
 3046|     46|    if (match->request->mnemonic == ZYDIS_MNEMONIC_MOV)
  ------------------
  |  Branch (3046:9): [True: 46, False: 0]
  ------------------
 3047|     46|    {
 3048|     46|        const ZyanU8 imm_size = ZydisGetSignedImmSize(match->request->operands[1].imm.s);
 3049|     46|        return (match->request->machine_mode == ZYDIS_MACHINE_MODE_LONG_64) &&
  ------------------
  |  Branch (3049:16): [True: 46, False: 0]
  ------------------
 3050|     46|               (match->eosz == 64) &&
  ------------------
  |  Branch (3050:16): [True: 42, False: 4]
  ------------------
 3051|     42|               (imm_size < 64);
  ------------------
  |  Branch (3051:16): [True: 8, False: 34]
  ------------------
 3052|     46|    }
 3053|       |
 3054|       |    // `xchg ax, ax`, `xchg eax, eax`, `xchg rax, rax` can be encoded as single-byte `nop` (opcode
 3055|       |    // 0x90, see `xchg` documentation in Intel SDM Vol. 2C). However in 64-bit mode operations
 3056|       |    // on 32-bit operands zero-extend results to full 64 bits (Intel SDM Vol. 1, 3.4.1), so
 3057|       |    // `xchg eax, eax` should not be aliased in this mode.
 3058|      0|    if (match->request->mnemonic == ZYDIS_MNEMONIC_XCHG)
  ------------------
  |  Branch (3058:9): [True: 0, False: 0]
  ------------------
 3059|      0|    {
 3060|      0|        ZYAN_ASSERT((match->request->operand_count == 2) &&
  ------------------
  |  |  381|      0|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (3060:9): [True: 0, False: 0]
  |  Branch (3060:9): [True: 0, False: 0]
  |  Branch (3060:9): [True: 0, False: 0]
  |  Branch (3060:9): [True: 0, False: 0]
  ------------------
 3061|      0|                    (match->request->operands[0].type == ZYDIS_OPERAND_TYPE_REGISTER));
 3062|      0|        switch (match->request->operands[0].reg.value)
 3063|      0|        {
 3064|      0|        case ZYDIS_REGISTER_AX:
  ------------------
  |  Branch (3064:9): [True: 0, False: 0]
  ------------------
 3065|      0|        case ZYDIS_REGISTER_RAX:
  ------------------
  |  Branch (3065:9): [True: 0, False: 0]
  ------------------
 3066|      0|            match->eosz = 0;
 3067|      0|            return ZYAN_FALSE;
  ------------------
  |  |  287|      0|#define ZYAN_FALSE 0u
  ------------------
 3068|      0|        case ZYDIS_REGISTER_EAX:
  ------------------
  |  Branch (3068:9): [True: 0, False: 0]
  ------------------
 3069|      0|            match->eosz = 0;
 3070|      0|            return ZydisGetMachineModeWidth(match->request->machine_mode) == 64;
 3071|      0|        default:
  ------------------
  |  Branch (3071:9): [True: 0, False: 0]
  ------------------
 3072|      0|            return ZYAN_FALSE;
  ------------------
  |  |  287|      0|#define ZYAN_FALSE 0u
  ------------------
 3073|      0|        }
 3074|      0|    }
 3075|       |
 3076|       |    // Check for possible `VEX` optimization
 3077|      0|    ZYAN_ASSERT((match->request->operand_count == 2) || (match->request->operand_count == 3));
  ------------------
  |  |  381|      0|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (3077:5): [True: 0, False: 0]
  |  Branch (3077:5): [True: 0, False: 0]
  |  Branch (3077:5): [True: 0, False: 0]
  |  Branch (3077:5): [True: 0, False: 0]
  ------------------
 3078|      0|    const ZyanU8 src_index = (match->request->operand_count == 3) ? 2 : 1;
  ------------------
  |  Branch (3078:30): [True: 0, False: 0]
  ------------------
 3079|      0|    const ZyanI8 dest_id = ZydisRegisterGetId(match->request->operands[0].reg.value);
 3080|      0|    const ZyanI8 src_id = ZydisRegisterGetId(match->request->operands[src_index].reg.value);
 3081|      0|    if ((dest_id <= 7) && (src_id > 7))
  ------------------
  |  Branch (3081:9): [True: 0, False: 0]
  |  Branch (3081:27): [True: 0, False: 0]
  ------------------
 3082|      0|    {
 3083|      0|        ++match->definition;
 3084|      0|        ZydisGetInstructionDefinition(match->definition->encoding,
 3085|      0|            match->definition->instruction_reference, &match->base_definition);
 3086|      0|        match->operands = ZydisGetOperandDefinitions(match->base_definition);
 3087|      0|        return ZYAN_TRUE;
  ------------------
  |  |  288|      0|#define ZYAN_TRUE  1u
  ------------------
 3088|      0|    }
 3089|       |
 3090|      0|    return ZYAN_FALSE;
  ------------------
  |  |  287|      0|#define ZYAN_FALSE 0u
  ------------------
 3091|      0|}
Encoder.c:ZydisBuildInstruction:
 4143|    203|{
 4144|    203|    ZYAN_MEMSET(instruction, 0, sizeof(ZydisEncoderInstruction));
  ------------------
  |  |  115|    203|#define ZYAN_MEMSET     memset
  ------------------
 4145|    203|    instruction->attributes = match->attributes;
 4146|    203|    instruction->encoding = match->definition->encoding;
 4147|    203|    instruction->opcode_map = match->definition->opcode_map;
 4148|    203|    instruction->opcode = match->definition->opcode;
 4149|    203|    instruction->rex_w = match->definition->rex_w;
 4150|    203|    instruction->mod = (match->definition->modrm >> 6) & 3;
 4151|    203|    instruction->reg = (match->definition->modrm >> 3) & 7;
 4152|    203|    instruction->rm = match->definition->modrm & 7;
 4153|    203|    if (match->definition->modrm)
  ------------------
  |  Branch (4153:9): [True: 61, False: 142]
  ------------------
 4154|     61|    {
 4155|     61|        instruction->attributes |= ZYDIS_ATTRIB_HAS_MODRM;
  ------------------
  |  |  536|     61|#define ZYDIS_ATTRIB_HAS_MODRM                  (1ULL <<  0)
  ------------------
 4156|     61|    }
 4157|    203|    if (match->definition->rex2 == ZYDIS_REX2_TYPE_MANDATORY)
  ------------------
  |  Branch (4157:9): [True: 0, False: 203]
  ------------------
 4158|      0|    {
 4159|      0|        instruction->attributes |= ZYDIS_ATTRIB_HAS_REX2;
  ------------------
  |  |  751|      0|#define ZYDIS_ATTRIB_HAS_REX2                   (1ULL << 46) // TODO: rebase
  ------------------
 4160|      0|    }
 4161|    203|    ZydisGetCcInfo(match->request->mnemonic, &instruction->scc);
 4162|    203|    if (instruction->scc != ZYDIS_SCC_NONE)
  ------------------
  |  Branch (4162:9): [True: 5, False: 198]
  ------------------
 4163|      5|    {
 4164|      5|        instruction->vvvv = match->request->evex.default_flags;
 4165|      5|    }
 4166|       |
 4167|    203|    switch (match->definition->vector_length)
 4168|    203|    {
 4169|    162|    case ZYDIS_VECTOR_LENGTH_INVALID:
  ------------------
  |  Branch (4169:5): [True: 162, False: 41]
  ------------------
 4170|    190|    case ZYDIS_VECTOR_LENGTH_128:
  ------------------
  |  Branch (4170:5): [True: 28, False: 175]
  ------------------
 4171|    190|        instruction->vector_length = 0;
 4172|    190|        break;
 4173|      3|    case ZYDIS_VECTOR_LENGTH_256:
  ------------------
  |  Branch (4173:5): [True: 3, False: 200]
  ------------------
 4174|      3|        instruction->vector_length = 1;
 4175|      3|        break;
 4176|     10|    case ZYDIS_VECTOR_LENGTH_512:
  ------------------
  |  Branch (4176:5): [True: 10, False: 193]
  ------------------
 4177|     10|        instruction->vector_length = 2;
 4178|     10|        break;
 4179|      0|    default:
  ------------------
  |  Branch (4179:5): [True: 0, False: 203]
  ------------------
 4180|      0|        ZYAN_UNREACHABLE;
  ------------------
  |  |  431|      0|#   define ZYAN_UNREACHABLE { assert(0); abort(); }
  ------------------
  |  Branch (4180:9): [Folded, False: 0]
  |  Branch (4180:9): [Folded, False: 0]
  ------------------
 4181|    203|    }
 4182|       |
 4183|    203|    if (match->definition->encoding == ZYDIS_INSTRUCTION_ENCODING_EVEX)
  ------------------
  |  Branch (4183:9): [True: 38, False: 165]
  ------------------
 4184|     38|    {
 4185|     38|        const ZydisInstructionDefinitionEVEX *evex_def =
 4186|     38|            (const ZydisInstructionDefinitionEVEX *)match->base_definition;
 4187|     38|        if (evex_def->mask_override != ZYDIS_MASK_OVERRIDE_ZEROING)
  ------------------
  |  Branch (4187:13): [True: 38, False: 0]
  ------------------
 4188|     38|        {
 4189|     38|            instruction->zeroing = match->request->evex.zeroing_mask;
 4190|     38|        }
 4191|     38|        if ((match->request->evex.sae) ||
  ------------------
  |  Branch (4191:13): [True: 4, False: 34]
  ------------------
 4192|     34|            (match->request->evex.broadcast != ZYDIS_BROADCAST_MODE_NONE))
  ------------------
  |  Branch (4192:13): [True: 0, False: 34]
  ------------------
 4193|      4|        {
 4194|      4|            instruction->attributes |= ZYDIS_ATTRIB_HAS_EVEX_B;
  ------------------
  |  |  747|      4|#define ZYDIS_ATTRIB_HAS_EVEX_B                 (1ULL << 45) // TODO: rename
  ------------------
 4195|      4|        }
 4196|     38|        if (match->request->evex.rounding != ZYDIS_ROUNDING_MODE_NONE)
  ------------------
  |  Branch (4196:13): [True: 4, False: 34]
  ------------------
 4197|      4|        {
 4198|      4|            instruction->attributes |= ZYDIS_ATTRIB_HAS_EVEX_B;
  ------------------
  |  |  747|      4|#define ZYDIS_ATTRIB_HAS_EVEX_B                 (1ULL << 45) // TODO: rename
  ------------------
 4199|      4|            switch (match->request->evex.rounding)
 4200|      4|            {
 4201|      0|            case ZYDIS_ROUNDING_MODE_RN:
  ------------------
  |  Branch (4201:13): [True: 0, False: 4]
  ------------------
 4202|      0|                instruction->vector_length = 0;
 4203|      0|                break;
 4204|      2|            case ZYDIS_ROUNDING_MODE_RD:
  ------------------
  |  Branch (4204:13): [True: 2, False: 2]
  ------------------
 4205|      2|                instruction->vector_length = 1;
 4206|      2|                break;
 4207|      2|            case ZYDIS_ROUNDING_MODE_RU:
  ------------------
  |  Branch (4207:13): [True: 2, False: 2]
  ------------------
 4208|      2|                instruction->vector_length = 2;
 4209|      2|                break;
 4210|      0|            case ZYDIS_ROUNDING_MODE_RZ:
  ------------------
  |  Branch (4210:13): [True: 0, False: 4]
  ------------------
 4211|      0|                instruction->vector_length = 3;
 4212|      0|                break;
 4213|      0|            default:
  ------------------
  |  Branch (4213:13): [True: 0, False: 4]
  ------------------
 4214|      0|                ZYAN_UNREACHABLE;
  ------------------
  |  |  431|      0|#   define ZYAN_UNREACHABLE { assert(0); abort(); }
  ------------------
  |  Branch (4214:17): [Folded, False: 0]
  |  Branch (4214:17): [Folded, False: 0]
  ------------------
 4215|      4|            }
 4216|      4|        }
 4217|     38|        instruction->nf = match->definition->evex_nf;
 4218|     38|        if (match->definition->evex_nd)
  ------------------
  |  Branch (4218:13): [True: 5, False: 33]
  ------------------
 4219|      5|        {
 4220|      5|            instruction->attributes |= ZYDIS_ATTRIB_HAS_EVEX_B;
  ------------------
  |  |  747|      5|#define ZYDIS_ATTRIB_HAS_EVEX_B                 (1ULL << 45) // TODO: rename
  ------------------
 4221|      5|        }
 4222|     38|        if (match->definition->apx_osz && match->eosz == 16)
  ------------------
  |  Branch (4222:13): [True: 8, False: 30]
  |  Branch (4222:43): [True: 0, False: 8]
  ------------------
 4223|      0|        {
 4224|      0|            instruction->attributes |= ZYDIS_ATTRIB_HAS_OPERANDSIZE;
  ------------------
  |  |  737|      0|#define ZYDIS_ATTRIB_HAS_OPERANDSIZE            (1ULL << 43) // TODO: rename
  ------------------
 4225|      0|        }
 4226|     38|    }
 4227|    165|    else if (match->definition->encoding == ZYDIS_INSTRUCTION_ENCODING_MVEX)
  ------------------
  |  Branch (4227:14): [True: 0, False: 165]
  ------------------
 4228|      0|    {
 4229|      0|        instruction->sss |= ZydisEncodeMvexBroadcastMode(match->request->mvex.broadcast);
 4230|      0|        instruction->sss |= ZydisEncodeMvexConversionMode(match->request->mvex.conversion);
 4231|       |
 4232|      0|        switch (match->request->mvex.rounding)
 4233|      0|        {
 4234|      0|        case ZYDIS_ROUNDING_MODE_NONE:
  ------------------
  |  Branch (4234:9): [True: 0, False: 0]
  ------------------
 4235|      0|            break;
 4236|      0|        case ZYDIS_ROUNDING_MODE_RN:
  ------------------
  |  Branch (4236:9): [True: 0, False: 0]
  ------------------
 4237|      0|        case ZYDIS_ROUNDING_MODE_RD:
  ------------------
  |  Branch (4237:9): [True: 0, False: 0]
  ------------------
 4238|      0|        case ZYDIS_ROUNDING_MODE_RU:
  ------------------
  |  Branch (4238:9): [True: 0, False: 0]
  ------------------
 4239|      0|        case ZYDIS_ROUNDING_MODE_RZ:
  ------------------
  |  Branch (4239:9): [True: 0, False: 0]
  ------------------
 4240|      0|            instruction->sss |= match->request->mvex.rounding - ZYDIS_ROUNDING_MODE_RN;
 4241|      0|            break;
 4242|      0|        default:
  ------------------
  |  Branch (4242:9): [True: 0, False: 0]
  ------------------
 4243|      0|            ZYAN_UNREACHABLE;
  ------------------
  |  |  431|      0|#   define ZYAN_UNREACHABLE { assert(0); abort(); }
  ------------------
  |  Branch (4243:13): [Folded, False: 0]
  |  Branch (4243:13): [Folded, False: 0]
  ------------------
 4244|      0|        }
 4245|       |
 4246|      0|        switch (match->request->mvex.swizzle)
 4247|      0|        {
 4248|      0|        case ZYDIS_SWIZZLE_MODE_NONE:
  ------------------
  |  Branch (4248:9): [True: 0, False: 0]
  ------------------
 4249|      0|            break;
 4250|      0|        case ZYDIS_SWIZZLE_MODE_DCBA:
  ------------------
  |  Branch (4250:9): [True: 0, False: 0]
  ------------------
 4251|      0|        case ZYDIS_SWIZZLE_MODE_CDAB:
  ------------------
  |  Branch (4251:9): [True: 0, False: 0]
  ------------------
 4252|      0|        case ZYDIS_SWIZZLE_MODE_BADC:
  ------------------
  |  Branch (4252:9): [True: 0, False: 0]
  ------------------
 4253|      0|        case ZYDIS_SWIZZLE_MODE_DACB:
  ------------------
  |  Branch (4253:9): [True: 0, False: 0]
  ------------------
 4254|      0|        case ZYDIS_SWIZZLE_MODE_AAAA:
  ------------------
  |  Branch (4254:9): [True: 0, False: 0]
  ------------------
 4255|      0|        case ZYDIS_SWIZZLE_MODE_BBBB:
  ------------------
  |  Branch (4255:9): [True: 0, False: 0]
  ------------------
 4256|      0|        case ZYDIS_SWIZZLE_MODE_CCCC:
  ------------------
  |  Branch (4256:9): [True: 0, False: 0]
  ------------------
 4257|      0|        case ZYDIS_SWIZZLE_MODE_DDDD:
  ------------------
  |  Branch (4257:9): [True: 0, False: 0]
  ------------------
 4258|      0|            instruction->sss |= match->request->mvex.swizzle - ZYDIS_SWIZZLE_MODE_DCBA;
 4259|      0|            break;
 4260|      0|        default:
  ------------------
  |  Branch (4260:9): [True: 0, False: 0]
  ------------------
 4261|      0|            ZYAN_UNREACHABLE;
  ------------------
  |  |  431|      0|#   define ZYAN_UNREACHABLE { assert(0); abort(); }
  ------------------
  |  Branch (4261:13): [Folded, False: 0]
  |  Branch (4261:13): [Folded, False: 0]
  ------------------
 4262|      0|        }
 4263|       |
 4264|      0|        if ((match->request->mvex.sae) ||
  ------------------
  |  Branch (4264:13): [True: 0, False: 0]
  ------------------
 4265|      0|            (match->request->mvex.eviction_hint) ||
  ------------------
  |  Branch (4265:13): [True: 0, False: 0]
  ------------------
 4266|      0|            (match->request->mvex.rounding != ZYDIS_ROUNDING_MODE_NONE))
  ------------------
  |  Branch (4266:13): [True: 0, False: 0]
  ------------------
 4267|      0|        {
 4268|      0|            instruction->eviction_hint = ZYAN_TRUE;
  ------------------
  |  |  288|      0|#define ZYAN_TRUE  1u
  ------------------
 4269|      0|        }
 4270|      0|        if (match->request->mvex.sae)
  ------------------
  |  Branch (4270:13): [True: 0, False: 0]
  ------------------
 4271|      0|        {
 4272|      0|            instruction->sss |= 4;
 4273|      0|        }
 4274|       |
 4275|       |        // Following instructions violate general `MVEX.EH` handling rules. In all other cases this
 4276|       |        // bit is used either as eviction hint (memory operands present) or to encode MVEX-specific
 4277|       |        // functionality (register forms). Instructions listed below use `MVEX.EH` to identify
 4278|       |        // different instructions with memory operands and don't treat it as eviction hint.
 4279|      0|        switch (match->request->mnemonic)
 4280|      0|        {
 4281|      0|        case ZYDIS_MNEMONIC_VMOVNRAPD:
  ------------------
  |  Branch (4281:9): [True: 0, False: 0]
  ------------------
 4282|      0|        case ZYDIS_MNEMONIC_VMOVNRAPS:
  ------------------
  |  Branch (4282:9): [True: 0, False: 0]
  ------------------
 4283|      0|            instruction->eviction_hint = ZYAN_FALSE;
  ------------------
  |  |  287|      0|#define ZYAN_FALSE 0u
  ------------------
 4284|      0|            break;
 4285|      0|        case ZYDIS_MNEMONIC_VMOVNRNGOAPD:
  ------------------
  |  Branch (4285:9): [True: 0, False: 0]
  ------------------
 4286|      0|        case ZYDIS_MNEMONIC_VMOVNRNGOAPS:
  ------------------
  |  Branch (4286:9): [True: 0, False: 0]
  ------------------
 4287|      0|            instruction->eviction_hint = ZYAN_TRUE;
  ------------------
  |  |  288|      0|#define ZYAN_TRUE  1u
  ------------------
 4288|      0|            break;
 4289|      0|        default:
  ------------------
  |  Branch (4289:9): [True: 0, False: 0]
  ------------------
 4290|      0|            break;
 4291|      0|        }
 4292|      0|    }
 4293|       |
 4294|    203|    switch (match->definition->mandatory_prefix)
 4295|    203|    {
 4296|    180|    case ZYDIS_MANDATORY_PREFIX_NONE:
  ------------------
  |  Branch (4296:5): [True: 180, False: 23]
  ------------------
 4297|    180|        break;
 4298|     17|    case ZYDIS_MANDATORY_PREFIX_66:
  ------------------
  |  Branch (4298:5): [True: 17, False: 186]
  ------------------
 4299|     17|        instruction->attributes |= ZYDIS_ATTRIB_HAS_OPERANDSIZE;
  ------------------
  |  |  737|     17|#define ZYDIS_ATTRIB_HAS_OPERANDSIZE            (1ULL << 43) // TODO: rename
  ------------------
 4300|     17|        break;
 4301|      2|    case ZYDIS_MANDATORY_PREFIX_F2:
  ------------------
  |  Branch (4301:5): [True: 2, False: 201]
  ------------------
 4302|      2|        instruction->attributes |= ZYDIS_ATTRIB_HAS_REPNE;
  ------------------
  |  |  672|      2|#define ZYDIS_ATTRIB_HAS_REPNE                  (1ULL << 30)
  ------------------
 4303|      2|        break;
 4304|      4|    case ZYDIS_MANDATORY_PREFIX_F3:
  ------------------
  |  Branch (4304:5): [True: 4, False: 199]
  ------------------
 4305|      4|        instruction->attributes |= ZYDIS_ATTRIB_HAS_REP;
  ------------------
  |  |  660|      4|#define ZYDIS_ATTRIB_HAS_REP                    (1ULL << 28)
  ------------------
 4306|      4|        break;
 4307|      0|    default:
  ------------------
  |  Branch (4307:5): [True: 0, False: 203]
  ------------------
 4308|      0|        ZYAN_UNREACHABLE;
  ------------------
  |  |  431|      0|#   define ZYAN_UNREACHABLE { assert(0); abort(); }
  ------------------
  |  Branch (4308:9): [Folded, False: 0]
  |  Branch (4308:9): [Folded, False: 0]
  ------------------
 4309|    203|    }
 4310|       |
 4311|    203|    const ZyanU8 mode_width = ZydisGetMachineModeWidth(match->request->machine_mode);
 4312|    203|    if (match->easz != mode_width)
  ------------------
  |  Branch (4312:9): [True: 37, False: 166]
  ------------------
 4313|     37|    {
 4314|     37|        instruction->attributes |= ZYDIS_ATTRIB_HAS_ADDRESSSIZE;
  ------------------
  |  |  741|     37|#define ZYDIS_ATTRIB_HAS_ADDRESSSIZE            (1ULL << 44) // TODO: rename
  ------------------
 4315|     37|    }
 4316|    203|    if ((match->request->machine_mode == ZYDIS_MACHINE_MODE_LONG_64) &&
  ------------------
  |  Branch (4316:9): [True: 142, False: 61]
  ------------------
 4317|    142|        (match->base_definition->operand_size_map != ZYDIS_OPSIZE_MAP_FORCE64))
  ------------------
  |  |   47|    142|#define ZYDIS_OPSIZE_MAP_FORCE64                5
  ------------------
  |  Branch (4317:9): [True: 130, False: 12]
  ------------------
 4318|    130|    {
 4319|    130|        switch (match->eosz)
 4320|    130|        {
 4321|      6|        case 16:
  ------------------
  |  Branch (4321:9): [True: 6, False: 124]
  ------------------
 4322|      6|            instruction->attributes |= ZYDIS_ATTRIB_HAS_OPERANDSIZE;
  ------------------
  |  |  737|      6|#define ZYDIS_ATTRIB_HAS_OPERANDSIZE            (1ULL << 43) // TODO: rename
  ------------------
 4323|      6|            break;
 4324|     72|        case 32:
  ------------------
  |  Branch (4324:9): [True: 72, False: 58]
  ------------------
 4325|     72|            break;
 4326|     52|        case 64:
  ------------------
  |  Branch (4326:9): [True: 52, False: 78]
  ------------------
 4327|     52|            instruction->rex_w =
 4328|     52|                match->base_definition->operand_size_map != ZYDIS_OPSIZE_MAP_DEFAULT64;
  ------------------
  |  |   46|     52|#define ZYDIS_OPSIZE_MAP_DEFAULT64              4
  ------------------
 4329|     52|            break;
 4330|      0|        default:
  ------------------
  |  Branch (4330:9): [True: 0, False: 130]
  ------------------
 4331|      0|            ZYAN_UNREACHABLE;
  ------------------
  |  |  431|      0|#   define ZYAN_UNREACHABLE { assert(0); abort(); }
  ------------------
  |  Branch (4331:13): [Folded, False: 0]
  |  Branch (4331:13): [Folded, False: 0]
  ------------------
 4332|    130|        }
 4333|    130|    }
 4334|     73|    else
 4335|     73|    {
 4336|     73|        if (match->eosz != mode_width)
  ------------------
  |  Branch (4336:13): [True: 37, False: 36]
  ------------------
 4337|     37|        {
 4338|     37|            instruction->attributes |= ZYDIS_ATTRIB_HAS_OPERANDSIZE;
  ------------------
  |  |  737|     37|#define ZYDIS_ATTRIB_HAS_OPERANDSIZE            (1ULL << 43) // TODO: rename
  ------------------
 4339|     37|        }
 4340|     73|    }
 4341|       |
 4342|    550|    for (ZyanU8 i = 0; i < match->request->operand_count; ++i)
  ------------------
  |  Branch (4342:24): [True: 347, False: 203]
  ------------------
 4343|    347|    {
 4344|    347|        const ZydisEncoderOperand *user_op = &match->request->operands[i];
 4345|    347|        const ZydisOperandDefinition *def_op = &match->operands[i];
 4346|    347|        switch (user_op->type)
 4347|    347|        {
 4348|    172|        case ZYDIS_OPERAND_TYPE_REGISTER:
  ------------------
  |  Branch (4348:9): [True: 172, False: 175]
  ------------------
 4349|    172|            ZydisBuildRegisterOperand(user_op, def_op, instruction);
 4350|    172|            break;
 4351|     68|        case ZYDIS_OPERAND_TYPE_MEMORY:
  ------------------
  |  Branch (4351:9): [True: 68, False: 279]
  ------------------
 4352|     68|            if (def_op->type != ZYDIS_SEMANTIC_OPTYPE_MOFFS)
  ------------------
  |  Branch (4352:17): [True: 68, False: 0]
  ------------------
 4353|     68|            {
 4354|     68|                ZydisBuildMemoryOperand(match, user_op, instruction);
 4355|     68|                if ((match->cd8_scale) &&
  ------------------
  |  Branch (4355:21): [True: 8, False: 60]
  ------------------
 4356|      8|                    (instruction->disp_size == 8))
  ------------------
  |  Branch (4356:21): [True: 0, False: 8]
  ------------------
 4357|      0|                {
 4358|      0|                    instruction->disp >>= match->cd8_scale;
 4359|      0|                }
 4360|     68|                switch (def_op->type)
 4361|     68|                {
 4362|      0|                case ZYDIS_SEMANTIC_OPTYPE_MEM_VSIBX:
  ------------------
  |  Branch (4362:17): [True: 0, False: 68]
  ------------------
 4363|      2|                case ZYDIS_SEMANTIC_OPTYPE_MEM_VSIBY:
  ------------------
  |  Branch (4363:17): [True: 2, False: 66]
  ------------------
 4364|      6|                case ZYDIS_SEMANTIC_OPTYPE_MEM_VSIBZ:
  ------------------
  |  Branch (4364:17): [True: 4, False: 64]
  ------------------
 4365|      6|                    instruction->is_vsib = ZYAN_TRUE;
  ------------------
  |  |  288|      6|#define ZYAN_TRUE  1u
  ------------------
 4366|      6|                    break;
 4367|     62|                default:
  ------------------
  |  Branch (4367:17): [True: 62, False: 6]
  ------------------
 4368|     62|                    break;
 4369|     68|                }
 4370|     68|            }
 4371|      0|            else
 4372|      0|            {
 4373|      0|                instruction->disp_size = match->disp_size;
 4374|      0|                instruction->disp = (ZyanU64)user_op->mem.displacement;
 4375|      0|            }
 4376|     68|            break;
 4377|     68|        case ZYDIS_OPERAND_TYPE_POINTER:
  ------------------
  |  Branch (4377:9): [True: 8, False: 339]
  ------------------
 4378|      8|            instruction->disp_size = match->disp_size;
 4379|      8|            instruction->disp = user_op->ptr.offset;
 4380|      8|            instruction->imm_size = match->imm_size;
 4381|      8|            instruction->imm = user_op->ptr.segment;
 4382|      8|            break;
 4383|     99|        case ZYDIS_OPERAND_TYPE_IMMEDIATE:
  ------------------
  |  Branch (4383:9): [True: 99, False: 248]
  ------------------
 4384|     99|        {
 4385|     99|            if (def_op->type == ZYDIS_SEMANTIC_OPTYPE_IMPLICIT_IMM1)
  ------------------
  |  Branch (4385:17): [True: 0, False: 99]
  ------------------
 4386|      0|            {
 4387|      0|                break;
 4388|      0|            }
 4389|     99|            const ZydisOperandDetails *details = ZydisGetOperandDetails(def_op);
 4390|     99|            if (details->encoding != ZYDIS_OPERAND_ENCODING_IS4)
  ------------------
  |  Branch (4390:17): [True: 99, False: 0]
  ------------------
 4391|     99|            {
 4392|     99|                if (instruction->imm_size)
  ------------------
  |  Branch (4392:21): [True: 0, False: 99]
  ------------------
 4393|      0|                {
 4394|      0|                    ZYAN_ASSERT(instruction->disp_size == 0);
  ------------------
  |  |  381|      0|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (4394:21): [True: 0, False: 0]
  |  Branch (4394:21): [True: 0, False: 0]
  ------------------
 4395|      0|                    instruction->disp_size = match->disp_size;
 4396|      0|                    instruction->disp = instruction->imm;
 4397|      0|                }
 4398|     99|                instruction->imm_size = match->imm_size;
 4399|     99|                instruction->imm = user_op->imm.u;
 4400|     99|            }
 4401|      0|            else
 4402|      0|            {
 4403|      0|                ZYAN_ASSERT(instruction->imm_size == 8);
  ------------------
  |  |  381|      0|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (4403:17): [True: 0, False: 0]
  |  Branch (4403:17): [True: 0, False: 0]
  ------------------
 4404|      0|                instruction->imm |= user_op->imm.u;
 4405|      0|            }
 4406|     99|            break;
 4407|     99|        }
 4408|     99|        default:
  ------------------
  |  Branch (4408:9): [True: 0, False: 347]
  ------------------
 4409|      0|            ZYAN_UNREACHABLE;
  ------------------
  |  |  431|      0|#   define ZYAN_UNREACHABLE { assert(0); abort(); }
  ------------------
  |  Branch (4409:13): [Folded, False: 0]
  |  Branch (4409:13): [Folded, False: 0]
  ------------------
 4410|    347|        }
 4411|    347|    }
 4412|       |
 4413|    203|    return ZYAN_STATUS_SUCCESS;
  ------------------
  |  |  164|    203|    ZYAN_MAKE_STATUS(0u, ZYAN_MODULE_ZYCORE, 0x00u)
  |  |  ------------------
  |  |  |  |   68|    203|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
 4414|    203|}
Encoder.c:ZydisBuildRegisterOperand:
 3934|    172|{
 3935|    172|    if (def_op->type == ZYDIS_SEMANTIC_OPTYPE_IMPLICIT_REG)
  ------------------
  |  Branch (3935:9): [True: 0, False: 172]
  ------------------
 3936|      0|    {
 3937|      0|        return;
 3938|      0|    }
 3939|       |
 3940|    172|    const ZydisRegisterClass reg_class = ZydisRegisterGetClass(user_op->reg.value);
 3941|    172|    const ZyanU8 reg_id = ZydisGetPhysicalId(user_op->reg.value, reg_class);
 3942|    172|    if ((reg_class == ZYDIS_REGCLASS_GPR8) &&
  ------------------
  |  Branch (3942:9): [True: 22, False: 150]
  ------------------
 3943|     22|        (user_op->reg.value >= ZYDIS_REGISTER_SPL) &&
  ------------------
  |  Branch (3943:9): [True: 13, False: 9]
  ------------------
 3944|     13|        (user_op->reg.value <= ZYDIS_REGISTER_DIL))
  ------------------
  |  Branch (3944:9): [True: 3, False: 10]
  ------------------
 3945|      3|    {
 3946|      3|        instruction->attributes |= ZYDIS_ATTRIB_HAS_REX;
  ------------------
  |  |  544|      3|#define ZYDIS_ATTRIB_HAS_REX                    (1ULL <<  2)
  ------------------
 3947|      3|    }
 3948|       |
 3949|    172|    const ZydisOperandDetails *details = ZydisGetOperandDetails(def_op);
 3950|    172|    switch (details->encoding)
 3951|    172|    {
 3952|     73|    case ZYDIS_OPERAND_ENCODING_MODRM_REG:
  ------------------
  |  Branch (3952:5): [True: 73, False: 99]
  ------------------
 3953|     73|        instruction->attributes |= ZYDIS_ATTRIB_HAS_MODRM;
  ------------------
  |  |  536|     73|#define ZYDIS_ATTRIB_HAS_MODRM                  (1ULL <<  0)
  ------------------
 3954|     73|        instruction->reg = reg_id;
 3955|     73|        break;
 3956|     36|    case ZYDIS_OPERAND_ENCODING_MODRM_RM:
  ------------------
  |  Branch (3956:5): [True: 36, False: 136]
  ------------------
 3957|     36|        instruction->attributes |= ZYDIS_ATTRIB_HAS_MODRM;
  ------------------
  |  |  536|     36|#define ZYDIS_ATTRIB_HAS_MODRM                  (1ULL <<  0)
  ------------------
 3958|     36|        instruction->rm = reg_id;
 3959|     36|        switch (reg_class)
 3960|     36|        {
 3961|      4|        case ZYDIS_REGCLASS_XMM:
  ------------------
  |  Branch (3961:9): [True: 4, False: 32]
  ------------------
 3962|      4|        case ZYDIS_REGCLASS_YMM:
  ------------------
  |  Branch (3962:9): [True: 0, False: 36]
  ------------------
 3963|      8|        case ZYDIS_REGCLASS_ZMM:
  ------------------
  |  Branch (3963:9): [True: 4, False: 32]
  ------------------
 3964|      8|            instruction->is_rm_vector = ZYAN_TRUE;
  ------------------
  |  |  288|      8|#define ZYAN_TRUE  1u
  ------------------
 3965|      8|            break;
 3966|     28|        default:
  ------------------
  |  Branch (3966:9): [True: 28, False: 8]
  ------------------
 3967|     28|            break;
 3968|     36|        }
 3969|     36|        break;
 3970|     38|    case ZYDIS_OPERAND_ENCODING_OPCODE:
  ------------------
  |  Branch (3970:5): [True: 38, False: 134]
  ------------------
 3971|     38|        instruction->opcode += reg_id & 7;
 3972|     38|        instruction->rm = reg_id;
 3973|     38|        break;
 3974|     12|    case ZYDIS_OPERAND_ENCODING_NDSNDD:
  ------------------
  |  Branch (3974:5): [True: 12, False: 160]
  ------------------
 3975|     12|        instruction->vvvv = reg_id;
 3976|     12|        break;
 3977|      0|    case ZYDIS_OPERAND_ENCODING_IS4:
  ------------------
  |  Branch (3977:5): [True: 0, False: 172]
  ------------------
 3978|      0|        instruction->imm_size = 8;
 3979|      0|        instruction->imm = reg_id << 4;
 3980|      0|        break;
 3981|     13|    case ZYDIS_OPERAND_ENCODING_MASK:
  ------------------
  |  Branch (3981:5): [True: 13, False: 159]
  ------------------
 3982|     13|        instruction->mask = reg_id;
 3983|     13|        break;
 3984|      0|    default:
  ------------------
  |  Branch (3984:5): [True: 0, False: 172]
  ------------------
 3985|      0|        ZYAN_UNREACHABLE;
  ------------------
  |  |  431|      0|#   define ZYAN_UNREACHABLE { assert(0); abort(); }
  ------------------
  |  Branch (3985:9): [Folded, False: 0]
  |  Branch (3985:9): [Folded, False: 0]
  ------------------
 3986|    172|    }
 3987|    172|}
Encoder.c:ZydisBuildMemoryOperand:
 3998|     68|{
 3999|     68|    instruction->attributes |= ZYDIS_ATTRIB_HAS_MODRM;
  ------------------
  |  |  536|     68|#define ZYDIS_ATTRIB_HAS_MODRM                  (1ULL <<  0)
  ------------------
 4000|     68|    instruction->disp = (ZyanU64)user_op->mem.displacement;
 4001|     68|    if (match->easz == 16)
  ------------------
  |  Branch (4001:9): [True: 2, False: 66]
  ------------------
 4002|      2|    {
 4003|      2|        const ZyanI8 rm = ZydisGetRm16(user_op->mem.base, user_op->mem.index);
 4004|      2|        if (rm != -1)
  ------------------
  |  Branch (4004:13): [True: 0, False: 2]
  ------------------
 4005|      0|        {
 4006|      0|            instruction->rm = (ZyanU8)rm;
 4007|      0|            instruction->disp_size = match->disp_size;
 4008|      0|            switch (instruction->disp_size)
 4009|      0|            {
 4010|      0|            case 0:
  ------------------
  |  Branch (4010:13): [True: 0, False: 0]
  ------------------
 4011|      0|                if (rm == 6)
  ------------------
  |  Branch (4011:21): [True: 0, False: 0]
  ------------------
 4012|      0|                {
 4013|      0|                    instruction->disp_size = 8;
 4014|      0|                    instruction->mod = 1;
 4015|      0|                }
 4016|      0|                break;
 4017|      0|            case 8:
  ------------------
  |  Branch (4017:13): [True: 0, False: 0]
  ------------------
 4018|      0|                instruction->mod = 1;
 4019|      0|                break;
 4020|      0|            case 16:
  ------------------
  |  Branch (4020:13): [True: 0, False: 0]
  ------------------
 4021|      0|                instruction->mod = 2;
 4022|      0|                break;
 4023|      0|            default:
  ------------------
  |  Branch (4023:13): [True: 0, False: 0]
  ------------------
 4024|      0|                ZYAN_UNREACHABLE;
  ------------------
  |  |  431|      0|#   define ZYAN_UNREACHABLE { assert(0); abort(); }
  ------------------
  |  Branch (4024:17): [Folded, False: 0]
  |  Branch (4024:17): [Folded, False: 0]
  ------------------
 4025|      0|            }
 4026|      0|        }
 4027|      2|        else
 4028|      2|        {
 4029|      2|            instruction->rm = 6;
 4030|      2|            instruction->disp_size = 16;
 4031|      2|        }
 4032|      2|        return;
 4033|      2|    }
 4034|       |
 4035|     66|    if (user_op->mem.index == ZYDIS_REGISTER_NONE)
  ------------------
  |  Branch (4035:9): [True: 57, False: 9]
  ------------------
 4036|     57|    {
 4037|     57|        if (user_op->mem.base == ZYDIS_REGISTER_NONE)
  ------------------
  |  Branch (4037:13): [True: 6, False: 51]
  ------------------
 4038|      6|        {
 4039|      6|            if (match->request->machine_mode == ZYDIS_MACHINE_MODE_LONG_64)
  ------------------
  |  Branch (4039:17): [True: 6, False: 0]
  ------------------
 4040|      6|            {
 4041|      6|                instruction->rm = 4;
 4042|      6|                instruction->attributes |= ZYDIS_ATTRIB_HAS_SIB;
  ------------------
  |  |  540|      6|#define ZYDIS_ATTRIB_HAS_SIB                    (1ULL <<  1)
  ------------------
 4043|      6|                instruction->base = 5;
 4044|      6|                instruction->index = 4;
 4045|      6|            }
 4046|      0|            else
 4047|      0|            {
 4048|      0|                instruction->rm = 5;
 4049|      0|            }
 4050|      6|            instruction->disp_size = 32;
 4051|      6|            return;
 4052|      6|        }
 4053|     51|        else if ((user_op->mem.base == ZYDIS_REGISTER_RIP) ||
  ------------------
  |  Branch (4053:18): [True: 21, False: 30]
  ------------------
 4054|     30|                 (user_op->mem.base == ZYDIS_REGISTER_EIP))
  ------------------
  |  Branch (4054:18): [True: 22, False: 8]
  ------------------
 4055|     43|        {
 4056|     43|            instruction->rm = 5;
 4057|     43|            instruction->disp_size = 32;
 4058|     43|            return;
 4059|     43|        }
 4060|     57|    }
 4061|       |
 4062|     17|    const ZyanU8 reg_base_id = (ZyanU8)ZydisRegisterGetId(user_op->mem.base);
 4063|     17|    const ZyanU8 reg_index_id = (ZyanU8)ZydisRegisterGetId(user_op->mem.index);
 4064|     17|    instruction->disp_size = match->disp_size;
 4065|     17|    switch (instruction->disp_size)
 4066|     17|    {
 4067|      4|    case 0:
  ------------------
  |  Branch (4067:5): [True: 4, False: 13]
  ------------------
 4068|      4|        if ((reg_base_id & 7) == 5)
  ------------------
  |  Branch (4068:13): [True: 0, False: 4]
  ------------------
 4069|      0|        {
 4070|      0|            instruction->disp_size = 8;
 4071|      0|            instruction->disp = 0;
 4072|      0|            instruction->mod = 1;
 4073|      0|        }
 4074|      4|        break;
 4075|      2|    case 8:
  ------------------
  |  Branch (4075:5): [True: 2, False: 15]
  ------------------
 4076|      2|        instruction->mod = 1;
 4077|      2|        break;
 4078|      5|    case 16:
  ------------------
  |  Branch (4078:5): [True: 5, False: 12]
  ------------------
 4079|      5|        instruction->disp_size = 32;
 4080|      5|        ZYAN_FALLTHROUGH;
 4081|     11|    case 32:
  ------------------
  |  Branch (4081:5): [True: 6, False: 11]
  ------------------
 4082|     11|        instruction->mod = 2;
 4083|     11|        break;
 4084|      0|    default:
  ------------------
  |  Branch (4084:5): [True: 0, False: 17]
  ------------------
 4085|      0|        ZYAN_UNREACHABLE;
  ------------------
  |  |  431|      0|#   define ZYAN_UNREACHABLE { assert(0); abort(); }
  ------------------
  |  Branch (4085:9): [Folded, False: 0]
  |  Branch (4085:9): [Folded, False: 0]
  ------------------
 4086|     17|    }
 4087|     17|    if ((user_op->mem.index == ZYDIS_REGISTER_NONE) &&
  ------------------
  |  Branch (4087:9): [True: 8, False: 9]
  ------------------
 4088|      8|        ((reg_base_id & 7) != 4) &&
  ------------------
  |  Branch (4088:9): [True: 8, False: 0]
  ------------------
 4089|      8|        ((match->definition->modrm & 7) != 4))
  ------------------
  |  Branch (4089:9): [True: 8, False: 0]
  ------------------
 4090|      8|    {
 4091|      8|        instruction->rm = reg_base_id;
 4092|      8|        return;
 4093|      8|    }
 4094|      9|    instruction->rm = 4;
 4095|      9|    instruction->attributes |= ZYDIS_ATTRIB_HAS_SIB;
  ------------------
  |  |  540|      9|#define ZYDIS_ATTRIB_HAS_SIB                    (1ULL <<  1)
  ------------------
 4096|      9|    if (reg_base_id != 0xFF)
  ------------------
  |  Branch (4096:9): [True: 4, False: 5]
  ------------------
 4097|      4|    {
 4098|      4|        instruction->base = reg_base_id;
 4099|      4|    }
 4100|      5|    else
 4101|      5|    {
 4102|      5|        instruction->base = 5;
 4103|      5|        instruction->mod = 0;
 4104|      5|        instruction->disp_size = 32;
 4105|      5|    }
 4106|      9|    if (reg_index_id != 0xFF)
  ------------------
  |  Branch (4106:9): [True: 9, False: 0]
  ------------------
 4107|      9|    {
 4108|      9|        instruction->index = reg_index_id;
 4109|      9|    }
 4110|      0|    else
 4111|      0|    {
 4112|      0|        instruction->index = 4;
 4113|      0|    }
 4114|      9|    switch (user_op->mem.scale)
 4115|      9|    {
 4116|      0|    case 0:
  ------------------
  |  Branch (4116:5): [True: 0, False: 9]
  ------------------
 4117|      0|    case 1:
  ------------------
  |  Branch (4117:5): [True: 0, False: 9]
  ------------------
 4118|      0|        break;
 4119|      1|    case 2:
  ------------------
  |  Branch (4119:5): [True: 1, False: 8]
  ------------------
 4120|      1|        instruction->scale = 1;
 4121|      1|        break;
 4122|      4|    case 4:
  ------------------
  |  Branch (4122:5): [True: 4, False: 5]
  ------------------
 4123|      4|        instruction->scale = 2;
 4124|      4|        break;
 4125|      4|    case 8:
  ------------------
  |  Branch (4125:5): [True: 4, False: 5]
  ------------------
 4126|      4|        instruction->scale = 3;
 4127|      4|        break;
 4128|      0|    default:
  ------------------
  |  Branch (4128:5): [True: 0, False: 9]
  ------------------
 4129|      0|        ZYAN_UNREACHABLE;
  ------------------
  |  |  431|      0|#   define ZYAN_UNREACHABLE { assert(0); abort(); }
  ------------------
  |  Branch (4129:9): [Folded, False: 0]
  |  Branch (4129:9): [Folded, False: 0]
  ------------------
 4130|      9|    }
 4131|      9|}
Encoder.c:ZydisEmitInstruction:
 3843|    203|{
 3844|    203|    ZYAN_CHECK(ZydisEmitLegacyPrefixes(instruction, buffer));
  ------------------
  |  |  100|    203|    do \
  |  |  101|    203|    { \
  |  |  102|    203|        const ZyanStatus status_047620348 = (status); \
  |  |  103|    203|        if (!ZYAN_SUCCESS(status_047620348)) \
  |  |  ------------------
  |  |  |  |   82|    203|    (!((status) & 0x80000000u))
  |  |  ------------------
  |  |  |  Branch (103:13): [True: 0, False: 203]
  |  |  ------------------
  |  |  104|    203|        { \
  |  |  105|      0|            return status_047620348; \
  |  |  106|      0|        } \
  |  |  107|    203|    } while (0)
  |  |  ------------------
  |  |  |  Branch (107:14): [Folded, False: 203]
  |  |  ------------------
  ------------------
 3845|       |
 3846|    203|    switch (instruction->encoding)
 3847|    203|    {
 3848|    162|    case ZYDIS_INSTRUCTION_ENCODING_LEGACY:
  ------------------
  |  Branch (3848:5): [True: 162, False: 41]
  ------------------
 3849|    162|    case ZYDIS_INSTRUCTION_ENCODING_3DNOW:
  ------------------
  |  Branch (3849:5): [True: 0, False: 203]
  ------------------
 3850|    162|        ZYAN_CHECK(ZydisEmitRex(instruction, buffer));
  ------------------
  |  |  100|    162|    do \
  |  |  101|    162|    { \
  |  |  102|    162|        const ZyanStatus status_047620348 = (status); \
  |  |  103|    162|        if (!ZYAN_SUCCESS(status_047620348)) \
  |  |  ------------------
  |  |  |  |   82|    162|    (!((status) & 0x80000000u))
  |  |  ------------------
  |  |  |  Branch (103:13): [True: 0, False: 162]
  |  |  ------------------
  |  |  104|    162|        { \
  |  |  105|      0|            return status_047620348; \
  |  |  106|      0|        } \
  |  |  107|    162|    } while (0)
  |  |  ------------------
  |  |  |  Branch (107:14): [Folded, False: 162]
  |  |  ------------------
  ------------------
 3851|    162|        break;
 3852|    162|    case ZYDIS_INSTRUCTION_ENCODING_XOP:
  ------------------
  |  Branch (3852:5): [True: 3, False: 200]
  ------------------
 3853|      3|        ZYAN_CHECK(ZydisEmitXop(instruction, buffer));
  ------------------
  |  |  100|      3|    do \
  |  |  101|      3|    { \
  |  |  102|      3|        const ZyanStatus status_047620348 = (status); \
  |  |  103|      3|        if (!ZYAN_SUCCESS(status_047620348)) \
  |  |  ------------------
  |  |  |  |   82|      3|    (!((status) & 0x80000000u))
  |  |  ------------------
  |  |  |  Branch (103:13): [True: 0, False: 3]
  |  |  ------------------
  |  |  104|      3|        { \
  |  |  105|      0|            return status_047620348; \
  |  |  106|      0|        } \
  |  |  107|      3|    } while (0)
  |  |  ------------------
  |  |  |  Branch (107:14): [Folded, False: 3]
  |  |  ------------------
  ------------------
 3854|      3|        break;
 3855|      3|    case ZYDIS_INSTRUCTION_ENCODING_VEX:
  ------------------
  |  Branch (3855:5): [True: 0, False: 203]
  ------------------
 3856|      0|        ZYAN_CHECK(ZydisEmitVex(instruction, buffer));
  ------------------
  |  |  100|      0|    do \
  |  |  101|      0|    { \
  |  |  102|      0|        const ZyanStatus status_047620348 = (status); \
  |  |  103|      0|        if (!ZYAN_SUCCESS(status_047620348)) \
  |  |  ------------------
  |  |  |  |   82|      0|    (!((status) & 0x80000000u))
  |  |  ------------------
  |  |  |  Branch (103:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  104|      0|        { \
  |  |  105|      0|            return status_047620348; \
  |  |  106|      0|        } \
  |  |  107|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (107:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 3857|      0|        break;
 3858|     38|    case ZYDIS_INSTRUCTION_ENCODING_EVEX:
  ------------------
  |  Branch (3858:5): [True: 38, False: 165]
  ------------------
 3859|     38|        ZYAN_CHECK(ZydisEmitEvex(instruction, buffer));
  ------------------
  |  |  100|     38|    do \
  |  |  101|     38|    { \
  |  |  102|     38|        const ZyanStatus status_047620348 = (status); \
  |  |  103|     38|        if (!ZYAN_SUCCESS(status_047620348)) \
  |  |  ------------------
  |  |  |  |   82|     38|    (!((status) & 0x80000000u))
  |  |  ------------------
  |  |  |  Branch (103:13): [True: 0, False: 38]
  |  |  ------------------
  |  |  104|     38|        { \
  |  |  105|      0|            return status_047620348; \
  |  |  106|      0|        } \
  |  |  107|     38|    } while (0)
  |  |  ------------------
  |  |  |  Branch (107:14): [Folded, False: 38]
  |  |  ------------------
  ------------------
 3860|     38|        break;
 3861|     38|    case ZYDIS_INSTRUCTION_ENCODING_MVEX:
  ------------------
  |  Branch (3861:5): [True: 0, False: 203]
  ------------------
 3862|      0|        ZYAN_CHECK(ZydisEmitMvex(instruction, buffer));
  ------------------
  |  |  100|      0|    do \
  |  |  101|      0|    { \
  |  |  102|      0|        const ZyanStatus status_047620348 = (status); \
  |  |  103|      0|        if (!ZYAN_SUCCESS(status_047620348)) \
  |  |  ------------------
  |  |  |  |   82|      0|    (!((status) & 0x80000000u))
  |  |  ------------------
  |  |  |  Branch (103:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  104|      0|        { \
  |  |  105|      0|            return status_047620348; \
  |  |  106|      0|        } \
  |  |  107|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (107:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 3863|      0|        break;
 3864|      0|    default:
  ------------------
  |  Branch (3864:5): [True: 0, False: 203]
  ------------------
 3865|      0|        ZYAN_UNREACHABLE;
  ------------------
  |  |  431|      0|#   define ZYAN_UNREACHABLE { assert(0); abort(); }
  ------------------
  |  Branch (3865:9): [Folded, False: 0]
  |  Branch (3865:9): [Folded, False: 0]
  ------------------
 3866|    203|    }
 3867|       |
 3868|    203|    switch (instruction->opcode_map)
 3869|    203|    {
 3870|    154|    case ZYDIS_OPCODE_MAP_DEFAULT:
  ------------------
  |  Branch (3870:5): [True: 154, False: 49]
  ------------------
 3871|    154|        break;
 3872|     38|    case ZYDIS_OPCODE_MAP_0F:
  ------------------
  |  Branch (3872:5): [True: 38, False: 165]
  ------------------
 3873|     38|        ZYAN_CHECK(ZydisEmitByte(0x0F, buffer));
  ------------------
  |  |  100|     38|    do \
  |  |  101|     38|    { \
  |  |  102|     38|        const ZyanStatus status_047620348 = (status); \
  |  |  103|     38|        if (!ZYAN_SUCCESS(status_047620348)) \
  |  |  ------------------
  |  |  |  |   82|     38|    (!((status) & 0x80000000u))
  |  |  ------------------
  |  |  |  Branch (103:13): [True: 0, False: 38]
  |  |  ------------------
  |  |  104|     38|        { \
  |  |  105|      0|            return status_047620348; \
  |  |  106|      0|        } \
  |  |  107|     38|    } while (0)
  |  |  ------------------
  |  |  |  Branch (107:14): [Folded, False: 38]
  |  |  ------------------
  ------------------
 3874|     38|        break;
 3875|     38|    case ZYDIS_OPCODE_MAP_0F38:
  ------------------
  |  Branch (3875:5): [True: 11, False: 192]
  ------------------
 3876|     11|        ZYAN_CHECK(ZydisEmitByte(0x0F, buffer));
  ------------------
  |  |  100|     11|    do \
  |  |  101|     11|    { \
  |  |  102|     11|        const ZyanStatus status_047620348 = (status); \
  |  |  103|     11|        if (!ZYAN_SUCCESS(status_047620348)) \
  |  |  ------------------
  |  |  |  |   82|     11|    (!((status) & 0x80000000u))
  |  |  ------------------
  |  |  |  Branch (103:13): [True: 0, False: 11]
  |  |  ------------------
  |  |  104|     11|        { \
  |  |  105|      0|            return status_047620348; \
  |  |  106|      0|        } \
  |  |  107|     11|    } while (0)
  |  |  ------------------
  |  |  |  Branch (107:14): [Folded, False: 11]
  |  |  ------------------
  ------------------
 3877|     11|        ZYAN_CHECK(ZydisEmitByte(0x38, buffer));
  ------------------
  |  |  100|     11|    do \
  |  |  101|     11|    { \
  |  |  102|     11|        const ZyanStatus status_047620348 = (status); \
  |  |  103|     11|        if (!ZYAN_SUCCESS(status_047620348)) \
  |  |  ------------------
  |  |  |  |   82|     11|    (!((status) & 0x80000000u))
  |  |  ------------------
  |  |  |  Branch (103:13): [True: 0, False: 11]
  |  |  ------------------
  |  |  104|     11|        { \
  |  |  105|      0|            return status_047620348; \
  |  |  106|      0|        } \
  |  |  107|     11|    } while (0)
  |  |  ------------------
  |  |  |  Branch (107:14): [Folded, False: 11]
  |  |  ------------------
  ------------------
 3878|     11|        break;
 3879|     11|    case ZYDIS_OPCODE_MAP_0F3A:
  ------------------
  |  Branch (3879:5): [True: 0, False: 203]
  ------------------
 3880|      0|        ZYAN_CHECK(ZydisEmitByte(0x0F, buffer));
  ------------------
  |  |  100|      0|    do \
  |  |  101|      0|    { \
  |  |  102|      0|        const ZyanStatus status_047620348 = (status); \
  |  |  103|      0|        if (!ZYAN_SUCCESS(status_047620348)) \
  |  |  ------------------
  |  |  |  |   82|      0|    (!((status) & 0x80000000u))
  |  |  ------------------
  |  |  |  Branch (103:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  104|      0|        { \
  |  |  105|      0|            return status_047620348; \
  |  |  106|      0|        } \
  |  |  107|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (107:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 3881|      0|        ZYAN_CHECK(ZydisEmitByte(0x3A, buffer));
  ------------------
  |  |  100|      0|    do \
  |  |  101|      0|    { \
  |  |  102|      0|        const ZyanStatus status_047620348 = (status); \
  |  |  103|      0|        if (!ZYAN_SUCCESS(status_047620348)) \
  |  |  ------------------
  |  |  |  |   82|      0|    (!((status) & 0x80000000u))
  |  |  ------------------
  |  |  |  Branch (103:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  104|      0|        { \
  |  |  105|      0|            return status_047620348; \
  |  |  106|      0|        } \
  |  |  107|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (107:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 3882|      0|        break;
 3883|      0|    case ZYDIS_OPCODE_MAP_0F0F:
  ------------------
  |  Branch (3883:5): [True: 0, False: 203]
  ------------------
 3884|      0|        ZYAN_CHECK(ZydisEmitByte(0x0F, buffer));
  ------------------
  |  |  100|      0|    do \
  |  |  101|      0|    { \
  |  |  102|      0|        const ZyanStatus status_047620348 = (status); \
  |  |  103|      0|        if (!ZYAN_SUCCESS(status_047620348)) \
  |  |  ------------------
  |  |  |  |   82|      0|    (!((status) & 0x80000000u))
  |  |  ------------------
  |  |  |  Branch (103:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  104|      0|        { \
  |  |  105|      0|            return status_047620348; \
  |  |  106|      0|        } \
  |  |  107|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (107:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 3885|      0|        ZYAN_CHECK(ZydisEmitByte(0x0F, buffer));
  ------------------
  |  |  100|      0|    do \
  |  |  101|      0|    { \
  |  |  102|      0|        const ZyanStatus status_047620348 = (status); \
  |  |  103|      0|        if (!ZYAN_SUCCESS(status_047620348)) \
  |  |  ------------------
  |  |  |  |   82|      0|    (!((status) & 0x80000000u))
  |  |  ------------------
  |  |  |  Branch (103:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  104|      0|        { \
  |  |  105|      0|            return status_047620348; \
  |  |  106|      0|        } \
  |  |  107|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (107:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 3886|      0|        break;
 3887|      0|    default:
  ------------------
  |  Branch (3887:5): [True: 0, False: 203]
  ------------------
 3888|      0|        ZYAN_UNREACHABLE;
  ------------------
  |  |  431|      0|#   define ZYAN_UNREACHABLE { assert(0); abort(); }
  ------------------
  |  Branch (3888:9): [Folded, False: 0]
  |  Branch (3888:9): [Folded, False: 0]
  ------------------
 3889|    203|    }
 3890|    203|    if (instruction->encoding != ZYDIS_INSTRUCTION_ENCODING_3DNOW)
  ------------------
  |  Branch (3890:9): [True: 203, False: 0]
  ------------------
 3891|    203|    {
 3892|    203|        ZYAN_CHECK(ZydisEmitByte(instruction->opcode, buffer));
  ------------------
  |  |  100|    203|    do \
  |  |  101|    203|    { \
  |  |  102|    203|        const ZyanStatus status_047620348 = (status); \
  |  |  103|    203|        if (!ZYAN_SUCCESS(status_047620348)) \
  |  |  ------------------
  |  |  |  |   82|    203|    (!((status) & 0x80000000u))
  |  |  ------------------
  |  |  |  Branch (103:13): [True: 0, False: 203]
  |  |  ------------------
  |  |  104|    203|        { \
  |  |  105|      0|            return status_047620348; \
  |  |  106|      0|        } \
  |  |  107|    203|    } while (0)
  |  |  ------------------
  |  |  |  Branch (107:14): [Folded, False: 203]
  |  |  ------------------
  ------------------
 3893|    203|    }
 3894|       |
 3895|    203|    if (instruction->attributes & ZYDIS_ATTRIB_HAS_MODRM)
  ------------------
  |  |  536|    203|#define ZYDIS_ATTRIB_HAS_MODRM                  (1ULL <<  0)
  ------------------
  |  Branch (3895:9): [True: 108, False: 95]
  ------------------
 3896|    108|    {
 3897|    108|        const ZyanU8 modrm = (instruction->mod << 6) |
 3898|    108|                             ((instruction->reg & 7) << 3) |
 3899|    108|                             (instruction->rm & 7);
 3900|    108|        ZYAN_CHECK(ZydisEmitByte(modrm, buffer));
  ------------------
  |  |  100|    108|    do \
  |  |  101|    108|    { \
  |  |  102|    108|        const ZyanStatus status_047620348 = (status); \
  |  |  103|    108|        if (!ZYAN_SUCCESS(status_047620348)) \
  |  |  ------------------
  |  |  |  |   82|    108|    (!((status) & 0x80000000u))
  |  |  ------------------
  |  |  |  Branch (103:13): [True: 0, False: 108]
  |  |  ------------------
  |  |  104|    108|        { \
  |  |  105|      0|            return status_047620348; \
  |  |  106|      0|        } \
  |  |  107|    108|    } while (0)
  |  |  ------------------
  |  |  |  Branch (107:14): [Folded, False: 108]
  |  |  ------------------
  ------------------
 3901|    108|    }
 3902|    203|    if (instruction->attributes & ZYDIS_ATTRIB_HAS_SIB)
  ------------------
  |  |  540|    203|#define ZYDIS_ATTRIB_HAS_SIB                    (1ULL <<  1)
  ------------------
  |  Branch (3902:9): [True: 15, False: 188]
  ------------------
 3903|     15|    {
 3904|     15|        const ZyanU8 sib = (instruction->scale << 6) |
 3905|     15|                           ((instruction->index & 7) << 3) |
 3906|     15|                           (instruction->base & 7);
 3907|     15|        ZYAN_CHECK(ZydisEmitByte(sib, buffer));
  ------------------
  |  |  100|     15|    do \
  |  |  101|     15|    { \
  |  |  102|     15|        const ZyanStatus status_047620348 = (status); \
  |  |  103|     15|        if (!ZYAN_SUCCESS(status_047620348)) \
  |  |  ------------------
  |  |  |  |   82|     15|    (!((status) & 0x80000000u))
  |  |  ------------------
  |  |  |  Branch (103:13): [True: 0, False: 15]
  |  |  ------------------
  |  |  104|     15|        { \
  |  |  105|      0|            return status_047620348; \
  |  |  106|      0|        } \
  |  |  107|     15|    } while (0)
  |  |  ------------------
  |  |  |  Branch (107:14): [Folded, False: 15]
  |  |  ------------------
  ------------------
 3908|     15|    }
 3909|    203|    if (instruction->disp_size)
  ------------------
  |  Branch (3909:9): [True: 72, False: 131]
  ------------------
 3910|     72|    {
 3911|     72|        ZYAN_CHECK(ZydisEmitUInt(instruction->disp, instruction->disp_size / 8, buffer));
  ------------------
  |  |  100|     72|    do \
  |  |  101|     72|    { \
  |  |  102|     72|        const ZyanStatus status_047620348 = (status); \
  |  |  103|     72|        if (!ZYAN_SUCCESS(status_047620348)) \
  |  |  ------------------
  |  |  |  |   82|     72|    (!((status) & 0x80000000u))
  |  |  ------------------
  |  |  |  Branch (103:13): [True: 0, False: 72]
  |  |  ------------------
  |  |  104|     72|        { \
  |  |  105|      0|            return status_047620348; \
  |  |  106|      0|        } \
  |  |  107|     72|    } while (0)
  |  |  ------------------
  |  |  |  Branch (107:14): [Folded, False: 72]
  |  |  ------------------
  ------------------
 3912|     72|    }
 3913|    203|    if (instruction->imm_size)
  ------------------
  |  Branch (3913:9): [True: 107, False: 96]
  ------------------
 3914|    107|    {
 3915|    107|        ZYAN_CHECK(ZydisEmitUInt(instruction->imm, instruction->imm_size / 8, buffer));
  ------------------
  |  |  100|    107|    do \
  |  |  101|    107|    { \
  |  |  102|    107|        const ZyanStatus status_047620348 = (status); \
  |  |  103|    107|        if (!ZYAN_SUCCESS(status_047620348)) \
  |  |  ------------------
  |  |  |  |   82|    107|    (!((status) & 0x80000000u))
  |  |  ------------------
  |  |  |  Branch (103:13): [True: 2, False: 105]
  |  |  ------------------
  |  |  104|    107|        { \
  |  |  105|      2|            return status_047620348; \
  |  |  106|      2|        } \
  |  |  107|    107|    } while (0)
  |  |  ------------------
  |  |  |  Branch (107:14): [Folded, False: 105]
  |  |  ------------------
  ------------------
 3916|    107|    }
 3917|    201|    if (instruction->encoding == ZYDIS_INSTRUCTION_ENCODING_3DNOW)
  ------------------
  |  Branch (3917:9): [True: 0, False: 201]
  ------------------
 3918|      0|    {
 3919|      0|        ZYAN_CHECK(ZydisEmitByte(instruction->opcode, buffer));
  ------------------
  |  |  100|      0|    do \
  |  |  101|      0|    { \
  |  |  102|      0|        const ZyanStatus status_047620348 = (status); \
  |  |  103|      0|        if (!ZYAN_SUCCESS(status_047620348)) \
  |  |  ------------------
  |  |  |  |   82|      0|    (!((status) & 0x80000000u))
  |  |  ------------------
  |  |  |  Branch (103:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  104|      0|        { \
  |  |  105|      0|            return status_047620348; \
  |  |  106|      0|        } \
  |  |  107|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (107:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 3920|      0|    }
 3921|       |
 3922|    201|    return ZYAN_STATUS_SUCCESS;
  ------------------
  |  |  164|    201|    ZYAN_MAKE_STATUS(0u, ZYAN_MODULE_ZYCORE, 0x00u)
  |  |  ------------------
  |  |  |  |   68|    201|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
 3923|    201|}
Encoder.c:ZydisEmitLegacyPrefixes:
 3457|    203|{
 3458|    203|    ZyanBool compressed_prefixes = ZYAN_FALSE;
  ------------------
  |  |  287|    203|#define ZYAN_FALSE 0u
  ------------------
 3459|    203|    switch (instruction->encoding)
 3460|    203|    {
 3461|      3|    case ZYDIS_INSTRUCTION_ENCODING_XOP:
  ------------------
  |  Branch (3461:5): [True: 3, False: 200]
  ------------------
 3462|      3|    case ZYDIS_INSTRUCTION_ENCODING_VEX:
  ------------------
  |  Branch (3462:5): [True: 0, False: 203]
  ------------------
 3463|     41|    case ZYDIS_INSTRUCTION_ENCODING_EVEX:
  ------------------
  |  Branch (3463:5): [True: 38, False: 165]
  ------------------
 3464|     41|    case ZYDIS_INSTRUCTION_ENCODING_MVEX:
  ------------------
  |  Branch (3464:5): [True: 0, False: 203]
  ------------------
 3465|     41|        compressed_prefixes = ZYAN_TRUE;
  ------------------
  |  |  288|     41|#define ZYAN_TRUE  1u
  ------------------
 3466|     41|        break;
 3467|    162|    default:
  ------------------
  |  Branch (3467:5): [True: 162, False: 41]
  ------------------
 3468|    162|        break;
 3469|    203|    }
 3470|       |
 3471|       |    // Group 1
 3472|    203|    if (instruction->attributes & ZYDIS_ATTRIB_HAS_LOCK)
  ------------------
  |  |  656|    203|#define ZYDIS_ATTRIB_HAS_LOCK                   (1ULL << 27)
  ------------------
  |  Branch (3472:9): [True: 3, False: 200]
  ------------------
 3473|      3|    {
 3474|      3|        ZYAN_CHECK(ZydisEmitByte(0xF0, buffer));
  ------------------
  |  |  100|      3|    do \
  |  |  101|      3|    { \
  |  |  102|      3|        const ZyanStatus status_047620348 = (status); \
  |  |  103|      3|        if (!ZYAN_SUCCESS(status_047620348)) \
  |  |  ------------------
  |  |  |  |   82|      3|    (!((status) & 0x80000000u))
  |  |  ------------------
  |  |  |  Branch (103:13): [True: 0, False: 3]
  |  |  ------------------
  |  |  104|      3|        { \
  |  |  105|      0|            return status_047620348; \
  |  |  106|      0|        } \
  |  |  107|      3|    } while (0)
  |  |  ------------------
  |  |  |  Branch (107:14): [Folded, False: 3]
  |  |  ------------------
  ------------------
 3475|      3|    }
 3476|    203|    if (!compressed_prefixes)
  ------------------
  |  Branch (3476:9): [True: 162, False: 41]
  ------------------
 3477|    162|    {
 3478|    162|        if (instruction->attributes & (ZYDIS_ATTRIB_HAS_REPNE |
  ------------------
  |  |  672|    162|#define ZYDIS_ATTRIB_HAS_REPNE                  (1ULL << 30)
  ------------------
  |  Branch (3478:13): [True: 9, False: 153]
  ------------------
 3479|    162|                                       ZYDIS_ATTRIB_HAS_BND |
  ------------------
  |  |  680|    162|#define ZYDIS_ATTRIB_HAS_BND                    (1ULL << 31)
  ------------------
 3480|    162|                                       ZYDIS_ATTRIB_HAS_XACQUIRE))
  ------------------
  |  |  684|    162|#define ZYDIS_ATTRIB_HAS_XACQUIRE               (1ULL << 32)
  ------------------
 3481|      9|        {
 3482|      9|            ZYAN_CHECK(ZydisEmitByte(0xF2, buffer));
  ------------------
  |  |  100|      9|    do \
  |  |  101|      9|    { \
  |  |  102|      9|        const ZyanStatus status_047620348 = (status); \
  |  |  103|      9|        if (!ZYAN_SUCCESS(status_047620348)) \
  |  |  ------------------
  |  |  |  |   82|      9|    (!((status) & 0x80000000u))
  |  |  ------------------
  |  |  |  Branch (103:13): [True: 0, False: 9]
  |  |  ------------------
  |  |  104|      9|        { \
  |  |  105|      0|            return status_047620348; \
  |  |  106|      0|        } \
  |  |  107|      9|    } while (0)
  |  |  ------------------
  |  |  |  Branch (107:14): [Folded, False: 9]
  |  |  ------------------
  ------------------
 3483|      9|        }
 3484|    162|        if (instruction->attributes & (ZYDIS_ATTRIB_HAS_REP |
  ------------------
  |  |  660|    162|#define ZYDIS_ATTRIB_HAS_REP                    (1ULL << 28)
  ------------------
  |  Branch (3484:13): [True: 7, False: 155]
  ------------------
 3485|    162|                                       ZYDIS_ATTRIB_HAS_REPE |
  ------------------
  |  |  664|    162|#define ZYDIS_ATTRIB_HAS_REPE                   (1ULL << 29)
  ------------------
 3486|    162|                                       ZYDIS_ATTRIB_HAS_XRELEASE))
  ------------------
  |  |  688|    162|#define ZYDIS_ATTRIB_HAS_XRELEASE               (1ULL << 33)
  ------------------
 3487|      7|        {
 3488|      7|            ZYAN_CHECK(ZydisEmitByte(0xF3, buffer));
  ------------------
  |  |  100|      7|    do \
  |  |  101|      7|    { \
  |  |  102|      7|        const ZyanStatus status_047620348 = (status); \
  |  |  103|      7|        if (!ZYAN_SUCCESS(status_047620348)) \
  |  |  ------------------
  |  |  |  |   82|      7|    (!((status) & 0x80000000u))
  |  |  ------------------
  |  |  |  Branch (103:13): [True: 0, False: 7]
  |  |  ------------------
  |  |  104|      7|        { \
  |  |  105|      0|            return status_047620348; \
  |  |  106|      0|        } \
  |  |  107|      7|    } while (0)
  |  |  ------------------
  |  |  |  Branch (107:14): [Folded, False: 7]
  |  |  ------------------
  ------------------
 3489|      7|        }
 3490|    162|    }
 3491|       |
 3492|       |    // Group 2
 3493|    203|    if (instruction->attributes & (ZYDIS_ATTRIB_HAS_SEGMENT_CS |
  ------------------
  |  |  704|    203|#define ZYDIS_ATTRIB_HAS_SEGMENT_CS             (1ULL << 37)
  ------------------
  |  Branch (3493:9): [True: 2, False: 201]
  ------------------
 3494|    203|                                   ZYDIS_ATTRIB_HAS_BRANCH_NOT_TAKEN))
  ------------------
  |  |  692|    203|#define ZYDIS_ATTRIB_HAS_BRANCH_NOT_TAKEN       (1ULL << 34)
  ------------------
 3495|      2|    {
 3496|      2|        ZYAN_CHECK(ZydisEmitByte(0x2E, buffer));
  ------------------
  |  |  100|      2|    do \
  |  |  101|      2|    { \
  |  |  102|      2|        const ZyanStatus status_047620348 = (status); \
  |  |  103|      2|        if (!ZYAN_SUCCESS(status_047620348)) \
  |  |  ------------------
  |  |  |  |   82|      2|    (!((status) & 0x80000000u))
  |  |  ------------------
  |  |  |  Branch (103:13): [True: 0, False: 2]
  |  |  ------------------
  |  |  104|      2|        { \
  |  |  105|      0|            return status_047620348; \
  |  |  106|      0|        } \
  |  |  107|      2|    } while (0)
  |  |  ------------------
  |  |  |  Branch (107:14): [Folded, False: 2]
  |  |  ------------------
  ------------------
 3497|      2|    }
 3498|    203|    if (instruction->attributes & ZYDIS_ATTRIB_HAS_SEGMENT_SS)
  ------------------
  |  |  708|    203|#define ZYDIS_ATTRIB_HAS_SEGMENT_SS             (1ULL << 38)
  ------------------
  |  Branch (3498:9): [True: 0, False: 203]
  ------------------
 3499|      0|    {
 3500|      0|        ZYAN_CHECK(ZydisEmitByte(0x36, buffer));
  ------------------
  |  |  100|      0|    do \
  |  |  101|      0|    { \
  |  |  102|      0|        const ZyanStatus status_047620348 = (status); \
  |  |  103|      0|        if (!ZYAN_SUCCESS(status_047620348)) \
  |  |  ------------------
  |  |  |  |   82|      0|    (!((status) & 0x80000000u))
  |  |  ------------------
  |  |  |  Branch (103:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  104|      0|        { \
  |  |  105|      0|            return status_047620348; \
  |  |  106|      0|        } \
  |  |  107|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (107:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 3501|      0|    }
 3502|    203|    if (instruction->attributes & (ZYDIS_ATTRIB_HAS_SEGMENT_DS |
  ------------------
  |  |  712|    203|#define ZYDIS_ATTRIB_HAS_SEGMENT_DS             (1ULL << 39)
  ------------------
  |  Branch (3502:9): [True: 3, False: 200]
  ------------------
 3503|    203|                                   ZYDIS_ATTRIB_HAS_BRANCH_TAKEN))
  ------------------
  |  |  696|    203|#define ZYDIS_ATTRIB_HAS_BRANCH_TAKEN           (1ULL << 35)
  ------------------
 3504|      3|    {
 3505|      3|        ZYAN_CHECK(ZydisEmitByte(0x3E, buffer));
  ------------------
  |  |  100|      3|    do \
  |  |  101|      3|    { \
  |  |  102|      3|        const ZyanStatus status_047620348 = (status); \
  |  |  103|      3|        if (!ZYAN_SUCCESS(status_047620348)) \
  |  |  ------------------
  |  |  |  |   82|      3|    (!((status) & 0x80000000u))
  |  |  ------------------
  |  |  |  Branch (103:13): [True: 0, False: 3]
  |  |  ------------------
  |  |  104|      3|        { \
  |  |  105|      0|            return status_047620348; \
  |  |  106|      0|        } \
  |  |  107|      3|    } while (0)
  |  |  ------------------
  |  |  |  Branch (107:14): [Folded, False: 3]
  |  |  ------------------
  ------------------
 3506|      3|    }
 3507|    203|    if (instruction->attributes & ZYDIS_ATTRIB_HAS_SEGMENT_ES)
  ------------------
  |  |  716|    203|#define ZYDIS_ATTRIB_HAS_SEGMENT_ES             (1ULL << 40)
  ------------------
  |  Branch (3507:9): [True: 0, False: 203]
  ------------------
 3508|      0|    {
 3509|      0|        ZYAN_CHECK(ZydisEmitByte(0x26, buffer));
  ------------------
  |  |  100|      0|    do \
  |  |  101|      0|    { \
  |  |  102|      0|        const ZyanStatus status_047620348 = (status); \
  |  |  103|      0|        if (!ZYAN_SUCCESS(status_047620348)) \
  |  |  ------------------
  |  |  |  |   82|      0|    (!((status) & 0x80000000u))
  |  |  ------------------
  |  |  |  Branch (103:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  104|      0|        { \
  |  |  105|      0|            return status_047620348; \
  |  |  106|      0|        } \
  |  |  107|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (107:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 3510|      0|    }
 3511|    203|    if (instruction->attributes & ZYDIS_ATTRIB_HAS_SEGMENT_FS)
  ------------------
  |  |  720|    203|#define ZYDIS_ATTRIB_HAS_SEGMENT_FS             (1ULL << 41)
  ------------------
  |  Branch (3511:9): [True: 9, False: 194]
  ------------------
 3512|      9|    {
 3513|      9|        ZYAN_CHECK(ZydisEmitByte(0x64, buffer));
  ------------------
  |  |  100|      9|    do \
  |  |  101|      9|    { \
  |  |  102|      9|        const ZyanStatus status_047620348 = (status); \
  |  |  103|      9|        if (!ZYAN_SUCCESS(status_047620348)) \
  |  |  ------------------
  |  |  |  |   82|      9|    (!((status) & 0x80000000u))
  |  |  ------------------
  |  |  |  Branch (103:13): [True: 0, False: 9]
  |  |  ------------------
  |  |  104|      9|        { \
  |  |  105|      0|            return status_047620348; \
  |  |  106|      0|        } \
  |  |  107|      9|    } while (0)
  |  |  ------------------
  |  |  |  Branch (107:14): [Folded, False: 9]
  |  |  ------------------
  ------------------
 3514|      9|    }
 3515|    203|    if (instruction->attributes & ZYDIS_ATTRIB_HAS_SEGMENT_GS)
  ------------------
  |  |  724|    203|#define ZYDIS_ATTRIB_HAS_SEGMENT_GS             (1ULL << 42)
  ------------------
  |  Branch (3515:9): [True: 5, False: 198]
  ------------------
 3516|      5|    {
 3517|      5|        ZYAN_CHECK(ZydisEmitByte(0x65, buffer));
  ------------------
  |  |  100|      5|    do \
  |  |  101|      5|    { \
  |  |  102|      5|        const ZyanStatus status_047620348 = (status); \
  |  |  103|      5|        if (!ZYAN_SUCCESS(status_047620348)) \
  |  |  ------------------
  |  |  |  |   82|      5|    (!((status) & 0x80000000u))
  |  |  ------------------
  |  |  |  Branch (103:13): [True: 0, False: 5]
  |  |  ------------------
  |  |  104|      5|        { \
  |  |  105|      0|            return status_047620348; \
  |  |  106|      0|        } \
  |  |  107|      5|    } while (0)
  |  |  ------------------
  |  |  |  Branch (107:14): [Folded, False: 5]
  |  |  ------------------
  ------------------
 3518|      5|    }
 3519|    203|    if (instruction->attributes & ZYDIS_ATTRIB_HAS_NOTRACK)
  ------------------
  |  |  700|    203|#define ZYDIS_ATTRIB_HAS_NOTRACK                (1ULL << 36)
  ------------------
  |  Branch (3519:9): [True: 1, False: 202]
  ------------------
 3520|      1|    {
 3521|      1|        ZYAN_CHECK(ZydisEmitByte(0x3E, buffer));
  ------------------
  |  |  100|      1|    do \
  |  |  101|      1|    { \
  |  |  102|      1|        const ZyanStatus status_047620348 = (status); \
  |  |  103|      1|        if (!ZYAN_SUCCESS(status_047620348)) \
  |  |  ------------------
  |  |  |  |   82|      1|    (!((status) & 0x80000000u))
  |  |  ------------------
  |  |  |  Branch (103:13): [True: 0, False: 1]
  |  |  ------------------
  |  |  104|      1|        { \
  |  |  105|      0|            return status_047620348; \
  |  |  106|      0|        } \
  |  |  107|      1|    } while (0)
  |  |  ------------------
  |  |  |  Branch (107:14): [Folded, False: 1]
  |  |  ------------------
  ------------------
 3522|      1|    }
 3523|       |
 3524|       |    // Group 3
 3525|    203|    if (!compressed_prefixes)
  ------------------
  |  Branch (3525:9): [True: 162, False: 41]
  ------------------
 3526|    162|    {
 3527|    162|        if (instruction->attributes & ZYDIS_ATTRIB_HAS_OPERANDSIZE)
  ------------------
  |  |  737|    162|#define ZYDIS_ATTRIB_HAS_OPERANDSIZE            (1ULL << 43) // TODO: rename
  ------------------
  |  Branch (3527:13): [True: 45, False: 117]
  ------------------
 3528|     45|        {
 3529|     45|            ZYAN_CHECK(ZydisEmitByte(0x66, buffer));
  ------------------
  |  |  100|     45|    do \
  |  |  101|     45|    { \
  |  |  102|     45|        const ZyanStatus status_047620348 = (status); \
  |  |  103|     45|        if (!ZYAN_SUCCESS(status_047620348)) \
  |  |  ------------------
  |  |  |  |   82|     45|    (!((status) & 0x80000000u))
  |  |  ------------------
  |  |  |  Branch (103:13): [True: 0, False: 45]
  |  |  ------------------
  |  |  104|     45|        { \
  |  |  105|      0|            return status_047620348; \
  |  |  106|      0|        } \
  |  |  107|     45|    } while (0)
  |  |  ------------------
  |  |  |  Branch (107:14): [Folded, False: 45]
  |  |  ------------------
  ------------------
 3530|     45|        }
 3531|    162|    }
 3532|       |
 3533|       |    // Group 4
 3534|    203|    if (instruction->attributes & ZYDIS_ATTRIB_HAS_ADDRESSSIZE)
  ------------------
  |  |  741|    203|#define ZYDIS_ATTRIB_HAS_ADDRESSSIZE            (1ULL << 44) // TODO: rename
  ------------------
  |  Branch (3534:9): [True: 37, False: 166]
  ------------------
 3535|     37|    {
 3536|     37|        ZYAN_CHECK(ZydisEmitByte(0x67, buffer));
  ------------------
  |  |  100|     37|    do \
  |  |  101|     37|    { \
  |  |  102|     37|        const ZyanStatus status_047620348 = (status); \
  |  |  103|     37|        if (!ZYAN_SUCCESS(status_047620348)) \
  |  |  ------------------
  |  |  |  |   82|     37|    (!((status) & 0x80000000u))
  |  |  ------------------
  |  |  |  Branch (103:13): [True: 0, False: 37]
  |  |  ------------------
  |  |  104|     37|        { \
  |  |  105|      0|            return status_047620348; \
  |  |  106|      0|        } \
  |  |  107|     37|    } while (0)
  |  |  ------------------
  |  |  |  Branch (107:14): [Folded, False: 37]
  |  |  ------------------
  ------------------
 3537|     37|    }
 3538|       |
 3539|    203|    return ZYAN_STATUS_SUCCESS;
  ------------------
  |  |  164|    203|    ZYAN_MAKE_STATUS(0u, ZYAN_MODULE_ZYCORE, 0x00u)
  |  |  ------------------
  |  |  |  |   68|    203|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
 3540|    203|}
Encoder.c:ZydisEmitRex:
 3596|    162|{
 3597|    162|    const ZyanU8 rex2 = ZydisEncodeRex2(instruction);
 3598|    162|    if ((rex2 & 0x70) || (instruction->attributes & ZYDIS_ATTRIB_HAS_REX2))
  ------------------
  |  |  751|    139|#define ZYDIS_ATTRIB_HAS_REX2                   (1ULL << 46) // TODO: rebase
  ------------------
  |  Branch (3598:9): [True: 23, False: 139]
  |  Branch (3598:26): [True: 0, False: 139]
  ------------------
 3599|     23|    {
 3600|     23|        instruction->opcode_map = ZYDIS_OPCODE_MAP_DEFAULT;
 3601|     23|        ZYAN_CHECK(ZydisEmitByte(0xD5, buffer));
  ------------------
  |  |  100|     23|    do \
  |  |  101|     23|    { \
  |  |  102|     23|        const ZyanStatus status_047620348 = (status); \
  |  |  103|     23|        if (!ZYAN_SUCCESS(status_047620348)) \
  |  |  ------------------
  |  |  |  |   82|     23|    (!((status) & 0x80000000u))
  |  |  ------------------
  |  |  |  Branch (103:13): [True: 0, False: 23]
  |  |  ------------------
  |  |  104|     23|        { \
  |  |  105|      0|            return status_047620348; \
  |  |  106|      0|        } \
  |  |  107|     23|    } while (0)
  |  |  ------------------
  |  |  |  Branch (107:14): [Folded, False: 23]
  |  |  ------------------
  ------------------
 3602|     23|        ZYAN_CHECK(ZydisEmitByte(rex2, buffer));
  ------------------
  |  |  100|     23|    do \
  |  |  101|     23|    { \
  |  |  102|     23|        const ZyanStatus status_047620348 = (status); \
  |  |  103|     23|        if (!ZYAN_SUCCESS(status_047620348)) \
  |  |  ------------------
  |  |  |  |   82|     23|    (!((status) & 0x80000000u))
  |  |  ------------------
  |  |  |  Branch (103:13): [True: 0, False: 23]
  |  |  ------------------
  |  |  104|     23|        { \
  |  |  105|      0|            return status_047620348; \
  |  |  106|      0|        } \
  |  |  107|     23|    } while (0)
  |  |  ------------------
  |  |  |  Branch (107:14): [Folded, False: 23]
  |  |  ------------------
  ------------------
 3603|     23|        return ZYAN_STATUS_SUCCESS;
  ------------------
  |  |  164|     23|    ZYAN_MAKE_STATUS(0u, ZYAN_MODULE_ZYCORE, 0x00u)
  |  |  ------------------
  |  |  |  |   68|     23|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
 3604|     23|    }
 3605|       |
 3606|    139|    const ZyanU8 rex = rex2 & 0x0F;
 3607|    139|    if (rex || (instruction->attributes & ZYDIS_ATTRIB_HAS_REX))
  ------------------
  |  |  544|     93|#define ZYDIS_ATTRIB_HAS_REX                    (1ULL <<  2)
  ------------------
  |  Branch (3607:9): [True: 46, False: 93]
  |  Branch (3607:16): [True: 3, False: 90]
  ------------------
 3608|     49|    {
 3609|     49|        ZYAN_CHECK(ZydisEmitByte(0x40 | rex, buffer));
  ------------------
  |  |  100|     49|    do \
  |  |  101|     49|    { \
  |  |  102|     49|        const ZyanStatus status_047620348 = (status); \
  |  |  103|     49|        if (!ZYAN_SUCCESS(status_047620348)) \
  |  |  ------------------
  |  |  |  |   82|     49|    (!((status) & 0x80000000u))
  |  |  ------------------
  |  |  |  Branch (103:13): [True: 0, False: 49]
  |  |  ------------------
  |  |  104|     49|        { \
  |  |  105|      0|            return status_047620348; \
  |  |  106|      0|        } \
  |  |  107|     49|    } while (0)
  |  |  ------------------
  |  |  |  Branch (107:14): [Folded, False: 49]
  |  |  ------------------
  ------------------
 3610|     49|    }
 3611|       |
 3612|    139|    return ZYAN_STATUS_SUCCESS;
  ------------------
  |  |  164|    139|    ZYAN_MAKE_STATUS(0u, ZYAN_MODULE_ZYCORE, 0x00u)
  |  |  ------------------
  |  |  |  |   68|    139|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
 3613|    139|}
Encoder.c:ZydisEncodeRex2:
 3550|    203|{
 3551|    203|    ZyanU8 rex2 = 0;
 3552|    203|    if (instruction->attributes & ZYDIS_ATTRIB_HAS_SIB)
  ------------------
  |  |  540|    203|#define ZYDIS_ATTRIB_HAS_SIB                    (1ULL <<  1)
  ------------------
  |  Branch (3552:9): [True: 15, False: 188]
  ------------------
 3553|     15|    {
 3554|     15|        ZYAN_ASSERT(instruction->attributes & ZYDIS_ATTRIB_HAS_MODRM);
  ------------------
  |  |  381|     15|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (3554:9): [True: 0, False: 15]
  |  Branch (3554:9): [True: 15, False: 0]
  ------------------
 3555|     15|        rex2 |=
 3556|     15|            (instruction->base & 0x08 ? 0x01 : 0) |
  ------------------
  |  Branch (3556:14): [True: 2, False: 13]
  ------------------
 3557|     15|            (instruction->base & 0x10 ? 0x10 : 0) |
  ------------------
  |  Branch (3557:14): [True: 2, False: 13]
  ------------------
 3558|     15|            (instruction->index & 0x08 ? 0x02 : 0) |
  ------------------
  |  Branch (3558:14): [True: 0, False: 15]
  ------------------
 3559|     15|            (instruction->index & 0x10 ? 0x20 : 0) |
  ------------------
  |  Branch (3559:14): [True: 2, False: 13]
  ------------------
 3560|     15|            (instruction->reg & 0x08 ? 0x04 : 0) |
  ------------------
  |  Branch (3560:14): [True: 6, False: 9]
  ------------------
 3561|     15|            (instruction->reg & 0x10 ? 0x40 : 0);
  ------------------
  |  Branch (3561:14): [True: 0, False: 15]
  ------------------
 3562|     15|    }
 3563|    188|    else
 3564|    188|    {
 3565|    188|        rex2 |=
 3566|    188|            (instruction->rm & 0x08 ? 0x01 : 0) |
  ------------------
  |  Branch (3566:14): [True: 24, False: 164]
  ------------------
 3567|    188|            (instruction->rm & 0x10 ? 0x10 : 0);
  ------------------
  |  Branch (3567:14): [True: 26, False: 162]
  ------------------
 3568|    188|        if (instruction->attributes & ZYDIS_ATTRIB_HAS_MODRM)
  ------------------
  |  |  536|    188|#define ZYDIS_ATTRIB_HAS_MODRM                  (1ULL <<  0)
  ------------------
  |  Branch (3568:13): [True: 93, False: 95]
  ------------------
 3569|     93|        {
 3570|     93|            rex2 |=
 3571|     93|                (instruction->reg & 0x08 ? 0x04 : 0) |
  ------------------
  |  Branch (3571:18): [True: 29, False: 64]
  ------------------
 3572|     93|                (instruction->reg & 0x10 ? 0x40 : 0);
  ------------------
  |  Branch (3572:18): [True: 22, False: 71]
  ------------------
 3573|     93|        }
 3574|    188|    }
 3575|    203|    if (instruction->opcode_map == ZYDIS_OPCODE_MAP_0F)
  ------------------
  |  Branch (3575:9): [True: 41, False: 162]
  ------------------
 3576|     41|    {
 3577|     41|        rex2 |= 0x80;
 3578|     41|    }
 3579|    203|    if (instruction->rex_w)
  ------------------
  |  Branch (3579:9): [True: 66, False: 137]
  ------------------
 3580|     66|    {
 3581|     66|        rex2 |= 0x08;
 3582|     66|    }
 3583|       |
 3584|    203|    return rex2;
 3585|    203|}
Encoder.c:ZydisEmitXop:
 3676|      3|{
 3677|      3|    ZyanU8 mmmmm, pp, vvvv, rex2;
 3678|      3|    ZydisEncodeVexCommons(instruction, &mmmmm, &pp, &vvvv, &rex2);
 3679|      3|    ZYAN_ASSERT(instruction->vector_length <= 1);
  ------------------
  |  |  381|      3|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (3679:5): [True: 0, False: 3]
  |  Branch (3679:5): [True: 3, False: 0]
  ------------------
 3680|      3|    const ZyanU8 b1 = (((~rex2) & 0x07) << 5) | mmmmm;
 3681|      3|    const ZyanU8 b2 = ((rex2 & 0x08) << 4) |
 3682|      3|                      ((vvvv & 0xF) << 3) |
 3683|      3|                      (instruction->vector_length << 2) |
 3684|      3|                      pp;
 3685|      3|    ZYAN_CHECK(ZydisEmitByte(0x8F, buffer));
  ------------------
  |  |  100|      3|    do \
  |  |  101|      3|    { \
  |  |  102|      3|        const ZyanStatus status_047620348 = (status); \
  |  |  103|      3|        if (!ZYAN_SUCCESS(status_047620348)) \
  |  |  ------------------
  |  |  |  |   82|      3|    (!((status) & 0x80000000u))
  |  |  ------------------
  |  |  |  Branch (103:13): [True: 0, False: 3]
  |  |  ------------------
  |  |  104|      3|        { \
  |  |  105|      0|            return status_047620348; \
  |  |  106|      0|        } \
  |  |  107|      3|    } while (0)
  |  |  ------------------
  |  |  |  Branch (107:14): [Folded, False: 3]
  |  |  ------------------
  ------------------
 3686|      3|    ZYAN_CHECK(ZydisEmitByte(b1, buffer));
  ------------------
  |  |  100|      3|    do \
  |  |  101|      3|    { \
  |  |  102|      3|        const ZyanStatus status_047620348 = (status); \
  |  |  103|      3|        if (!ZYAN_SUCCESS(status_047620348)) \
  |  |  ------------------
  |  |  |  |   82|      3|    (!((status) & 0x80000000u))
  |  |  ------------------
  |  |  |  Branch (103:13): [True: 0, False: 3]
  |  |  ------------------
  |  |  104|      3|        { \
  |  |  105|      0|            return status_047620348; \
  |  |  106|      0|        } \
  |  |  107|      3|    } while (0)
  |  |  ------------------
  |  |  |  Branch (107:14): [Folded, False: 3]
  |  |  ------------------
  ------------------
 3687|      3|    ZYAN_CHECK(ZydisEmitByte(b2, buffer));
  ------------------
  |  |  100|      3|    do \
  |  |  101|      3|    { \
  |  |  102|      3|        const ZyanStatus status_047620348 = (status); \
  |  |  103|      3|        if (!ZYAN_SUCCESS(status_047620348)) \
  |  |  ------------------
  |  |  |  |   82|      3|    (!((status) & 0x80000000u))
  |  |  ------------------
  |  |  |  Branch (103:13): [True: 0, False: 3]
  |  |  ------------------
  |  |  104|      3|        { \
  |  |  105|      0|            return status_047620348; \
  |  |  106|      0|        } \
  |  |  107|      3|    } while (0)
  |  |  ------------------
  |  |  |  Branch (107:14): [Folded, False: 3]
  |  |  ------------------
  ------------------
 3688|      3|    return ZYAN_STATUS_SUCCESS;
  ------------------
  |  |  164|      3|    ZYAN_MAKE_STATUS(0u, ZYAN_MODULE_ZYCORE, 0x00u)
  |  |  ------------------
  |  |  |  |   68|      3|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
 3689|      3|}
Encoder.c:ZydisEncodeVexCommons:
 3626|     41|{
 3627|     41|    switch (instruction->opcode_map)
 3628|     41|    {
 3629|      0|    case ZYDIS_OPCODE_MAP_DEFAULT:
  ------------------
  |  Branch (3629:5): [True: 0, False: 41]
  ------------------
 3630|      7|    case ZYDIS_OPCODE_MAP_0F:
  ------------------
  |  Branch (3630:5): [True: 7, False: 34]
  ------------------
 3631|     18|    case ZYDIS_OPCODE_MAP_0F38:
  ------------------
  |  Branch (3631:5): [True: 11, False: 30]
  ------------------
 3632|     18|    case ZYDIS_OPCODE_MAP_0F3A:
  ------------------
  |  Branch (3632:5): [True: 0, False: 41]
  ------------------
 3633|     38|    case ZYDIS_OPCODE_MAP_MAP4:
  ------------------
  |  Branch (3633:5): [True: 20, False: 21]
  ------------------
 3634|     38|    case ZYDIS_OPCODE_MAP_MAP5:
  ------------------
  |  Branch (3634:5): [True: 0, False: 41]
  ------------------
 3635|     38|    case ZYDIS_OPCODE_MAP_MAP6:
  ------------------
  |  Branch (3635:5): [True: 0, False: 41]
  ------------------
 3636|     38|    case ZYDIS_OPCODE_MAP_MAP7:
  ------------------
  |  Branch (3636:5): [True: 0, False: 41]
  ------------------
 3637|     38|        *mmmmm = (ZyanU8)instruction->opcode_map;
 3638|     38|        break;
 3639|      0|    case ZYDIS_OPCODE_MAP_XOP8:
  ------------------
  |  Branch (3639:5): [True: 0, False: 41]
  ------------------
 3640|      0|    case ZYDIS_OPCODE_MAP_XOP9:
  ------------------
  |  Branch (3640:5): [True: 0, False: 41]
  ------------------
 3641|      3|    case ZYDIS_OPCODE_MAP_XOPA:
  ------------------
  |  Branch (3641:5): [True: 3, False: 38]
  ------------------
 3642|      3|        *mmmmm = 8 + ((ZyanU8)instruction->opcode_map - ZYDIS_OPCODE_MAP_XOP8);
 3643|      3|        break;
 3644|      0|    default:
  ------------------
  |  Branch (3644:5): [True: 0, False: 41]
  ------------------
 3645|      0|        ZYAN_UNREACHABLE;
  ------------------
  |  |  431|      0|#   define ZYAN_UNREACHABLE { assert(0); abort(); }
  ------------------
  |  Branch (3645:9): [Folded, False: 0]
  |  Branch (3645:9): [Folded, False: 0]
  ------------------
 3646|     41|    }
 3647|     41|    instruction->opcode_map = ZYDIS_OPCODE_MAP_DEFAULT;
 3648|       |
 3649|     41|    *pp = 0;
 3650|     41|    if (instruction->attributes & ZYDIS_ATTRIB_HAS_OPERANDSIZE)
  ------------------
  |  |  737|     41|#define ZYDIS_ATTRIB_HAS_OPERANDSIZE            (1ULL << 43) // TODO: rename
  ------------------
  |  Branch (3650:9): [True: 15, False: 26]
  ------------------
 3651|     15|    {
 3652|     15|        *pp = 1;
 3653|     15|    }
 3654|     26|    else if (instruction->attributes & ZYDIS_ATTRIB_HAS_REP)
  ------------------
  |  |  660|     26|#define ZYDIS_ATTRIB_HAS_REP                    (1ULL << 28)
  ------------------
  |  Branch (3654:14): [True: 2, False: 24]
  ------------------
 3655|      2|    {
 3656|      2|        *pp = 2;
 3657|      2|    }
 3658|     24|    else if (instruction->attributes & ZYDIS_ATTRIB_HAS_REPNE)
  ------------------
  |  |  672|     24|#define ZYDIS_ATTRIB_HAS_REPNE                  (1ULL << 30)
  ------------------
  |  Branch (3658:14): [True: 0, False: 24]
  ------------------
 3659|      0|    {
 3660|      0|        *pp = 3;
 3661|      0|    }
 3662|       |
 3663|     41|    *vvvv = ~instruction->vvvv;
 3664|     41|    *rex2 = ZydisEncodeRex2(instruction);
 3665|     41|}
Encoder.c:ZydisEmitEvex:
 3773|     38|{
 3774|     38|    ZyanU8 p0, p1, p2, vvvvv;
 3775|     38|    ZydisEncodeEvexCommons(instruction, &p0, &p1, &vvvvv);
 3776|     38|    if (instruction->scc == ZYDIS_SCC_NONE)
  ------------------
  |  Branch (3776:9): [True: 33, False: 5]
  ------------------
 3777|     33|    {
 3778|     33|        p2 =
 3779|     33|            (instruction->zeroing ? 0x80 : 0) |                                 /* z */
  ------------------
  |  Branch (3779:14): [True: 2, False: 31]
  ------------------
 3780|     33|            (instruction->vector_length << 5) |                                 /* LL */
 3781|     33|            (instruction->attributes & ZYDIS_ATTRIB_HAS_EVEX_B ? 0x10 : 0) |    /* b/ND */
  ------------------
  |  |  747|     33|#define ZYDIS_ATTRIB_HAS_EVEX_B                 (1ULL << 45) // TODO: rename
  ------------------
  |  Branch (3781:14): [True: 9, False: 24]
  ------------------
 3782|     33|            ((vvvvv & 0x10) >> 1) |                                             /* V4 */
 3783|     33|            (instruction->nf ? 0x04 : 0) |                                      /* NF */
  ------------------
  |  Branch (3783:14): [True: 3, False: 30]
  ------------------
 3784|     33|            (instruction->mask);                                                /* aaa */
 3785|     33|        if ((instruction->is_vsib) && (instruction->index & 0x10))
  ------------------
  |  Branch (3785:13): [True: 6, False: 27]
  |  Branch (3785:39): [True: 0, False: 6]
  ------------------
 3786|      0|        {
 3787|      0|            p1 |= 0x04; /* X4 */
 3788|      0|            p2 &= 0xF7; /* V4 */
 3789|      0|        }
 3790|     33|    }
 3791|      5|    else
 3792|      5|    {
 3793|      5|        p1 ^= 0x78; /* ~vvvv */
 3794|      5|        p2 = (ZyanU8)(instruction->scc - ZYDIS_SCC_O);
 3795|      5|    }
 3796|       |
 3797|     38|    ZYAN_CHECK(ZydisEmitByte(0x62, buffer));
  ------------------
  |  |  100|     38|    do \
  |  |  101|     38|    { \
  |  |  102|     38|        const ZyanStatus status_047620348 = (status); \
  |  |  103|     38|        if (!ZYAN_SUCCESS(status_047620348)) \
  |  |  ------------------
  |  |  |  |   82|     38|    (!((status) & 0x80000000u))
  |  |  ------------------
  |  |  |  Branch (103:13): [True: 0, False: 38]
  |  |  ------------------
  |  |  104|     38|        { \
  |  |  105|      0|            return status_047620348; \
  |  |  106|      0|        } \
  |  |  107|     38|    } while (0)
  |  |  ------------------
  |  |  |  Branch (107:14): [Folded, False: 38]
  |  |  ------------------
  ------------------
 3798|     38|    ZYAN_CHECK(ZydisEmitByte(p0, buffer));
  ------------------
  |  |  100|     38|    do \
  |  |  101|     38|    { \
  |  |  102|     38|        const ZyanStatus status_047620348 = (status); \
  |  |  103|     38|        if (!ZYAN_SUCCESS(status_047620348)) \
  |  |  ------------------
  |  |  |  |   82|     38|    (!((status) & 0x80000000u))
  |  |  ------------------
  |  |  |  Branch (103:13): [True: 0, False: 38]
  |  |  ------------------
  |  |  104|     38|        { \
  |  |  105|      0|            return status_047620348; \
  |  |  106|      0|        } \
  |  |  107|     38|    } while (0)
  |  |  ------------------
  |  |  |  Branch (107:14): [Folded, False: 38]
  |  |  ------------------
  ------------------
 3799|     38|    ZYAN_CHECK(ZydisEmitByte(p1, buffer));
  ------------------
  |  |  100|     38|    do \
  |  |  101|     38|    { \
  |  |  102|     38|        const ZyanStatus status_047620348 = (status); \
  |  |  103|     38|        if (!ZYAN_SUCCESS(status_047620348)) \
  |  |  ------------------
  |  |  |  |   82|     38|    (!((status) & 0x80000000u))
  |  |  ------------------
  |  |  |  Branch (103:13): [True: 0, False: 38]
  |  |  ------------------
  |  |  104|     38|        { \
  |  |  105|      0|            return status_047620348; \
  |  |  106|      0|        } \
  |  |  107|     38|    } while (0)
  |  |  ------------------
  |  |  |  Branch (107:14): [Folded, False: 38]
  |  |  ------------------
  ------------------
 3800|     38|    ZYAN_CHECK(ZydisEmitByte(p2, buffer));
  ------------------
  |  |  100|     38|    do \
  |  |  101|     38|    { \
  |  |  102|     38|        const ZyanStatus status_047620348 = (status); \
  |  |  103|     38|        if (!ZYAN_SUCCESS(status_047620348)) \
  |  |  ------------------
  |  |  |  |   82|     38|    (!((status) & 0x80000000u))
  |  |  ------------------
  |  |  |  Branch (103:13): [True: 0, False: 38]
  |  |  ------------------
  |  |  104|     38|        { \
  |  |  105|      0|            return status_047620348; \
  |  |  106|      0|        } \
  |  |  107|     38|    } while (0)
  |  |  ------------------
  |  |  |  Branch (107:14): [Folded, False: 38]
  |  |  ------------------
  ------------------
 3801|     38|    return ZYAN_STATUS_SUCCESS;
  ------------------
  |  |  164|     38|    ZYAN_MAKE_STATUS(0u, ZYAN_MODULE_ZYCORE, 0x00u)
  |  |  ------------------
  |  |  |  |   68|     38|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
 3802|     38|}
Encoder.c:ZydisEncodeEvexCommons:
 3738|     38|{
 3739|     38|    ZyanU8 mmmmm, pp, rex2;
 3740|     38|    ZydisEncodeVexCommons(instruction, &mmmmm, &pp, vvvvv, &rex2);
 3741|     38|    const ZyanU8 irex2 = ~rex2;
 3742|     38|    *p0 =
 3743|     38|        ((irex2 & 0x07) << 5) |     /* R3,X3,B3 */
 3744|     38|        ((irex2 & 0x40) >> 2) |     /* R4 */
 3745|     38|        mmmmm;
 3746|     38|    if (instruction->is_rm_vector)
  ------------------
  |  Branch (3746:9): [True: 6, False: 32]
  ------------------
 3747|      6|    {
 3748|      6|        if (instruction->rm & 0x10)
  ------------------
  |  Branch (3748:13): [True: 2, False: 4]
  ------------------
 3749|      2|        {
 3750|      2|            *p0 &= 0xBF;            /* X3 */
 3751|      2|        }
 3752|      6|    }
 3753|     32|    else
 3754|     32|    {
 3755|     32|        *p0 |= (rex2 & 0x10) >> 1;  /* B4 */
 3756|     32|    }
 3757|     38|    *p1 =
 3758|     38|        ((rex2 & 0x08) << 4) |      /* W */
 3759|     38|        ((*vvvvv & 0x0F) << 3) |    /* VVVV */
 3760|     38|        ((irex2 & 0x20) >> 3) |     /* X4/U */
 3761|     38|        pp;
 3762|     38|}
Encoder.c:ZydisEmitByte:
 3443|    763|{
 3444|    763|    return ZydisEmitUInt(byte, 1, buffer);
 3445|    763|}
Encoder.c:ZydisEmitUInt:
 3375|    942|{
 3376|    942|    ZYAN_ASSERT(size == 1 || size == 2 || size == 4 || size == 8);
  ------------------
  |  |  381|    942|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (3376:5): [True: 942, False: 0]
  |  Branch (3376:5): [True: 0, False: 0]
  |  Branch (3376:5): [True: 0, False: 0]
  |  Branch (3376:5): [True: 0, False: 0]
  |  Branch (3376:5): [True: 776, False: 166]
  |  Branch (3376:5): [True: 14, False: 152]
  |  Branch (3376:5): [True: 118, False: 34]
  |  Branch (3376:5): [True: 34, False: 0]
  ------------------
 3377|       |
 3378|    942|    const ZyanUSize new_offset = buffer->offset + size;
 3379|    942|    if (new_offset > buffer->size)
  ------------------
  |  Branch (3379:9): [True: 2, False: 940]
  ------------------
 3380|      2|    {
 3381|      2|        return ZYAN_STATUS_INSUFFICIENT_BUFFER_SIZE;
  ------------------
  |  |  218|      2|    ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ZYCORE, 0x09u)
  |  |  ------------------
  |  |  |  |   68|      2|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
 3382|      2|    }
 3383|       |
 3384|       |    // The size variable is not passed on purpose to allow the compiler
 3385|       |    // to generate better code with a known size at compile time.
 3386|    940|#if ZYAN_ENDIAN == ZYAN_LITTLE_ENDIAN
 3387|    940|    if (size == 1)
  ------------------
  |  Branch (3387:9): [True: 776, False: 164]
  ------------------
 3388|    776|    {
 3389|    776|        ZYAN_MEMCPY(buffer->buffer + buffer->offset, &data, 1);
  ------------------
  |  |  113|    776|#define ZYAN_MEMCPY     memcpy
  ------------------
 3390|    776|    }
 3391|    164|    else if (size == 2)
  ------------------
  |  Branch (3391:14): [True: 14, False: 150]
  ------------------
 3392|     14|    {
 3393|     14|        ZYAN_MEMCPY(buffer->buffer + buffer->offset, &data, 2);
  ------------------
  |  |  113|     14|#define ZYAN_MEMCPY     memcpy
  ------------------
 3394|     14|    }
 3395|    150|    else if (size == 4)
  ------------------
  |  Branch (3395:14): [True: 116, False: 34]
  ------------------
 3396|    116|    {
 3397|    116|        ZYAN_MEMCPY(buffer->buffer + buffer->offset, &data, 4);
  ------------------
  |  |  113|    116|#define ZYAN_MEMCPY     memcpy
  ------------------
 3398|    116|    }
 3399|     34|    else if (size == 8)
  ------------------
  |  Branch (3399:14): [True: 34, False: 0]
  ------------------
 3400|     34|    {
 3401|     34|        ZYAN_MEMCPY(buffer->buffer + buffer->offset, &data, 8);
  ------------------
  |  |  113|     34|#define ZYAN_MEMCPY     memcpy
  ------------------
 3402|     34|    }
 3403|       |#else
 3404|       |    if (size == 1)
 3405|       |    {
 3406|       |        ZyanU8 value = (ZyanU8)data;
 3407|       |        ZYAN_MEMCPY(buffer->buffer + buffer->offset, &value, 1);
 3408|       |    }
 3409|       |    else if (size == 2)
 3410|       |    {
 3411|       |        ZyanU16 value = ZYAN_BYTESWAP16((ZyanU16)data);
 3412|       |        ZYAN_MEMCPY(buffer->buffer + buffer->offset, &value, 2);
 3413|       |    }
 3414|       |    else if (size == 4)
 3415|       |    {
 3416|       |        ZyanU32 value = ZYAN_BYTESWAP32((ZyanU32)data);
 3417|       |        ZYAN_MEMCPY(buffer->buffer + buffer->offset, &value, 4);
 3418|       |    }
 3419|       |    else if (size == 8)
 3420|       |    {
 3421|       |        ZyanU64 value = ZYAN_BYTESWAP64((ZyanU64)data);
 3422|       |        ZYAN_MEMCPY(buffer->buffer + buffer->offset, &value, 8);
 3423|       |    }
 3424|       |#endif
 3425|      0|    else
 3426|      0|    {
 3427|      0|        ZYAN_UNREACHABLE;
  ------------------
  |  |  431|      0|#   define ZYAN_UNREACHABLE { assert(0); abort(); }
  ------------------
  |  Branch (3427:9): [Folded, False: 0]
  |  Branch (3427:9): [Folded, False: 0]
  ------------------
 3428|      0|    }
 3429|       |
 3430|    940|    buffer->offset = new_offset;
 3431|    940|    return ZYAN_STATUS_SUCCESS;
  ------------------
  |  |  164|    940|    ZYAN_MAKE_STATUS(0u, ZYAN_MODULE_ZYCORE, 0x00u)
  |  |  ------------------
  |  |  |  |   68|    940|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
 3432|    940|}
Encoder.c:ZydisGetMachineModeWidth:
  304|  3.62k|{
  305|  3.62k|    ZYAN_ASSERT((ZyanUSize)machine_mode <= ZYDIS_MACHINE_MODE_MAX_VALUE);
  ------------------
  |  |  381|  3.62k|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (305:5): [True: 0, False: 3.62k]
  |  Branch (305:5): [True: 3.62k, False: 0]
  ------------------
  306|  3.62k|    static const ZyanU8 lookup[6] =
  307|  3.62k|    {
  308|  3.62k|        /* ZYDIS_MACHINE_MODE_LONG_64 */            64,
  309|  3.62k|        /* ZYDIS_MACHINE_MODE_LONG_COMPAT_32 */     32,
  310|  3.62k|        /* ZYDIS_MACHINE_MODE_LONG_COMPAT_16 */     16,
  311|  3.62k|        /* ZYDIS_MACHINE_MODE_LEGACY_32 */          32,
  312|  3.62k|        /* ZYDIS_MACHINE_MODE_LEGACY_16 */          16,
  313|  3.62k|        /* ZYDIS_MACHINE_MODE_REAL_16 */            16,
  314|  3.62k|    };
  315|  3.62k|    return lookup[machine_mode];
  316|  3.62k|}
Encoder.c:ZydisGetSignedImmSize:
  457|    475|{
  458|    475|    if (imm >= ZYAN_INT8_MIN && imm <= ZYAN_INT8_MAX)
  ------------------
  |  |  229|    950|#   define ZYAN_INT8_MIN         INT8_MIN
  ------------------
                  if (imm >= ZYAN_INT8_MIN && imm <= ZYAN_INT8_MAX)
  ------------------
  |  |  233|    296|#   define ZYAN_INT8_MAX         INT8_MAX
  ------------------
  |  Branch (458:9): [True: 296, False: 179]
  |  Branch (458:33): [True: 61, False: 235]
  ------------------
  459|     61|    {
  460|     61|        return 8;
  461|     61|    }
  462|    414|    if (imm >= ZYAN_INT16_MIN && imm <= ZYAN_INT16_MAX)
  ------------------
  |  |  230|    828|#   define ZYAN_INT16_MIN        INT16_MIN
  ------------------
                  if (imm >= ZYAN_INT16_MIN && imm <= ZYAN_INT16_MAX)
  ------------------
  |  |  234|    263|#   define ZYAN_INT16_MAX        INT16_MAX
  ------------------
  |  Branch (462:9): [True: 263, False: 151]
  |  Branch (462:34): [True: 82, False: 181]
  ------------------
  463|     82|    {
  464|     82|        return 16;
  465|     82|    }
  466|    332|    if (imm >= ZYAN_INT32_MIN && imm <= ZYAN_INT32_MAX)
  ------------------
  |  |  231|    664|#   define ZYAN_INT32_MIN        INT32_MIN
  ------------------
                  if (imm >= ZYAN_INT32_MIN && imm <= ZYAN_INT32_MAX)
  ------------------
  |  |  235|    262|#   define ZYAN_INT32_MAX        INT32_MAX
  ------------------
  |  Branch (466:9): [True: 262, False: 70]
  |  Branch (466:34): [True: 201, False: 61]
  ------------------
  467|    201|    {
  468|    201|        return 32;
  469|    201|    }
  470|       |
  471|    131|    return 64;
  472|    332|}
Encoder.c:ZydisGetAszFromHint:
  326|  3.22k|{
  327|  3.22k|    ZYAN_ASSERT((ZyanUSize)hint <= ZYDIS_ADDRESS_SIZE_HINT_MAX_VALUE);
  ------------------
  |  |  381|  3.22k|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (327:5): [True: 0, False: 3.22k]
  |  Branch (327:5): [True: 3.22k, False: 0]
  ------------------
  328|  3.22k|    static const ZyanU8 lookup[ZYDIS_ADDRESS_SIZE_HINT_MAX_VALUE + 1] = { 0, 16, 32, 64 };
  329|  3.22k|    return lookup[hint];
  330|  3.22k|}

ZydisGetEncodableInstructions:
   35|  3.13k|{
   36|  3.13k|    if (mnemonic <= ZYDIS_MNEMONIC_INVALID || mnemonic > ZYDIS_MNEMONIC_MAX_VALUE)
  ------------------
  |  Branch (36:9): [True: 0, False: 3.13k]
  |  Branch (36:47): [True: 0, False: 3.13k]
  ------------------
   37|      0|    {
   38|      0|        *instruction = ZYAN_NULL;
  ------------------
  |  |  277|      0|#define ZYAN_NULL ((void*)0)
  ------------------
   39|      0|        return 0;
   40|      0|    }
   41|  3.13k|    ZydisEncoderLookupEntry lookup_entry = encoder_instruction_lookup[mnemonic];
   42|  3.13k|    *instruction = &encoder_instructions[lookup_entry.encoder_reference];
   43|  3.13k|    return lookup_entry.instruction_count;
   44|  3.13k|}

ZydisGetCcInfo:
    2|    444|{
    3|    444|    switch (mnemonic)
    4|    444|    {
    5|      0|    case ZYDIS_MNEMONIC_CCMPB:
  ------------------
  |  Branch (5:5): [True: 0, False: 444]
  ------------------
    6|      9|    case ZYDIS_MNEMONIC_CTESTB:
  ------------------
  |  Branch (6:5): [True: 9, False: 435]
  ------------------
    7|      9|        *scc = ZYDIS_SCC_B;
    8|      9|        return ZYAN_TRUE;
  ------------------
  |  |  288|      9|#define ZYAN_TRUE  1u
  ------------------
    9|      0|    case ZYDIS_MNEMONIC_CCMPBE:
  ------------------
  |  Branch (9:5): [True: 0, False: 444]
  ------------------
   10|      0|    case ZYDIS_MNEMONIC_CTESTBE:
  ------------------
  |  Branch (10:5): [True: 0, False: 444]
  ------------------
   11|      0|        *scc = ZYDIS_SCC_BE;
   12|      0|        return ZYAN_TRUE;
  ------------------
  |  |  288|      0|#define ZYAN_TRUE  1u
  ------------------
   13|      0|    case ZYDIS_MNEMONIC_CCMPF:
  ------------------
  |  Branch (13:5): [True: 0, False: 444]
  ------------------
   14|      0|    case ZYDIS_MNEMONIC_CTESTF:
  ------------------
  |  Branch (14:5): [True: 0, False: 444]
  ------------------
   15|      0|        *scc = ZYDIS_SCC_FALSE;
   16|      0|        return ZYAN_TRUE;
  ------------------
  |  |  288|      0|#define ZYAN_TRUE  1u
  ------------------
   17|      0|    case ZYDIS_MNEMONIC_CCMPL:
  ------------------
  |  Branch (17:5): [True: 0, False: 444]
  ------------------
   18|      0|    case ZYDIS_MNEMONIC_CTESTL:
  ------------------
  |  Branch (18:5): [True: 0, False: 444]
  ------------------
   19|      0|        *scc = ZYDIS_SCC_L;
   20|      0|        return ZYAN_TRUE;
  ------------------
  |  |  288|      0|#define ZYAN_TRUE  1u
  ------------------
   21|      0|    case ZYDIS_MNEMONIC_CCMPLE:
  ------------------
  |  Branch (21:5): [True: 0, False: 444]
  ------------------
   22|      0|    case ZYDIS_MNEMONIC_CTESTLE:
  ------------------
  |  Branch (22:5): [True: 0, False: 444]
  ------------------
   23|      0|        *scc = ZYDIS_SCC_LE;
   24|      0|        return ZYAN_TRUE;
  ------------------
  |  |  288|      0|#define ZYAN_TRUE  1u
  ------------------
   25|      0|    case ZYDIS_MNEMONIC_CCMPNB:
  ------------------
  |  Branch (25:5): [True: 0, False: 444]
  ------------------
   26|      0|    case ZYDIS_MNEMONIC_CTESTNB:
  ------------------
  |  Branch (26:5): [True: 0, False: 444]
  ------------------
   27|      0|        *scc = ZYDIS_SCC_NB;
   28|      0|        return ZYAN_TRUE;
  ------------------
  |  |  288|      0|#define ZYAN_TRUE  1u
  ------------------
   29|      5|    case ZYDIS_MNEMONIC_CCMPNBE:
  ------------------
  |  Branch (29:5): [True: 5, False: 439]
  ------------------
   30|      5|    case ZYDIS_MNEMONIC_CTESTNBE:
  ------------------
  |  Branch (30:5): [True: 0, False: 444]
  ------------------
   31|      5|        *scc = ZYDIS_SCC_NBE;
   32|      5|        return ZYAN_TRUE;
  ------------------
  |  |  288|      5|#define ZYAN_TRUE  1u
  ------------------
   33|      9|    case ZYDIS_MNEMONIC_CCMPNL:
  ------------------
  |  Branch (33:5): [True: 9, False: 435]
  ------------------
   34|     13|    case ZYDIS_MNEMONIC_CTESTNL:
  ------------------
  |  Branch (34:5): [True: 4, False: 440]
  ------------------
   35|     13|        *scc = ZYDIS_SCC_NL;
   36|     13|        return ZYAN_TRUE;
  ------------------
  |  |  288|     13|#define ZYAN_TRUE  1u
  ------------------
   37|      0|    case ZYDIS_MNEMONIC_CCMPNLE:
  ------------------
  |  Branch (37:5): [True: 0, False: 444]
  ------------------
   38|      0|    case ZYDIS_MNEMONIC_CTESTNLE:
  ------------------
  |  Branch (38:5): [True: 0, False: 444]
  ------------------
   39|      0|        *scc = ZYDIS_SCC_NLE;
   40|      0|        return ZYAN_TRUE;
  ------------------
  |  |  288|      0|#define ZYAN_TRUE  1u
  ------------------
   41|      0|    case ZYDIS_MNEMONIC_CCMPNO:
  ------------------
  |  Branch (41:5): [True: 0, False: 444]
  ------------------
   42|      0|    case ZYDIS_MNEMONIC_CTESTNO:
  ------------------
  |  Branch (42:5): [True: 0, False: 444]
  ------------------
   43|      0|        *scc = ZYDIS_SCC_NO;
   44|      0|        return ZYAN_TRUE;
  ------------------
  |  |  288|      0|#define ZYAN_TRUE  1u
  ------------------
   45|      3|    case ZYDIS_MNEMONIC_CCMPNS:
  ------------------
  |  Branch (45:5): [True: 3, False: 441]
  ------------------
   46|      9|    case ZYDIS_MNEMONIC_CTESTNS:
  ------------------
  |  Branch (46:5): [True: 6, False: 438]
  ------------------
   47|      9|        *scc = ZYDIS_SCC_NS;
   48|      9|        return ZYAN_TRUE;
  ------------------
  |  |  288|      9|#define ZYAN_TRUE  1u
  ------------------
   49|      2|    case ZYDIS_MNEMONIC_CCMPNZ:
  ------------------
  |  Branch (49:5): [True: 2, False: 442]
  ------------------
   50|      2|    case ZYDIS_MNEMONIC_CTESTNZ:
  ------------------
  |  Branch (50:5): [True: 0, False: 444]
  ------------------
   51|      2|        *scc = ZYDIS_SCC_NZ;
   52|      2|        return ZYAN_TRUE;
  ------------------
  |  |  288|      2|#define ZYAN_TRUE  1u
  ------------------
   53|      0|    case ZYDIS_MNEMONIC_CCMPO:
  ------------------
  |  Branch (53:5): [True: 0, False: 444]
  ------------------
   54|      0|    case ZYDIS_MNEMONIC_CTESTO:
  ------------------
  |  Branch (54:5): [True: 0, False: 444]
  ------------------
   55|      0|        *scc = ZYDIS_SCC_O;
   56|      0|        return ZYAN_TRUE;
  ------------------
  |  |  288|      0|#define ZYAN_TRUE  1u
  ------------------
   57|      0|    case ZYDIS_MNEMONIC_CCMPS:
  ------------------
  |  Branch (57:5): [True: 0, False: 444]
  ------------------
   58|      0|    case ZYDIS_MNEMONIC_CTESTS:
  ------------------
  |  Branch (58:5): [True: 0, False: 444]
  ------------------
   59|      0|        *scc = ZYDIS_SCC_S;
   60|      0|        return ZYAN_TRUE;
  ------------------
  |  |  288|      0|#define ZYAN_TRUE  1u
  ------------------
   61|      0|    case ZYDIS_MNEMONIC_CCMPT:
  ------------------
  |  Branch (61:5): [True: 0, False: 444]
  ------------------
   62|      0|    case ZYDIS_MNEMONIC_CTESTT:
  ------------------
  |  Branch (62:5): [True: 0, False: 444]
  ------------------
   63|      0|        *scc = ZYDIS_SCC_TRUE;
   64|      0|        return ZYAN_TRUE;
  ------------------
  |  |  288|      0|#define ZYAN_TRUE  1u
  ------------------
   65|      0|    case ZYDIS_MNEMONIC_CCMPZ:
  ------------------
  |  Branch (65:5): [True: 0, False: 444]
  ------------------
   66|      4|    case ZYDIS_MNEMONIC_CTESTZ:
  ------------------
  |  Branch (66:5): [True: 4, False: 440]
  ------------------
   67|      4|        *scc = ZYDIS_SCC_Z;
   68|      4|        return ZYAN_TRUE;
  ------------------
  |  |  288|      4|#define ZYAN_TRUE  1u
  ------------------
   69|      1|    case ZYDIS_MNEMONIC_CFCMOVB:
  ------------------
  |  Branch (69:5): [True: 1, False: 443]
  ------------------
   70|      1|    case ZYDIS_MNEMONIC_CFCMOVBE:
  ------------------
  |  Branch (70:5): [True: 0, False: 444]
  ------------------
   71|      1|    case ZYDIS_MNEMONIC_CFCMOVL:
  ------------------
  |  Branch (71:5): [True: 0, False: 444]
  ------------------
   72|      1|    case ZYDIS_MNEMONIC_CFCMOVLE:
  ------------------
  |  Branch (72:5): [True: 0, False: 444]
  ------------------
   73|      1|    case ZYDIS_MNEMONIC_CFCMOVNB:
  ------------------
  |  Branch (73:5): [True: 0, False: 444]
  ------------------
   74|      1|    case ZYDIS_MNEMONIC_CFCMOVNBE:
  ------------------
  |  Branch (74:5): [True: 0, False: 444]
  ------------------
   75|      1|    case ZYDIS_MNEMONIC_CFCMOVNL:
  ------------------
  |  Branch (75:5): [True: 0, False: 444]
  ------------------
   76|      1|    case ZYDIS_MNEMONIC_CFCMOVNLE:
  ------------------
  |  Branch (76:5): [True: 0, False: 444]
  ------------------
   77|      1|    case ZYDIS_MNEMONIC_CFCMOVNO:
  ------------------
  |  Branch (77:5): [True: 0, False: 444]
  ------------------
   78|      1|    case ZYDIS_MNEMONIC_CFCMOVNP:
  ------------------
  |  Branch (78:5): [True: 0, False: 444]
  ------------------
   79|      1|    case ZYDIS_MNEMONIC_CFCMOVNS:
  ------------------
  |  Branch (79:5): [True: 0, False: 444]
  ------------------
   80|      1|    case ZYDIS_MNEMONIC_CFCMOVNZ:
  ------------------
  |  Branch (80:5): [True: 0, False: 444]
  ------------------
   81|      1|    case ZYDIS_MNEMONIC_CFCMOVO:
  ------------------
  |  Branch (81:5): [True: 0, False: 444]
  ------------------
   82|      1|    case ZYDIS_MNEMONIC_CFCMOVP:
  ------------------
  |  Branch (82:5): [True: 0, False: 444]
  ------------------
   83|      1|    case ZYDIS_MNEMONIC_CFCMOVS:
  ------------------
  |  Branch (83:5): [True: 0, False: 444]
  ------------------
   84|      6|    case ZYDIS_MNEMONIC_CFCMOVZ:
  ------------------
  |  Branch (84:5): [True: 5, False: 439]
  ------------------
   85|      6|    case ZYDIS_MNEMONIC_CMOVB:
  ------------------
  |  Branch (85:5): [True: 0, False: 444]
  ------------------
   86|      6|    case ZYDIS_MNEMONIC_CMOVBE:
  ------------------
  |  Branch (86:5): [True: 0, False: 444]
  ------------------
   87|      6|    case ZYDIS_MNEMONIC_CMOVL:
  ------------------
  |  Branch (87:5): [True: 0, False: 444]
  ------------------
   88|      7|    case ZYDIS_MNEMONIC_CMOVLE:
  ------------------
  |  Branch (88:5): [True: 1, False: 443]
  ------------------
   89|     11|    case ZYDIS_MNEMONIC_CMOVNB:
  ------------------
  |  Branch (89:5): [True: 4, False: 440]
  ------------------
   90|     11|    case ZYDIS_MNEMONIC_CMOVNBE:
  ------------------
  |  Branch (90:5): [True: 0, False: 444]
  ------------------
   91|     11|    case ZYDIS_MNEMONIC_CMOVNL:
  ------------------
  |  Branch (91:5): [True: 0, False: 444]
  ------------------
   92|     11|    case ZYDIS_MNEMONIC_CMOVNLE:
  ------------------
  |  Branch (92:5): [True: 0, False: 444]
  ------------------
   93|     12|    case ZYDIS_MNEMONIC_CMOVNO:
  ------------------
  |  Branch (93:5): [True: 1, False: 443]
  ------------------
   94|     12|    case ZYDIS_MNEMONIC_CMOVNP:
  ------------------
  |  Branch (94:5): [True: 0, False: 444]
  ------------------
   95|     12|    case ZYDIS_MNEMONIC_CMOVNS:
  ------------------
  |  Branch (95:5): [True: 0, False: 444]
  ------------------
   96|     12|    case ZYDIS_MNEMONIC_CMOVNZ:
  ------------------
  |  Branch (96:5): [True: 0, False: 444]
  ------------------
   97|     12|    case ZYDIS_MNEMONIC_CMOVO:
  ------------------
  |  Branch (97:5): [True: 0, False: 444]
  ------------------
   98|     12|    case ZYDIS_MNEMONIC_CMOVP:
  ------------------
  |  Branch (98:5): [True: 0, False: 444]
  ------------------
   99|     12|    case ZYDIS_MNEMONIC_CMOVS:
  ------------------
  |  Branch (99:5): [True: 0, False: 444]
  ------------------
  100|     14|    case ZYDIS_MNEMONIC_CMOVZ:
  ------------------
  |  Branch (100:5): [True: 2, False: 442]
  ------------------
  101|     14|        *scc = ZYDIS_SCC_NONE;
  102|     14|        return ZYAN_TRUE;
  ------------------
  |  |  288|     14|#define ZYAN_TRUE  1u
  ------------------
  103|    388|    default:
  ------------------
  |  Branch (103:5): [True: 388, False: 56]
  ------------------
  104|    388|        *scc = ZYDIS_SCC_NONE;
  105|    388|        return ZYAN_FALSE;
  ------------------
  |  |  287|    388|#define ZYAN_FALSE 0u
  ------------------
  106|    444|    }
  107|    444|}

ZydisGetRelInfo:
    2|     27|{
    3|     27|    static const ZydisEncoderRelInfo info_lookup[9] =
    4|     27|    {
    5|     27|        { { { 0, 3, 6 }, { 0, 4, 5 }, { 0, 0, 5 } }, ZYDIS_SIZE_HINT_NONE, ZYAN_FALSE, ZYAN_TRUE },
  ------------------
  |  |  287|     27|#define ZYAN_FALSE 0u
  ------------------
                      { { { 0, 3, 6 }, { 0, 4, 5 }, { 0, 0, 5 } }, ZYDIS_SIZE_HINT_NONE, ZYAN_FALSE, ZYAN_TRUE },
  ------------------
  |  |  288|     27|#define ZYAN_TRUE  1u
  ------------------
    6|     27|        { { { 2, 4, 7 }, { 2, 5, 6 }, { 2, 0, 6 } }, ZYDIS_SIZE_HINT_NONE, ZYAN_TRUE, ZYAN_TRUE },
  ------------------
  |  |  288|     27|#define ZYAN_TRUE  1u
  ------------------
                      { { { 2, 4, 7 }, { 2, 5, 6 }, { 2, 0, 6 } }, ZYDIS_SIZE_HINT_NONE, ZYAN_TRUE, ZYAN_TRUE },
  ------------------
  |  |  288|     27|#define ZYAN_TRUE  1u
  ------------------
    7|     27|        { { { 2, 0, 0 }, { 3, 0, 0 }, { 0, 0, 0 } }, ZYDIS_SIZE_HINT_NONE, ZYAN_FALSE, ZYAN_FALSE },
  ------------------
  |  |  287|     27|#define ZYAN_FALSE 0u
  ------------------
                      { { { 2, 0, 0 }, { 3, 0, 0 }, { 0, 0, 0 } }, ZYDIS_SIZE_HINT_NONE, ZYAN_FALSE, ZYAN_FALSE },
  ------------------
  |  |  287|     27|#define ZYAN_FALSE 0u
  ------------------
    8|     27|        { { { 3, 0, 0 }, { 2, 0, 0 }, { 3, 0, 0 } }, ZYDIS_SIZE_HINT_NONE, ZYAN_FALSE, ZYAN_FALSE },
  ------------------
  |  |  287|     27|#define ZYAN_FALSE 0u
  ------------------
                      { { { 3, 0, 0 }, { 2, 0, 0 }, { 3, 0, 0 } }, ZYDIS_SIZE_HINT_NONE, ZYAN_FALSE, ZYAN_FALSE },
  ------------------
  |  |  287|     27|#define ZYAN_FALSE 0u
  ------------------
    9|     27|        { { { 0, 0, 0 }, { 0, 0, 0 }, { 5, 0, 7 } }, ZYDIS_SIZE_HINT_NONE, ZYAN_FALSE, ZYAN_FALSE },
  ------------------
  |  |  287|     27|#define ZYAN_FALSE 0u
  ------------------
                      { { { 0, 0, 0 }, { 0, 0, 0 }, { 5, 0, 7 } }, ZYDIS_SIZE_HINT_NONE, ZYAN_FALSE, ZYAN_FALSE },
  ------------------
  |  |  287|     27|#define ZYAN_FALSE 0u
  ------------------
   10|     27|        { { { 2, 3, 6 }, { 2, 4, 5 }, { 2, 0, 5 } }, ZYDIS_SIZE_HINT_NONE, ZYAN_FALSE, ZYAN_TRUE },
  ------------------
  |  |  287|     27|#define ZYAN_FALSE 0u
  ------------------
                      { { { 2, 3, 6 }, { 2, 4, 5 }, { 2, 0, 5 } }, ZYDIS_SIZE_HINT_NONE, ZYAN_FALSE, ZYAN_TRUE },
  ------------------
  |  |  288|     27|#define ZYAN_TRUE  1u
  ------------------
   11|     27|        { { { 0, 0, 0 }, { 0, 0, 0 }, { 2, 0, 0 } }, ZYDIS_SIZE_HINT_NONE, ZYAN_FALSE, ZYAN_FALSE },
  ------------------
  |  |  287|     27|#define ZYAN_FALSE 0u
  ------------------
                      { { { 0, 0, 0 }, { 0, 0, 0 }, { 2, 0, 0 } }, ZYDIS_SIZE_HINT_NONE, ZYAN_FALSE, ZYAN_FALSE },
  ------------------
  |  |  287|     27|#define ZYAN_FALSE 0u
  ------------------
   12|     27|        { { { 2, 0, 0 }, { 2, 0, 0 }, { 2, 0, 0 } }, ZYDIS_SIZE_HINT_ASZ, ZYAN_FALSE, ZYAN_FALSE },
  ------------------
  |  |  287|     27|#define ZYAN_FALSE 0u
  ------------------
                      { { { 2, 0, 0 }, { 2, 0, 0 }, { 2, 0, 0 } }, ZYDIS_SIZE_HINT_ASZ, ZYAN_FALSE, ZYAN_FALSE },
  ------------------
  |  |  287|     27|#define ZYAN_FALSE 0u
  ------------------
   13|     27|        { { { 0, 4, 7 }, { 0, 5, 6 }, { 0, 5, 6 } }, ZYDIS_SIZE_HINT_OSZ, ZYAN_FALSE, ZYAN_FALSE },
  ------------------
  |  |  287|     27|#define ZYAN_FALSE 0u
  ------------------
                      { { { 0, 4, 7 }, { 0, 5, 6 }, { 0, 5, 6 } }, ZYDIS_SIZE_HINT_OSZ, ZYAN_FALSE, ZYAN_FALSE },
  ------------------
  |  |  287|     27|#define ZYAN_FALSE 0u
  ------------------
   14|     27|    };
   15|       |
   16|     27|    switch (mnemonic)
   17|     27|    {
   18|      1|    case ZYDIS_MNEMONIC_CALL:
  ------------------
  |  Branch (18:5): [True: 1, False: 26]
  ------------------
   19|      1|        return &info_lookup[0];
   20|      0|    case ZYDIS_MNEMONIC_JB:
  ------------------
  |  Branch (20:5): [True: 0, False: 27]
  ------------------
   21|      0|    case ZYDIS_MNEMONIC_JBE:
  ------------------
  |  Branch (21:5): [True: 0, False: 27]
  ------------------
   22|      0|    case ZYDIS_MNEMONIC_JL:
  ------------------
  |  Branch (22:5): [True: 0, False: 27]
  ------------------
   23|      0|    case ZYDIS_MNEMONIC_JLE:
  ------------------
  |  Branch (23:5): [True: 0, False: 27]
  ------------------
   24|      1|    case ZYDIS_MNEMONIC_JNB:
  ------------------
  |  Branch (24:5): [True: 1, False: 26]
  ------------------
   25|      1|    case ZYDIS_MNEMONIC_JNBE:
  ------------------
  |  Branch (25:5): [True: 0, False: 27]
  ------------------
   26|      1|    case ZYDIS_MNEMONIC_JNL:
  ------------------
  |  Branch (26:5): [True: 0, False: 27]
  ------------------
   27|      1|    case ZYDIS_MNEMONIC_JNLE:
  ------------------
  |  Branch (27:5): [True: 0, False: 27]
  ------------------
   28|      3|    case ZYDIS_MNEMONIC_JNO:
  ------------------
  |  Branch (28:5): [True: 2, False: 25]
  ------------------
   29|      5|    case ZYDIS_MNEMONIC_JNP:
  ------------------
  |  Branch (29:5): [True: 2, False: 25]
  ------------------
   30|      6|    case ZYDIS_MNEMONIC_JNS:
  ------------------
  |  Branch (30:5): [True: 1, False: 26]
  ------------------
   31|      6|    case ZYDIS_MNEMONIC_JNZ:
  ------------------
  |  Branch (31:5): [True: 0, False: 27]
  ------------------
   32|      7|    case ZYDIS_MNEMONIC_JO:
  ------------------
  |  Branch (32:5): [True: 1, False: 26]
  ------------------
   33|      7|    case ZYDIS_MNEMONIC_JP:
  ------------------
  |  Branch (33:5): [True: 0, False: 27]
  ------------------
   34|      7|    case ZYDIS_MNEMONIC_JS:
  ------------------
  |  Branch (34:5): [True: 0, False: 27]
  ------------------
   35|      8|    case ZYDIS_MNEMONIC_JZ:
  ------------------
  |  Branch (35:5): [True: 1, False: 26]
  ------------------
   36|      8|        return &info_lookup[1];
   37|      0|    case ZYDIS_MNEMONIC_JCXZ:
  ------------------
  |  Branch (37:5): [True: 0, False: 27]
  ------------------
   38|      0|        return &info_lookup[2];
   39|      0|    case ZYDIS_MNEMONIC_JECXZ:
  ------------------
  |  Branch (39:5): [True: 0, False: 27]
  ------------------
   40|      0|        return &info_lookup[3];
   41|      0|    case ZYDIS_MNEMONIC_JKNZD:
  ------------------
  |  Branch (41:5): [True: 0, False: 27]
  ------------------
   42|      0|    case ZYDIS_MNEMONIC_JKZD:
  ------------------
  |  Branch (42:5): [True: 0, False: 27]
  ------------------
   43|      0|        return &info_lookup[4];
   44|      3|    case ZYDIS_MNEMONIC_JMP:
  ------------------
  |  Branch (44:5): [True: 3, False: 24]
  ------------------
   45|      3|        return &info_lookup[5];
   46|      0|    case ZYDIS_MNEMONIC_JRCXZ:
  ------------------
  |  Branch (46:5): [True: 0, False: 27]
  ------------------
   47|      0|        return &info_lookup[6];
   48|      0|    case ZYDIS_MNEMONIC_LOOP:
  ------------------
  |  Branch (48:5): [True: 0, False: 27]
  ------------------
   49|      1|    case ZYDIS_MNEMONIC_LOOPE:
  ------------------
  |  Branch (49:5): [True: 1, False: 26]
  ------------------
   50|      2|    case ZYDIS_MNEMONIC_LOOPNE:
  ------------------
  |  Branch (50:5): [True: 1, False: 26]
  ------------------
   51|      2|        return &info_lookup[7];
   52|      0|    case ZYDIS_MNEMONIC_XBEGIN:
  ------------------
  |  Branch (52:5): [True: 0, False: 27]
  ------------------
   53|      0|        return &info_lookup[8];
   54|     13|    default:
  ------------------
  |  Branch (54:5): [True: 13, False: 14]
  ------------------
   55|     13|        return ZYAN_NULL;
  ------------------
  |  |  277|     13|#define ZYAN_NULL ((void*)0)
  ------------------
   56|     27|    }
   57|     27|}

ZydisRegisterEncode:
   98|    190|{
   99|    190|    if ((register_class == ZYDIS_REGCLASS_INVALID) ||
  ------------------
  |  Branch (99:9): [True: 0, False: 190]
  ------------------
  100|    190|        (register_class == ZYDIS_REGCLASS_FLAGS) ||
  ------------------
  |  Branch (100:9): [True: 0, False: 190]
  ------------------
  101|    190|        (register_class == ZYDIS_REGCLASS_IP))
  ------------------
  |  Branch (101:9): [True: 0, False: 190]
  ------------------
  102|      0|    {
  103|      0|        return ZYDIS_REGISTER_NONE;
  104|      0|    }
  105|       |
  106|    190|    if ((ZyanUSize)register_class >= ZYAN_ARRAY_LENGTH(REG_CLASS_LOOKUP))
  ------------------
  |  |  510|    190|#define ZYAN_ARRAY_LENGTH(a) (sizeof(a) / sizeof((a)[0]))
  ------------------
  |  Branch (106:9): [True: 0, False: 190]
  ------------------
  107|      0|    {
  108|      0|        return ZYDIS_REGISTER_NONE;
  109|      0|    }
  110|       |
  111|    190|    const ZydisRegisterClassLookupItem* item = &REG_CLASS_LOOKUP[register_class];
  112|    190|    if (id <= (item->hi - item->lo))
  ------------------
  |  Branch (112:9): [True: 190, False: 0]
  ------------------
  113|    190|    {
  114|    190|        return item->lo + id;
  115|    190|    }
  116|       |
  117|      0|    return ZYDIS_REGISTER_NONE;
  118|    190|}
ZydisRegisterGetId:
  121|    624|{
  122|    624|    if ((ZyanUSize)reg >= ZYAN_ARRAY_LENGTH(REG_LOOKUP))
  ------------------
  |  |  510|    624|#define ZYAN_ARRAY_LENGTH(a) (sizeof(a) / sizeof((a)[0]))
  ------------------
  |  Branch (122:9): [True: 0, False: 624]
  ------------------
  123|      0|    {
  124|      0|        return -1;
  125|      0|    }
  126|       |
  127|    624|    return REG_LOOKUP[reg].id;
  128|    624|}
ZydisRegisterGetClass:
  131|  1.09k|{
  132|  1.09k|    if ((ZyanUSize)reg >= ZYAN_ARRAY_LENGTH(REG_LOOKUP))
  ------------------
  |  |  510|  1.09k|#define ZYAN_ARRAY_LENGTH(a) (sizeof(a) / sizeof((a)[0]))
  ------------------
  |  Branch (132:9): [True: 0, False: 1.09k]
  ------------------
  133|      0|    {
  134|      0|        return ZYDIS_REGCLASS_INVALID;
  135|      0|    }
  136|       |
  137|  1.09k|    return REG_LOOKUP[reg].class;
  138|  1.09k|}
ZydisRegisterGetWidth:
  141|    210|{
  142|    210|    if ((ZyanUSize)reg >= ZYAN_ARRAY_LENGTH(REG_LOOKUP))
  ------------------
  |  |  510|    210|#define ZYAN_ARRAY_LENGTH(a) (sizeof(a) / sizeof((a)[0]))
  ------------------
  |  Branch (142:9): [True: 0, False: 210]
  ------------------
  143|      0|    {
  144|      0|        return 0;
  145|      0|    }
  146|       |
  147|    210|    return (mode == ZYDIS_MACHINE_MODE_LONG_64)
  ------------------
  |  Branch (147:12): [True: 118, False: 92]
  ------------------
  148|    210|        ? REG_LOOKUP[reg].width64
  149|    210|        : REG_LOOKUP[reg].width;
  150|    210|}
ZydisRegisterClassGetWidth:
  306|    657|{
  307|    657|    if ((ZyanUSize)register_class >= ZYAN_ARRAY_LENGTH(REG_CLASS_LOOKUP))
  ------------------
  |  |  510|    657|#define ZYAN_ARRAY_LENGTH(a) (sizeof(a) / sizeof((a)[0]))
  ------------------
  |  Branch (307:9): [True: 0, False: 657]
  ------------------
  308|      0|    {
  309|      0|        return 0;
  310|      0|    }
  311|       |
  312|    657|    return (mode == ZYDIS_MACHINE_MODE_LONG_64)
  ------------------
  |  Branch (312:12): [True: 579, False: 78]
  ------------------
  313|    657|        ? REG_CLASS_LOOKUP[register_class].width64
  314|    657|        : REG_CLASS_LOOKUP[register_class].width;
  315|    657|}

ZydisGetInstructionDefinition:
   76|  1.49k|{
   77|  1.49k|    switch (encoding)
   78|  1.49k|    {
   79|    850|    case ZYDIS_INSTRUCTION_ENCODING_LEGACY:
  ------------------
  |  Branch (79:5): [True: 850, False: 647]
  ------------------
   80|    872|    case ZYDIS_INSTRUCTION_ENCODING_REX2:
  ------------------
  |  Branch (80:5): [True: 22, False: 1.47k]
  ------------------
   81|    872|        *definition = (ZydisInstructionDefinition*)&ISTR_DEFINITIONS_LEGACY[id];
   82|    872|        break;
   83|      2|    case ZYDIS_INSTRUCTION_ENCODING_3DNOW:
  ------------------
  |  Branch (83:5): [True: 2, False: 1.49k]
  ------------------
   84|      2|        *definition = (ZydisInstructionDefinition*)&ISTR_DEFINITIONS_3DNOW[id];
   85|      2|        break;
   86|     18|    case ZYDIS_INSTRUCTION_ENCODING_XOP:
  ------------------
  |  Branch (86:5): [True: 18, False: 1.47k]
  ------------------
   87|     18|        *definition = (ZydisInstructionDefinition*)&ISTR_DEFINITIONS_XOP[id];
   88|     18|        break;
   89|    148|    case ZYDIS_INSTRUCTION_ENCODING_VEX:
  ------------------
  |  Branch (89:5): [True: 148, False: 1.34k]
  ------------------
   90|    148|        *definition = (ZydisInstructionDefinition*)&ISTR_DEFINITIONS_VEX[id];
   91|    148|        break;
   92|      0|#ifndef ZYDIS_DISABLE_AVX512
   93|    441|    case ZYDIS_INSTRUCTION_ENCODING_EVEX:
  ------------------
  |  Branch (93:5): [True: 441, False: 1.05k]
  ------------------
   94|    441|        *definition = (ZydisInstructionDefinition*)&ISTR_DEFINITIONS_EVEX[id];
   95|    441|        break;
   96|      0|#endif
   97|      0|#ifndef ZYDIS_DISABLE_KNC
   98|     16|    case ZYDIS_INSTRUCTION_ENCODING_MVEX:
  ------------------
  |  Branch (98:5): [True: 16, False: 1.48k]
  ------------------
   99|     16|        *definition = (ZydisInstructionDefinition*)&ISTR_DEFINITIONS_MVEX[id];
  100|     16|        break;
  101|      0|#endif
  102|      0|    default:
  ------------------
  |  Branch (102:5): [True: 0, False: 1.49k]
  ------------------
  103|      0|        ZYAN_UNREACHABLE;
  ------------------
  |  |  431|      0|#   define ZYAN_UNREACHABLE { assert(0); abort(); }
  ------------------
  |  Branch (103:9): [Folded, False: 0]
  |  Branch (103:9): [Folded, False: 0]
  ------------------
  104|  1.49k|    }
  105|  1.49k|}
ZydisGetOperandDefinitions:
  114|  1.03k|{
  115|  1.03k|    if (definition->operand_count == 0)
  ------------------
  |  Branch (115:9): [True: 4, False: 1.03k]
  ------------------
  116|      4|    {
  117|      4|        return ZYAN_NULL;
  ------------------
  |  |  277|      4|#define ZYAN_NULL ((void*)0)
  ------------------
  118|      4|    }
  119|  1.03k|    ZYAN_ASSERT(definition->operand_reference != 0x7FFF);
  ------------------
  |  |  381|  1.03k|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (119:5): [True: 0, False: 1.03k]
  |  Branch (119:5): [True: 1.03k, False: 0]
  ------------------
  120|  1.03k|    return &OPERAND_DEFINITIONS[definition->operand_reference];
  121|  1.03k|}
ZydisGetOperandSizes:
  124|    755|{
  125|    755|    return OPERAND_SIZES[definition->size_reference];
  126|    755|}
ZydisGetOperandDetails:
  129|  1.63k|{
  130|  1.63k|    return &OPERAND_DETAILS[definition->details_reference];
  131|  1.63k|}
ZydisGetElementInfo:
  141|    292|{
  142|    292|    static const struct
  143|    292|    {
  144|    292|        ZydisElementType type;
  145|    292|        ZydisElementSize size;
  146|       |        // Operand bits per element, if not the element size. FP6 values are packed densely
  147|       |        // (VL/8 values in the low 6*VL/8 bits), so their count does not follow from the size.
  148|    292|        ZydisElementSize slot;
  149|    292|    } lookup[] =
  150|    292|    {
  151|    292|        { ZYDIS_ELEMENT_TYPE_INVALID  ,   0, 0 },
  152|    292|        { ZYDIS_ELEMENT_TYPE_INVALID  ,   0, 0 },
  153|    292|        { ZYDIS_ELEMENT_TYPE_STRUCT   ,   0, 0 },
  154|    292|        { ZYDIS_ELEMENT_TYPE_INT      ,   0, 0 },
  155|    292|        { ZYDIS_ELEMENT_TYPE_UINT     ,   0, 0 },
  156|    292|        { ZYDIS_ELEMENT_TYPE_INT      ,   1, 0 },
  157|    292|        { ZYDIS_ELEMENT_TYPE_INT      ,   8, 0 },
  158|    292|        { ZYDIS_ELEMENT_TYPE_INT      ,  16, 0 }, // TODO: Should indicate 2 INT8 elements
  159|    292|        { ZYDIS_ELEMENT_TYPE_INT      ,  32, 0 }, // TODO: Should indicate 4 INT8 elements
  160|    292|        { ZYDIS_ELEMENT_TYPE_INT      ,  16, 0 },
  161|    292|        { ZYDIS_ELEMENT_TYPE_INT      ,  32, 0 }, // TODO: Should indicate 2 INT16 elements
  162|    292|        { ZYDIS_ELEMENT_TYPE_INT      ,  32, 0 },
  163|    292|        { ZYDIS_ELEMENT_TYPE_INT      ,  64, 0 },
  164|    292|        { ZYDIS_ELEMENT_TYPE_INT      , 128, 0 },
  165|    292|        { ZYDIS_ELEMENT_TYPE_UINT     ,   8, 0 },
  166|    292|        { ZYDIS_ELEMENT_TYPE_UINT     ,  32, 0 }, // TODO: Should indicate 4 UINT8 elements
  167|    292|        { ZYDIS_ELEMENT_TYPE_UINT     ,  16, 0 },
  168|    292|        { ZYDIS_ELEMENT_TYPE_UINT     ,  32, 0 }, // TODO: Should indicate 2 UINT16 elements
  169|    292|        { ZYDIS_ELEMENT_TYPE_UINT     ,  32, 0 },
  170|    292|        { ZYDIS_ELEMENT_TYPE_UINT     ,  64, 0 },
  171|    292|        { ZYDIS_ELEMENT_TYPE_UINT     , 128, 0 },
  172|    292|        { ZYDIS_ELEMENT_TYPE_UINT     , 256, 0 },
  173|    292|        { ZYDIS_ELEMENT_TYPE_FLOAT16  ,  16, 0 },
  174|    292|        { ZYDIS_ELEMENT_TYPE_FLOAT16  ,  32, 0 }, // TODO: Should indicate 2 FLOAT16 elements
  175|    292|        { ZYDIS_ELEMENT_TYPE_FLOAT32  ,  32, 0 },
  176|    292|        { ZYDIS_ELEMENT_TYPE_FLOAT64  ,  64, 0 },
  177|    292|        { ZYDIS_ELEMENT_TYPE_FLOAT80  ,  80, 0 },
  178|    292|        { ZYDIS_ELEMENT_TYPE_BFLOAT16 ,  16, 0 },
  179|    292|        { ZYDIS_ELEMENT_TYPE_BFLOAT16 ,  32, 0 }, // TODO: Should indicate 2 BFLOAT16 elements
  180|    292|        { ZYDIS_ELEMENT_TYPE_BFLOAT8  ,   8, 0 },
  181|    292|        { ZYDIS_ELEMENT_TYPE_HFLOAT8  ,   8, 0 },
  182|    292|        { ZYDIS_ELEMENT_TYPE_BFLOAT8  ,  32, 0 }, // TODO: Should indicate 4 BFLOAT8 elements
  183|    292|        { ZYDIS_ELEMENT_TYPE_HFLOAT8  ,  32, 0 }, // TODO: Should indicate 4 HFLOAT8 elements
  184|    292|        { ZYDIS_ELEMENT_TYPE_BFLOAT4  ,   4, 0 },
  185|    292|        { ZYDIS_ELEMENT_TYPE_BFLOAT6  ,   6, 8 },
  186|    292|        { ZYDIS_ELEMENT_TYPE_HFLOAT6  ,   6, 8 },
  187|    292|        { ZYDIS_ELEMENT_TYPE_LONGBCD  ,  80, 0 },
  188|    292|        { ZYDIS_ELEMENT_TYPE_CC       ,   3, 0 },
  189|    292|        { ZYDIS_ELEMENT_TYPE_CC       ,   5, 0 }
  190|    292|    };
  191|    292|    ZYAN_STATIC_ASSERT(ZYAN_ARRAY_LENGTH(lookup) == ZYDIS_IELEMENT_TYPE_MAX_VALUE + 1);
  ------------------
  |  |  388|    292|#   define ZYAN_STATIC_ASSERT(x) _Static_assert(x, #x)
  ------------------
  192|    292|    ZYAN_ASSERT((ZyanUSize)element < ZYAN_ARRAY_LENGTH(lookup));
  ------------------
  |  |  381|    292|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (192:5): [True: 0, False: 292]
  |  Branch (192:5): [True: 292, False: 0]
  ------------------
  193|       |
  194|    292|    *type = lookup[element].type;
  195|    292|    *size = lookup[element].size;
  196|    292|    *slot = lookup[element].slot;
  197|    292|}
ZydisGetAccessedFlags:
  207|    174|{
  208|    174|    ZYAN_ASSERT(definition->flags_reference < ZYAN_ARRAY_LENGTH(ACCESSED_FLAGS));
  ------------------
  |  |  381|    174|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (208:5): [True: 0, False: 174]
  |  Branch (208:5): [True: 174, False: 0]
  ------------------
  209|    174|    *flags = &ACCESSED_FLAGS[definition->flags_reference];
  210|    174|    return (definition->flags_reference != 0);
  211|    174|}

ZydisCalcAbsoluteAddress:
   43|     95|{
   44|     95|    if (!instruction || !operand || !result_address)
  ------------------
  |  Branch (44:9): [True: 0, False: 95]
  |  Branch (44:25): [True: 0, False: 95]
  |  Branch (44:37): [True: 0, False: 95]
  ------------------
   45|      0|    {
   46|      0|        return ZYAN_STATUS_INVALID_ARGUMENT;
  ------------------
  |  |  188|      0|    ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ZYCORE, 0x04u)
  |  |  ------------------
  |  |  |  |   68|      0|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
   47|      0|    }
   48|       |
   49|     95|    switch (operand->type)
   50|     95|    {
   51|     82|    case ZYDIS_OPERAND_TYPE_MEMORY:
  ------------------
  |  Branch (51:5): [True: 82, False: 13]
  ------------------
   52|     82|        if (!operand->mem.disp.size)
  ------------------
  |  Branch (52:13): [True: 20, False: 62]
  ------------------
   53|     20|        {
   54|     20|            return ZYAN_STATUS_INVALID_ARGUMENT;
  ------------------
  |  |  188|     20|    ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ZYCORE, 0x04u)
  |  |  ------------------
  |  |  |  |   68|     20|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
   55|     20|        }
   56|     62|        if (operand->mem.base == ZYDIS_REGISTER_EIP)
  ------------------
  |  Branch (56:13): [True: 21, False: 41]
  ------------------
   57|     21|        {
   58|     21|            *result_address = ((ZyanU32)runtime_address + instruction->length +
   59|     21|                (ZyanU32)operand->mem.disp.value);
   60|     21|            return ZYAN_STATUS_SUCCESS;
  ------------------
  |  |  164|     21|    ZYAN_MAKE_STATUS(0u, ZYAN_MODULE_ZYCORE, 0x00u)
  |  |  ------------------
  |  |  |  |   68|     21|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
   61|     21|        }
   62|     41|        if (operand->mem.base == ZYDIS_REGISTER_RIP)
  ------------------
  |  Branch (62:13): [True: 21, False: 20]
  ------------------
   63|     21|        {
   64|     21|            *result_address = (ZyanU64)(runtime_address + instruction->length +
   65|     21|                operand->mem.disp.value);
   66|     21|            return ZYAN_STATUS_SUCCESS;
  ------------------
  |  |  164|     21|    ZYAN_MAKE_STATUS(0u, ZYAN_MODULE_ZYCORE, 0x00u)
  |  |  ------------------
  |  |  |  |   68|     21|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
   67|     21|        }
   68|     20|        if ((operand->mem.base == ZYDIS_REGISTER_NONE) &&
  ------------------
  |  Branch (68:13): [True: 12, False: 8]
  ------------------
   69|     12|            (operand->mem.index == ZYDIS_REGISTER_NONE))
  ------------------
  |  Branch (69:13): [True: 8, False: 4]
  ------------------
   70|      8|        {
   71|      8|            switch (instruction->address_width)
   72|      8|            {
   73|      2|            case 16:
  ------------------
  |  Branch (73:13): [True: 2, False: 6]
  ------------------
   74|      2|                *result_address = (ZyanU64)operand->mem.disp.value & 0x000000000000FFFF;
   75|      2|                return ZYAN_STATUS_SUCCESS;
  ------------------
  |  |  164|      2|    ZYAN_MAKE_STATUS(0u, ZYAN_MODULE_ZYCORE, 0x00u)
  |  |  ------------------
  |  |  |  |   68|      2|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
   76|      2|            case 32:
  ------------------
  |  Branch (76:13): [True: 2, False: 6]
  ------------------
   77|      2|                *result_address = (ZyanU64)operand->mem.disp.value & 0x00000000FFFFFFFF;
   78|      2|                return ZYAN_STATUS_SUCCESS;
  ------------------
  |  |  164|      2|    ZYAN_MAKE_STATUS(0u, ZYAN_MODULE_ZYCORE, 0x00u)
  |  |  ------------------
  |  |  |  |   68|      2|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
   79|      4|            case 64:
  ------------------
  |  Branch (79:13): [True: 4, False: 4]
  ------------------
   80|      4|                *result_address = (ZyanU64)operand->mem.disp.value;
   81|      4|                return ZYAN_STATUS_SUCCESS;
  ------------------
  |  |  164|      4|    ZYAN_MAKE_STATUS(0u, ZYAN_MODULE_ZYCORE, 0x00u)
  |  |  ------------------
  |  |  |  |   68|      4|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
   82|      0|            default:
  ------------------
  |  Branch (82:13): [True: 0, False: 8]
  ------------------
   83|      0|                return ZYAN_STATUS_INVALID_ARGUMENT;
  ------------------
  |  |  188|      0|    ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ZYCORE, 0x04u)
  |  |  ------------------
  |  |  |  |   68|      0|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
   84|      8|            }
   85|      8|        }
   86|     12|        break;
   87|     13|    case ZYDIS_OPERAND_TYPE_IMMEDIATE:
  ------------------
  |  Branch (87:5): [True: 13, False: 82]
  ------------------
   88|     13|        if (!operand->imm.is_address)
  ------------------
  |  Branch (88:13): [True: 0, False: 13]
  ------------------
   89|      0|        {
   90|      0|            return ZYAN_STATUS_INVALID_ARGUMENT;
  ------------------
  |  |  188|      0|    ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ZYCORE, 0x04u)
  |  |  ------------------
  |  |  |  |   68|      0|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
   91|      0|        }
   92|       |
   93|     13|        if (operand->imm.is_signed && operand->imm.is_relative)
  ------------------
  |  Branch (93:13): [True: 13, False: 0]
  |  Branch (93:39): [True: 13, False: 0]
  ------------------
   94|     13|        {
   95|     13|            *result_address = (ZyanU64)((ZyanI64)runtime_address + instruction->length +
   96|     13|                operand->imm.value.s);
   97|     13|            switch (instruction->machine_mode)
   98|     13|            {
   99|      3|            case ZYDIS_MACHINE_MODE_LONG_COMPAT_16:
  ------------------
  |  Branch (99:13): [True: 3, False: 10]
  ------------------
  100|      8|            case ZYDIS_MACHINE_MODE_LEGACY_16:
  ------------------
  |  Branch (100:13): [True: 5, False: 8]
  ------------------
  101|     10|            case ZYDIS_MACHINE_MODE_REAL_16:
  ------------------
  |  Branch (101:13): [True: 2, False: 11]
  ------------------
  102|     10|            case ZYDIS_MACHINE_MODE_LONG_COMPAT_32:
  ------------------
  |  Branch (102:13): [True: 0, False: 13]
  ------------------
  103|     10|            case ZYDIS_MACHINE_MODE_LEGACY_32:
  ------------------
  |  Branch (103:13): [True: 0, False: 13]
  ------------------
  104|       |                // `XBEGIN` is a special case as it doesn't truncate computed address
  105|       |                // This behavior is documented by Intel (SDM Vol. 2C):
  106|       |                // Use of the 16-bit operand size does not cause this address to be truncated to
  107|       |                // 16 bits, unlike a near jump to a relative offset.
  108|     10|                if ((instruction->operand_width == 16) &&
  ------------------
  |  Branch (108:21): [True: 2, False: 8]
  ------------------
  109|      2|                    (instruction->mnemonic != ZYDIS_MNEMONIC_XBEGIN))
  ------------------
  |  Branch (109:21): [True: 2, False: 0]
  ------------------
  110|      2|                {
  111|      2|                    *result_address &= 0xFFFF;
  112|      2|                }
  113|     10|                break;
  114|      3|            case ZYDIS_MACHINE_MODE_LONG_64:
  ------------------
  |  Branch (114:13): [True: 3, False: 10]
  ------------------
  115|      3|                break;
  116|      0|            default:
  ------------------
  |  Branch (116:13): [True: 0, False: 13]
  ------------------
  117|      0|                return ZYAN_STATUS_INVALID_ARGUMENT;
  ------------------
  |  |  188|      0|    ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ZYCORE, 0x04u)
  |  |  ------------------
  |  |  |  |   68|      0|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
  118|     13|            }
  119|     13|            return ZYAN_STATUS_SUCCESS;
  ------------------
  |  |  164|     13|    ZYAN_MAKE_STATUS(0u, ZYAN_MODULE_ZYCORE, 0x00u)
  |  |  ------------------
  |  |  |  |   68|     13|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
  120|     13|        }
  121|      0|        else if (!operand->imm.is_signed && !operand->imm.is_relative && 
  ------------------
  |  Branch (121:18): [True: 0, False: 0]
  |  Branch (121:45): [True: 0, False: 0]
  ------------------
  122|      0|            (instruction->machine_mode == ZYDIS_MACHINE_MODE_LONG_64))
  ------------------
  |  Branch (122:13): [True: 0, False: 0]
  ------------------
  123|      0|        {
  124|      0|            *result_address = operand->imm.value.u;
  125|      0|            return ZYAN_STATUS_SUCCESS;
  ------------------
  |  |  164|      0|    ZYAN_MAKE_STATUS(0u, ZYAN_MODULE_ZYCORE, 0x00u)
  |  |  ------------------
  |  |  |  |   68|      0|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
  126|      0|        }
  127|      0|        break;
  128|      0|    default:
  ------------------
  |  Branch (128:5): [True: 0, False: 95]
  ------------------
  129|      0|        break;
  130|     95|    }
  131|       |
  132|     12|    return ZYAN_STATUS_INVALID_ARGUMENT;
  ------------------
  |  |  188|     12|    ZYAN_MAKE_STATUS(1u, ZYAN_MODULE_ZYCORE, 0x04u)
  |  |  ------------------
  |  |  |  |   68|     12|    (ZyanStatus)((((error) & 0x01u) << 31u) | (((module) & 0x7FFu) << 20u) | ((code) & 0xFFFFFu))
  |  |  ------------------
  ------------------
  133|     95|}

ZydisGetVersion:
   34|      2|{
   35|      2|    return ZYDIS_VERSION;
  ------------------
  |  |   89|      2|#define ZYDIS_VERSION 0x0005000000000000ULL
  ------------------
   36|      2|}

ZydisCompareRequestToInstruction:
   42|     87|{
   43|       |    // Special case, `xchg rAX, rAX` is an alias for `NOP`
   44|     87|    if ((request->mnemonic == ZYDIS_MNEMONIC_XCHG) &&
  ------------------
  |  Branch (44:9): [True: 0, False: 87]
  ------------------
   45|      0|        (request->operand_count == 2) &&
  ------------------
  |  Branch (45:9): [True: 0, False: 0]
  ------------------
   46|      0|        (request->operands[0].type == ZYDIS_OPERAND_TYPE_REGISTER) &&
  ------------------
  |  Branch (46:9): [True: 0, False: 0]
  ------------------
   47|      0|        (request->operands[1].type == ZYDIS_OPERAND_TYPE_REGISTER) &&
  ------------------
  |  Branch (47:9): [True: 0, False: 0]
  ------------------
   48|      0|        (request->operands[0].reg.value == request->operands[1].reg.value) &&
  ------------------
  |  Branch (48:9): [True: 0, False: 0]
  ------------------
   49|      0|        (insn->mnemonic == ZYDIS_MNEMONIC_NOP))
  ------------------
  |  Branch (49:9): [True: 0, False: 0]
  ------------------
   50|      0|    {
   51|      0|        switch (request->operands[0].reg.value)
   52|      0|        {
   53|      0|        case ZYDIS_REGISTER_AX:
  ------------------
  |  Branch (53:9): [True: 0, False: 0]
  ------------------
   54|      0|        case ZYDIS_REGISTER_EAX:
  ------------------
  |  Branch (54:9): [True: 0, False: 0]
  ------------------
   55|      0|        case ZYDIS_REGISTER_RAX:
  ------------------
  |  Branch (55:9): [True: 0, False: 0]
  ------------------
   56|      0|            return;
   57|      0|        default:
  ------------------
  |  Branch (57:9): [True: 0, False: 0]
  ------------------
   58|      0|            break;
   59|      0|        }
   60|      0|    }
   61|       |
   62|     87|    ZyanBool prefixes_match = ((insn->attributes & request->prefixes) == request->prefixes);
   63|     87|    if (!prefixes_match &&
  ------------------
  |  Branch (63:9): [True: 1, False: 86]
  ------------------
   64|      1|        (request->machine_mode != ZYDIS_MACHINE_MODE_LONG_64) &&
  ------------------
  |  Branch (64:9): [True: 1, False: 0]
  ------------------
   65|      1|        (request->prefixes & ZYDIS_ATTRIB_HAS_SEGMENT_DS))
  ------------------
  |  |  712|      1|#define ZYDIS_ATTRIB_HAS_SEGMENT_DS             (1ULL << 39)
  ------------------
  |  Branch (65:9): [True: 1, False: 0]
  ------------------
   66|      1|    {
   67|       |        // Encoder allows specifying DS override even when it might be interpreted as NOTRACK
   68|      1|        ZyanU64 acceptable_prefixes = (request->prefixes & (~ZYDIS_ATTRIB_HAS_SEGMENT_DS)) |
  ------------------
  |  |  712|      1|#define ZYDIS_ATTRIB_HAS_SEGMENT_DS             (1ULL << 39)
  ------------------
   69|      1|                                      ZYDIS_ATTRIB_HAS_NOTRACK;
  ------------------
  |  |  700|      1|#define ZYDIS_ATTRIB_HAS_NOTRACK                (1ULL << 36)
  ------------------
   70|      1|        prefixes_match = ((insn->attributes & acceptable_prefixes) == acceptable_prefixes);
   71|      1|    }
   72|     87|    if ((request->machine_mode != insn->machine_mode) ||
  ------------------
  |  Branch (72:9): [True: 0, False: 87]
  ------------------
   73|     87|        (request->mnemonic != insn->mnemonic) ||
  ------------------
  |  Branch (73:9): [True: 0, False: 87]
  ------------------
   74|     87|        (request->operand_count != insn->operand_count_visible) ||
  ------------------
  |  Branch (74:9): [True: 0, False: 87]
  ------------------
   75|     87|        !prefixes_match)
  ------------------
  |  Branch (75:9): [True: 0, False: 87]
  ------------------
   76|      0|    {
   77|      0|        fputs("Basic instruction attributes mismatch\n", ZYAN_STDERR);
  ------------------
  |  |   93|      0|#define ZYAN_STDERR     stderr
  ------------------
   78|      0|        abort();
   79|      0|    }
   80|       |
   81|    237|    for (ZyanU8 i = 0; i < insn->operand_count_visible; ++i)
  ------------------
  |  Branch (81:24): [True: 150, False: 87]
  ------------------
   82|    150|    {
   83|    150|        const ZydisEncoderOperand *op1 = &request->operands[i];
   84|    150|        const ZydisDecodedOperand *op2 = &operands[i];
   85|    150|        if (op1->type != op2->type)
  ------------------
  |  Branch (85:13): [True: 0, False: 150]
  ------------------
   86|      0|        {
   87|      0|            fprintf(ZYAN_STDERR, "Mismatch for operand %u\n", i);
  ------------------
  |  |   93|      0|#define ZYAN_STDERR     stderr
  ------------------
   88|      0|            abort();
   89|      0|        }
   90|    150|        switch (op1->type)
   91|    150|        {
   92|     79|        case ZYDIS_OPERAND_TYPE_REGISTER:
  ------------------
  |  Branch (92:9): [True: 79, False: 71]
  ------------------
   93|     79|            if (op1->reg.value != op2->reg.value)
  ------------------
  |  Branch (93:17): [True: 0, False: 79]
  ------------------
   94|      0|            {
   95|      0|                fprintf(ZYAN_STDERR, "Mismatch for register operand %u\n", i);
  ------------------
  |  |   93|      0|#define ZYAN_STDERR     stderr
  ------------------
   96|      0|                abort();
   97|      0|            }
   98|     79|            break;
   99|     79|        case ZYDIS_OPERAND_TYPE_MEMORY:
  ------------------
  |  Branch (99:9): [True: 26, False: 124]
  ------------------
  100|     26|            if ((op1->mem.base != op2->mem.base) ||
  ------------------
  |  Branch (100:17): [True: 0, False: 26]
  ------------------
  101|     26|                (op1->mem.index != op2->mem.index) ||
  ------------------
  |  Branch (101:17): [True: 0, False: 26]
  ------------------
  102|     26|                (op1->mem.scale != op2->mem.scale && op2->mem.type != ZYDIS_MEMOP_TYPE_MIB) ||
  ------------------
  |  Branch (102:18): [True: 0, False: 26]
  |  Branch (102:54): [True: 0, False: 0]
  ------------------
  103|     26|                (op1->mem.displacement != op2->mem.disp.value))
  ------------------
  |  Branch (103:17): [True: 0, False: 26]
  ------------------
  104|      0|            {
  105|      0|                ZyanBool acceptable_mismatch = ZYAN_FALSE;
  ------------------
  |  |  287|      0|#define ZYAN_FALSE 0u
  ------------------
  106|      0|                if (op1->mem.displacement != op2->mem.disp.value)
  ------------------
  |  Branch (106:21): [True: 0, False: 0]
  ------------------
  107|      0|                {
  108|      0|                    if ((op2->mem.disp.size) &&
  ------------------
  |  Branch (108:25): [True: 0, False: 0]
  ------------------
  109|      0|                        (op1->mem.index == ZYDIS_REGISTER_NONE) &&
  ------------------
  |  Branch (109:25): [True: 0, False: 0]
  ------------------
  110|      0|                        ((op1->mem.base == ZYDIS_REGISTER_NONE) ||
  ------------------
  |  Branch (110:26): [True: 0, False: 0]
  ------------------
  111|      0|                         (op1->mem.base == ZYDIS_REGISTER_EIP) ||
  ------------------
  |  Branch (111:26): [True: 0, False: 0]
  ------------------
  112|      0|                         (op1->mem.base == ZYDIS_REGISTER_RIP)))
  ------------------
  |  Branch (112:26): [True: 0, False: 0]
  ------------------
  113|      0|                    {
  114|      0|                        ZyanU64 addr;
  115|      0|                        ZydisCalcAbsoluteAddress(insn, op2, 0, &addr);
  116|      0|                        acceptable_mismatch = ((ZyanU64)op1->mem.displacement == addr);
  117|      0|                    }
  118|      0|                    if ((insn->machine_mode == ZYDIS_MACHINE_MODE_REAL_16) ||
  ------------------
  |  Branch (118:25): [True: 0, False: 0]
  ------------------
  119|      0|                        (insn->machine_mode == ZYDIS_MACHINE_MODE_LEGACY_16) ||
  ------------------
  |  Branch (119:25): [True: 0, False: 0]
  ------------------
  120|      0|                        (insn->machine_mode == ZYDIS_MACHINE_MODE_LONG_COMPAT_16) ||
  ------------------
  |  Branch (120:25): [True: 0, False: 0]
  ------------------
  121|      0|                        (insn->stack_width == 16) ||
  ------------------
  |  Branch (121:25): [True: 0, False: 0]
  ------------------
  122|      0|                        (insn->address_width == 16))
  ------------------
  |  Branch (122:25): [True: 0, False: 0]
  ------------------
  123|      0|                    {
  124|      0|                        acceptable_mismatch = ((op1->mem.displacement & 0xFFFF) ==
  125|      0|                            (op2->mem.disp.value & 0xFFFF));
  126|      0|                    }
  127|      0|                }
  128|      0|                if (!acceptable_mismatch)
  ------------------
  |  Branch (128:21): [True: 0, False: 0]
  ------------------
  129|      0|                {
  130|      0|                    fprintf(ZYAN_STDERR, "Mismatch for memory operand %u\n", i);
  ------------------
  |  |   93|      0|#define ZYAN_STDERR     stderr
  ------------------
  131|      0|                    abort();
  132|      0|                }
  133|      0|            }
  134|     26|            break;
  135|     26|        case ZYDIS_OPERAND_TYPE_POINTER:
  ------------------
  |  Branch (135:9): [True: 4, False: 146]
  ------------------
  136|      4|            if ((op1->ptr.segment != op2->ptr.segment) ||
  ------------------
  |  Branch (136:17): [True: 0, False: 4]
  ------------------
  137|      4|                (op1->ptr.offset != op2->ptr.offset))
  ------------------
  |  Branch (137:17): [True: 0, False: 4]
  ------------------
  138|      0|            {
  139|      0|                fprintf(ZYAN_STDERR, "Mismatch for pointer operand %u\n", i);
  ------------------
  |  |   93|      0|#define ZYAN_STDERR     stderr
  ------------------
  140|      0|                abort();
  141|      0|            }
  142|      4|            break;
  143|     41|        case ZYDIS_OPERAND_TYPE_IMMEDIATE:
  ------------------
  |  Branch (143:9): [True: 41, False: 109]
  ------------------
  144|     41|            if (op1->imm.u != op2->imm.value.u)
  ------------------
  |  Branch (144:17): [True: 0, False: 41]
  ------------------
  145|      0|            {
  146|      0|                ZyanBool acceptable_mismatch = ZYAN_FALSE;
  ------------------
  |  |  287|      0|#define ZYAN_FALSE 0u
  ------------------
  147|      0|                if ((insn->meta.category == ZYDIS_CATEGORY_DATAXFER) ||
  ------------------
  |  Branch (147:21): [True: 0, False: 0]
  ------------------
  148|      0|                    (insn->meta.category == ZYDIS_CATEGORY_LOGICAL))
  ------------------
  |  Branch (148:21): [True: 0, False: 0]
  ------------------
  149|      0|                {
  150|      0|                    if (op2->size < 64)
  ------------------
  |  Branch (150:25): [True: 0, False: 0]
  ------------------
  151|      0|                    {
  152|      0|                        ZyanU64 mask = (1ULL << op2->size) - 1;
  153|      0|                        acceptable_mismatch =
  154|      0|                            (op1->imm.u & mask) == (op2->imm.value.u & mask);
  155|      0|                    }
  156|      0|                    else
  157|      0|                    {
  158|      0|                        acceptable_mismatch = op1->imm.u == op2->imm.value.u;
  159|      0|                    }
  160|      0|                }
  161|      0|                if (!acceptable_mismatch)
  ------------------
  |  Branch (161:21): [True: 0, False: 0]
  ------------------
  162|      0|                {
  163|      0|                    fprintf(ZYAN_STDERR, "Mismatch for immediate operand %u\n", i);
  ------------------
  |  |   93|      0|#define ZYAN_STDERR     stderr
  ------------------
  164|      0|                    abort();
  165|      0|                }
  166|      0|            }
  167|     41|            break;
  168|     41|        default:
  ------------------
  |  Branch (168:9): [True: 0, False: 150]
  ------------------
  169|       |            fprintf(ZYAN_STDERR, "Invalid operand type for operand %u\n", i);
  ------------------
  |  |   93|      0|#define ZYAN_STDERR     stderr
  ------------------
  170|      0|            abort();
  171|    150|        }
  172|    150|    }
  173|     87|}
ZydisFuzzTarget:
  177|  3.10k|{
  178|  3.10k|    ZydisEncoderRequest request;
  179|  3.10k|    if (read_fn(stream_ctx, (ZyanU8 *)&request, sizeof(request)) != sizeof(request))
  ------------------
  |  Branch (179:9): [True: 23, False: 3.08k]
  ------------------
  180|     23|    {
  181|     23|        ZYDIS_MAYBE_FPUTS("Not enough bytes to fuzz\n", ZYAN_STDERR);
  182|     23|        return EXIT_SUCCESS;
  183|     23|    }
  184|       |
  185|       |    // Sanitization greatly improves coverage, without it most inputs will fail at basic checks
  186|       |    // inside `ZydisEncoderCheckRequestSanity`
  187|  3.08k|    request.operand_count %= ZYDIS_ENCODER_MAX_OPERANDS + 1;
  ------------------
  |  |   57|  3.08k|#define ZYDIS_ENCODER_MAX_OPERANDS 5
  ------------------
  188|  3.08k|    ZYDIS_SANITIZE_MASK32(request.allowed_encodings, ZydisEncodableEncoding,
  ------------------
  |  |   60|  3.08k|#define ZYDIS_SANITIZE_MASK32(var, type, mask)    ZYDIS_SANITIZE_MASK(var, type, 32, mask)
  |  |  ------------------
  |  |  |  |   59|  3.08k|    var = (type)((ZyanU##type_size)(var) & (mask))
  |  |  ------------------
  ------------------
  189|  3.08k|        ZYDIS_ENCODABLE_ENCODING_MAX_VALUE);
  190|  3.08k|    ZYDIS_SANITIZE_MASK64(request.prefixes, ZydisInstructionAttributes, ZYDIS_ENCODABLE_PREFIXES);
  ------------------
  |  |   61|  3.08k|#define ZYDIS_SANITIZE_MASK64(var, type, mask)    ZYDIS_SANITIZE_MASK(var, type, 64, mask)
  |  |  ------------------
  |  |  |  |   59|  3.08k|    var = (type)((ZyanU##type_size)(var) & (mask))
  |  |  ------------------
  ------------------
  191|  3.08k|    ZYDIS_SANITIZE_ENUM(request.machine_mode, ZydisMachineMode, ZYDIS_MACHINE_MODE_MAX_VALUE);
  ------------------
  |  |   62|  3.08k|#define ZYDIS_SANITIZE_ENUM(var, type, max_value) var = (type)((ZyanUSize)(ZyanU32)(var) % \
  |  |   63|  3.08k|                                                        (max_value + 1))
  ------------------
  192|  3.08k|    ZYDIS_SANITIZE_ENUM(request.mnemonic, ZydisMnemonic, ZYDIS_MNEMONIC_MAX_VALUE);
  ------------------
  |  |   62|  3.08k|#define ZYDIS_SANITIZE_ENUM(var, type, max_value) var = (type)((ZyanUSize)(ZyanU32)(var) % \
  |  |   63|  3.08k|                                                        (max_value + 1))
  ------------------
  193|  3.08k|    ZYDIS_SANITIZE_ENUM(request.branch_type, ZydisBranchType, ZYDIS_BRANCH_TYPE_MAX_VALUE);
  ------------------
  |  |   62|  3.08k|#define ZYDIS_SANITIZE_ENUM(var, type, max_value) var = (type)((ZyanUSize)(ZyanU32)(var) % \
  |  |   63|  3.08k|                                                        (max_value + 1))
  ------------------
  194|  3.08k|    ZYDIS_SANITIZE_ENUM(request.branch_width, ZydisBranchWidth, ZYDIS_BRANCH_WIDTH_MAX_VALUE);
  ------------------
  |  |   62|  3.08k|#define ZYDIS_SANITIZE_ENUM(var, type, max_value) var = (type)((ZyanUSize)(ZyanU32)(var) % \
  |  |   63|  3.08k|                                                        (max_value + 1))
  ------------------
  195|  3.08k|    ZYDIS_SANITIZE_ENUM(request.address_size_hint, ZydisAddressSizeHint,
  ------------------
  |  |   62|  3.08k|#define ZYDIS_SANITIZE_ENUM(var, type, max_value) var = (type)((ZyanUSize)(ZyanU32)(var) % \
  |  |   63|  3.08k|                                                        (max_value + 1))
  ------------------
  196|  3.08k|        ZYDIS_ADDRESS_SIZE_HINT_MAX_VALUE);
  197|  3.08k|    ZYDIS_SANITIZE_ENUM(request.operand_size_hint, ZydisOperandSizeHint,
  ------------------
  |  |   62|  3.08k|#define ZYDIS_SANITIZE_ENUM(var, type, max_value) var = (type)((ZyanUSize)(ZyanU32)(var) % \
  |  |   63|  3.08k|                                                        (max_value + 1))
  ------------------
  198|  3.08k|        ZYDIS_OPERAND_SIZE_HINT_MAX_VALUE);
  199|  3.08k|    ZYDIS_SANITIZE_ENUM(request.evex.broadcast, ZydisBroadcastMode, ZYDIS_BROADCAST_MODE_MAX_VALUE);
  ------------------
  |  |   62|  3.08k|#define ZYDIS_SANITIZE_ENUM(var, type, max_value) var = (type)((ZyanUSize)(ZyanU32)(var) % \
  |  |   63|  3.08k|                                                        (max_value + 1))
  ------------------
  200|  3.08k|    ZYDIS_SANITIZE_ENUM(request.evex.rounding, ZydisRoundingMode, ZYDIS_ROUNDING_MODE_MAX_VALUE);
  ------------------
  |  |   62|  3.08k|#define ZYDIS_SANITIZE_ENUM(var, type, max_value) var = (type)((ZyanUSize)(ZyanU32)(var) % \
  |  |   63|  3.08k|                                                        (max_value + 1))
  ------------------
  201|  3.08k|    ZYDIS_SANITIZE_ENUM(request.mvex.broadcast, ZydisBroadcastMode, ZYDIS_BROADCAST_MODE_MAX_VALUE);
  ------------------
  |  |   62|  3.08k|#define ZYDIS_SANITIZE_ENUM(var, type, max_value) var = (type)((ZyanUSize)(ZyanU32)(var) % \
  |  |   63|  3.08k|                                                        (max_value + 1))
  ------------------
  202|  3.08k|    ZYDIS_SANITIZE_ENUM(request.mvex.conversion, ZydisConversionMode,
  ------------------
  |  |   62|  3.08k|#define ZYDIS_SANITIZE_ENUM(var, type, max_value) var = (type)((ZyanUSize)(ZyanU32)(var) % \
  |  |   63|  3.08k|                                                        (max_value + 1))
  ------------------
  203|  3.08k|        ZYDIS_CONVERSION_MODE_MAX_VALUE);
  204|  3.08k|    ZYDIS_SANITIZE_ENUM(request.mvex.rounding, ZydisRoundingMode, ZYDIS_ROUNDING_MODE_MAX_VALUE);
  ------------------
  |  |   62|  3.08k|#define ZYDIS_SANITIZE_ENUM(var, type, max_value) var = (type)((ZyanUSize)(ZyanU32)(var) % \
  |  |   63|  3.08k|                                                        (max_value + 1))
  ------------------
  205|  3.08k|    ZYDIS_SANITIZE_ENUM(request.mvex.swizzle, ZydisSwizzleMode, ZYDIS_SWIZZLE_MODE_MAX_VALUE);
  ------------------
  |  |   62|  3.08k|#define ZYDIS_SANITIZE_ENUM(var, type, max_value) var = (type)((ZyanUSize)(ZyanU32)(var) % \
  |  |   63|  3.08k|                                                        (max_value + 1))
  ------------------
  206|  10.0k|    for (ZyanU8 i = 0; i < request.operand_count; ++i)
  ------------------
  |  Branch (206:24): [True: 6.95k, False: 3.08k]
  ------------------
  207|  6.95k|    {
  208|  6.95k|        ZydisEncoderOperand *op = &request.operands[i];
  209|  6.95k|        op->type = (ZydisOperandType)(ZYDIS_OPERAND_TYPE_REGISTER +
  210|  6.95k|            ((ZyanUSize)op->type % ZYDIS_OPERAND_TYPE_MAX_VALUE));
  211|  6.95k|        switch (op->type)
  212|  6.95k|        {
  213|  3.91k|        case ZYDIS_OPERAND_TYPE_REGISTER:
  ------------------
  |  Branch (213:9): [True: 3.91k, False: 3.04k]
  ------------------
  214|  3.91k|            ZYDIS_SANITIZE_ENUM(op->reg.value, ZydisRegister, ZYDIS_REGISTER_MAX_VALUE);
  ------------------
  |  |   62|  3.91k|#define ZYDIS_SANITIZE_ENUM(var, type, max_value) var = (type)((ZyanUSize)(ZyanU32)(var) % \
  |  |   63|  3.91k|                                                        (max_value + 1))
  ------------------
  215|  3.91k|            break;
  216|  1.84k|        case ZYDIS_OPERAND_TYPE_MEMORY:
  ------------------
  |  Branch (216:9): [True: 1.84k, False: 5.11k]
  ------------------
  217|  1.84k|            ZYDIS_SANITIZE_ENUM(op->mem.base, ZydisRegister, ZYDIS_REGISTER_MAX_VALUE);
  ------------------
  |  |   62|  1.84k|#define ZYDIS_SANITIZE_ENUM(var, type, max_value) var = (type)((ZyanUSize)(ZyanU32)(var) % \
  |  |   63|  1.84k|                                                        (max_value + 1))
  ------------------
  218|  1.84k|            ZYDIS_SANITIZE_ENUM(op->mem.index, ZydisRegister, ZYDIS_REGISTER_MAX_VALUE);
  ------------------
  |  |   62|  1.84k|#define ZYDIS_SANITIZE_ENUM(var, type, max_value) var = (type)((ZyanUSize)(ZyanU32)(var) % \
  |  |   63|  1.84k|                                                        (max_value + 1))
  ------------------
  219|  1.84k|            break;
  220|     88|        case ZYDIS_OPERAND_TYPE_POINTER:
  ------------------
  |  Branch (220:9): [True: 88, False: 6.86k]
  ------------------
  221|  1.20k|        case ZYDIS_OPERAND_TYPE_IMMEDIATE:
  ------------------
  |  Branch (221:9): [True: 1.11k, False: 5.84k]
  ------------------
  222|  1.20k|            break;
  223|      0|        default:
  ------------------
  |  Branch (223:9): [True: 0, False: 6.95k]
  ------------------
  224|      0|            ZYAN_UNREACHABLE;
  ------------------
  |  |  431|      0|#   define ZYAN_UNREACHABLE { assert(0); abort(); }
  ------------------
  |  Branch (224:13): [Folded, False: 0]
  |  Branch (224:13): [Folded, False: 0]
  ------------------
  225|  6.95k|        }
  226|  6.95k|    }
  227|       |
  228|       |    // APX has conflicts with KNC, so we override `ZYDIS_ENCODABLE_ENCODING_DEFAULT` to disallow
  229|       |    // `MVEX` unless `MVEX`-only features are required.
  230|  3.08k|    const ZyanBool requested_knc =
  231|  3.08k|        (request.mvex.broadcast != ZYDIS_BROADCAST_MODE_NONE) ||
  ------------------
  |  Branch (231:9): [True: 97, False: 2.98k]
  ------------------
  232|  2.98k|        (request.mvex.conversion != ZYDIS_CONVERSION_MODE_NONE) ||
  ------------------
  |  Branch (232:9): [True: 91, False: 2.89k]
  ------------------
  233|  2.89k|        (request.mvex.rounding != ZYDIS_ROUNDING_MODE_NONE) ||
  ------------------
  |  Branch (233:9): [True: 20, False: 2.87k]
  ------------------
  234|  2.87k|        (request.mvex.swizzle != ZYDIS_SWIZZLE_MODE_NONE) ||
  ------------------
  |  Branch (234:9): [True: 24, False: 2.84k]
  ------------------
  235|  2.84k|        (request.mvex.sae) ||
  ------------------
  |  Branch (235:9): [True: 40, False: 2.80k]
  ------------------
  236|  2.80k|        (request.mvex.eviction_hint) ||
  ------------------
  |  Branch (236:9): [True: 59, False: 2.74k]
  ------------------
  237|  2.74k|        (request.mnemonic == ZYDIS_MNEMONIC_KMOV) ||
  ------------------
  |  Branch (237:9): [True: 0, False: 2.74k]
  ------------------
  238|  2.74k|        (request.mnemonic == ZYDIS_MNEMONIC_KNOT) ||
  ------------------
  |  Branch (238:9): [True: 0, False: 2.74k]
  ------------------
  239|  2.74k|        (request.mnemonic == ZYDIS_MNEMONIC_KORTEST);
  ------------------
  |  Branch (239:9): [True: 2, False: 2.74k]
  ------------------
  240|  3.08k|    static const ZydisEncodableEncoding conflicting_encodings =
  241|  3.08k|        ZYDIS_ENCODABLE_ENCODING_EVEX | ZYDIS_ENCODABLE_ENCODING_MVEX;
  242|  3.08k|    static const ZydisEncodableEncoding no_mvex = (ZydisEncodableEncoding)
  243|  3.08k|        (ZYDIS_ENCODABLE_ENCODING_MAX_VALUE & (~ZYDIS_ENCODABLE_ENCODING_MVEX));
  244|  3.08k|    if ((request.allowed_encodings == ZYDIS_ENCODABLE_ENCODING_DEFAULT) && (!requested_knc))
  ------------------
  |  Branch (244:9): [True: 1.59k, False: 1.48k]
  |  Branch (244:76): [True: 1.38k, False: 207]
  ------------------
  245|  1.38k|    {
  246|  1.38k|        request.allowed_encodings = no_mvex;
  247|  1.38k|    }
  248|  1.69k|    else if ((request.allowed_encodings & conflicting_encodings) == conflicting_encodings)
  ------------------
  |  Branch (248:14): [True: 714, False: 982]
  ------------------
  249|    714|    {
  250|       |        // In case of potential conflict favor `EVEX` space
  251|    714|        request.allowed_encodings =
  252|    714|            (ZydisEncodableEncoding)(request.allowed_encodings & (~ZYDIS_ENCODABLE_ENCODING_MVEX));
  253|    714|    }
  254|  3.08k|    if ((request.allowed_encodings & ZYDIS_ENCODABLE_ENCODING_MVEX) != 0)
  ------------------
  |  Branch (254:9): [True: 259, False: 2.82k]
  ------------------
  255|    259|    {
  256|    259|        if ((request.mnemonic == ZYDIS_MNEMONIC_KMOVW) ||
  ------------------
  |  Branch (256:13): [True: 0, False: 259]
  ------------------
  257|    259|            (request.mnemonic == ZYDIS_MNEMONIC_KNOTW) ||
  ------------------
  |  Branch (257:13): [True: 1, False: 258]
  ------------------
  258|    258|            (request.mnemonic == ZYDIS_MNEMONIC_KORTESTW))
  ------------------
  |  Branch (258:13): [True: 1, False: 257]
  ------------------
  259|      2|        {
  260|      2|            request.allowed_encodings = no_mvex;
  261|      2|        }
  262|    259|    }
  263|       |
  264|  3.08k|    ZyanU8 encoded_instruction[ZYDIS_MAX_INSTRUCTION_LENGTH];
  265|  3.08k|    ZyanUSize encoded_length = sizeof(encoded_instruction);
  266|  3.08k|    ZyanStatus status = ZydisEncoderEncodeInstruction(&request, encoded_instruction,
  267|  3.08k|        &encoded_length);
  268|  3.08k|    if (!ZYAN_SUCCESS(status))
  ------------------
  |  |   82|  3.08k|    (!((status) & 0x80000000u))
  ------------------
  |  Branch (268:9): [True: 2.99k, False: 87]
  ------------------
  269|  2.99k|    {
  270|  2.99k|#ifdef ZYDIS_LIBFUZZER
  271|  2.99k|        return EXIT_SUCCESS;
  272|       |#else
  273|       |        return EXIT_ENCODING_FAILURE;
  274|       |#endif // ZYDIS_LIBFUZZER
  275|  2.99k|    }
  276|       |
  277|     87|    ZydisStackWidth stack_width;
  278|     87|    switch (request.machine_mode)
  279|     87|    {
  280|     62|    case ZYDIS_MACHINE_MODE_LONG_64:
  ------------------
  |  Branch (280:5): [True: 62, False: 25]
  ------------------
  281|     62|        stack_width = ZYDIS_STACK_WIDTH_64;
  282|     62|        break;
  283|      1|    case ZYDIS_MACHINE_MODE_LONG_COMPAT_32:
  ------------------
  |  Branch (283:5): [True: 1, False: 86]
  ------------------
  284|      1|    case ZYDIS_MACHINE_MODE_LEGACY_32:
  ------------------
  |  Branch (284:5): [True: 0, False: 87]
  ------------------
  285|      1|        stack_width = ZYDIS_STACK_WIDTH_32;
  286|      1|        break;
  287|     12|    case ZYDIS_MACHINE_MODE_LONG_COMPAT_16:
  ------------------
  |  Branch (287:5): [True: 12, False: 75]
  ------------------
  288|     21|    case ZYDIS_MACHINE_MODE_LEGACY_16:
  ------------------
  |  Branch (288:5): [True: 9, False: 78]
  ------------------
  289|     24|    case ZYDIS_MACHINE_MODE_REAL_16:
  ------------------
  |  Branch (289:5): [True: 3, False: 84]
  ------------------
  290|     24|        stack_width = ZYDIS_STACK_WIDTH_16;
  291|     24|        break;
  292|      0|    default:
  ------------------
  |  Branch (292:5): [True: 0, False: 87]
  ------------------
  293|      0|        ZYAN_UNREACHABLE;
  ------------------
  |  |  431|      0|#   define ZYAN_UNREACHABLE { assert(0); abort(); }
  ------------------
  |  Branch (293:9): [Folded, False: 0]
  |  Branch (293:9): [Folded, False: 0]
  ------------------
  294|     87|    }
  295|       |
  296|     87|    ZydisDecoder decoder;
  297|     87|    if (!ZYAN_SUCCESS(ZydisDecoderInit(&decoder, request.machine_mode, stack_width)))
  ------------------
  |  |   82|     87|    (!((status) & 0x80000000u))
  ------------------
  |  Branch (297:9): [True: 0, False: 87]
  ------------------
  298|      0|    {
  299|      0|        fputs("Failed to initialize decoder\n", ZYAN_STDERR);
  ------------------
  |  |   93|      0|#define ZYAN_STDERR     stderr
  ------------------
  300|      0|        abort();
  301|      0|    }
  302|     87|    if (requested_knc || ((request.allowed_encodings & ZYDIS_ENCODABLE_ENCODING_MVEX) != 0))
  ------------------
  |  Branch (302:9): [True: 0, False: 87]
  |  Branch (302:26): [True: 1, False: 86]
  ------------------
  303|      1|    {
  304|      1|        status = ZydisDecoderEnableMode(&decoder, ZYDIS_DECODER_MODE_KNC, ZYAN_TRUE);
  ------------------
  |  |  288|      1|#define ZYAN_TRUE  1u
  ------------------
  305|      1|        if (!ZYAN_SUCCESS(status))
  ------------------
  |  |   82|      1|    (!((status) & 0x80000000u))
  ------------------
  |  Branch (305:13): [True: 0, False: 1]
  ------------------
  306|      0|        {
  307|      0|            fputs("Failed to enable KNC mode\n", ZYAN_STDERR);
  ------------------
  |  |   93|      0|#define ZYAN_STDERR     stderr
  ------------------
  308|      0|            abort();
  309|      0|        }
  310|      1|    }
  311|     87|    if (request.mnemonic == ZYDIS_MNEMONIC_UD0 && request.operand_count == 0)
  ------------------
  |  Branch (311:9): [True: 1, False: 86]
  |  Branch (311:51): [True: 1, False: 0]
  ------------------
  312|      1|    {
  313|      1|        status = ZydisDecoderEnableMode(&decoder, ZYDIS_DECODER_MODE_UD0_COMPAT, ZYAN_TRUE);
  ------------------
  |  |  288|      1|#define ZYAN_TRUE  1u
  ------------------
  314|      1|        if (!ZYAN_SUCCESS(status))
  ------------------
  |  |   82|      1|    (!((status) & 0x80000000u))
  ------------------
  |  Branch (314:13): [True: 0, False: 1]
  ------------------
  315|      0|        {
  316|      0|            fputs("Failed to enable UD0_COMPAT mode\n", ZYAN_STDERR);
  ------------------
  |  |   93|      0|#define ZYAN_STDERR     stderr
  ------------------
  317|      0|            abort();
  318|      0|        }
  319|      1|    }
  320|       |
  321|     87|    ZydisDecodedInstruction insn1;
  322|     87|    ZydisDecodedOperand operands1[ZYDIS_MAX_OPERAND_COUNT];
  323|     87|    status = ZydisDecoderDecodeFull(&decoder, encoded_instruction, encoded_length, &insn1,
  324|     87|        operands1);
  325|     87|    if (!ZYAN_SUCCESS(status))
  ------------------
  |  |   82|     87|    (!((status) & 0x80000000u))
  ------------------
  |  Branch (325:9): [True: 0, False: 87]
  ------------------
  326|      0|    {
  327|      0|        fputs("Failed to decode instruction\n", ZYAN_STDERR);
  ------------------
  |  |   93|      0|#define ZYAN_STDERR     stderr
  ------------------
  328|      0|        abort();
  329|      0|    }
  330|       |
  331|     87|    ZydisCompareRequestToInstruction(&request, &insn1, operands1);
  332|     87|    ZydisReEncodeInstruction(&decoder, &insn1, operands1, insn1.operand_count, 
  333|     87|        encoded_instruction);
  334|       |
  335|       |    return EXIT_SUCCESS;
  336|     87|}

ZydisLibFuzzerRead:
   72|  3.10k|{
   73|  3.10k|    ZydisLibFuzzerContext* c = (ZydisLibFuzzerContext*)ctx;
   74|  3.10k|    ZyanUSize len = ZYAN_MIN((ZyanUSize)(c->buf_len - c->read_offs), max_len);
  ------------------
  |  |  524|  3.10k|#define ZYAN_MIN(a, b) (((a) < (b)) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (524:25): [True: 23, False: 3.08k]
  |  |  ------------------
  ------------------
   75|       |    // printf("buf_len: %ld, read_offs: %ld, len: %ld, max_len: %ld, ptr: %p\n",
   76|       |    //     c->buf_len, c->read_offs, len, max_len, c->buf + c->read_offs);
   77|  3.10k|    if (!len)
  ------------------
  |  Branch (77:9): [True: 0, False: 3.10k]
  ------------------
   78|      0|    {
   79|      0|        return 0;
   80|      0|    }
   81|  3.10k|    ZYAN_MEMCPY(buf, c->buf + c->read_offs, len);
  ------------------
  |  |  113|  3.10k|#define ZYAN_MEMCPY     memcpy
  ------------------
   82|  3.10k|    c->read_offs += len;
   83|  3.10k|    return len;
   84|  3.10k|}
ZydisValidateImmediateSize:
  144|    142|{
  145|    142|    if ((value != 0) &&
  ------------------
  |  Branch (145:9): [True: 130, False: 12]
  ------------------
  146|    130|        (value != 8) &&
  ------------------
  |  Branch (146:9): [True: 120, False: 10]
  ------------------
  147|    120|        (value != 16) &&
  ------------------
  |  Branch (147:9): [True: 116, False: 4]
  ------------------
  148|    116|        (value != 32) &&
  ------------------
  |  Branch (148:9): [True: 34, False: 82]
  ------------------
  149|     34|        (value != 64)) 
  ------------------
  |  Branch (149:9): [True: 0, False: 34]
  ------------------
  150|      0|    {
  151|       |        fprintf(stderr, "Value 0x%016" PRIX64 " does not match any of the expected "
  152|      0|            "values (0, 8, 16, 32, 64).\n", value);
  153|      0|        abort();
  154|      0|    }
  155|    142|}
ZydisValidateEnumRanges:
  160|    174|{
  161|    174|#   define ZYDIS_CHECK_ENUM(value, max)                                                            \
  162|    174|    if ((ZyanU64)(value) > (ZyanU64)(max))                                                         \
  163|    174|    {                                                                                              \
  164|    174|        fprintf(stderr, "Value " #value " = 0x%016" PRIX64 " is above expected max " #max          \
  165|    174|            " = 0x%016" PRIX64 "\n", (ZyanU64)(value), (ZyanU64)(max));                            \
  166|    174|        abort();                                                                                   \
  167|    174|    }
  168|    174|#   define ZYDIS_CHECK_MAX ZYDIS_CHECK_ENUM
  169|       |
  170|    174|    ZYDIS_CHECK_ENUM(insn->length, ZYDIS_MAX_INSTRUCTION_LENGTH);
  ------------------
  |  |  162|    174|    if ((ZyanU64)(value) > (ZyanU64)(max))                                                         \
  |  |  ------------------
  |  |  |  Branch (162:9): [True: 0, False: 174]
  |  |  ------------------
  |  |  163|    174|    {                                                                                              \
  |  |  164|      0|        fprintf(stderr, "Value " #value " = 0x%016" PRIX64 " is above expected max " #max          \
  |  |  165|      0|            " = 0x%016" PRIX64 "\n", (ZyanU64)(value), (ZyanU64)(max));                            \
  |  |  166|      0|        abort();                                                                                   \
  |  |  167|      0|    }
  ------------------
  171|       |
  172|    174|    ZYDIS_CHECK_ENUM(insn->machine_mode, ZYDIS_MACHINE_MODE_MAX_VALUE);
  ------------------
  |  |  162|    174|    if ((ZyanU64)(value) > (ZyanU64)(max))                                                         \
  |  |  ------------------
  |  |  |  Branch (162:9): [True: 0, False: 174]
  |  |  ------------------
  |  |  163|    174|    {                                                                                              \
  |  |  164|      0|        fprintf(stderr, "Value " #value " = 0x%016" PRIX64 " is above expected max " #max          \
  |  |  165|      0|            " = 0x%016" PRIX64 "\n", (ZyanU64)(value), (ZyanU64)(max));                            \
  |  |  166|      0|        abort();                                                                                   \
  |  |  167|      0|    }
  ------------------
  173|    174|    ZYDIS_CHECK_ENUM(insn->mnemonic, ZYDIS_MNEMONIC_MAX_VALUE);
  ------------------
  |  |  162|    174|    if ((ZyanU64)(value) > (ZyanU64)(max))                                                         \
  |  |  ------------------
  |  |  |  Branch (162:9): [True: 0, False: 174]
  |  |  ------------------
  |  |  163|    174|    {                                                                                              \
  |  |  164|      0|        fprintf(stderr, "Value " #value " = 0x%016" PRIX64 " is above expected max " #max          \
  |  |  165|      0|            " = 0x%016" PRIX64 "\n", (ZyanU64)(value), (ZyanU64)(max));                            \
  |  |  166|      0|        abort();                                                                                   \
  |  |  167|      0|    }
  ------------------
  174|    174|    ZYDIS_CHECK_ENUM(insn->encoding, ZYDIS_INSTRUCTION_ENCODING_MAX_VALUE);
  ------------------
  |  |  162|    174|    if ((ZyanU64)(value) > (ZyanU64)(max))                                                         \
  |  |  ------------------
  |  |  |  Branch (162:9): [True: 0, False: 174]
  |  |  ------------------
  |  |  163|    174|    {                                                                                              \
  |  |  164|      0|        fprintf(stderr, "Value " #value " = 0x%016" PRIX64 " is above expected max " #max          \
  |  |  165|      0|            " = 0x%016" PRIX64 "\n", (ZyanU64)(value), (ZyanU64)(max));                            \
  |  |  166|      0|        abort();                                                                                   \
  |  |  167|      0|    }
  ------------------
  175|    174|    ZYDIS_CHECK_ENUM(insn->opcode_map, ZYDIS_OPCODE_MAP_MAX_VALUE);
  ------------------
  |  |  162|    174|    if ((ZyanU64)(value) > (ZyanU64)(max))                                                         \
  |  |  ------------------
  |  |  |  Branch (162:9): [True: 0, False: 174]
  |  |  ------------------
  |  |  163|    174|    {                                                                                              \
  |  |  164|      0|        fprintf(stderr, "Value " #value " = 0x%016" PRIX64 " is above expected max " #max          \
  |  |  165|      0|            " = 0x%016" PRIX64 "\n", (ZyanU64)(value), (ZyanU64)(max));                            \
  |  |  166|      0|        abort();                                                                                   \
  |  |  167|      0|    }
  ------------------
  176|    174|    ZYDIS_CHECK_ENUM(insn->opcode_map, ZYDIS_OPCODE_MAP_MAX_VALUE);
  ------------------
  |  |  162|    174|    if ((ZyanU64)(value) > (ZyanU64)(max))                                                         \
  |  |  ------------------
  |  |  |  Branch (162:9): [True: 0, False: 174]
  |  |  ------------------
  |  |  163|    174|    {                                                                                              \
  |  |  164|      0|        fprintf(stderr, "Value " #value " = 0x%016" PRIX64 " is above expected max " #max          \
  |  |  165|      0|            " = 0x%016" PRIX64 "\n", (ZyanU64)(value), (ZyanU64)(max));                            \
  |  |  166|      0|        abort();                                                                                   \
  |  |  167|      0|    }
  ------------------
  177|       |
  178|       |    // Operands.
  179|    545|    for (ZyanU32 i = 0; i < operand_count; ++i)
  ------------------
  |  Branch (179:25): [True: 371, False: 174]
  ------------------
  180|    371|    {
  181|    371|        const ZydisDecodedOperand* op = &operands[i];
  182|    371|        ZYDIS_CHECK_ENUM(op->type, ZYDIS_OPERAND_TYPE_MAX_VALUE);
  ------------------
  |  |  162|    371|    if ((ZyanU64)(value) > (ZyanU64)(max))                                                         \
  |  |  ------------------
  |  |  |  Branch (162:9): [True: 0, False: 371]
  |  |  ------------------
  |  |  163|    371|    {                                                                                              \
  |  |  164|      0|        fprintf(stderr, "Value " #value " = 0x%016" PRIX64 " is above expected max " #max          \
  |  |  165|      0|            " = 0x%016" PRIX64 "\n", (ZyanU64)(value), (ZyanU64)(max));                            \
  |  |  166|      0|        abort();                                                                                   \
  |  |  167|      0|    }
  ------------------
  183|    371|        ZYDIS_CHECK_ENUM(op->visibility, ZYDIS_OPERAND_VISIBILITY_MAX_VALUE);
  ------------------
  |  |  162|    371|    if ((ZyanU64)(value) > (ZyanU64)(max))                                                         \
  |  |  ------------------
  |  |  |  Branch (162:9): [True: 0, False: 371]
  |  |  ------------------
  |  |  163|    371|    {                                                                                              \
  |  |  164|      0|        fprintf(stderr, "Value " #value " = 0x%016" PRIX64 " is above expected max " #max          \
  |  |  165|      0|            " = 0x%016" PRIX64 "\n", (ZyanU64)(value), (ZyanU64)(max));                            \
  |  |  166|      0|        abort();                                                                                   \
  |  |  167|      0|    }
  ------------------
  184|    371|        ZYDIS_CHECK_ENUM(op->encoding, ZYDIS_OPERAND_ENCODING_MAX_VALUE);
  ------------------
  |  |  162|    371|    if ((ZyanU64)(value) > (ZyanU64)(max))                                                         \
  |  |  ------------------
  |  |  |  Branch (162:9): [True: 0, False: 371]
  |  |  ------------------
  |  |  163|    371|    {                                                                                              \
  |  |  164|      0|        fprintf(stderr, "Value " #value " = 0x%016" PRIX64 " is above expected max " #max          \
  |  |  165|      0|            " = 0x%016" PRIX64 "\n", (ZyanU64)(value), (ZyanU64)(max));                            \
  |  |  166|      0|        abort();                                                                                   \
  |  |  167|      0|    }
  ------------------
  185|    371|        ZYDIS_CHECK_ENUM(op->element_type, ZYDIS_ELEMENT_TYPE_MAX_VALUE);
  ------------------
  |  |  162|    371|    if ((ZyanU64)(value) > (ZyanU64)(max))                                                         \
  |  |  ------------------
  |  |  |  Branch (162:9): [True: 0, False: 371]
  |  |  ------------------
  |  |  163|    371|    {                                                                                              \
  |  |  164|      0|        fprintf(stderr, "Value " #value " = 0x%016" PRIX64 " is above expected max " #max          \
  |  |  165|      0|            " = 0x%016" PRIX64 "\n", (ZyanU64)(value), (ZyanU64)(max));                            \
  |  |  166|      0|        abort();                                                                                   \
  |  |  167|      0|    }
  ------------------
  186|       |
  187|    371|        switch (op->type)
  188|    371|        {
  189|    221|        case ZYDIS_OPERAND_TYPE_REGISTER:
  ------------------
  |  Branch (189:9): [True: 221, False: 150]
  ------------------
  190|    221|            ZYDIS_CHECK_ENUM(op->reg.value, ZYDIS_REGISTER_MAX_VALUE);
  ------------------
  |  |  162|    221|    if ((ZyanU64)(value) > (ZyanU64)(max))                                                         \
  |  |  ------------------
  |  |  |  Branch (162:9): [True: 0, False: 221]
  |  |  ------------------
  |  |  163|    221|    {                                                                                              \
  |  |  164|      0|        fprintf(stderr, "Value " #value " = 0x%016" PRIX64 " is above expected max " #max          \
  |  |  165|      0|            " = 0x%016" PRIX64 "\n", (ZyanU64)(value), (ZyanU64)(max));                            \
  |  |  166|      0|        abort();                                                                                   \
  |  |  167|      0|    }
  ------------------
  191|    221|            break;
  192|     60|        case ZYDIS_OPERAND_TYPE_MEMORY:
  ------------------
  |  Branch (192:9): [True: 60, False: 311]
  ------------------
  193|     60|            ZYDIS_CHECK_ENUM(op->mem.type, ZYDIS_MEMOP_TYPE_MAX_VALUE);
  ------------------
  |  |  162|     60|    if ((ZyanU64)(value) > (ZyanU64)(max))                                                         \
  |  |  ------------------
  |  |  |  Branch (162:9): [True: 0, False: 60]
  |  |  ------------------
  |  |  163|     60|    {                                                                                              \
  |  |  164|      0|        fprintf(stderr, "Value " #value " = 0x%016" PRIX64 " is above expected max " #max          \
  |  |  165|      0|            " = 0x%016" PRIX64 "\n", (ZyanU64)(value), (ZyanU64)(max));                            \
  |  |  166|      0|        abort();                                                                                   \
  |  |  167|      0|    }
  ------------------
  194|     60|            ZYDIS_CHECK_ENUM(op->mem.segment, ZYDIS_REGISTER_MAX_VALUE);
  ------------------
  |  |  162|     60|    if ((ZyanU64)(value) > (ZyanU64)(max))                                                         \
  |  |  ------------------
  |  |  |  Branch (162:9): [True: 0, False: 60]
  |  |  ------------------
  |  |  163|     60|    {                                                                                              \
  |  |  164|      0|        fprintf(stderr, "Value " #value " = 0x%016" PRIX64 " is above expected max " #max          \
  |  |  165|      0|            " = 0x%016" PRIX64 "\n", (ZyanU64)(value), (ZyanU64)(max));                            \
  |  |  166|      0|        abort();                                                                                   \
  |  |  167|      0|    }
  ------------------
  195|     60|            ZYDIS_CHECK_ENUM(op->mem.base, ZYDIS_REGISTER_MAX_VALUE);
  ------------------
  |  |  162|     60|    if ((ZyanU64)(value) > (ZyanU64)(max))                                                         \
  |  |  ------------------
  |  |  |  Branch (162:9): [True: 0, False: 60]
  |  |  ------------------
  |  |  163|     60|    {                                                                                              \
  |  |  164|      0|        fprintf(stderr, "Value " #value " = 0x%016" PRIX64 " is above expected max " #max          \
  |  |  165|      0|            " = 0x%016" PRIX64 "\n", (ZyanU64)(value), (ZyanU64)(max));                            \
  |  |  166|      0|        abort();                                                                                   \
  |  |  167|      0|    }
  ------------------
  196|     60|            ZYDIS_CHECK_ENUM(op->mem.index, ZYDIS_REGISTER_MAX_VALUE);
  ------------------
  |  |  162|     60|    if ((ZyanU64)(value) > (ZyanU64)(max))                                                         \
  |  |  ------------------
  |  |  |  Branch (162:9): [True: 0, False: 60]
  |  |  ------------------
  |  |  163|     60|    {                                                                                              \
  |  |  164|      0|        fprintf(stderr, "Value " #value " = 0x%016" PRIX64 " is above expected max " #max          \
  |  |  165|      0|            " = 0x%016" PRIX64 "\n", (ZyanU64)(value), (ZyanU64)(max));                            \
  |  |  166|      0|        abort();                                                                                   \
  |  |  167|      0|    }
  ------------------
  197|     60|            ZydisValidateImmediateSize(op->mem.disp.size);
  198|     60|            ZYDIS_CHECK_MAX(op->mem.disp.offset + (op->mem.disp.size / 8), insn->length);
  ------------------
  |  |  168|     60|#   define ZYDIS_CHECK_MAX ZYDIS_CHECK_ENUM
  |  |  ------------------
  |  |  |  |  162|     60|    if ((ZyanU64)(value) > (ZyanU64)(max))                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (162:9): [True: 0, False: 60]
  |  |  |  |  ------------------
  |  |  |  |  163|     60|    {                                                                                              \
  |  |  |  |  164|      0|        fprintf(stderr, "Value " #value " = 0x%016" PRIX64 " is above expected max " #max          \
  |  |  |  |  165|      0|            " = 0x%016" PRIX64 "\n", (ZyanU64)(value), (ZyanU64)(max));                            \
  |  |  |  |  166|      0|        abort();                                                                                   \
  |  |  |  |  167|      0|    }
  |  |  ------------------
  ------------------
  199|     60|            break;
  200|     82|        case ZYDIS_OPERAND_TYPE_IMMEDIATE:
  ------------------
  |  Branch (200:9): [True: 82, False: 289]
  ------------------
  201|     82|            ZYDIS_CHECK_ENUM(op->imm.is_signed, ZYAN_TRUE);
  ------------------
  |  |  162|     82|    if ((ZyanU64)(value) > (ZyanU64)(max))                                                         \
  |  |  ------------------
  |  |  |  Branch (162:9): [True: 0, False: 82]
  |  |  ------------------
  |  |  163|     82|    {                                                                                              \
  |  |  164|      0|        fprintf(stderr, "Value " #value " = 0x%016" PRIX64 " is above expected max " #max          \
  |  |  165|      0|            " = 0x%016" PRIX64 "\n", (ZyanU64)(value), (ZyanU64)(max));                            \
  |  |  166|      0|        abort();                                                                                   \
  |  |  167|      0|    }
  ------------------
  202|     82|            ZYDIS_CHECK_ENUM(op->imm.is_relative, ZYAN_TRUE);
  ------------------
  |  |  162|     82|    if ((ZyanU64)(value) > (ZyanU64)(max))                                                         \
  |  |  ------------------
  |  |  |  Branch (162:9): [True: 0, False: 82]
  |  |  ------------------
  |  |  163|     82|    {                                                                                              \
  |  |  164|      0|        fprintf(stderr, "Value " #value " = 0x%016" PRIX64 " is above expected max " #max          \
  |  |  165|      0|            " = 0x%016" PRIX64 "\n", (ZyanU64)(value), (ZyanU64)(max));                            \
  |  |  166|      0|        abort();                                                                                   \
  |  |  167|      0|    }
  ------------------
  203|     82|            ZydisValidateImmediateSize(op->imm.size);
  204|     82|            ZYDIS_CHECK_MAX(op->imm.offset + (op->imm.size / 8), insn->length);
  ------------------
  |  |  168|     82|#   define ZYDIS_CHECK_MAX ZYDIS_CHECK_ENUM
  |  |  ------------------
  |  |  |  |  162|     82|    if ((ZyanU64)(value) > (ZyanU64)(max))                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (162:9): [True: 0, False: 82]
  |  |  |  |  ------------------
  |  |  |  |  163|     82|    {                                                                                              \
  |  |  |  |  164|      0|        fprintf(stderr, "Value " #value " = 0x%016" PRIX64 " is above expected max " #max          \
  |  |  |  |  165|      0|            " = 0x%016" PRIX64 "\n", (ZyanU64)(value), (ZyanU64)(max));                            \
  |  |  |  |  166|      0|        abort();                                                                                   \
  |  |  |  |  167|      0|    }
  |  |  ------------------
  ------------------
  205|     82|            break;
  206|      8|        default:
  ------------------
  |  Branch (206:9): [True: 8, False: 363]
  ------------------
  207|      8|            break;
  208|    371|        }
  209|    371|    }
  210|       |
  211|       |    // AVX.
  212|    174|    ZYDIS_CHECK_ENUM(insn->avx.mask.mode, ZYDIS_MASK_MODE_MAX_VALUE);
  ------------------
  |  |  162|    174|    if ((ZyanU64)(value) > (ZyanU64)(max))                                                         \
  |  |  ------------------
  |  |  |  Branch (162:9): [True: 0, False: 174]
  |  |  ------------------
  |  |  163|    174|    {                                                                                              \
  |  |  164|      0|        fprintf(stderr, "Value " #value " = 0x%016" PRIX64 " is above expected max " #max          \
  |  |  165|      0|            " = 0x%016" PRIX64 "\n", (ZyanU64)(value), (ZyanU64)(max));                            \
  |  |  166|      0|        abort();                                                                                   \
  |  |  167|      0|    }
  ------------------
  213|    174|    ZYDIS_CHECK_ENUM(insn->avx.mask.reg, ZYDIS_REGISTER_MAX_VALUE);
  ------------------
  |  |  162|    174|    if ((ZyanU64)(value) > (ZyanU64)(max))                                                         \
  |  |  ------------------
  |  |  |  Branch (162:9): [True: 0, False: 174]
  |  |  ------------------
  |  |  163|    174|    {                                                                                              \
  |  |  164|      0|        fprintf(stderr, "Value " #value " = 0x%016" PRIX64 " is above expected max " #max          \
  |  |  165|      0|            " = 0x%016" PRIX64 "\n", (ZyanU64)(value), (ZyanU64)(max));                            \
  |  |  166|      0|        abort();                                                                                   \
  |  |  167|      0|    }
  ------------------
  214|    174|    ZYDIS_CHECK_ENUM(insn->avx.broadcast.is_static, ZYAN_TRUE);
  ------------------
  |  |  162|    174|    if ((ZyanU64)(value) > (ZyanU64)(max))                                                         \
  |  |  ------------------
  |  |  |  Branch (162:9): [True: 0, False: 174]
  |  |  ------------------
  |  |  163|    174|    {                                                                                              \
  |  |  164|      0|        fprintf(stderr, "Value " #value " = 0x%016" PRIX64 " is above expected max " #max          \
  |  |  165|      0|            " = 0x%016" PRIX64 "\n", (ZyanU64)(value), (ZyanU64)(max));                            \
  |  |  166|      0|        abort();                                                                                   \
  |  |  167|      0|    }
  ------------------
  215|    174|    ZYDIS_CHECK_ENUM(insn->avx.broadcast.mode, ZYDIS_BROADCAST_MODE_MAX_VALUE);
  ------------------
  |  |  162|    174|    if ((ZyanU64)(value) > (ZyanU64)(max))                                                         \
  |  |  ------------------
  |  |  |  Branch (162:9): [True: 0, False: 174]
  |  |  ------------------
  |  |  163|    174|    {                                                                                              \
  |  |  164|      0|        fprintf(stderr, "Value " #value " = 0x%016" PRIX64 " is above expected max " #max          \
  |  |  165|      0|            " = 0x%016" PRIX64 "\n", (ZyanU64)(value), (ZyanU64)(max));                            \
  |  |  166|      0|        abort();                                                                                   \
  |  |  167|      0|    }
  ------------------
  216|    174|    ZYDIS_CHECK_ENUM(insn->avx.rounding.mode, ZYDIS_ROUNDING_MODE_MAX_VALUE);
  ------------------
  |  |  162|    174|    if ((ZyanU64)(value) > (ZyanU64)(max))                                                         \
  |  |  ------------------
  |  |  |  Branch (162:9): [True: 0, False: 174]
  |  |  ------------------
  |  |  163|    174|    {                                                                                              \
  |  |  164|      0|        fprintf(stderr, "Value " #value " = 0x%016" PRIX64 " is above expected max " #max          \
  |  |  165|      0|            " = 0x%016" PRIX64 "\n", (ZyanU64)(value), (ZyanU64)(max));                            \
  |  |  166|      0|        abort();                                                                                   \
  |  |  167|      0|    }
  ------------------
  217|    174|    ZYDIS_CHECK_ENUM(insn->avx.swizzle.mode, ZYDIS_SWIZZLE_MODE_MAX_VALUE);
  ------------------
  |  |  162|    174|    if ((ZyanU64)(value) > (ZyanU64)(max))                                                         \
  |  |  ------------------
  |  |  |  Branch (162:9): [True: 0, False: 174]
  |  |  ------------------
  |  |  163|    174|    {                                                                                              \
  |  |  164|      0|        fprintf(stderr, "Value " #value " = 0x%016" PRIX64 " is above expected max " #max          \
  |  |  165|      0|            " = 0x%016" PRIX64 "\n", (ZyanU64)(value), (ZyanU64)(max));                            \
  |  |  166|      0|        abort();                                                                                   \
  |  |  167|      0|    }
  ------------------
  218|    174|    ZYDIS_CHECK_ENUM(insn->avx.conversion.mode, ZYDIS_CONVERSION_MODE_MAX_VALUE);
  ------------------
  |  |  162|    174|    if ((ZyanU64)(value) > (ZyanU64)(max))                                                         \
  |  |  ------------------
  |  |  |  Branch (162:9): [True: 0, False: 174]
  |  |  ------------------
  |  |  163|    174|    {                                                                                              \
  |  |  164|      0|        fprintf(stderr, "Value " #value " = 0x%016" PRIX64 " is above expected max " #max          \
  |  |  165|      0|            " = 0x%016" PRIX64 "\n", (ZyanU64)(value), (ZyanU64)(max));                            \
  |  |  166|      0|        abort();                                                                                   \
  |  |  167|      0|    }
  ------------------
  219|    174|    ZYDIS_CHECK_ENUM(insn->avx.has_sae, ZYAN_TRUE);
  ------------------
  |  |  162|    174|    if ((ZyanU64)(value) > (ZyanU64)(max))                                                         \
  |  |  ------------------
  |  |  |  Branch (162:9): [True: 0, False: 174]
  |  |  ------------------
  |  |  163|    174|    {                                                                                              \
  |  |  164|      0|        fprintf(stderr, "Value " #value " = 0x%016" PRIX64 " is above expected max " #max          \
  |  |  165|      0|            " = 0x%016" PRIX64 "\n", (ZyanU64)(value), (ZyanU64)(max));                            \
  |  |  166|      0|        abort();                                                                                   \
  |  |  167|      0|    }
  ------------------
  220|    174|    ZYDIS_CHECK_ENUM(insn->avx.has_eviction_hint, ZYAN_TRUE);
  ------------------
  |  |  162|    174|    if ((ZyanU64)(value) > (ZyanU64)(max))                                                         \
  |  |  ------------------
  |  |  |  Branch (162:9): [True: 0, False: 174]
  |  |  ------------------
  |  |  163|    174|    {                                                                                              \
  |  |  164|      0|        fprintf(stderr, "Value " #value " = 0x%016" PRIX64 " is above expected max " #max          \
  |  |  165|      0|            " = 0x%016" PRIX64 "\n", (ZyanU64)(value), (ZyanU64)(max));                            \
  |  |  166|      0|        abort();                                                                                   \
  |  |  167|      0|    }
  ------------------
  221|       |
  222|       |    // Meta.
  223|    174|    ZYDIS_CHECK_ENUM(insn->meta.category, ZYDIS_CATEGORY_MAX_VALUE);
  ------------------
  |  |  162|    174|    if ((ZyanU64)(value) > (ZyanU64)(max))                                                         \
  |  |  ------------------
  |  |  |  Branch (162:9): [True: 0, False: 174]
  |  |  ------------------
  |  |  163|    174|    {                                                                                              \
  |  |  164|      0|        fprintf(stderr, "Value " #value " = 0x%016" PRIX64 " is above expected max " #max          \
  |  |  165|      0|            " = 0x%016" PRIX64 "\n", (ZyanU64)(value), (ZyanU64)(max));                            \
  |  |  166|      0|        abort();                                                                                   \
  |  |  167|      0|    }
  ------------------
  224|    174|    ZYDIS_CHECK_ENUM(insn->meta.isa_set, ZYDIS_ISA_SET_MAX_VALUE);
  ------------------
  |  |  162|    174|    if ((ZyanU64)(value) > (ZyanU64)(max))                                                         \
  |  |  ------------------
  |  |  |  Branch (162:9): [True: 0, False: 174]
  |  |  ------------------
  |  |  163|    174|    {                                                                                              \
  |  |  164|      0|        fprintf(stderr, "Value " #value " = 0x%016" PRIX64 " is above expected max " #max          \
  |  |  165|      0|            " = 0x%016" PRIX64 "\n", (ZyanU64)(value), (ZyanU64)(max));                            \
  |  |  166|      0|        abort();                                                                                   \
  |  |  167|      0|    }
  ------------------
  225|    174|    ZYDIS_CHECK_ENUM(insn->meta.isa_ext, ZYDIS_ISA_SET_MAX_VALUE);
  ------------------
  |  |  162|    174|    if ((ZyanU64)(value) > (ZyanU64)(max))                                                         \
  |  |  ------------------
  |  |  |  Branch (162:9): [True: 0, False: 174]
  |  |  ------------------
  |  |  163|    174|    {                                                                                              \
  |  |  164|      0|        fprintf(stderr, "Value " #value " = 0x%016" PRIX64 " is above expected max " #max          \
  |  |  165|      0|            " = 0x%016" PRIX64 "\n", (ZyanU64)(value), (ZyanU64)(max));                            \
  |  |  166|      0|        abort();                                                                                   \
  |  |  167|      0|    }
  ------------------
  226|    174|    ZYDIS_CHECK_ENUM(insn->meta.branch_type, ZYDIS_BRANCH_TYPE_MAX_VALUE);
  ------------------
  |  |  162|    174|    if ((ZyanU64)(value) > (ZyanU64)(max))                                                         \
  |  |  ------------------
  |  |  |  Branch (162:9): [True: 0, False: 174]
  |  |  ------------------
  |  |  163|    174|    {                                                                                              \
  |  |  164|      0|        fprintf(stderr, "Value " #value " = 0x%016" PRIX64 " is above expected max " #max          \
  |  |  165|      0|            " = 0x%016" PRIX64 "\n", (ZyanU64)(value), (ZyanU64)(max));                            \
  |  |  166|      0|        abort();                                                                                   \
  |  |  167|      0|    }
  ------------------
  227|    174|    ZYDIS_CHECK_ENUM(insn->meta.exception_class, ZYDIS_EXCEPTION_CLASS_MAX_VALUE);
  ------------------
  |  |  162|    174|    if ((ZyanU64)(value) > (ZyanU64)(max))                                                         \
  |  |  ------------------
  |  |  |  Branch (162:9): [True: 0, False: 174]
  |  |  ------------------
  |  |  163|    174|    {                                                                                              \
  |  |  164|      0|        fprintf(stderr, "Value " #value " = 0x%016" PRIX64 " is above expected max " #max          \
  |  |  165|      0|            " = 0x%016" PRIX64 "\n", (ZyanU64)(value), (ZyanU64)(max));                            \
  |  |  166|      0|        abort();                                                                                   \
  |  |  167|      0|    }
  ------------------
  228|       |
  229|       |    // Raw.
  230|  2.78k|    for (ZyanU32 i = 0; i < ZYAN_ARRAY_LENGTH(insn->raw.prefixes); ++i)
  ------------------
  |  |  510|  2.78k|#define ZYAN_ARRAY_LENGTH(a) (sizeof(a) / sizeof((a)[0]))
  ------------------
  |  Branch (230:25): [True: 2.61k, False: 174]
  ------------------
  231|  2.61k|    {
  232|  2.61k|        ZYDIS_CHECK_ENUM(insn->raw.prefixes[i].type, ZYDIS_PREFIX_TYPE_MAX_VALUE);
  ------------------
  |  |  162|  2.61k|    if ((ZyanU64)(value) > (ZyanU64)(max))                                                         \
  |  |  ------------------
  |  |  |  Branch (162:9): [True: 0, False: 2.61k]
  |  |  ------------------
  |  |  163|  2.61k|    {                                                                                              \
  |  |  164|      0|        fprintf(stderr, "Value " #value " = 0x%016" PRIX64 " is above expected max " #max          \
  |  |  165|      0|            " = 0x%016" PRIX64 "\n", (ZyanU64)(value), (ZyanU64)(max));                            \
  |  |  166|      0|        abort();                                                                                   \
  |  |  167|      0|    }
  ------------------
  233|  2.61k|    }
  234|    522|    for (ZyanU32 i = 0; i < ZYAN_ARRAY_LENGTH(insn->raw.imm); ++i)
  ------------------
  |  |  510|    522|#define ZYAN_ARRAY_LENGTH(a) (sizeof(a) / sizeof((a)[0]))
  ------------------
  |  Branch (234:25): [True: 348, False: 174]
  ------------------
  235|    348|    {
  236|    348|        ZYDIS_CHECK_ENUM(insn->raw.imm[i].is_signed, ZYAN_TRUE);
  ------------------
  |  |  162|    348|    if ((ZyanU64)(value) > (ZyanU64)(max))                                                         \
  |  |  ------------------
  |  |  |  Branch (162:9): [True: 0, False: 348]
  |  |  ------------------
  |  |  163|    348|    {                                                                                              \
  |  |  164|      0|        fprintf(stderr, "Value " #value " = 0x%016" PRIX64 " is above expected max " #max          \
  |  |  165|      0|            " = 0x%016" PRIX64 "\n", (ZyanU64)(value), (ZyanU64)(max));                            \
  |  |  166|      0|        abort();                                                                                   \
  |  |  167|      0|    }
  ------------------
  237|    348|        ZYDIS_CHECK_ENUM(insn->raw.imm[i].is_relative, ZYAN_TRUE);
  ------------------
  |  |  162|    348|    if ((ZyanU64)(value) > (ZyanU64)(max))                                                         \
  |  |  ------------------
  |  |  |  Branch (162:9): [True: 0, False: 348]
  |  |  ------------------
  |  |  163|    348|    {                                                                                              \
  |  |  164|      0|        fprintf(stderr, "Value " #value " = 0x%016" PRIX64 " is above expected max " #max          \
  |  |  165|      0|            " = 0x%016" PRIX64 "\n", (ZyanU64)(value), (ZyanU64)(max));                            \
  |  |  166|      0|        abort();                                                                                   \
  |  |  167|      0|    }
  ------------------
  238|    348|    }
  239|       |
  240|    174|#   undef ZYDIS_CHECK_ENUM
  241|    174|#   undef ZYDIS_CHECK_MAX
  242|    174|}
ZydisValidateInstructionIdentity:
  247|     87|{
  248|       |    // TODO: Probably a good idea to input validate operand_counts to this function
  249|       |    // TODO: I don't like accessing buffers without having their actual sizes available...
  250|       |
  251|       |    // Special case, `xchg rAX, rAX` is an alias for `NOP` except `xchg eax, eax` in 64-bit mode
  252|     87|    if ((insn1->mnemonic == ZYDIS_MNEMONIC_XCHG) &&
  ------------------
  |  Branch (252:9): [True: 0, False: 87]
  ------------------
  253|      0|        (insn1->operand_count == 2) &&
  ------------------
  |  Branch (253:9): [True: 0, False: 0]
  ------------------
  254|      0|        (operands1[0].type == ZYDIS_OPERAND_TYPE_REGISTER) &&
  ------------------
  |  Branch (254:9): [True: 0, False: 0]
  ------------------
  255|      0|        (operands1[1].type == ZYDIS_OPERAND_TYPE_REGISTER) &&
  ------------------
  |  Branch (255:9): [True: 0, False: 0]
  ------------------
  256|      0|        (operands1[0].reg.value == operands1[1].reg.value) &&
  ------------------
  |  Branch (256:9): [True: 0, False: 0]
  ------------------
  257|      0|        (insn2->mnemonic == ZYDIS_MNEMONIC_NOP))
  ------------------
  |  Branch (257:9): [True: 0, False: 0]
  ------------------
  258|      0|    {
  259|      0|        switch (operands1[0].reg.value)
  260|      0|        {
  261|      0|        case ZYDIS_REGISTER_AX:
  ------------------
  |  Branch (261:9): [True: 0, False: 0]
  ------------------
  262|      0|        case ZYDIS_REGISTER_RAX:
  ------------------
  |  Branch (262:9): [True: 0, False: 0]
  ------------------
  263|      0|            return;
  264|      0|        case ZYDIS_REGISTER_EAX:
  ------------------
  |  Branch (264:9): [True: 0, False: 0]
  ------------------
  265|      0|            if (insn1->machine_mode != ZYDIS_MACHINE_MODE_LONG_64)
  ------------------
  |  Branch (265:17): [True: 0, False: 0]
  ------------------
  266|      0|                return;
  267|      0|            break;
  268|      0|        default:
  ------------------
  |  Branch (268:9): [True: 0, False: 0]
  ------------------
  269|      0|            break;
  270|      0|        }
  271|      0|    }
  272|       |
  273|     87|    ZydisSwizzleMode swizzle1 = insn1->avx.swizzle.mode == ZYDIS_SWIZZLE_MODE_DCBA ?
  ------------------
  |  Branch (273:33): [True: 0, False: 87]
  ------------------
  274|     87|        ZYDIS_SWIZZLE_MODE_NONE : insn1->avx.swizzle.mode;
  275|     87|    ZydisSwizzleMode swizzle2 = insn2->avx.swizzle.mode == ZYDIS_SWIZZLE_MODE_DCBA ?
  ------------------
  |  Branch (275:33): [True: 0, False: 87]
  ------------------
  276|     87|        ZYDIS_SWIZZLE_MODE_NONE : insn2->avx.swizzle.mode;
  277|     87|    if ((insn1->machine_mode != insn2->machine_mode) ||
  ------------------
  |  Branch (277:9): [True: 0, False: 87]
  ------------------
  278|     87|        (insn1->mnemonic != insn2->mnemonic) ||
  ------------------
  |  Branch (278:9): [True: 0, False: 87]
  ------------------
  279|     87|        (insn1->stack_width != insn2->stack_width) ||
  ------------------
  |  Branch (279:9): [True: 0, False: 87]
  ------------------
  280|     87|        (insn1->operand_count != insn2->operand_count) ||
  ------------------
  |  Branch (280:9): [True: 0, False: 87]
  ------------------
  281|     87|        (insn1->avx.mask.mode != insn2->avx.mask.mode) ||
  ------------------
  |  Branch (281:9): [True: 0, False: 87]
  ------------------
  282|     87|        (insn1->avx.mask.reg != insn2->avx.mask.reg) ||
  ------------------
  |  Branch (282:9): [True: 0, False: 87]
  ------------------
  283|     87|        (insn1->avx.broadcast.is_static != insn2->avx.broadcast.is_static) ||
  ------------------
  |  Branch (283:9): [True: 0, False: 87]
  ------------------
  284|     87|        (insn1->avx.broadcast.mode != insn2->avx.broadcast.mode) ||
  ------------------
  |  Branch (284:9): [True: 0, False: 87]
  ------------------
  285|     87|        (insn1->avx.conversion.mode != insn2->avx.conversion.mode) ||
  ------------------
  |  Branch (285:9): [True: 0, False: 87]
  ------------------
  286|     87|        (insn1->avx.rounding.mode != insn2->avx.rounding.mode) ||
  ------------------
  |  Branch (286:9): [True: 0, False: 87]
  ------------------
  287|     87|        (insn1->avx.has_sae != insn2->avx.has_sae) ||
  ------------------
  |  Branch (287:9): [True: 0, False: 87]
  ------------------
  288|     87|        (insn1->avx.has_eviction_hint != insn2->avx.has_eviction_hint) ||
  ------------------
  |  Branch (288:9): [True: 0, False: 87]
  ------------------
  289|     87|        (swizzle1 != swizzle2))
  ------------------
  |  Branch (289:9): [True: 0, False: 87]
  ------------------
  290|      0|    {
  291|      0|        fputs("Basic instruction attributes mismatch\n", ZYAN_STDERR);
  ------------------
  |  |   93|      0|#define ZYAN_STDERR     stderr
  ------------------
  292|      0|        abort();
  293|      0|    }
  294|       |
  295|    308|    for (ZyanU8 i = 0; i < insn1->operand_count; ++i)
  ------------------
  |  Branch (295:24): [True: 221, False: 87]
  ------------------
  296|    221|    {
  297|    221|        const ZydisDecodedOperand *op1 = &operands1[i];
  298|    221|        const ZydisDecodedOperand *op2 = &operands2[i];
  299|    221|        if ((op1->type != op2->type) ||
  ------------------
  |  Branch (299:13): [True: 0, False: 221]
  ------------------
  300|    221|            (op1->size != op2->size && op1->type != ZYDIS_OPERAND_TYPE_IMMEDIATE))
  ------------------
  |  Branch (300:14): [True: 0, False: 221]
  |  Branch (300:40): [True: 0, False: 0]
  ------------------
  301|      0|        {
  302|      0|            fprintf(ZYAN_STDERR, "Mismatch for operand %u\n", i);
  ------------------
  |  |   93|      0|#define ZYAN_STDERR     stderr
  ------------------
  303|      0|            abort();
  304|      0|        }
  305|    221|        switch (op1->type)
  306|    221|        {
  307|    142|        case ZYDIS_OPERAND_TYPE_REGISTER:
  ------------------
  |  Branch (307:9): [True: 142, False: 79]
  ------------------
  308|    142|            if (op1->reg.value != op2->reg.value)
  ------------------
  |  Branch (308:17): [True: 0, False: 142]
  ------------------
  309|      0|            {
  310|      0|                fprintf(ZYAN_STDERR, "Mismatch for register operand %u\n", i);
  ------------------
  |  |   93|      0|#define ZYAN_STDERR     stderr
  ------------------
  311|      0|                abort();
  312|      0|            }
  313|    142|            break;
  314|    142|        case ZYDIS_OPERAND_TYPE_MEMORY:
  ------------------
  |  Branch (314:9): [True: 34, False: 187]
  ------------------
  315|     34|        {
  316|       |            // Usually this check is done after verifying instruction identity but in this case
  317|       |            // we have to fail early
  318|     34|            if (insn1->length < insn2->length)
  ------------------
  |  Branch (318:17): [True: 0, False: 34]
  ------------------
  319|      0|            {
  320|      0|                fputs("Suboptimal output size detected\n", ZYAN_STDERR);
  ------------------
  |  |   93|      0|#define ZYAN_STDERR     stderr
  ------------------
  321|      0|                abort();
  322|      0|            }
  323|     34|            ZyanU64 addr1, addr2;
  324|     34|            ZyanStatus status1 = ZydisCalcAbsoluteAddress(insn1, op1, 0, &addr1);
  325|     34|            ZyanStatus status2 = ZydisCalcAbsoluteAddress(insn2, op2,
  326|     34|                insn1->length - insn2->length, &addr2);
  327|     34|            ZyanBool addresses_match = ZYAN_FALSE;
  ------------------
  |  |  287|     34|#define ZYAN_FALSE 0u
  ------------------
  328|     34|            if (ZYAN_SUCCESS(status1) && ZYAN_SUCCESS(status2))
  ------------------
  |  |   82|     68|    (!((status) & 0x80000000u))
  |  |  ------------------
  |  |  |  Branch (82:5): [True: 18, False: 16]
  |  |  ------------------
  ------------------
                          if (ZYAN_SUCCESS(status1) && ZYAN_SUCCESS(status2))
  ------------------
  |  |   82|     18|    (!((status) & 0x80000000u))
  |  |  ------------------
  |  |  |  Branch (82:5): [True: 18, False: 0]
  |  |  ------------------
  ------------------
  329|     18|            {
  330|     18|                if (addr1 != addr2)
  ------------------
  |  Branch (330:21): [True: 0, False: 18]
  ------------------
  331|      0|                {
  332|      0|                    fprintf(ZYAN_STDERR, "Mismatch for memory operand %u (absolute address)\n", i);
  ------------------
  |  |   93|      0|#define ZYAN_STDERR     stderr
  ------------------
  333|      0|                    abort();
  334|      0|                }
  335|     18|                addresses_match = ZYAN_TRUE;
  ------------------
  |  |  288|     18|#define ZYAN_TRUE  1u
  ------------------
  336|     18|            }
  337|     34|            if ((op1->mem.type != op2->mem.type) ||
  ------------------
  |  Branch (337:17): [True: 0, False: 34]
  ------------------
  338|     34|                (op1->mem.segment != op2->mem.segment) ||
  ------------------
  |  Branch (338:17): [True: 0, False: 34]
  ------------------
  339|     34|                (op1->mem.base != op2->mem.base) ||
  ------------------
  |  Branch (339:17): [True: 0, False: 34]
  ------------------
  340|     34|                (op1->mem.index != op2->mem.index) ||
  ------------------
  |  Branch (340:17): [True: 0, False: 34]
  ------------------
  341|     34|                ((op1->mem.scale != op2->mem.scale) && (op1->mem.type != ZYDIS_MEMOP_TYPE_MIB)) ||
  ------------------
  |  Branch (341:18): [True: 0, False: 34]
  |  Branch (341:56): [True: 0, False: 0]
  ------------------
  342|     34|                ((op1->mem.disp.value != op2->mem.disp.value) && !addresses_match))
  ------------------
  |  Branch (342:18): [True: 0, False: 34]
  |  Branch (342:66): [True: 0, False: 0]
  ------------------
  343|      0|            {
  344|      0|                fprintf(ZYAN_STDERR, "Mismatch for memory operand %u\n", i);
  ------------------
  |  |   93|      0|#define ZYAN_STDERR     stderr
  ------------------
  345|      0|                abort();
  346|      0|            }
  347|     34|            break;
  348|     34|        }
  349|     34|        case ZYDIS_OPERAND_TYPE_POINTER:
  ------------------
  |  Branch (349:9): [True: 4, False: 217]
  ------------------
  350|      4|            if ((op1->ptr.segment != op2->ptr.segment) ||
  ------------------
  |  Branch (350:17): [True: 0, False: 4]
  ------------------
  351|      4|                (op1->ptr.offset != op2->ptr.offset))
  ------------------
  |  Branch (351:17): [True: 0, False: 4]
  ------------------
  352|      0|            {
  353|      0|                fprintf(ZYAN_STDERR, "Mismatch for pointer operand %u\n", i);
  ------------------
  |  |   93|      0|#define ZYAN_STDERR     stderr
  ------------------
  354|      0|                abort();
  355|      0|            }
  356|      4|            break;
  357|     41|        case ZYDIS_OPERAND_TYPE_IMMEDIATE:
  ------------------
  |  Branch (357:9): [True: 41, False: 180]
  ------------------
  358|     41|            if ((op1->imm.is_relative != op2->imm.is_relative) ||
  ------------------
  |  Branch (358:17): [True: 0, False: 41]
  ------------------
  359|     41|                (op1->imm.is_signed != op2->imm.is_signed) ||
  ------------------
  |  Branch (359:17): [True: 0, False: 41]
  ------------------
  360|     41|                (op1->imm.value.u != op2->imm.value.u))
  ------------------
  |  Branch (360:17): [True: 0, False: 41]
  ------------------
  361|      0|            {
  362|      0|                ZyanBool acceptable_mismatch = ZYAN_FALSE;
  ------------------
  |  |  287|      0|#define ZYAN_FALSE 0u
  ------------------
  363|      0|                if ((insn1->meta.category == ZYDIS_CATEGORY_DATAXFER) ||
  ------------------
  |  Branch (363:21): [True: 0, False: 0]
  ------------------
  364|      0|                    (insn1->meta.category == ZYDIS_CATEGORY_LOGICAL))
  ------------------
  |  Branch (364:21): [True: 0, False: 0]
  ------------------
  365|      0|                {
  366|      0|                    const ZyanU16 size = ZYAN_MAX(op1->size, op2->size);
  ------------------
  |  |  534|      0|#define ZYAN_MAX(a, b) (((a) > (b)) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (534:25): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  367|      0|                    if (size < 64)
  ------------------
  |  Branch (367:25): [True: 0, False: 0]
  ------------------
  368|      0|                    {
  369|      0|                        const ZyanU64 mask = (1ULL << size) - 1;
  370|      0|                        acceptable_mismatch =
  371|      0|                            (op1->imm.value.u & mask) == (op2->imm.value.u & mask);
  372|      0|                    }
  373|      0|                    else
  374|      0|                    {
  375|      0|                        acceptable_mismatch = op1->imm.value.u == op2->imm.value.u;
  376|      0|                    }
  377|      0|                }
  378|      0|                if (!acceptable_mismatch)
  ------------------
  |  Branch (378:21): [True: 0, False: 0]
  ------------------
  379|      0|                {
  380|      0|                    fprintf(ZYAN_STDERR, "Mismatch for immediate operand %u\n", i);
  ------------------
  |  |   93|      0|#define ZYAN_STDERR     stderr
  ------------------
  381|      0|                    abort();
  382|      0|                }
  383|      0|            }
  384|     41|            break;
  385|     41|        default:
  ------------------
  |  Branch (385:9): [True: 0, False: 221]
  ------------------
  386|       |            fprintf(ZYAN_STDERR, "Invalid operand type for operand %u\n", i);
  ------------------
  |  |   93|      0|#define ZYAN_STDERR     stderr
  ------------------
  387|      0|            abort();
  388|    221|        }
  389|    221|    }
  390|     87|}
ZydisReEncodeInstruction:
  478|     87|{
  479|     87|    ZydisPrintInstruction(insn1, operands1, operand_count, insn1_bytes);
  480|     87|    ZydisValidateEnumRanges(insn1, operands1, operand_count);
  481|       |
  482|     87|    ZYAN_ASSERT(operand_count >= insn1->operand_count_visible);
  ------------------
  |  |  381|     87|#   define ZYAN_ASSERT(condition) assert(condition)
  ------------------
  |  Branch (482:5): [True: 0, False: 87]
  |  Branch (482:5): [True: 87, False: 0]
  ------------------
  483|       |
  484|     87|    ZydisEncoderRequest request;
  485|     87|    ZyanStatus status = ZydisEncoderDecodedInstructionToEncoderRequest(insn1, operands1,
  486|     87|        insn1->operand_count_visible, &request);
  487|     87|    if (!ZYAN_SUCCESS(status))
  ------------------
  |  |   82|     87|    (!((status) & 0x80000000u))
  ------------------
  |  Branch (487:9): [True: 0, False: 87]
  ------------------
  488|      0|    {
  489|      0|        fputs("ZydisEncoderDecodedInstructionToEncoderRequest failed\n", ZYAN_STDERR);
  ------------------
  |  |   93|      0|#define ZYAN_STDERR     stderr
  ------------------
  490|      0|        abort();
  491|      0|    }
  492|       |
  493|     87|    ZyanU8 encoded_instruction[ZYDIS_MAX_INSTRUCTION_LENGTH];
  494|     87|    ZyanUSize encoded_length = sizeof(encoded_instruction);
  495|     87|    status = ZydisEncoderEncodeInstruction(&request, encoded_instruction, &encoded_length);
  496|     87|    if (!ZYAN_SUCCESS(status))
  ------------------
  |  |   82|     87|    (!((status) & 0x80000000u))
  ------------------
  |  Branch (496:9): [True: 0, False: 87]
  ------------------
  497|      0|    {
  498|      0|        fputs("Failed to re-encode instruction\n", ZYAN_STDERR);
  ------------------
  |  |   93|      0|#define ZYAN_STDERR     stderr
  ------------------
  499|      0|        abort();
  500|      0|    }
  501|       |
  502|     87|    ZydisDecodedInstruction insn2;
  503|     87|    ZydisDecodedOperand operands2[ZYDIS_MAX_OPERAND_COUNT];
  504|     87|    status = ZydisDecoderDecodeFull(decoder, encoded_instruction, encoded_length, &insn2,
  505|     87|        operands2);
  506|     87|    if (!ZYAN_SUCCESS(status))
  ------------------
  |  |   82|     87|    (!((status) & 0x80000000u))
  ------------------
  |  Branch (506:9): [True: 0, False: 87]
  ------------------
  507|      0|    {
  508|      0|        fputs("Failed to decode re-encoded instruction\n", ZYAN_STDERR);
  ------------------
  |  |   93|      0|#define ZYAN_STDERR     stderr
  ------------------
  509|      0|        abort();
  510|      0|    }
  511|       |
  512|     87|    ZydisPrintInstruction(&insn2, operands2, insn2.operand_count_visible, encoded_instruction);
  513|     87|    ZydisValidateEnumRanges(&insn2, operands2, insn2.operand_count_visible);
  514|     87|    ZydisValidateInstructionIdentity(insn1, operands1, &insn2, operands2);
  515|       |
  516|     87|    if (insn2.length > insn1->length)
  ------------------
  |  Branch (516:9): [True: 0, False: 87]
  ------------------
  517|      0|    {
  518|      0|        fputs("Suboptimal output size detected\n", ZYAN_STDERR);
  ------------------
  |  |   93|      0|#define ZYAN_STDERR     stderr
  ------------------
  519|      0|        abort();
  520|      0|    }
  521|       |
  522|     87|    ZydisReEncodeInstructionAbsolute(&request, &insn2, operands2, encoded_instruction);
  523|     87|}
ZydisFuzzerInit:
  532|      2|{
  533|      2|    if (ZydisGetVersion() != ZYDIS_VERSION)
  ------------------
  |  |   89|      2|#define ZYDIS_VERSION 0x0005000000000000ULL
  ------------------
  |  Branch (533:9): [True: 0, False: 2]
  ------------------
  534|      0|    {
  535|      0|        fputs("Invalid Zydis version\n", ZYAN_STDERR);
  ------------------
  |  |   93|      0|#define ZYAN_STDERR     stderr
  ------------------
  536|      0|        return EXIT_FAILURE;
  537|      0|    }
  538|       |
  539|       |#ifdef ZYAN_WINDOWS
  540|       |    // The `stdin` pipe uses text-mode on Windows platforms by default. We need it to be opened in
  541|       |    // binary mode
  542|       |    (void)_setmode(_fileno(ZYAN_STDIN), _O_BINARY);
  543|       |#endif
  544|       |
  545|      2|    return EXIT_SUCCESS;
  546|      2|}
LLVMFuzzerInitialize:
  555|      2|{
  556|      2|    ZYAN_UNUSED(argc);
  ------------------
  |  |  447|      2|#define ZYAN_UNUSED(x) (void)(x)
  ------------------
  557|      2|    ZYAN_UNUSED(argv);
  ------------------
  |  |  447|      2|#define ZYAN_UNUSED(x) (void)(x)
  ------------------
  558|       |
  559|      2|    if (ZydisFuzzerInit() != EXIT_SUCCESS)
  ------------------
  |  Branch (559:9): [True: 0, False: 2]
  ------------------
  560|      0|        abort(); // abort manually because LibFuzzer ignores return value
  561|      2|    return EXIT_SUCCESS;
  562|      2|}
LLVMFuzzerTestOneInput:
  565|  3.10k|{
  566|  3.10k|    ZydisLibFuzzerContext ctx;
  567|  3.10k|    ctx.buf = buf;
  568|  3.10k|    ctx.buf_len = len;
  569|  3.10k|    ctx.read_offs = 0;
  570|       |
  571|  3.10k|    ZydisFuzzTarget(&ZydisLibFuzzerRead, &ctx);
  572|  3.10k|    return 0;
  573|  3.10k|}
ZydisFuzzShared.c:ZydisReEncodeInstructionAbsolute:
  397|     87|{
  398|     87|    ZyanU64 runtime_address;
  399|     87|    switch (insn2->address_width)
  400|     87|    {
  401|     22|    case 16:
  ------------------
  |  Branch (401:5): [True: 22, False: 65]
  ------------------
  402|     22|        runtime_address = (ZyanU64)(ZyanU16)ZYAN_INT16_MIN;
  ------------------
  |  |  230|     22|#   define ZYAN_INT16_MIN        INT16_MIN
  ------------------
  403|     22|        break;
  404|     15|    case 32:
  ------------------
  |  Branch (404:5): [True: 15, False: 72]
  ------------------
  405|     15|        runtime_address = (ZyanU64)(ZyanU32)ZYAN_INT32_MIN;
  ------------------
  |  |  231|     15|#   define ZYAN_INT32_MIN        INT32_MIN
  ------------------
  406|     15|        break;
  407|     50|    case 64:
  ------------------
  |  Branch (407:5): [True: 50, False: 37]
  ------------------
  408|     50|        runtime_address = (ZyanU64)ZYAN_INT64_MIN;
  ------------------
  |  |  232|     50|#   define ZYAN_INT64_MIN        INT64_MIN
  ------------------
  409|     50|        break;
  410|      0|    default:
  ------------------
  |  Branch (410:5): [True: 0, False: 87]
  ------------------
  411|      0|        ZYAN_UNREACHABLE;
  ------------------
  |  |  431|      0|#   define ZYAN_UNREACHABLE { assert(0); abort(); }
  ------------------
  |  Branch (411:9): [Folded, False: 0]
  |  Branch (411:9): [Folded, False: 0]
  ------------------
  412|     87|    }
  413|     87|    if ((insn2->machine_mode != ZYDIS_MACHINE_MODE_LONG_64) && (insn2->operand_width == 16))
  ------------------
  |  Branch (413:9): [True: 25, False: 62]
  |  Branch (413:64): [True: 10, False: 15]
  ------------------
  414|     10|    {
  415|     10|        runtime_address = (ZyanU64)(ZyanU16)ZYAN_INT16_MIN;
  ------------------
  |  |  230|     10|#   define ZYAN_INT16_MIN        INT16_MIN
  ------------------
  416|     10|    }
  417|     87|    runtime_address -= insn2->length;
  418|       |
  419|     87|    ZyanBool has_relative = ZYAN_FALSE;
  ------------------
  |  |  287|     87|#define ZYAN_FALSE 0u
  ------------------
  420|    237|    for (ZyanU8 i = 0; i < req->operand_count; ++i)
  ------------------
  |  Branch (420:24): [True: 150, False: 87]
  ------------------
  421|    150|    {
  422|    150|        const ZydisDecodedOperand *decoded_op = &insn2_operands[i];
  423|    150|        ZydisEncoderOperand *op = &req->operands[i];
  424|    150|        ZyanU64 *dst_address = ZYAN_NULL;
  ------------------
  |  |  277|    150|#define ZYAN_NULL ((void*)0)
  ------------------
  425|    150|        switch (op->type)
  426|    150|        {
  427|     41|        case ZYDIS_OPERAND_TYPE_IMMEDIATE:
  ------------------
  |  Branch (427:9): [True: 41, False: 109]
  ------------------
  428|     41|            if (decoded_op->imm.is_relative)
  ------------------
  |  Branch (428:17): [True: 13, False: 28]
  ------------------
  429|     13|            {
  430|     13|                dst_address = &op->imm.u;
  431|     13|            }
  432|     41|            break;
  433|     26|        case ZYDIS_OPERAND_TYPE_MEMORY:
  ------------------
  |  Branch (433:9): [True: 26, False: 124]
  ------------------
  434|     26|            if ((decoded_op->mem.base == ZYDIS_REGISTER_EIP) ||
  ------------------
  |  Branch (434:17): [True: 7, False: 19]
  ------------------
  435|     19|                (decoded_op->mem.base == ZYDIS_REGISTER_RIP))
  ------------------
  |  Branch (435:17): [True: 7, False: 12]
  ------------------
  436|     14|            {
  437|     14|                dst_address = (ZyanU64 *)&op->mem.displacement;
  438|     14|            }
  439|     26|            break;
  440|     83|        default:
  ------------------
  |  Branch (440:9): [True: 83, False: 67]
  ------------------
  441|     83|            break;
  442|    150|        }
  443|    150|        if (!dst_address)
  ------------------
  |  Branch (443:13): [True: 123, False: 27]
  ------------------
  444|    123|        {
  445|    123|            continue;
  446|    123|        }
  447|     27|        has_relative = ZYAN_TRUE;
  ------------------
  |  |  288|     27|#define ZYAN_TRUE  1u
  ------------------
  448|     27|        if (!ZYAN_SUCCESS(ZydisCalcAbsoluteAddress(insn2, decoded_op, runtime_address,
  ------------------
  |  |   82|     27|    (!((status) & 0x80000000u))
  ------------------
  |  Branch (448:13): [True: 0, False: 27]
  ------------------
  449|     27|            dst_address)))
  450|      0|        {
  451|      0|            fputs("ZydisCalcAbsoluteAddress has failed\n", ZYAN_STDERR);
  ------------------
  |  |   93|      0|#define ZYAN_STDERR     stderr
  ------------------
  452|      0|            abort();
  453|      0|        }
  454|     27|    }
  455|     87|    if (!has_relative)
  ------------------
  |  Branch (455:9): [True: 60, False: 27]
  ------------------
  456|     60|    {
  457|     60|        return;
  458|     60|    }
  459|       |
  460|     27|    ZyanU8 insn1_bytes[ZYDIS_MAX_INSTRUCTION_LENGTH];
  461|     27|    ZyanUSize insn1_length = sizeof(insn1_bytes);
  462|     27|    ZyanStatus status = ZydisEncoderEncodeInstructionAbsolute(req, insn1_bytes, &insn1_length,
  463|     27|        runtime_address);
  464|     27|    if (!ZYAN_SUCCESS(status))
  ------------------
  |  |   82|     27|    (!((status) & 0x80000000u))
  ------------------
  |  Branch (464:9): [True: 0, False: 27]
  ------------------
  465|      0|    {
  466|      0|        fputs("Failed to re-encode instruction (absolute)\n", ZYAN_STDERR);
  ------------------
  |  |   93|      0|#define ZYAN_STDERR     stderr
  ------------------
  467|      0|        abort();
  468|      0|    }
  469|     27|    if (insn1_length != insn2->length || ZYAN_MEMCMP(insn1_bytes, insn2_bytes, insn2->length))
  ------------------
  |  |  112|     27|#define ZYAN_MEMCMP     memcmp
  ------------------
  |  Branch (469:9): [True: 0, False: 27]
  |  Branch (469:42): [True: 0, False: 27]
  ------------------
  470|      0|    {
  471|       |        fputs("Instruction mismatch (absolute)\n", ZYAN_STDERR);
  ------------------
  |  |   93|      0|#define ZYAN_STDERR     stderr
  ------------------
  472|      0|        abort();
  473|      0|    }
  474|     27|}

