// File: /workspace/github_c_makefile_star2_O0/KhronosGroup[P]dfdutils/printdfd.c
// Function: printDFDJSON
void printDFDJSON(uint32_t* DFD, uint32_t dataSize, uint32_t base_indent, uint32_t indent_width, bool minified)
{
    if (minified) {
        base_indent = 0;
        indent_width = 0;
    }
    const char* space = minified ? "" : " ";
    const char* nl = minified ? "" : "\n";

#define LENGTH_OF_INDENT(INDENT) ((base_indent + INDENT) * indent_width)

/** Prints an enum as string or number */
#define PRINT_ENUM(INDENT, NAME, VALUE, TO_STRING_FN, COMMA) {          \
        int value = VALUE;                                                 \
        printf("%*s\"" NAME "\":%s", LENGTH_OF_INDENT(INDENT), "", space); \
        const char* str = TO_STRING_FN(value);                             \
        if (str)                                                           \
            printf("\"%s\"", str);                                         \
        else                                                               \
            printf("%u", value);                                           \
        printf(COMMA "%s", nl);                                            \
    }

/** Prints an enum as string or number if the to string function fails with a trailing comma*/
#define PRINT_ENUM_C(INDENT, NAME, VALUE, TO_STRING_FN) \
        PRINT_ENUM(INDENT, NAME, VALUE, TO_STRING_FN, ",")

/** Prints an enum as string or number if the to string function fails without a trailing comma*/
#define PRINT_ENUM_E(INDENT, NAME, VALUE, TO_STRING_FN) \
        PRINT_ENUM(INDENT, NAME, VALUE, TO_STRING_FN, "")

#define PRINT_INDENT(INDENT, FMT, ...) {                              \
        printf("%*s" FMT, LENGTH_OF_INDENT(INDENT), "", __VA_ARGS__); \
    }

#define PRINT_INDENT_NOARG(INDENT, FMT) {                \
        printf("%*s" FMT, LENGTH_OF_INDENT(INDENT), ""); \
    }

    const uint32_t sizeof_dfdTotalSize = sizeof(uint32_t);
    const uint32_t sizeof_DFDBHeader = sizeof(uint32_t) * 2;
    const uint32_t sizeof_BDFD = sizeof(uint32_t) * KHR_DF_WORD_SAMPLESTART;
    const uint32_t sizeof_BDFDSample = sizeof(uint32_t) * KHR_DF_WORD_SAMPLEWORDS;

    uint32_t dfdTotalSize = dataSize >= sizeof_dfdTotalSize ? DFD[0] : 0;
    PRINT_INDENT(0, "\"totalSize\":%s%u,%s", space, dfdTotalSize, nl)

    uint32_t remainingSize = dfdTotalSize < dataSize ? dfdTotalSize : dataSize;
    if (remainingSize < sizeof_dfdTotalSize) {
        PRINT_INDENT(0, "\"blocks\":%s[]%s", space, nl) // Print empty blocks to confirm to the json scheme
        return; // Invalid DFD: dfdTotalSize must be present
    }

    uint32_t* block = DFD + 1;
    remainingSize -= sizeof_dfdTotalSize;
    PRINT_INDENT(0, "\"blocks\":%s[", space)

    for (int i = 0; i < MAX_NUM_DFD_BLOCKS; ++i) { // At most only iterate MAX_NUM_DFD_BLOCKS block
        if (remainingSize < sizeof_DFDBHeader)
            break; // Invalid DFD: Missing or partial block header

        const khr_df_vendorid_e vendorID = KHR_DFDVAL(block, VENDORID);
        const khr_df_khr_descriptortype_e descriptorType = KHR_DFDVAL(block, DESCRIPTORTYPE);
        const khr_df_versionnumber_e versionNumber = KHR_DFDVAL(block, VERSIONNUMBER);
        const uint32_t blockSize = KHR_DFDVAL(block, DESCRIPTORBLOCKSIZE);

        const int model = KHR_DFDVAL(block, MODEL);

        if (i == 0) {
            printf("%s", nl);
        } else {
            printf(",%s", nl);
        }
        PRINT_INDENT(1, "{%s", nl)
        PRINT_ENUM_C(2, "vendorId", vendorID, dfdToStringVendorID);
        PRINT_ENUM_C(2, "descriptorType", descriptorType, dfdToStringDescriptorType);
        PRINT_ENUM_C(2, "versionNumber", versionNumber, dfdToStringVersionNumber);
        PRINT_INDENT(2, "\"descriptorBlockSize\":%s%u", space, blockSize)

        if (vendorID == KHR_DF_VENDORID_KHRONOS && descriptorType == KHR_DF_KHR_DESCRIPTORTYPE_BASICFORMAT) {
            if (remainingSize < sizeof_BDFD) {
                // Invalid DFD: Missing or partial basic DFD block
                printf("%s", nl);
                PRINT_INDENT(1, "}%s", nl) // End of block
                break;
            }

            printf(",%s", nl);
            PRINT_INDENT(2, "\"flags\":%s[%s", space, nl)
            khr_df_flags_e flags = KHR_DFDVAL(block, FLAGS);
            printFlagBitsJSON(LENGTH_OF_INDENT(3), nl, flags, dfdToStringFlagsBit);
            PRINT_INDENT(2, "],%s", nl)

            PRINT_ENUM_C(2, "transferFunction", KHR_DFDVAL(block, TRANSFER), dfdToStringTransferFunction);
            PRINT_ENUM_C(2, "colorPrimaries", KHR_DFDVAL(block, PRIMARIES), dfdToStringColorPrimaries);
            PRINT_ENUM_C(2, "colorModel", model, dfdToStringColorModel);
            PRINT_INDENT(2, "\"texelBlockDimension\":%s[%u,%s%u,%s%u,%s%u],%s", space,
                    KHR_DFDVAL(block, TEXELBLOCKDIMENSION0) + 1, space,
                    KHR_DFDVAL(block, TEXELBLOCKDIMENSION1) + 1, space,
                    KHR_DFDVAL(block, TEXELBLOCKDIMENSION2) + 1, space,
                    KHR_DFDVAL(block, TEXELBLOCKDIMENSION3) + 1, nl)
            PRINT_INDENT(2, "\"bytesPlane\":%s[%u,%s%u,%s%u,%s%u,%s%u,%s%u,%s%u,%s%u],%s", space,
                    KHR_DFDVAL(block, BYTESPLANE0), space,
                    KHR_DFDVAL(block, BYTESPLANE1), space,
                    KHR_DFDVAL(block, BYTESPLANE2), space,
                    KHR_DFDVAL(block, BYTESPLANE3), space,
                    KHR_DFDVAL(block, BYTESPLANE4), space,
                    KHR_DFDVAL(block, BYTESPLANE5), space,
                    KHR_DFDVAL(block, BYTESPLANE6), space,
                    KHR_DFDVAL(block, BYTESPLANE7), nl)

            PRINT_INDENT(2, "\"samples\":%s[%s", space, nl)
            int samples = (blockSize - sizeof_BDFD) / sizeof_BDFDSample;
            if (samples > MAX_NUM_BDFD_SAMPLES)
                samples = MAX_NUM_BDFD_SAMPLES;
            for (int sample = 0; sample < samples; ++sample) {
                if (remainingSize < sizeof_BDFD + (sample + 1) * sizeof_BDFDSample)
                    break; // Invalid DFD: Missing or partial basic DFD sample

                if (sample != 0)
                    printf(",%s", nl);
                PRINT_INDENT(3, "{%s", nl)

                khr_df_sample_datatype_qualifiers_e qualifiers = KHR_DFDSVAL(block, sample, QUALIFIERS);
                if (qualifiers == 0) {
                    PRINT_INDENT(4, "\"qualifiers\":%s[],%s", space, nl)

                } else {
                    PRINT_INDENT(4, "\"qualifiers\":%s[%s", space, nl)
                    printFlagBitsJSON(LENGTH_OF_INDENT(5), nl, qualifiers, dfdToStringSampleDatatypeQualifiers);
                    PRINT_INDENT(4, "],%s", nl)
                }

                khr_df_model_channels_e channelType = KHR_DFDSVAL(block, sample, CHANNELID);
                const char* channelStr = dfdToStringChannelId(model, channelType);
                if (channelStr)
                    PRINT_INDENT(4, "\"channelType\":%s\"%s\",%s", space, channelStr, nl)
                else
                    PRINT_INDENT(4, "\"channelType\":%s%u,%s", space, channelType, nl)

                PRINT_INDENT(4, "\"bitLength\":%s%u,%s", space, KHR_DFDSVAL(block, sample, BITLENGTH), nl)
                PRINT_INDENT(4, "\"bitOffset\":%s%u,%s", space, KHR_DFDSVAL(block, sample, BITOFFSET), nl)
                PRINT_INDENT(4, "\"samplePosition\":%s[%u,%s%u,%s%u,%s%u],%s", space,
                        KHR_DFDSVAL(block, sample, SAMPLEPOSITION0), space,
                        KHR_DFDSVAL(block, sample, SAMPLEPOSITION1), space,
                        KHR_DFDSVAL(block, sample, SAMPLEPOSITION2), space,
                        KHR_DFDSVAL(block, sample, SAMPLEPOSITION3), nl)

                if (qualifiers & KHR_DF_SAMPLE_DATATYPE_SIGNED) {
                    PRINT_INDENT(4, "\"sampleLower\":%s%d,%s", space, KHR_DFDSVAL(block, sample, SAMPLELOWER), nl)
                    PRINT_INDENT(4, "\"sampleUpper\":%s%d%s", space, KHR_DFDSVAL(block, sample, SAMPLEUPPER), nl)
                } else {
                    PRINT_INDENT(4, "\"sampleLower\":%s%u,%s", space, (unsigned int) KHR_DFDSVAL(block, sample, SAMPLELOWER), nl)
                    PRINT_INDENT(4, "\"sampleUpper\":%s%u%s", space, (unsigned int) KHR_DFDSVAL(block, sample, SAMPLEUPPER), nl)
                }

                PRINT_INDENT_NOARG(3, "}")
            }
            printf("%s", nl);
            PRINT_INDENT(2, "]%s", nl) // End of samples
        } else if (vendorID == KHR_DF_VENDORID_KHRONOS && descriptorType == KHR_DF_KHR_DESCRIPTORTYPE_ADDITIONAL_DIMENSIONS) {
            printf("%s", nl);
            // printf(",%s", nl); // If there is extra member printed
            // TODO: Implement DFD print for ADDITIONAL_DIMENSIONS
        } else if (vendorID == KHR_DF_VENDORID_KHRONOS && descriptorType == KHR_DF_KHR_DESCRIPTORTYPE_ADDITIONAL_PLANES) {
            printf("%s", nl);
            // printf(",%s", nl); // If there is extra member printed
            // TODO: Implement DFD print for ADDITIONAL_PLANES
        } else {
            printf("%s", nl);
            // printf(",%s", nl); // If there is extra member printed
            // TODO: What to do with unknown blocks for json?
            //      Unknown block data in binary?
        }

        PRINT_INDENT_NOARG(1, "}") // End of block

        const uint32_t advance = sizeof_DFDBHeader > blockSize ? sizeof_DFDBHeader : blockSize;
        if (advance > remainingSize)
            break;
        remainingSize -= advance;
        block += advance / 4;
    }
    printf("%s", nl);
    PRINT_INDENT(0, "]%s", nl) // End of blocks

#undef PRINT_ENUM
#undef PRINT_ENUM_C
#undef PRINT_ENUM_E
#undef PRINT_INDENT
#undef PRINT_INDENT_NOARG
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x188, %rsp            # imm = 0x188
movb %r8b, %al
movq %rdi, 0x180(%rsp)
movl %esi, 0x17c(%rsp)
movl %edx, 0x178(%rsp)
movl %ecx, 0x174(%rsp)
andb $0x1, %al
movb %al, 0x173(%rsp)
testb $0x1, 0x173(%rsp)
je 0x5b1a
movl $0x0, 0x178(%rsp)
movl $0x0, 0x174(%rsp)
movb 0x173(%rsp), %dl
leaq 0x38b2(%rip), %rax      # 0x93da
leaq 0x3583(%rip), %rcx      # 0x90b2
testb $0x1, %dl
cmovneq %rcx, %rax
movq %rax, 0x168(%rsp)
movb 0x173(%rsp), %dl
leaq 0x3565(%rip), %rax      # 0x90b1
leaq 0x355f(%rip), %rcx      # 0x90b2
testb $0x1, %dl
cmovneq %rcx, %rax
movq %rax, 0x160(%rsp)
movl $0x4, 0x15c(%rsp)
movl $0x8, 0x158(%rsp)
movl $0x18, 0x154(%rsp)
movl $0x10, 0x150(%rsp)
cmpl $0x4, 0x17c(%rsp)
jb 0x5bab
movq 0x180(%rsp), %rax
movl (%rax), %eax
movl %eax, 0xa8(%rsp)
jmp 0x5bb6
xorl %eax, %eax
movl %eax, 0xa8(%rsp)
jmp 0x5bb6
movl 0xa8(%rsp), %eax
movl %eax, 0x14c(%rsp)
movl 0x178(%rsp), %esi
addl $0x0, %esi
imull 0x174(%rsp), %esi
movq 0x168(%rsp), %rcx
movl 0x14c(%rsp), %r8d
movq 0x160(%rsp), %r9
leaq 0x3537(%rip), %rdi      # 0x912c
leaq 0x34b6(%rip), %rdx      # 0x90b2
movb $0x0, %al
callq 0x1030
movl 0x14c(%rsp), %eax
cmpl 0x17c(%rsp), %eax
jae 0x5c23
movl 0x14c(%rsp), %eax
movl %eax, 0xa4(%rsp)
jmp 0x5c31
movl 0x17c(%rsp), %eax
movl %eax, 0xa4(%rsp)
movl 0xa4(%rsp), %eax
movl %eax, 0x148(%rsp)
cmpl $0x4, 0x148(%rsp)
jae 0x5c85
movl 0x178(%rsp), %esi
addl $0x0, %esi
imull 0x174(%rsp), %esi
movq 0x168(%rsp), %rcx
movq 0x160(%rsp), %r8
leaq 0x34d1(%rip), %rdi      # 0x9143
leaq 0x3439(%rip), %rdx      # 0x90b2
movb $0x0, %al
callq 0x1030
jmp 0x6dab
movq 0x180(%rsp), %rax
addq $0x4, %rax
movq %rax, 0x140(%rsp)
movl 0x148(%rsp), %eax
subl $0x4, %eax
movl %eax, 0x148(%rsp)
movl 0x178(%rsp), %esi
addl $0x0, %esi
imull 0x174(%rsp), %esi
movq 0x168(%rsp), %rcx
leaq 0x348b(%rip), %rdi      # 0x9156
leaq 0x33e0(%rip), %rdx      # 0x90b2
movb $0x0, %al
callq 0x1030
movl $0x0, 0x13c(%rsp)
cmpl $0xa, 0x13c(%rsp)
jge 0x6d66
cmpl $0x8, 0x148(%rsp)
jae 0x5d01
jmp 0x6d66
movq 0x140(%rsp), %rax
movl (%rax), %eax
shrl $0x0, %eax
andl $0x1ffff, %eax          # imm = 0x1FFFF
movl %eax, 0x138(%rsp)
movq 0x140(%rsp), %rax
movl (%rax), %eax
shrl $0x11, %eax
andl $0x7fff, %eax           # imm = 0x7FFF
movl %eax, 0x134(%rsp)
movq 0x140(%rsp), %rax
movl 0x4(%rax), %eax
shrl $0x0, %eax
andl $0xffff, %eax           # imm = 0xFFFF
movl %eax, 0x130(%rsp)
movq 0x140(%rsp), %rax
movl 0x4(%rax), %eax
shrl $0x10, %eax
andl $0xffff, %eax           # imm = 0xFFFF
movl %eax, 0x12c(%rsp)
movq 0x140(%rsp), %rax
movl 0x8(%rax), %eax
shrl $0x0, %eax
andl $0xff, %eax
movl %eax, 0x128(%rsp)
cmpl $0x0, 0x13c(%rsp)
jne 0x5da3
movq 0x160(%rsp), %rsi
leaq 0x355a(%rip), %rdi      # 0x92f4
movb $0x0, %al
callq 0x1030
jmp 0x5db9
movq 0x160(%rsp), %rsi
leaq 0x3541(%rip), %rdi      # 0x92f3
movb $0x0, %al
callq 0x1030
movl 0x178(%rsp), %esi
addl $0x1, %esi
imull 0x174(%rsp), %esi
movq 0x160(%rsp), %rcx
leaq 0x338c(%rip), %rdi      # 0x9166
leaq 0x32d1(%rip), %rdx      # 0x90b2
movb $0x0, %al
callq 0x1030
movl 0x138(%rsp), %eax
movl %eax, 0x124(%rsp)
movl 0x178(%rsp), %esi
addl $0x2, %esi
imull 0x174(%rsp), %esi
movq 0x168(%rsp), %rcx
leaq 0x3356(%rip), %rdi      # 0x916d
leaq 0x3294(%rip), %rdx      # 0x90b2
movb $0x0, %al
callq 0x1030
movl 0x124(%rsp), %edi
callq 0x3cb0
movq %rax, 0x118(%rsp)
cmpq $0x0, 0x118(%rsp)
je 0x5e5c
movq 0x118(%rsp), %rsi
leaq 0x3595(%rip), %rdi      # 0x93e8
movb $0x0, %al
callq 0x1030
jmp 0x5e71
movl 0x124(%rsp), %esi
leaq 0x318b(%rip), %rdi      # 0x8ff5
movb $0x0, %al
callq 0x1030
movq 0x160(%rsp), %rsi
leaq 0x3473(%rip), %rdi      # 0x92f3
movb $0x0, %al
callq 0x1030
movl 0x134(%rsp), %eax
movl %eax, 0x114(%rsp)
movl 0x178(%rsp), %esi
addl $0x2, %esi
imull 0x174(%rsp), %esi
movq 0x168(%rsp), %rcx
leaq 0x32c8(%rip), %rdi      # 0x917e
leaq 0x31f5(%rip), %rdx      # 0x90b2
movb $0x0, %al
callq 0x1030
movl 0x114(%rsp), %edi
callq 0x3cf0
movq %rax, 0x108(%rsp)
cmpq $0x0, 0x108(%rsp)
je 0x5efb
movq 0x108(%rsp), %rsi
leaq 0x34f6(%rip), %rdi      # 0x93e8
movb $0x0, %al
callq 0x1030
jmp 0x5f10
movl 0x114(%rsp), %esi
leaq 0x30ec(%rip), %rdi      # 0x8ff5
movb $0x0, %al
callq 0x1030
movq 0x160(%rsp), %rsi
leaq 0x33d4(%rip), %rdi      # 0x92f3
movb $0x0, %al
callq 0x1030
movl 0x130(%rsp), %eax
movl %eax, 0x104(%rsp)
movl 0x178(%rsp), %esi
addl $0x2, %esi
imull 0x174(%rsp), %esi
movq 0x168(%rsp), %rcx
leaq 0x3240(%rip), %rdi      # 0x9195
leaq 0x3156(%rip), %rdx      # 0x90b2
movb $0x0, %al
callq 0x1030
movl 0x104(%rsp), %edi
callq 0x3d80
movq %rax, 0xf8(%rsp)
cmpq $0x0, 0xf8(%rsp)
je 0x5f9a
movq 0xf8(%rsp), %rsi
leaq 0x3457(%rip), %rdi      # 0x93e8
movb $0x0, %al
callq 0x1030
jmp 0x5faf
movl 0x104(%rsp), %esi
leaq 0x304d(%rip), %rdi      # 0x8ff5
movb $0x0, %al
callq 0x1030
movq 0x160(%rsp), %rsi
leaq 0x3335(%rip), %rdi      # 0x92f3
movb $0x0, %al
callq 0x1030
movl 0x178(%rsp), %esi
addl $0x2, %esi
imull 0x174(%rsp), %esi
movq 0x168(%rsp), %rcx
movl 0x12c(%rsp), %r8d
leaq 0x31bd(%rip), %rdi      # 0x91ab
leaq 0x30bd(%rip), %rdx      # 0x90b2
movb $0x0, %al
callq 0x1030
cmpl $0x0, 0x138(%rsp)
jne 0x6c36
cmpl $0x0, 0x134(%rsp)
jne 0x6c36
cmpl $0x18, 0x148(%rsp)
jae 0x606c
movq 0x160(%rsp), %rsi
leaq 0x32c3(%rip), %rdi      # 0x92f4
movb $0x0, %al
callq 0x1030
movl 0x178(%rsp), %esi
addl $0x1, %esi
imull 0x174(%rsp), %esi
movq 0x160(%rsp), %rcx
leaq 0x3170(%rip), %rdi      # 0x91c9
leaq 0x3052(%rip), %rdx      # 0x90b2
movb $0x0, %al
callq 0x1030
jmp 0x6d66
movq 0x160(%rsp), %rsi
leaq 0x3278(%rip), %rdi      # 0x92f3
movb $0x0, %al
callq 0x1030
movl 0x178(%rsp), %esi
addl $0x2, %esi
imull 0x174(%rsp), %esi
movq 0x168(%rsp), %rcx
movq 0x160(%rsp), %r8
leaq 0x3125(%rip), %rdi      # 0x91d0
leaq 0x3000(%rip), %rdx      # 0x90b2
movb $0x0, %al
callq 0x1030
movq 0x140(%rsp), %rax
movl 0x8(%rax), %eax
shrl $0x18, %eax
andl $0xff, %eax
movl %eax, 0xf4(%rsp)
movl 0x178(%rsp), %edi
addl $0x3, %edi
imull 0x174(%rsp), %edi
movq 0x160(%rsp), %rsi
movl 0xf4(%rsp), %edx
leaq -0x230b(%rip), %rcx     # 0x3df0
callq 0x6dc0
movl 0x178(%rsp), %esi
addl $0x2, %esi
imull 0x174(%rsp), %esi
movq 0x160(%rsp), %rcx
leaq 0x30c0(%rip), %rdi      # 0x91e1
leaq 0x2f8a(%rip), %rdx      # 0x90b2
movb $0x0, %al
callq 0x1030
movq 0x140(%rsp), %rax
movl 0x8(%rax), %eax
shrl $0x10, %eax
andl $0xff, %eax
movl %eax, 0xf0(%rsp)
movl 0x178(%rsp), %esi
addl $0x2, %esi
imull 0x174(%rsp), %esi
movq 0x168(%rsp), %rcx
leaq 0x307f(%rip), %rdi      # 0x91e9
leaq 0x2f41(%rip), %rdx      # 0x90b2
movb $0x0, %al
callq 0x1030
movl 0xf0(%rsp), %edi
callq 0x3e40
movq %rax, 0xe8(%rsp)
cmpq $0x0, 0xe8(%rsp)
je 0x61af
movq 0xe8(%rsp), %rsi
leaq 0x3242(%rip), %rdi      # 0x93e8
movb $0x0, %al
callq 0x1030
jmp 0x61c4
movl 0xf0(%rsp), %esi
leaq 0x2e38(%rip), %rdi      # 0x8ff5
movb $0x0, %al
callq 0x1030
movq 0x160(%rsp), %rsi
leaq 0x3120(%rip), %rdi      # 0x92f3
movb $0x0, %al
callq 0x1030
movq 0x140(%rsp), %rax
movl 0x8(%rax), %eax
shrl $0x8, %eax
andl $0xff, %eax
movl %eax, 0xe4(%rsp)
movl 0x178(%rsp), %esi
addl $0x2, %esi
imull 0x174(%rsp), %esi
movq 0x168(%rsp), %rcx
leaq 0x2fed(%rip), %rdi      # 0x9202
leaq 0x2e96(%rip), %rdx      # 0x90b2
movb $0x0, %al
callq 0x1030
movl 0xe4(%rsp), %edi
callq 0x40c0
movq %rax, 0xd8(%rsp)
cmpq $0x0, 0xd8(%rsp)
je 0x625a
movq 0xd8(%rsp), %rsi
leaq 0x3197(%rip), %rdi      # 0x93e8
movb $0x0, %al
callq 0x1030
jmp 0x626f
movl 0xe4(%rsp), %esi
leaq 0x2d8d(%rip), %rdi      # 0x8ff5
movb $0x0, %al
callq 0x1030
movq 0x160(%rsp), %rsi
leaq 0x3075(%rip), %rdi      # 0x92f3
movb $0x0, %al
callq 0x1030
movl 0x128(%rsp), %eax
movl %eax, 0xd4(%rsp)
movl 0x178(%rsp), %esi
addl $0x2, %esi
imull 0x174(%rsp), %esi
movq 0x168(%rsp), %rcx
leaq 0x2f65(%rip), %rdi      # 0x9219
leaq 0x2df7(%rip), %rdx      # 0x90b2
movb $0x0, %al
callq 0x1030
movl 0xd4(%rsp), %edi
callq 0x4260
movq %rax, 0xc8(%rsp)
cmpq $0x0, 0xc8(%rsp)
je 0x62f9
movq 0xc8(%rsp), %rsi
leaq 0x30f8(%rip), %rdi      # 0x93e8
movb $0x0, %al
callq 0x1030
jmp 0x630e
movl 0xd4(%rsp), %esi
leaq 0x2cee(%rip), %rdi      # 0x8ff5
movb $0x0, %al
callq 0x1030
movq 0x160(%rsp), %rsi
leaq 0x2fd6(%rip), %rdi      # 0x92f3
movb $0x0, %al
callq 0x1030
movl 0x178(%rsp), %esi
addl $0x2, %esi
imull 0x174(%rsp), %esi
movq 0x168(%rsp), %rcx
movq 0x140(%rsp), %rax
movl 0xc(%rax), %r8d
shrl $0x0, %r8d
andl $0xff, %r8d
addl $0x1, %r8d
movq 0x168(%rsp), %r9
movq 0x140(%rsp), %rax
movl 0xc(%rax), %ebp
shrl $0x8, %ebp
andl $0xff, %ebp
addl $0x1, %ebp
movq 0x168(%rsp), %r14
movq 0x140(%rsp), %rax
movl 0xc(%rax), %ebx
shrl $0x10, %ebx
andl $0xff, %ebx
addl $0x1, %ebx
movq 0x168(%rsp), %r11
movq 0x140(%rsp), %rax
movl 0xc(%rax), %r10d
shrl $0x18, %r10d
andl $0xff, %r10d
addl $0x1, %r10d
movq 0x160(%rsp), %rax
leaq 0x2e63(%rip), %rdi      # 0x922c
leaq 0x2ce2(%rip), %rdx      # 0x90b2
movl %ebp, (%rsp)
movq %r14, 0x8(%rsp)
movl %ebx, 0x10(%rsp)
movq %r11, 0x18(%rsp)
movl %r10d, 0x20(%rsp)
movq %rax, 0x28(%rsp)
movb $0x0, %al
callq 0x1030
movl 0x178(%rsp), %esi
addl $0x2, %esi
imull 0x174(%rsp), %esi
movq 0x168(%rsp), %rcx
movq 0x140(%rsp), %rax
movl 0x10(%rax), %r8d
shrl $0x0, %r8d
andl $0xff, %r8d
movq 0x168(%rsp), %r9
movq 0x140(%rsp), %rax
movl 0x10(%rax), %eax
shrl $0x8, %eax
andl $0xff, %eax
movq 0x168(%rsp), %rdx
movq %rdx, 0x78(%rsp)
movq 0x140(%rsp), %rdx
movl 0x10(%rdx), %edx
shrl $0x10, %edx
andl $0xff, %edx
movl %edx, 0x84(%rsp)
movq 0x168(%rsp), %rdx
movq %rdx, 0x88(%rsp)
movq 0x140(%rsp), %rdx
movl 0x10(%rdx), %edx
shrl $0x18, %edx
andl $0xff, %edx
movl %edx, 0x94(%rsp)
movq 0x168(%rsp), %r13
movq 0x140(%rsp), %rdx
movl 0x14(%rdx), %r12d
shrl $0x0, %r12d
andl $0xff, %r12d
movq 0x168(%rsp), %r15
movq 0x140(%rsp), %rdx
movl 0x14(%rdx), %ebp
shrl $0x8, %ebp
andl $0xff, %ebp
movq 0x168(%rsp), %r14
movq 0x140(%rsp), %rdx
movl 0x14(%rdx), %ebx
shrl $0x10, %ebx
andl $0xff, %ebx
movq 0x168(%rsp), %r11
movq 0x140(%rsp), %rdx
movl 0x14(%rdx), %r10d
shrl $0x18, %r10d
andl $0xff, %r10d
movq 0x160(%rsp), %rdx
movq %rdx, 0x98(%rsp)
leaq 0x2d40(%rip), %rdi      # 0x925e
leaq 0x2b8d(%rip), %rdx      # 0x90b2
movl %eax, (%rsp)
movq 0x78(%rsp), %rax
movq %rax, 0x8(%rsp)
movl 0x84(%rsp), %eax
movl %eax, 0x10(%rsp)
movq 0x88(%rsp), %rax
movq %rax, 0x18(%rsp)
movl 0x94(%rsp), %eax
movl %eax, 0x20(%rsp)
movq 0x98(%rsp), %rax
movq %r13, 0x28(%rsp)
movl %r12d, 0x30(%rsp)
movq %r15, 0x38(%rsp)
movl %ebp, 0x40(%rsp)
movq %r14, 0x48(%rsp)
movl %ebx, 0x50(%rsp)
movq %r11, 0x58(%rsp)
movl %r10d, 0x60(%rsp)
movq %rax, 0x68(%rsp)
movb $0x0, %al
callq 0x1030
movl 0x178(%rsp), %esi
addl $0x2, %esi
imull 0x174(%rsp), %esi
movq 0x168(%rsp), %rcx
movq 0x160(%rsp), %r8
leaq 0x2ce3(%rip), %rdi      # 0x929b
leaq 0x2af3(%rip), %rdx      # 0x90b2
movb $0x0, %al
callq 0x1030
movl 0x12c(%rsp), %eax
subl $0x18, %eax
shrl $0x4, %eax
movl %eax, 0xc4(%rsp)
cmpl $0x10, 0xc4(%rsp)
jle 0x65ef
movl $0x10, 0xc4(%rsp)
movl $0x0, 0xc0(%rsp)
movl 0xc0(%rsp), %eax
cmpl 0xc4(%rsp), %eax
jge 0x6bef
movl 0x148(%rsp), %eax
movl 0xc0(%rsp), %ecx
addl $0x1, %ecx
shll $0x4, %ecx
addl $0x18, %ecx
cmpl %ecx, %eax
jae 0x662e
jmp 0x6bef
cmpl $0x0, 0xc0(%rsp)
je 0x664e
movq 0x160(%rsp), %rsi
leaq 0x2cac(%rip), %rdi      # 0x92f3
movb $0x0, %al
callq 0x1030
movl 0x178(%rsp), %esi
addl $0x3, %esi
imull 0x174(%rsp), %esi
movq 0x160(%rsp), %rcx
leaq 0x2af7(%rip), %rdi      # 0x9166
leaq 0x2a3c(%rip), %rdx      # 0x90b2
movb $0x0, %al
callq 0x1030
movq 0x140(%rsp), %rax
movl 0xc0(%rsp), %ecx
shll $0x2, %ecx
addl $0x6, %ecx
addl $0x0, %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %eax
shrl $0x18, %eax
andl $0xf0, %eax
movl %eax, 0xbc(%rsp)
cmpl $0x0, 0xbc(%rsp)
jne 0x66f0
movl 0x178(%rsp), %esi
addl $0x4, %esi
imull 0x174(%rsp), %esi
movq 0x168(%rsp), %rcx
movq 0x160(%rsp), %r8
leaq 0x2bd1(%rip), %rdi      # 0x92ae
leaq 0x29ce(%rip), %rdx      # 0x90b2
movb $0x0, %al
callq 0x1030
jmp 0x6783
movl 0x178(%rsp), %esi
addl $0x4, %esi
imull 0x174(%rsp), %esi
movq 0x168(%rsp), %rcx
movq 0x160(%rsp), %r8
leaq 0x2bad(%rip), %rdi      # 0x92c6
leaq 0x2992(%rip), %rdx      # 0x90b2
movb $0x0, %al
callq 0x1030
movl 0x178(%rsp), %edi
addl $0x5, %edi
imull 0x174(%rsp), %edi
movq 0x160(%rsp), %rsi
movl 0xbc(%rsp), %edx
leaq -0x22bf(%rip), %rcx     # 0x4490
callq 0x6dc0
movl 0x178(%rsp), %esi
addl $0x4, %esi
imull 0x174(%rsp), %esi
movq 0x160(%rsp), %rcx
leaq 0x2a6c(%rip), %rdi      # 0x91e1
leaq 0x2936(%rip), %rdx      # 0x90b2
movb $0x0, %al
callq 0x1030
movq 0x140(%rsp), %rax
movl 0xc0(%rsp), %ecx
shll $0x2, %ecx
addl $0x6, %ecx
addl $0x0, %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %eax
shrl $0x18, %eax
andl $0xf, %eax
movl %eax, 0xb8(%rsp)
movl 0x128(%rsp), %edi
movl 0xb8(%rsp), %esi
callq 0x4530
movq %rax, 0xb0(%rsp)
cmpq $0x0, 0xb0(%rsp)
je 0x6815
movl 0x178(%rsp), %esi
addl $0x4, %esi
imull 0x174(%rsp), %esi
movq 0x168(%rsp), %rcx
movq 0xb0(%rsp), %r8
movq 0x160(%rsp), %r9
leaq 0x2ad7(%rip), %rdi      # 0x92dc
leaq 0x28a6(%rip), %rdx      # 0x90b2
movb $0x0, %al
callq 0x1030
jmp 0x6854
movl 0x178(%rsp), %esi
addl $0x4, %esi
imull 0x174(%rsp), %esi
movq 0x168(%rsp), %rcx
movl 0xb8(%rsp), %r8d
movq 0x160(%rsp), %r9
leaq 0x2ab1(%rip), %rdi      # 0x92f7
leaq 0x2865(%rip), %rdx      # 0x90b2
movb $0x0, %al
callq 0x1030
movl 0x178(%rsp), %esi
addl $0x4, %esi
imull 0x174(%rsp), %esi
movq 0x168(%rsp), %rcx
movq 0x140(%rsp), %rax
movl 0xc0(%rsp), %edx
shll $0x2, %edx
addl $0x6, %edx
addl $0x0, %edx
movslq %edx, %rdx
movl (%rax,%rdx,4), %r8d
shrl $0x10, %r8d
andl $0xff, %r8d
movq 0x160(%rsp), %r9
leaq 0x2a69(%rip), %rdi      # 0x9310
leaq 0x2804(%rip), %rdx      # 0x90b2
movb $0x0, %al
callq 0x1030
movl 0x178(%rsp), %esi
addl $0x4, %esi
imull 0x174(%rsp), %esi
movq 0x168(%rsp), %rcx
movq 0x140(%rsp), %rax
movl 0xc0(%rsp), %edx
shll $0x2, %edx
addl $0x6, %edx
addl $0x0, %edx
movslq %edx, %rdx
movl (%rax,%rdx,4), %r8d
shrl $0x0, %r8d
andl $0xffff, %r8d           # imm = 0xFFFF
movq 0x160(%rsp), %r9
leaq 0x2a1f(%rip), %rdi      # 0x9327
leaq 0x27a3(%rip), %rdx      # 0x90b2
movb $0x0, %al
callq 0x1030
movl 0x178(%rsp), %esi
addl $0x4, %esi
imull 0x174(%rsp), %esi
movq 0x168(%rsp), %rcx
movq 0x140(%rsp), %rax
movl 0xc0(%rsp), %edx
shll $0x2, %edx
addl $0x6, %edx
addl $0x1, %edx
movslq %edx, %rdx
movl (%rax,%rdx,4), %r8d
shrl $0x0, %r8d
andl $0xff, %r8d
movq 0x168(%rsp), %r9
movq 0x140(%rsp), %rax
movl 0xc0(%rsp), %edx
shll $0x2, %edx
addl $0x6, %edx
addl $0x1, %edx
movslq %edx, %rdx
movl (%rax,%rdx,4), %ebp
shrl $0x8, %ebp
andl $0xff, %ebp
movq 0x168(%rsp), %r14
movq 0x140(%rsp), %rax
movl 0xc0(%rsp), %edx
shll $0x2, %edx
addl $0x6, %edx
addl $0x1, %edx
movslq %edx, %rdx
movl (%rax,%rdx,4), %ebx
shrl $0x10, %ebx
andl $0xff, %ebx
movq 0x168(%rsp), %r11
movq 0x140(%rsp), %rax
movl 0xc0(%rsp), %edx
shll $0x2, %edx
addl $0x6, %edx
addl $0x1, %edx
movslq %edx, %rdx
movl (%rax,%rdx,4), %r10d
shrl $0x18, %r10d
andl $0xff, %r10d
movq 0x160(%rsp), %rax
leaq 0x2945(%rip), %rdi      # 0x933e
leaq 0x26b2(%rip), %rdx      # 0x90b2
movl %ebp, (%rsp)
movq %r14, 0x8(%rsp)
movl %ebx, 0x10(%rsp)
movq %r11, 0x18(%rsp)
movl %r10d, 0x20(%rsp)
movq %rax, 0x28(%rsp)
movb $0x0, %al
callq 0x1030
movl 0xbc(%rsp), %eax
andl $0x40, %eax
cmpl $0x0, %eax
je 0x6af6
movl 0x178(%rsp), %esi
addl $0x4, %esi
imull 0x174(%rsp), %esi
movq 0x168(%rsp), %rcx
movq 0x140(%rsp), %rax
movl 0xc0(%rsp), %edx
shll $0x2, %edx
addl $0x6, %edx
addl $0x2, %edx
movslq %edx, %rdx
movl (%rax,%rdx,4), %r8d
shrl $0x0, %r8d
andl $-0x1, %r8d
movq 0x160(%rsp), %r9
leaq 0x28e6(%rip), %rdi      # 0x936b
leaq 0x2626(%rip), %rdx      # 0x90b2
movb $0x0, %al
callq 0x1030
movl 0x178(%rsp), %esi
addl $0x4, %esi
imull 0x174(%rsp), %esi
movq 0x168(%rsp), %rcx
movq 0x140(%rsp), %rax
movl 0xc0(%rsp), %edx
shll $0x2, %edx
addl $0x6, %edx
addl $0x3, %edx
movslq %edx, %rdx
movl (%rax,%rdx,4), %r8d
shrl $0x0, %r8d
andl $-0x1, %r8d
movq 0x160(%rsp), %r9
leaq 0x28a1(%rip), %rdi      # 0x9384
leaq 0x25c8(%rip), %rdx      # 0x90b2
movb $0x0, %al
callq 0x1030
jmp 0x6bb2
movl 0x178(%rsp), %esi
addl $0x4, %esi
imull 0x174(%rsp), %esi
movq 0x168(%rsp), %rcx
movq 0x140(%rsp), %rax
movl 0xc0(%rsp), %edx
shll $0x2, %edx
addl $0x6, %edx
addl $0x2, %edx
movslq %edx, %rdx
movl (%rax,%rdx,4), %r8d
shrl $0x0, %r8d
andl $-0x1, %r8d
movq 0x160(%rsp), %r9
leaq 0x2856(%rip), %rdi      # 0x939c
leaq 0x2565(%rip), %rdx      # 0x90b2
movb $0x0, %al
callq 0x1030
movl 0x178(%rsp), %esi
addl $0x4, %esi
imull 0x174(%rsp), %esi
movq 0x168(%rsp), %rcx
movq 0x140(%rsp), %rax
movl 0xc0(%rsp), %edx
shll $0x2, %edx
addl $0x6, %edx
addl $0x3, %edx
movslq %edx, %rdx
movl (%rax,%rdx,4), %r8d
shrl $0x0, %r8d
andl $-0x1, %r8d
movq 0x160(%rsp), %r9
leaq 0x2811(%rip), %rdi      # 0x93b5
leaq 0x2507(%rip), %rdx      # 0x90b2
movb $0x0, %al
callq 0x1030
movl 0x178(%rsp), %esi
addl $0x3, %esi
imull 0x174(%rsp), %esi
leaq 0x2802(%rip), %rdi      # 0x93cd
leaq 0x24e0(%rip), %rdx      # 0x90b2
movb $0x0, %al
callq 0x1030
movl 0xc0(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xc0(%rsp)
jmp 0x65fa
movq 0x160(%rsp), %rsi
leaq 0x26f6(%rip), %rdi      # 0x92f4
movb $0x0, %al
callq 0x1030
movl 0x178(%rsp), %esi
addl $0x2, %esi
imull 0x174(%rsp), %esi
movq 0x160(%rsp), %rcx
leaq 0x27ac(%rip), %rdi      # 0x93d2
leaq 0x2485(%rip), %rdx      # 0x90b2
movb $0x0, %al
callq 0x1030
jmp 0x6cae
cmpl $0x0, 0x138(%rsp)
jne 0x6c65
cmpl $0x6002, 0x134(%rsp) # imm = 0x6002
jne 0x6c65
movq 0x160(%rsp), %rsi
leaq 0x2698(%rip), %rdi      # 0x92f4
movb $0x0, %al
callq 0x1030
jmp 0x6cac
cmpl $0x0, 0x138(%rsp)
jne 0x6c94
cmpl $0x6001, 0x134(%rsp) # imm = 0x6001
jne 0x6c94
movq 0x160(%rsp), %rsi
leaq 0x2669(%rip), %rdi      # 0x92f4
movb $0x0, %al
callq 0x1030
jmp 0x6caa
movq 0x160(%rsp), %rsi
leaq 0x2651(%rip), %rdi      # 0x92f4
movb $0x0, %al
callq 0x1030
jmp 0x6cac
jmp 0x6cae
movl 0x178(%rsp), %esi
addl $0x1, %esi
imull 0x174(%rsp), %esi
leaq 0x2706(%rip), %rdi      # 0x93cd
leaq 0x23e4(%rip), %rdx      # 0x90b2
movb $0x0, %al
callq 0x1030
movl $0x8, %eax
cmpl 0x12c(%rsp), %eax
jbe 0x6cee
movl $0x8, %eax
movl %eax, 0x74(%rsp)
jmp 0x6cf9
movl 0x12c(%rsp), %eax
movl %eax, 0x74(%rsp)
movl 0x74(%rsp), %eax
movl %eax, 0xac(%rsp)
movl 0xac(%rsp), %eax
cmpl 0x148(%rsp), %eax
jbe 0x6d16
jmp 0x6d66
movl 0xac(%rsp), %ecx
movl 0x148(%rsp), %eax
subl %ecx, %eax
movl %eax, 0x148(%rsp)
movl 0xac(%rsp), %ecx
shrl $0x2, %ecx
movq 0x140(%rsp), %rax
movl %ecx, %ecx
shlq $0x2, %rcx
addq %rcx, %rax
movq %rax, 0x140(%rsp)
movl 0x13c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x13c(%rsp)
jmp 0x5ce4
movq 0x160(%rsp), %rsi
leaq 0x257f(%rip), %rdi      # 0x92f4
movb $0x0, %al
callq 0x1030
movl 0x178(%rsp), %esi
addl $0x0, %esi
imull 0x174(%rsp), %esi
movq 0x160(%rsp), %rcx
leaq 0x2635(%rip), %rdi      # 0x93d2
leaq 0x230e(%rip), %rdx      # 0x90b2
movb $0x0, %al
callq 0x1030
addq $0x188, %rsp            # imm = 0x188
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)