// File: /workspace/github_c_makefile_star2_O2/dwbuiten[P]obuparse/obuparse.c
// Function: obp_parse_metadata
int obp_parse_metadata(uint8_t *buf, size_t buf_size, OBPMetadata *metadata, OBPError *err)
{
    uint64_t val;
    ptrdiff_t consumed;
    char err_buf[1024];
    _OBPBitReader b;
    _OBPBitReader *br;
    OBPError error = { &err_buf[0], 1024 };

    int ret = _obp_leb128(buf, buf_size, &val, &consumed, &error);
    if (ret < 0) {
        snprintf(err->error, err->size, "Couldn't read metadata type: %s", error.error);
        return -1;
    }
    metadata->metadata_type = val;

    b  = _obp_new_br(buf + consumed, buf_size - consumed);
    br = &b;

    if (metadata->metadata_type == OBP_METADATA_TYPE_HDR_CLL) {
        _obp_br(metadata->metadata_hdr_cll.max_cll, br, 16);
        _obp_br(metadata->metadata_hdr_cll.max_fall, br, 16);
    } else if (metadata->metadata_type == OBP_METADATA_TYPE_HDR_MDCV) {
        for (int i = 0; i < 3; i++) {
            _obp_br(metadata->metadata_hdr_mdcv.primary_chromaticity_x[i], br, 16);
            _obp_br(metadata->metadata_hdr_mdcv.primary_chromaticity_y[i], br, 16);
        }
        _obp_br(metadata->metadata_hdr_mdcv.white_point_chromaticity_x, br, 16);
        _obp_br(metadata->metadata_hdr_mdcv.white_point_chromaticity_y, br, 16);
        _obp_br(metadata->metadata_hdr_mdcv.luminance_max, br, 32);
        _obp_br(metadata->metadata_hdr_mdcv.luminance_min, br, 32);
    } else if (metadata->metadata_type == OBP_METADATA_TYPE_SCALABILITY) {
        _obp_br(metadata->metadata_scalability.scalability_mode_idc, br, 8);
        if (metadata->metadata_scalability.scalability_mode_idc) {
            /* scalability_structure() */
            _obp_br(metadata->metadata_scalability.scalability_structure.spatial_layers_cnt_minus_1, br, 2);
            _obp_br(metadata->metadata_scalability.scalability_structure.spatial_layer_dimensions_present_flag, br, 1);
            _obp_br(metadata->metadata_scalability.scalability_structure.spatial_layer_description_present_flag, br, 1);
            _obp_br(metadata->metadata_scalability.scalability_structure.temporal_group_description_present_flag, br, 1);
            _obp_br(metadata->metadata_scalability.scalability_structure.scalability_structure_reserved_3bits, br, 3);
            if (metadata->metadata_scalability.scalability_structure.spatial_layer_dimensions_present_flag) {
                for (uint8_t i = 0; i < metadata->metadata_scalability.scalability_structure.spatial_layers_cnt_minus_1; i++) {
                    _obp_br(metadata->metadata_scalability.scalability_structure.spatial_layer_max_width[i], br, 16);
                    _obp_br(metadata->metadata_scalability.scalability_structure.spatial_layer_max_height[i], br, 16);
                }
            }
            if (metadata->metadata_scalability.scalability_structure.spatial_layer_description_present_flag) {
                for (uint8_t i = 0; i < metadata->metadata_scalability.scalability_structure.spatial_layers_cnt_minus_1; i++) {
                    _obp_br(metadata->metadata_scalability.scalability_structure.spatial_layer_ref_id[i], br, 8);
                }
            }
            if (metadata->metadata_scalability.scalability_structure.temporal_group_description_present_flag) {
                _obp_br(metadata->metadata_scalability.scalability_structure.temporal_group_size, br, 8);
                for (uint8_t i = 0; i < metadata->metadata_scalability.scalability_structure.temporal_group_size; i++) {
                    _obp_br(metadata->metadata_scalability.scalability_structure.temporal_group_temporal_id[i], br, 3);
                    _obp_br(metadata->metadata_scalability.scalability_structure.temporal_group_temporal_switching_up_point_flag[i], br, 1);
                    _obp_br(metadata->metadata_scalability.scalability_structure.temporal_group_spatial_switching_up_point_flag[i], br, 1);
                    _obp_br(metadata->metadata_scalability.scalability_structure.temporal_group_ref_cnt[i], br, 3);
                    for (uint8_t j = 0; j < metadata->metadata_scalability.scalability_structure.temporal_group_ref_cnt[i]; j++) {
                        _obp_br(metadata->metadata_scalability.scalability_structure.temporal_group_ref_pic_diff[i][j], br, 8);
                    }
                }
            }
        }
    } else if (metadata->metadata_type == OBP_METADATA_TYPE_ITUT_T35) {
        size_t offset = 1;
        _obp_br(metadata->metadata_itut_t35.itu_t_t35_country_code, br, 8);
        if (metadata->metadata_itut_t35.itu_t_t35_country_code == 0xFF) {
            _obp_br(metadata->metadata_itut_t35.itu_t_t35_country_code_extension_byte, br, 8);
            offset++;
        }
        metadata->metadata_itut_t35.itu_t_t35_payload_bytes = buf + consumed + offset;
        int non_zero_bytes_seen = 0;
        /*
         * OBUs with byte payloads at the end have a dumb property where you need to
         * know the trailing bits *before* you parse the OBU, despite the way the spec
         * the syntax displayed and defined. SO as a result, you need to find the *second*
         * non-zero byte at the end of the OBU payload, rather than the last one, as
         * the note in the ITU T.35 part of the spec says.
         */
        for (size_t i = buf_size - consumed - offset - 1; i > 0; i--) {
            if (metadata->metadata_itut_t35.itu_t_t35_payload_bytes[i] != 0) {
                non_zero_bytes_seen++;
                if (non_zero_bytes_seen == 2) {
                    metadata->metadata_itut_t35.itu_t_t35_payload_bytes_size = i + 1;
                }
            }
        }
    } else if (metadata->metadata_type == OBP_METADATA_TYPE_TIMECODE) {
        _obp_br(metadata->metadata_timecode.counting_type, br, 5);
        _obp_br(metadata->metadata_timecode.full_timestamp_flag, br, 1);
        _obp_br(metadata->metadata_timecode.discontinuity_flag, br, 1);
        _obp_br(metadata->metadata_timecode.cnt_dropped_flag, br, 1);
        _obp_br(metadata->metadata_timecode.n_frames, br, 9);
        if (metadata->metadata_timecode.full_timestamp_flag) {
            _obp_br(metadata->metadata_timecode.seconds_value, br, 6);
            _obp_br(metadata->metadata_timecode.minutes_value, br, 6);
            _obp_br(metadata->metadata_timecode.hours_value, br, 5);
        } else {
            _obp_br(metadata->metadata_timecode.seconds_flag, br, 1);
            if (metadata->metadata_timecode.seconds_flag) {
                _obp_br(metadata->metadata_timecode.seconds_value, br, 6);
                _obp_br(metadata->metadata_timecode.minutes_flag, br, 1);
                if (metadata->metadata_timecode.minutes_flag) {
                    _obp_br(metadata->metadata_timecode.minutes_value, br, 6);
                    _obp_br(metadata->metadata_timecode.hours_flag, br, 1);
                    if (metadata->metadata_timecode.hours_flag) {
                        _obp_br(metadata->metadata_timecode.hours_value, br, 5);
                    }
                }
            }
        }
        _obp_br(metadata->metadata_timecode.time_offset_length, br, 5);
        if (metadata->metadata_timecode.time_offset_length > 0) {
             _obp_br(metadata->metadata_timecode.time_offset_value, br, metadata->metadata_timecode.time_offset_length);
        }
    } else if (metadata->metadata_type >= 6 && metadata->metadata_type <= 31) {
        metadata->unregistered.buf      = buf + consumed;
        metadata->unregistered.buf_size = buf_size - consumed;
    } else {
        snprintf(err->error, err->size, "Invalid metadata type: %"PRIu32"\n", metadata->metadata_type);
        return -1;
    }

    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x458, %rsp            # imm = 0x458
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %r13
leaq 0x50(%rsp), %rax
leaq 0x40(%rsp), %r8
movq %rax, (%r8)
movq $0x400, 0x8(%r8)        # imm = 0x400
leaq 0x38(%rsp), %rdx
leaq 0x30(%rsp), %rcx
callq 0x12ea
testl %eax, %eax
js 0x29ca
movl 0x38(%rsp), %ecx
movl %ecx, (%r14)
movq 0x30(%rsp), %rbp
movq %r13, %r15
addq %rbp, %r15
movq %r12, %rax
subq %rbp, %rax
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rsp)
movb $0x0, 0x28(%rsp)
movq %r15, 0x8(%rsp)
movq %rax, 0x10(%rsp)
leal -0x1(%rcx), %edx
cmpl $0x4, %edx
ja 0x2e5a
movq %rbx, (%rsp)
leaq 0x56ac(%rip), %rcx      # 0x8000
movslq (%rcx,%rdx,4), %rdx
addq %rcx, %rdx
pushq $0xf
popq %rsi
pushq $0x17
popq %rbx
jmpq *%rdx
movzbl 0x28(%rsp), %ecx
movl %ebx, %edx
subl %ecx, %edx
sarl $0x3, %edx
movslq %edx, %rcx
subq 0x18(%rsp), %rax
cmpq %rcx, %rax
jb 0x31f2
leaq 0x8(%rsp), %r15
pushq $0x10
popq %rsi
movq %r15, %rdi
callq 0x24ef
movw %ax, 0x20(%r14)
movzbl 0x20(%r15), %eax
subl %eax, %ebx
sarl $0x3, %ebx
movslq %ebx, %rax
movq 0x8(%r15), %rcx
subq 0x10(%r15), %rcx
cmpq %rax, %rcx
jb 0x31f2
leaq 0x8(%rsp), %rdi
pushq $0x10
popq %rsi
callq 0x24ef
movw %ax, 0x22(%r14)
jmp 0x2e70
movq (%rbx), %rdi
movq 0x8(%rbx), %rsi
leaq 0x58d3(%rip), %rdx      # 0x82ab
leaq 0x50(%rsp), %rcx
xorl %eax, %eax
callq 0x1030
jmp 0x320b
movzbl 0x28(%rsp), %ecx
pushq $0xc
popq %rbp
movl %ebp, %edx
subl %ecx, %edx
sarl $0x3, %edx
movslq %edx, %rcx
subq 0x18(%rsp), %rax
cmpq %rcx, %rax
jb 0x31f2
pushq $0x8
popq %rbx
leaq 0x8(%rsp), %r15
pushq $0x5
popq %rsi
movq %r15, %rdi
callq 0x24ef
movb %al, 0x1264(%r14)
movzbl 0x20(%r15), %eax
movl %ebx, %ecx
subl %eax, %ecx
sarl $0x3, %ecx
movslq %ecx, %rax
movq 0x8(%r15), %rcx
subq 0x10(%r15), %rcx
cmpq %rax, %rcx
jb 0x31f2
leaq 0x8(%rsp), %r15
pushq $0x1
popq %rsi
movq %r15, %rdi
callq 0x24ef
movl %eax, 0x1268(%r14)
movzbl 0x20(%r15), %eax
movl %ebx, %ecx
subl %eax, %ecx
sarl $0x3, %ecx
movslq %ecx, %rax
movq 0x8(%r15), %rcx
subq 0x10(%r15), %rcx
cmpq %rax, %rcx
jb 0x31f2
leaq 0x8(%rsp), %r15
pushq $0x1
popq %rsi
movq %r15, %rdi
callq 0x24ef
movl %eax, 0x126c(%r14)
movzbl 0x20(%r15), %eax
movl %ebx, %ecx
subl %eax, %ecx
sarl $0x3, %ecx
movslq %ecx, %rax
movq 0x8(%r15), %rcx
subq 0x10(%r15), %rcx
cmpq %rax, %rcx
jb 0x31f2
leaq 0x8(%rsp), %r15
pushq $0x1
popq %rsi
movq %r15, %rdi
callq 0x24ef
movl %eax, 0x1270(%r14)
movzbl 0x20(%r15), %eax
pushq $0x10
popq %rcx
subl %eax, %ecx
sarl $0x3, %ecx
movslq %ecx, %rax
movq 0x8(%r15), %rcx
subq 0x10(%r15), %rcx
cmpq %rax, %rcx
jb 0x31f2
leaq 0x8(%rsp), %r15
pushq $0x9
popq %rsi
movq %r15, %rdi
callq 0x24ef
movw %ax, 0x1274(%r14)
movq 0x8(%r15), %rax
movzbl 0x20(%r15), %ecx
subq 0x10(%r15), %rax
cmpl $0x0, 0x1268(%r14)
je 0x2fc7
pushq $0xd
popq %rbx
movl %ebx, %edx
subl %ecx, %edx
sarl $0x3, %edx
movslq %edx, %rcx
cmpq %rcx, %rax
jb 0x31f2
leaq 0x8(%rsp), %r15
pushq $0x6
popq %rsi
movq %r15, %rdi
callq 0x24ef
movb %al, 0x1276(%r14)
movzbl 0x20(%r15), %eax
subl %eax, %ebx
sarl $0x3, %ebx
movslq %ebx, %rax
movq 0x8(%r15), %rcx
subq 0x10(%r15), %rcx
cmpq %rax, %rcx
jb 0x31f2
leaq 0x8(%rsp), %r15
pushq $0x6
popq %rsi
movq %r15, %rdi
callq 0x24ef
movb %al, 0x1277(%r14)
movzbl 0x20(%r15), %eax
movl %ebp, %ecx
subl %eax, %ecx
sarl $0x3, %ecx
movslq %ecx, %rax
movq 0x8(%r15), %rcx
subq 0x10(%r15), %rcx
cmpq %rax, %rcx
jb 0x31f2
leaq 0x8(%rsp), %rdi
pushq $0x5
popq %rsi
callq 0x24ef
movb %al, 0x1278(%r14)
jmp 0x315d
movzbl 0x28(%rsp), %ecx
movl %esi, %edx
subl %ecx, %edx
sarl $0x3, %edx
movslq %edx, %rcx
subq 0x18(%rsp), %rax
cmpq %rcx, %rax
jb 0x31f2
leaq 0x8(%rsp), %rdi
pushq $0x8
popq %rbp
movl %ebp, %esi
callq 0x24ef
movb %al, 0x3c(%r14)
xorl %r15d, %r15d
testb %al, %al
je 0x320f
pushq $0x9
popq %rax
movzbl 0x28(%rsp), %ecx
subl %ecx, %eax
sarl $0x3, %eax
cltq
movq 0x10(%rsp), %rcx
subq 0x18(%rsp), %rcx
cmpq %rax, %rcx
jb 0x31f2
leaq 0x8(%rsp), %r12
pushq $0x2
popq %rsi
movq %r12, %rdi
callq 0x24ef
movb %al, 0x40(%r14)
movzbl 0x20(%r12), %eax
movl %ebp, %ecx
subl %eax, %ecx
sarl $0x3, %ecx
movslq %ecx, %rax
movq 0x8(%r12), %rcx
subq 0x10(%r12), %rcx
cmpq %rax, %rcx
jb 0x31f2
leaq 0x8(%rsp), %r12
pushq $0x1
popq %rsi
movq %r12, %rdi
callq 0x24ef
movl %eax, 0x44(%r14)
movzbl 0x20(%r12), %eax
movl %ebp, %ecx
subl %eax, %ecx
sarl $0x3, %ecx
movslq %ecx, %rax
movq 0x8(%r12), %rcx
subq 0x10(%r12), %rcx
cmpq %rax, %rcx
jb 0x31f2
leaq 0x8(%rsp), %r12
pushq $0x1
popq %rsi
movq %r12, %rdi
callq 0x24ef
movl %eax, 0x48(%r14)
movzbl 0x20(%r12), %eax
subl %eax, %ebp
sarl $0x3, %ebp
movslq %ebp, %rax
movq 0x8(%r12), %rcx
subq 0x10(%r12), %rcx
cmpq %rax, %rcx
jb 0x31f2
leaq 0x8(%rsp), %r12
pushq $0x1
popq %rsi
movq %r12, %rdi
callq 0x24ef
movl %eax, 0x4c(%r14)
movzbl 0x20(%r12), %eax
pushq $0xa
popq %rcx
subl %eax, %ecx
sarl $0x3, %ecx
movslq %ecx, %rax
movq 0x8(%r12), %rcx
subq 0x10(%r12), %rcx
cmpq %rax, %rcx
jb 0x31f2
leaq 0x8(%rsp), %rdi
pushq $0x3
popq %rsi
callq 0x24ef
movb %al, 0x50(%r14)
cmpl $0x0, 0x44(%r14)
pushq $0xf
popq %rcx
je 0x30fd
xorl %ebp, %ebp
pushq $0x10
popq %r13
movzbl 0x40(%r14), %eax
cmpq %rax, %rbp
jae 0x30fd
movzbl 0x28(%rsp), %eax
movl %ebx, %ecx
subl %eax, %ecx
sarl $0x3, %ecx
movslq %ecx, %rax
movq 0x10(%rsp), %rcx
subq 0x18(%rsp), %rcx
cmpq %rax, %rcx
jb 0x31f2
leaq 0x8(%rsp), %r12
movq %r12, %rdi
movl %r13d, %esi
callq 0x24ef
movw %ax, 0x52(%r14,%rbp,2)
movzbl 0x28(%rsp), %eax
movl %ebx, %ecx
subl %eax, %ecx
sarl $0x3, %ecx
movslq %ecx, %rax
movq 0x10(%rsp), %rcx
subq 0x18(%rsp), %rcx
cmpq %rax, %rcx
jb 0x31f2
movq %r12, %rdi
movl %r13d, %esi
callq 0x24ef
movw %ax, 0x58(%r14,%rbp,2)
incq %rbp
pushq $0xf
popq %rcx
jmp 0x2d14
movzbl 0x28(%rsp), %ecx
movl %esi, %edx
subl %ecx, %edx
sarl $0x3, %edx
movslq %edx, %rcx
subq 0x18(%rsp), %rax
cmpq %rcx, %rax
jb 0x31f2
movl %esi, %ebx
leaq 0x8(%rsp), %rdi
pushq $0x8
popq %rsi
callq 0x24ef
movb %al, 0x8(%r14)
cmpb $-0x1, %al
movq (%rsp), %rdx
je 0x2f4e
pushq $0x1
jmp 0x2f89
pushq $-0x6
popq %r12
leaq 0x8(%rsp), %r15
pushq $0x10
popq %rbp
movzbl 0x28(%rsp), %eax
movl %ebx, %ecx
subl %eax, %ecx
sarl $0x3, %ecx
movq 0x10(%rsp), %rax
subq 0x18(%rsp), %rax
movslq %ecx, %rcx
testq %r12, %r12
je 0x2e92
cmpq %rcx, %rax
jb 0x31f2
movq %r15, %rdi
movl %ebp, %esi
callq 0x24ef
movw %ax, 0x2a(%r14,%r12)
movzbl 0x28(%rsp), %eax
movl %ebx, %ecx
subl %eax, %ecx
sarl $0x3, %ecx
movslq %ecx, %rax
movq 0x10(%rsp), %rcx
subq 0x18(%rsp), %rcx
cmpq %rax, %rcx
jb 0x31f2
movq %r15, %rdi
movl %ebp, %esi
callq 0x24ef
movw %ax, 0x30(%r14,%r12)
addq $0x2, %r12
jmp 0x2de7
leal -0x6(%rcx), %edx
cmpl $0x19, %edx
ja 0x2e78
movq %r15, 0x1290(%r14)
movq %rax, 0x1298(%r14)
xorl %r15d, %r15d
jmp 0x320f
movq (%rbx), %rdi
movq 0x8(%rbx), %rsi
leaq 0x5445(%rip), %rdx      # 0x82cb
xorl %eax, %eax
callq 0x1030
jmp 0x320b
cmpq %rcx, %rax
jb 0x31f2
leaq 0x8(%rsp), %r15
pushq $0x10
popq %rsi
movq %r15, %rdi
callq 0x24ef
movw %ax, 0x30(%r14)
movzbl 0x20(%r15), %eax
subl %eax, %ebx
sarl $0x3, %ebx
movslq %ebx, %rax
movq 0x8(%r15), %rcx
subq 0x10(%r15), %rcx
cmpq %rax, %rcx
jb 0x31f2
leaq 0x8(%rsp), %r15
pushq $0x10
popq %rsi
movq %r15, %rdi
callq 0x24ef
movw %ax, 0x32(%r14)
movzbl 0x20(%r15), %eax
pushq $0x27
popq %rbx
movl %ebx, %ecx
subl %eax, %ecx
sarl $0x3, %ecx
movslq %ecx, %rax
movq 0x8(%r15), %rcx
subq 0x10(%r15), %rcx
cmpq %rax, %rcx
jb 0x31f2
leaq 0x8(%rsp), %r15
pushq $0x20
popq %rsi
movq %r15, %rdi
callq 0x24ef
movl %eax, 0x34(%r14)
movzbl 0x20(%r15), %eax
subl %eax, %ebx
sarl $0x3, %ebx
movslq %ebx, %rax
movq 0x8(%r15), %rcx
subq 0x10(%r15), %rcx
cmpq %rax, %rcx
jb 0x31f2
leaq 0x8(%rsp), %rdi
pushq $0x20
popq %rsi
callq 0x24ef
movl %eax, 0x38(%r14)
jmp 0x2e70
movzbl 0x28(%rsp), %eax
subl %eax, %ebx
sarl $0x3, %ebx
movslq %ebx, %rax
movq 0x10(%rsp), %rcx
subq 0x18(%rsp), %rcx
cmpq %rax, %rcx
jae 0x2f76
movq (%rdx), %rdi
movq 0x8(%rdx), %rsi
jmp 0x31fd
leaq 0x8(%rsp), %rdi
pushq $0x8
popq %rsi
callq 0x24ef
movb %al, 0x9(%r14)
pushq $0x2
popq %rax
addq %rax, %r15
movq %r15, 0x10(%r14)
addq %rax, %rbp
negq %rbp
xorl %r15d, %r15d
pushq $0x2
popq %rax
xorl %ecx, %ecx
leaq (%r12,%rbp), %rdx
cmpq $0x1, %rdx
je 0x320f
cmpb $0x0, -0x1(%r13,%r12)
je 0x2fc2
incl %ecx
cmpl $0x2, %ecx
jne 0x2fc2
movq %rdx, 0x18(%r14)
movl %eax, %ecx
decq %r12
jmp 0x2f9f
movl %ebx, %edx
subl %ecx, %edx
sarl $0x3, %edx
movslq %edx, %rcx
cmpq %rcx, %rax
jb 0x31f2
leaq 0x8(%rsp), %rdi
pushq $0x1
popq %rsi
callq 0x24ef
movl %eax, 0x127c(%r14)
testl %eax, %eax
je 0x315d
movzbl 0x28(%rsp), %eax
pushq $0xd
popq %r12
movl %r12d, %ecx
subl %eax, %ecx
sarl $0x3, %ecx
movslq %ecx, %rax
movq 0x10(%rsp), %rcx
subq 0x18(%rsp), %rcx
cmpq %rax, %rcx
jb 0x31f2
leaq 0x8(%rsp), %r15
pushq $0x6
popq %rsi
movq %r15, %rdi
callq 0x24ef
movb %al, 0x1276(%r14)
movzbl 0x20(%r15), %eax
movl %ebx, %ecx
subl %eax, %ecx
sarl $0x3, %ecx
movslq %ecx, %rax
movq 0x8(%r15), %rcx
subq 0x10(%r15), %rcx
cmpq %rax, %rcx
jb 0x31f2
leaq 0x8(%rsp), %rdi
pushq $0x1
popq %rsi
callq 0x24ef
movl %eax, 0x1280(%r14)
testl %eax, %eax
je 0x315d
movzbl 0x28(%rsp), %eax
subl %eax, %r12d
sarl $0x3, %r12d
movslq %r12d, %rax
movq 0x10(%rsp), %rcx
subq 0x18(%rsp), %rcx
cmpq %rax, %rcx
jb 0x31f2
leaq 0x8(%rsp), %r15
pushq $0x6
popq %rsi
movq %r15, %rdi
callq 0x24ef
movb %al, 0x1277(%r14)
movzbl 0x20(%r15), %eax
subl %eax, %ebx
sarl $0x3, %ebx
movslq %ebx, %rax
movq 0x8(%r15), %rcx
subq 0x10(%r15), %rcx
cmpq %rax, %rcx
jb 0x31f2
leaq 0x8(%rsp), %rdi
pushq $0x1
popq %rsi
callq 0x24ef
movl %eax, 0x1284(%r14)
testl %eax, %eax
je 0x315d
movzbl 0x28(%rsp), %eax
movl %ebp, %ecx
subl %eax, %ecx
sarl $0x3, %ecx
movslq %ecx, %rax
movq 0x10(%rsp), %rcx
subq 0x18(%rsp), %rcx
jmp 0x2b95
cmpl $0x0, 0x48(%r14)
pushq $0x8
popq %r13
je 0x31cc
xorl %ebx, %ebx
leaq 0x8(%rsp), %rbp
pushq $0x8
popq %r12
movzbl 0x40(%r14), %eax
cmpq %rax, %rbx
jae 0x31cc
movzbl 0x28(%rsp), %eax
subl %eax, %ecx
sarl $0x3, %ecx
movslq %ecx, %rax
movq 0x10(%rsp), %rcx
subq 0x18(%rsp), %rcx
cmpq %rax, %rcx
jb 0x31f2
movq %rbp, %rdi
movl %r12d, %esi
callq 0x24ef
pushq $0xf
popq %rcx
movb %al, 0x5e(%r14,%rbx)
incq %rbx
jmp 0x3117
movzbl 0x28(%rsp), %eax
subl %eax, %ebp
sarl $0x3, %ebp
movslq %ebp, %rax
movq 0x10(%rsp), %rcx
subq 0x18(%rsp), %rcx
cmpq %rax, %rcx
jb 0x31f2
leaq 0x8(%rsp), %rdi
pushq $0x5
popq %rsi
callq 0x24ef
movb %al, 0x1288(%r14)
xorl %r15d, %r15d
testb %al, %al
je 0x320f
movzbl %al, %ecx
movzbl 0x28(%rsp), %edx
subl %edx, %ecx
addl $0x7, %ecx
sarl $0x3, %ecx
movslq %ecx, %rcx
movq 0x10(%rsp), %rdx
subq 0x18(%rsp), %rdx
cmpq %rcx, %rdx
jb 0x31f2
movzbl %al, %esi
leaq 0x8(%rsp), %rdi
callq 0x24ef
movl %eax, 0x128c(%r14)
jmp 0x320f
cmpl $0x0, 0x4c(%r14)
je 0x320f
movzbl 0x28(%rsp), %eax
subl %eax, %ecx
sarl $0x3, %ecx
movslq %ecx, %rax
movq 0x10(%rsp), %rcx
subq 0x18(%rsp), %rcx
cmpq %rax, %rcx
pushq $0xa
popq %rbp
jae 0x3224
movq (%rsp), %rax
movq (%rax), %rdi
movq 0x8(%rax), %rsi
leaq 0x4f69(%rip), %rdx      # 0x816d
xorl %eax, %eax
callq 0x1030
pushq $-0x1
popq %r15
movl %r15d, %eax
addq $0x458, %rsp            # imm = 0x458
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x8(%rsp), %rdi
movl %r13d, %esi
callq 0x24ef
movb %al, 0x61(%r14)
leaq 0xa64(%r14), %rbx
xorl %r15d, %r15d
xorl %r12d, %r12d
movzbl %al, %eax
cmpq %rax, %r12
jae 0x320f
movzbl 0x28(%rsp), %eax
movl %ebp, %ecx
subl %eax, %ecx
sarl $0x3, %ecx
movslq %ecx, %rax
movq 0x10(%rsp), %rcx
subq 0x18(%rsp), %rcx
cmpq %rax, %rcx
leaq 0x8(%rsp), %rbp
jb 0x31f2
movq %rbp, %rdi
pushq $0x3
popq %rsi
callq 0x24ef
movb %al, 0x62(%r14,%r12)
movzbl 0x28(%rsp), %eax
movl %r13d, %ecx
subl %eax, %ecx
sarl $0x3, %ecx
movslq %ecx, %rax
movq 0x10(%rsp), %rcx
subq 0x18(%rsp), %rcx
cmpq %rax, %rcx
jb 0x31f2
movq %rbp, %rdi
pushq $0x1
popq %rbp
movl %ebp, %esi
callq 0x24ef
movl %eax, 0x164(%r14,%r12,4)
movzbl 0x28(%rsp), %eax
movl %r13d, %ecx
subl %eax, %ecx
sarl $0x3, %ecx
movslq %ecx, %rax
movq 0x10(%rsp), %rcx
subq 0x18(%rsp), %rcx
cmpq %rax, %rcx
jb 0x31f2
leaq 0x8(%rsp), %rdi
movl %ebp, %esi
callq 0x24ef
movl %eax, 0x564(%r14,%r12,4)
movzbl 0x28(%rsp), %eax
pushq $0xa
popq %rcx
subl %eax, %ecx
sarl $0x3, %ecx
movslq %ecx, %rax
movq 0x10(%rsp), %rcx
subq 0x18(%rsp), %rcx
cmpq %rax, %rcx
jb 0x31f2
leaq 0x8(%rsp), %rdi
pushq $0x3
popq %rsi
callq 0x24ef
movb %al, 0x964(%r14,%r12)
xorl %ebp, %ebp
movzbl %al, %eax
cmpq %rax, %rbp
pushq $0xf
popq %rcx
jae 0x336e
movzbl 0x28(%rsp), %eax
subl %eax, %ecx
sarl $0x3, %ecx
movslq %ecx, %rax
movq 0x10(%rsp), %rcx
subq 0x18(%rsp), %rcx
cmpq %rax, %rcx
leaq 0x8(%rsp), %rdi
jb 0x31f2
movl %r13d, %esi
callq 0x24ef
movb %al, (%rbx,%rbp)
incq %rbp
movb 0x964(%r14,%r12), %al
jmp 0x3326
incq %r12
movb 0x61(%r14), %al
addq $0x8, %rbx
pushq $0xa
popq %rbp
jmp 0x3242