// File: /workspace/github_c_makefile_star2_O1/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 $0x448, %rsp            # imm = 0x448
movq %rcx, 0x8(%rsp)
movq %rdx, %rbp
movq %rsi, %r15
movq %rdi, %r12
xorl %ecx, %ecx
movabsq $0x2e65756c617620, %rdx # imm = 0x2E65756C617620
xorl %r13d, %r13d
xorl %eax, %eax
leaq 0x1(%r13), %r8
cmpq %r15, %r8
jbe 0x339a
movups 0x8108(%rip), %xmm0     # 0xb483
movaps %xmm0, 0x50(%rsp)
movups 0x80ec(%rip), %xmm0     # 0xb473
movaps %xmm0, 0x40(%rsp)
movq %rdx, 0x5f(%rsp)
movl $0x1, %esi
xorl %edi, %edi
jmp 0x33be
movzbl (%r12,%r13), %edi
xorl %esi, %esi
testb %dil, %dil
setns %sil
movl %edi, %r9d
andl $0x7f, %r9d
shlq %cl, %r9
orq %r9, %rax
shrb $0x7, %dil
addl %esi, %esi
movq %r8, %r13
testb %dil, %dil
je 0x33d2
addq $0x7, %rcx
cmpq $0x38, %rcx
jne 0x336b
movl $0x2, %esi
cmpl $0x2, %esi
jne 0x3456
movl %eax, (%rbp)
leaq (%r12,%r13), %r14
movq %r15, %rbx
subq %r13, %rbx
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%rsp)
movb $0x0, 0x30(%rsp)
movq %r14, 0x10(%rsp)
movq %rbx, 0x18(%rsp)
leal -0x1(%rax), %ecx
cmpl $0x4, %ecx
ja 0x3656
leaq 0x7c02(%rip), %rax      # 0xb010
movslq (%rax,%rcx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
movzbl 0x30(%rsp), %eax
movl $0x17, %ecx
subl %eax, %ecx
sarl $0x3, %ecx
movslq %ecx, %r14
subq 0x20(%rsp), %rbx
cmpq %r14, %rbx
jae 0x37b8
movq 0x8(%rsp), %rax
movq (%rax), %rdi
movq 0x8(%rax), %rsi
leaq 0x7d33(%rip), %rdx      # 0xb17d
xorl %eax, %eax
callq 0x1030
jmp 0x37cb
movq 0x8(%rsp), %rax
movq (%rax), %rdi
movq 0x8(%rax), %rsi
leaq 0x7e52(%rip), %rdx      # 0xb2bb
leaq 0x40(%rsp), %rcx
xorl %eax, %eax
callq 0x1030
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x448, %rsp            # imm = 0x448
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movzbl 0x30(%rsp), %eax
movl $0xc, %ecx
subl %eax, %ecx
sarl $0x3, %ecx
movslq %ecx, %r14
subq 0x20(%rsp), %rbx
cmpq %r14, %rbx
jae 0x3675
movq 0x8(%rsp), %rax
movq (%rax), %rdi
movq 0x8(%rax), %rsi
leaq 0x7cbe(%rip), %rdx      # 0xb17d
xorl %eax, %eax
callq 0x1030
jmp 0x368a
movzbl 0x30(%rsp), %eax
movl $0xf, %ecx
subl %eax, %ecx
sarl $0x3, %ecx
movslq %ecx, %r14
subq 0x20(%rsp), %rbx
cmpq %r14, %rbx
jae 0x36d7
movq 0x8(%rsp), %rax
movq (%rax), %rdi
movq 0x8(%rax), %rsi
leaq 0x7c7f(%rip), %rdx      # 0xb17d
xorl %eax, %eax
callq 0x1030
jmp 0x36e9
movq %rbp, 0x38(%rsp)
movzbl 0x30(%rsp), %eax
movl $0xf, %ecx
subl %eax, %ecx
sarl $0x3, %ecx
movslq %ecx, %rbp
subq 0x20(%rsp), %rbx
cmpq %rbp, %rbx
jae 0x3740
movq 0x8(%rsp), %rax
movq (%rax), %rdi
movq 0x8(%rax), %rsi
leaq 0x7c3b(%rip), %rdx      # 0xb17d
xorl %eax, %eax
callq 0x1030
jmp 0x3757
movq $-0x3, %rbx
leaq 0x7c21(%rip), %r15      # 0xb17d
leaq 0x10(%rsp), %r12
movzbl 0x30(%rsp), %eax
movl $0x17, %ecx
subl %eax, %ecx
sarl $0x3, %ecx
movslq %ecx, %r14
movq 0x18(%rsp), %r13
subq 0x20(%rsp), %r13
cmpq %r14, %r13
jae 0x359a
movq 0x8(%rsp), %rax
movq (%rax), %rdi
movq 0x8(%rax), %rsi
movq %r15, %rdx
xorl %eax, %eax
callq 0x1030
jmp 0x35ac
movq %r12, %rdi
movl $0x10, %esi
callq 0x2cf9
movw %ax, 0x2a(%rbp,%rbx,2)
cmpq %r14, %r13
jb 0x3475
movzbl 0x30(%rsp), %eax
movl $0x17, %ecx
subl %eax, %ecx
sarl $0x3, %ecx
movslq %ecx, %r14
movq 0x18(%rsp), %r13
subq 0x20(%rsp), %r13
cmpq %r14, %r13
jae 0x35ee
movq 0x8(%rsp), %rax
movq (%rax), %rdi
movq 0x8(%rax), %rsi
movq %r15, %rdx
xorl %eax, %eax
callq 0x1030
jmp 0x3600
movq %r12, %rdi
movl $0x10, %esi
callq 0x2cf9
movw %ax, 0x30(%rbp,%rbx,2)
cmpq %r14, %r13
jb 0x3475
incq %rbx
jne 0x3561
movzbl 0x30(%rsp), %eax
movl $0x17, %ecx
subl %eax, %ecx
sarl $0x3, %ecx
movslq %ecx, %rbx
movq 0x18(%rsp), %r14
subq 0x20(%rsp), %r14
cmpq %rbx, %r14
jae 0x38c1
movq 0x8(%rsp), %rax
movq (%rax), %rdi
movq 0x8(%rax), %rsi
leaq 0x7b33(%rip), %rdx      # 0xb17d
xorl %eax, %eax
callq 0x1030
jmp 0x38d4
leal -0x6(%rax), %ecx
cmpl $0x19, %ecx
ja 0x3818
movq %r14, 0x1290(%rbp)
movq %rbx, 0x1298(%rbp)
jmp 0x3a57
leaq 0x10(%rsp), %rdi
movl $0x5, %esi
callq 0x2cf9
movb %al, 0x1264(%rbp)
cmpq %r14, %rbx
jb 0x3475
movzbl 0x30(%rsp), %eax
movl $0x8, %ecx
subl %eax, %ecx
sarl $0x3, %ecx
movslq %ecx, %rbx
movq 0x18(%rsp), %r14
subq 0x20(%rsp), %r14
cmpq %rbx, %r14
jae 0x3839
movq 0x8(%rsp), %rax
movq (%rax), %rdi
movq 0x8(%rax), %rsi
leaq 0x7ab2(%rip), %rdx      # 0xb17d
xorl %eax, %eax
callq 0x1030
jmp 0x384e
leaq 0x10(%rsp), %rdi
movl $0x8, %esi
callq 0x2cf9
movb %al, 0x3c(%rbp)
cmpq %r14, %rbx
jb 0x3475
cmpb $0x0, 0x3c(%rbp)
je 0x3a57
movzbl 0x30(%rsp), %eax
movl $0x9, %ecx
subl %eax, %ecx
sarl $0x3, %ecx
movslq %ecx, %rbx
movq 0x18(%rsp), %r14
subq 0x20(%rsp), %r14
cmpq %rbx, %r14
jae 0x3921
movq 0x8(%rsp), %rax
movq (%rax), %rdi
movq 0x8(%rax), %rsi
leaq 0x7a49(%rip), %rdx      # 0xb17d
xorl %eax, %eax
callq 0x1030
jmp 0x3933
leaq 0x10(%rsp), %rdi
movl $0x8, %esi
callq 0x2cf9
movq 0x38(%rsp), %rcx
movb %al, 0x8(%rcx)
cmpq %rbp, %rbx
jb 0x3475
movl $0x1, %ecx
movq 0x38(%rsp), %rdx
cmpb $-0x1, 0x8(%rdx)
jne 0x3a11
movzbl 0x30(%rsp), %eax
movl $0xf, %ecx
subl %eax, %ecx
sarl $0x3, %ecx
movslq %ecx, %rbx
movq 0x18(%rsp), %rbp
subq 0x20(%rsp), %rbp
cmpq %rbx, %rbp
jae 0x39e2
movq 0x8(%rsp), %rax
movq (%rax), %rdi
movq 0x8(%rax), %rsi
leaq 0x79d1(%rip), %rdx      # 0xb17d
xorl %eax, %eax
callq 0x1030
jmp 0x39f9
leaq 0x10(%rsp), %rdi
movl $0x10, %esi
callq 0x2cf9
movw %ax, 0x20(%rbp)
cmpq %r14, %rbx
jb 0x3475
movzbl 0x30(%rsp), %eax
movl $0x17, %ecx
subl %eax, %ecx
sarl $0x3, %ecx
movslq %ecx, %rbx
movq 0x18(%rsp), %r14
subq 0x20(%rsp), %r14
cmpq %rbx, %r14
jae 0x389b
movq 0x8(%rsp), %rax
movq (%rax), %rdi
movq 0x8(%rax), %rsi
leaq 0x7971(%rip), %rdx      # 0xb17d
xorl %eax, %eax
callq 0x1030
jmp 0x38ae
movq 0x8(%rsp), %rcx
movq (%rcx), %rdi
movq 0x8(%rcx), %rsi
leaq 0x7ab0(%rip), %rdx      # 0xb2db
movl %eax, %ecx
xorl %eax, %eax
callq 0x1030
jmp 0x3475
leaq 0x10(%rsp), %rdi
movl $0x1, %esi
callq 0x2cf9
movl %eax, 0x1268(%rbp)
cmpq %rbx, %r14
jb 0x3475
movzbl 0x30(%rsp), %eax
movl $0x8, %ecx
subl %eax, %ecx
sarl $0x3, %ecx
movslq %ecx, %rbx
movq 0x18(%rsp), %r14
subq 0x20(%rsp), %r14
cmpq %rbx, %r14
jae 0x3980
movq 0x8(%rsp), %rax
movq (%rax), %rdi
movq 0x8(%rax), %rsi
leaq 0x78ee(%rip), %rdx      # 0xb17d
xorl %eax, %eax
callq 0x1030
jmp 0x3995
leaq 0x10(%rsp), %rdi
movl $0x10, %esi
callq 0x2cf9
movw %ax, 0x22(%rbp)
cmpq %rbx, %r14
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jb 0x347a
jmp 0x3a57
leaq 0x10(%rsp), %rdi
movl $0x10, %esi
callq 0x2cf9
movw %ax, 0x30(%rbp)
cmpq %rbx, %r14
jb 0x3475
movzbl 0x30(%rsp), %eax
movl $0x17, %ecx
subl %eax, %ecx
sarl $0x3, %ecx
movslq %ecx, %rbx
movq 0x18(%rsp), %r14
subq 0x20(%rsp), %r14
cmpq %rbx, %r14
jae 0x3a5e
movq 0x8(%rsp), %rax
movq (%rax), %rdi
movq 0x8(%rax), %rsi
leaq 0x7868(%rip), %rdx      # 0xb17d
xorl %eax, %eax
callq 0x1030
jmp 0x3a71
leaq 0x10(%rsp), %rdi
movl $0x2, %esi
callq 0x2cf9
movb %al, 0x40(%rbp)
cmpq %rbx, %r14
jb 0x3475
movzbl 0x30(%rsp), %eax
movl $0x8, %ecx
subl %eax, %ecx
sarl $0x3, %ecx
movslq %ecx, %rbx
movq 0x18(%rsp), %r14
subq 0x20(%rsp), %r14
cmpq %rbx, %r14
jae 0x3abe
movq 0x8(%rsp), %rax
movq (%rax), %rdi
movq 0x8(%rax), %rsi
leaq 0x7809(%rip), %rdx      # 0xb17d
xorl %eax, %eax
callq 0x1030
jmp 0x3ad0
leaq 0x10(%rsp), %rdi
movl $0x1, %esi
callq 0x2cf9
movl %eax, 0x126c(%rbp)
cmpq %rbx, %r14
jb 0x3475
movzbl 0x30(%rsp), %eax
movl $0x8, %ecx
subl %eax, %ecx
sarl $0x3, %ecx
movslq %ecx, %rbx
movq 0x18(%rsp), %r14
subq 0x20(%rsp), %r14
cmpq %rbx, %r14
jae 0x3b1d
movq 0x8(%rsp), %rax
movq (%rax), %rdi
movq 0x8(%rax), %rsi
leaq 0x77a7(%rip), %rdx      # 0xb17d
xorl %eax, %eax
callq 0x1030
jmp 0x3b32
leaq 0x10(%rsp), %rdi
movl $0x8, %esi
callq 0x2cf9
movq 0x38(%rsp), %rcx
movb %al, 0x9(%rcx)
movl $0x2, %ecx
cmpq %rbx, %rbp
movq 0x38(%rsp), %rdx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jb 0x347a
addq %rcx, %r14
movq %r14, 0x10(%rdx)
addq %rcx, %r13
movq %r13, %rax
notq %rax
addq %r15, %rax
je 0x3a57
negq %r13
xorl %eax, %eax
cmpb $0x0, -0x1(%r12,%r15)
je 0x3a47
incl %eax
cmpl $0x2, %eax
jne 0x3a47
leaq (%r15,%r13), %rax
movq %rax, 0x18(%rdx)
movl $0x2, %eax
leaq (%r15,%r13), %rcx
decq %rcx
decq %r15
cmpq $0x1, %rcx
jne 0x3a2b
xorl %eax, %eax
jmp 0x347a
leaq 0x10(%rsp), %rdi
movl $0x10, %esi
callq 0x2cf9
movw %ax, 0x32(%rbp)
cmpq %rbx, %r14
jb 0x3475
movzbl 0x30(%rsp), %eax
movl $0x27, %ecx
subl %eax, %ecx
sarl $0x3, %ecx
movslq %ecx, %rbx
movq 0x18(%rsp), %r14
subq 0x20(%rsp), %r14
cmpq %rbx, %r14
jae 0x3b7f
movq 0x8(%rsp), %rax
movq (%rax), %rdi
movq 0x8(%rax), %rsi
leaq 0x76cb(%rip), %rdx      # 0xb17d
xorl %eax, %eax
callq 0x1030
jmp 0x3b91
leaq 0x10(%rsp), %rdi
movl $0x1, %esi
callq 0x2cf9
movl %eax, 0x44(%rbp)
cmpq %rbx, %r14
jb 0x3475
movzbl 0x30(%rsp), %eax
movl $0x8, %ecx
subl %eax, %ecx
sarl $0x3, %ecx
movslq %ecx, %rbx
movq 0x18(%rsp), %r14
subq 0x20(%rsp), %r14
cmpq %rbx, %r14
jae 0x3bd6
movq 0x8(%rsp), %rax
movq (%rax), %rdi
movq 0x8(%rax), %rsi
leaq 0x766c(%rip), %rdx      # 0xb17d
xorl %eax, %eax
callq 0x1030
jmp 0x3be8
leaq 0x10(%rsp), %rdi
movl $0x1, %esi
callq 0x2cf9
movl %eax, 0x1270(%rbp)
cmpq %rbx, %r14
jb 0x3475
movzbl 0x30(%rsp), %eax
movl $0x10, %ecx
subl %eax, %ecx
sarl $0x3, %ecx
movslq %ecx, %rbx
movq 0x18(%rsp), %r14
subq 0x20(%rsp), %r14
cmpq %rbx, %r14
jae 0x3c35
movq 0x8(%rsp), %rax
movq (%rax), %rdi
movq 0x8(%rax), %rsi
leaq 0x760a(%rip), %rdx      # 0xb17d
xorl %eax, %eax
callq 0x1030
jmp 0x3c4b
leaq 0x10(%rsp), %rdi
movl $0x20, %esi
callq 0x2cf9
movl %eax, 0x34(%rbp)
cmpq %rbx, %r14
jb 0x3475
movzbl 0x30(%rsp), %eax
movl $0x27, %ecx
subl %eax, %ecx
sarl $0x3, %ecx
movslq %ecx, %rbx
movq 0x18(%rsp), %r14
subq 0x20(%rsp), %r14
cmpq %rbx, %r14
jb 0x37f9
leaq 0x10(%rsp), %rdi
movl $0x20, %esi
callq 0x2cf9
movl %eax, 0x38(%rbp)
jmp 0x38ae
leaq 0x10(%rsp), %rdi
movl $0x1, %esi
callq 0x2cf9
movl %eax, 0x48(%rbp)
cmpq %rbx, %r14
jb 0x3475
movzbl 0x30(%rsp), %eax
movl $0x8, %ecx
subl %eax, %ecx
sarl $0x3, %ecx
movslq %ecx, %rbx
movq 0x18(%rsp), %r14
subq 0x20(%rsp), %r14
cmpq %rbx, %r14
jae 0x3ca5
movq 0x8(%rsp), %rax
movq (%rax), %rdi
movq 0x8(%rax), %rsi
leaq 0x7554(%rip), %rdx      # 0xb17d
xorl %eax, %eax
callq 0x1030
jmp 0x3cb7
leaq 0x10(%rsp), %rdi
movl $0x9, %esi
callq 0x2cf9
movw %ax, 0x1274(%rbp)
cmpq %rbx, %r14
jb 0x3475
movq 0x18(%rsp), %rbx
movzbl 0x30(%rsp), %eax
subq 0x20(%rsp), %rbx
cmpl $0x0, 0x1268(%rbp)
je 0x3d04
movl $0xd, %ecx
subl %eax, %ecx
sarl $0x3, %ecx
movslq %ecx, %r14
cmpq %r14, %rbx
jae 0x3d39
movq 0x8(%rsp), %rax
movq (%rax), %rdi
movq 0x8(%rax), %rsi
leaq 0x74e4(%rip), %rdx      # 0xb17d
xorl %eax, %eax
callq 0x1030
jmp 0x3d4e
leaq 0x10(%rsp), %rdi
movl $0x1, %esi
callq 0x2cf9
movl %eax, 0x4c(%rbp)
cmpq %rbx, %r14
jb 0x3475
movzbl 0x30(%rsp), %eax
movl $0xa, %ecx
subl %eax, %ecx
sarl $0x3, %ecx
movslq %ecx, %rbx
movq 0x18(%rsp), %r14
subq 0x20(%rsp), %r14
cmpq %rbx, %r14
jae 0x3d9b
movq 0x8(%rsp), %rax
movq (%rax), %rdi
movq 0x8(%rax), %rsi
leaq 0x7485(%rip), %rdx      # 0xb17d
xorl %eax, %eax
callq 0x1030
jmp 0x3dad
movl $0x8, %ecx
subl %eax, %ecx
sarl $0x3, %ecx
movslq %ecx, %r14
cmpq %r14, %rbx
jae 0x3f57
movq 0x8(%rsp), %rax
movq (%rax), %rdi
movq 0x8(%rax), %rsi
leaq 0x7450(%rip), %rdx      # 0xb17d
xorl %eax, %eax
callq 0x1030
jmp 0x3f6c
leaq 0x10(%rsp), %rdi
movl $0x6, %esi
callq 0x2cf9
movb %al, 0x1276(%rbp)
cmpq %r14, %rbx
jb 0x3475
movzbl 0x30(%rsp), %eax
movl $0xd, %ecx
subl %eax, %ecx
sarl $0x3, %ecx
movslq %ecx, %rbx
movq 0x18(%rsp), %r14
subq 0x20(%rsp), %r14
cmpq %rbx, %r14
jae 0x3fc6
movq 0x8(%rsp), %rax
movq (%rax), %rdi
movq 0x8(%rax), %rsi
leaq 0x73ee(%rip), %rdx      # 0xb17d
xorl %eax, %eax
callq 0x1030
jmp 0x3fdb
leaq 0x10(%rsp), %rdi
movl $0x3, %esi
callq 0x2cf9
movb %al, 0x50(%rbp)
cmpq %rbx, %r14
jb 0x3475
cmpl $0x0, 0x44(%rbp)
je 0x3e90
cmpb $0x0, 0x40(%rbp)
je 0x3e90
leaq 0x73ac(%rip), %r15      # 0xb17d
leaq 0x10(%rsp), %r12
xorl %ebx, %ebx
movzbl 0x30(%rsp), %eax
movl $0x17, %ecx
subl %eax, %ecx
sarl $0x3, %ecx
movslq %ecx, %r14
movq 0x18(%rsp), %r13
subq 0x20(%rsp), %r13
cmpq %r14, %r13
jae 0x3e11
movq 0x8(%rsp), %rax
movq (%rax), %rdi
movq 0x8(%rax), %rsi
movq %r15, %rdx
xorl %eax, %eax
callq 0x1030
jmp 0x3e23
movq %r12, %rdi
movl $0x10, %esi
callq 0x2cf9
movw %ax, 0x52(%rbp,%rbx,2)
cmpq %r14, %r13
jb 0x3475
movzbl 0x30(%rsp), %eax
movl $0x17, %ecx
subl %eax, %ecx
sarl $0x3, %ecx
movslq %ecx, %r14
movq 0x18(%rsp), %r13
subq 0x20(%rsp), %r13
cmpq %r14, %r13
jae 0x3e65
movq 0x8(%rsp), %rax
movq (%rax), %rdi
movq 0x8(%rax), %rsi
movq %r15, %rdx
xorl %eax, %eax
callq 0x1030
jmp 0x3e77
movq %r12, %rdi
movl $0x10, %esi
callq 0x2cf9
movw %ax, 0x58(%rbp,%rbx,2)
cmpq %r14, %r13
jb 0x3475
incq %rbx
movzbl 0x40(%rbp), %eax
cmpq %rax, %rbx
jb 0x3dd8
cmpl $0x0, 0x48(%rbp)
je 0x3f09
cmpb $0x0, 0x40(%rbp)
je 0x3f09
leaq 0x72da(%rip), %r15      # 0xb17d
leaq 0x10(%rsp), %r12
xorl %ebx, %ebx
movzbl 0x30(%rsp), %eax
movl $0xf, %ecx
subl %eax, %ecx
sarl $0x3, %ecx
movslq %ecx, %r14
movq 0x18(%rsp), %r13
subq 0x20(%rsp), %r13
cmpq %r14, %r13
jae 0x3ee3
movq 0x8(%rsp), %rax
movq (%rax), %rdi
movq 0x8(%rax), %rsi
movq %r15, %rdx
xorl %eax, %eax
callq 0x1030
jmp 0x3ef4
movq %r12, %rdi
movl $0x8, %esi
callq 0x2cf9
movb %al, 0x5e(%rbp,%rbx)
cmpq %r14, %r13
jb 0x3475
incq %rbx
movzbl 0x40(%rbp), %eax
cmpq %rax, %rbx
jb 0x3eaa
cmpl $0x0, 0x4c(%rbp)
je 0x3a57
movzbl 0x30(%rsp), %eax
movl $0xf, %ecx
subl %eax, %ecx
sarl $0x3, %ecx
movslq %ecx, %rbx
movq 0x18(%rsp), %r14
subq 0x20(%rsp), %r14
cmpq %rbx, %r14
jae 0x4145
movq 0x8(%rsp), %rax
movq (%rax), %rdi
movq 0x8(%rax), %rsi
leaq 0x7232(%rip), %rdx      # 0xb17d
xorl %eax, %eax
callq 0x1030
jmp 0x4157
leaq 0x10(%rsp), %rdi
movl $0x1, %esi
callq 0x2cf9
movl %eax, 0x127c(%rbp)
cmpq %r14, %rbx
jb 0x3475
cmpl $0x0, 0x127c(%rbp)
je 0x403f
movzbl 0x30(%rsp), %eax
movl $0xd, %ecx
subl %eax, %ecx
sarl $0x3, %ecx
movslq %ecx, %rbx
movq 0x18(%rsp), %r14
subq 0x20(%rsp), %r14
cmpq %rbx, %r14
jae 0x40e3
movq 0x8(%rsp), %rax
movq (%rax), %rdi
movq 0x8(%rax), %rsi
leaq 0x71c3(%rip), %rdx      # 0xb17d
xorl %eax, %eax
callq 0x1030
jmp 0x40f8
leaq 0x10(%rsp), %rdi
movl $0x6, %esi
callq 0x2cf9
movb %al, 0x1277(%rbp)
cmpq %rbx, %r14
jb 0x3475
movzbl 0x30(%rsp), %eax
movl $0xc, %ecx
subl %eax, %ecx
sarl $0x3, %ecx
movslq %ecx, %rbx
movq 0x18(%rsp), %r14
subq 0x20(%rsp), %r14
cmpq %rbx, %r14
jae 0x4021
movq 0x8(%rsp), %rax
movq (%rax), %rdi
movq 0x8(%rax), %rsi
leaq 0x7165(%rip), %rdx      # 0xb17d
xorl %eax, %eax
callq 0x1030
jmp 0x4036
leaq 0x10(%rsp), %rdi
movl $0x5, %esi
callq 0x2cf9
movb %al, 0x1278(%rbp)
cmpq %rbx, %r14
jb 0x3475
movzbl 0x30(%rsp), %eax
movl $0xc, %ecx
subl %eax, %ecx
sarl $0x3, %ecx
movslq %ecx, %rbx
movq 0x18(%rsp), %r14
subq 0x20(%rsp), %r14
cmpq %rbx, %r14
jae 0x407c
movq 0x8(%rsp), %rax
movq (%rax), %rdi
movq 0x8(%rax), %rsi
leaq 0x710a(%rip), %rdx      # 0xb17d
xorl %eax, %eax
callq 0x1030
jmp 0x4091
leaq 0x10(%rsp), %rdi
movl $0x5, %esi
callq 0x2cf9
movb %al, 0x1288(%rbp)
cmpq %rbx, %r14
jb 0x3475
movzbl 0x1288(%rbp), %esi
testl %esi, %esi
je 0x3a57
movzbl 0x30(%rsp), %eax
movl %esi, %ecx
subl %eax, %ecx
addl $0x7, %ecx
sarl $0x3, %ecx
movslq %ecx, %rbx
movq 0x18(%rsp), %r14
subq 0x20(%rsp), %r14
cmpq %rbx, %r14
jb 0x37f9
leaq 0x10(%rsp), %rdi
callq 0x2cf9
movl %eax, 0x128c(%rbp)
jmp 0x38ae
leaq 0x10(%rsp), %rdi
movl $0x6, %esi
callq 0x2cf9
movb %al, 0x1276(%rbp)
cmpq %rbx, %r14
jb 0x3475
movzbl 0x30(%rsp), %eax
movl $0x8, %ecx
subl %eax, %ecx
sarl $0x3, %ecx
movslq %ecx, %rbx
movq 0x18(%rsp), %r14
subq 0x20(%rsp), %r14
cmpq %rbx, %r14
jae 0x437c
movq 0x8(%rsp), %rax
movq (%rax), %rdi
movq 0x8(%rax), %rsi
leaq 0x7044(%rip), %rdx      # 0xb17d
xorl %eax, %eax
callq 0x1030
jmp 0x4391
leaq 0x10(%rsp), %rdi
movl $0x8, %esi
callq 0x2cf9
movb %al, 0x61(%rbp)
cmpq %rbx, %r14
jb 0x3475
cmpb $0x0, 0x61(%rbp)
je 0x3a57
leaq 0xa64(%rbp), %r13
xorl %r15d, %r15d
movzbl 0x30(%rsp), %eax
movl $0xa, %ecx
subl %eax, %ecx
sarl $0x3, %ecx
movslq %ecx, %rbx
movq 0x18(%rsp), %r14
subq 0x20(%rsp), %r14
cmpq %rbx, %r14
jae 0x41b1
movq 0x8(%rsp), %rax
movq (%rax), %rdi
movq 0x8(%rax), %rsi
leaq 0x6fd5(%rip), %rdx      # 0xb17d
xorl %eax, %eax
callq 0x1030
jmp 0x41c5
leaq 0x10(%rsp), %rdi
movl $0x3, %esi
callq 0x2cf9
movb %al, 0x62(%rbp,%r15)
cmpq %rbx, %r14
jb 0x3475
movzbl 0x30(%rsp), %eax
movl $0x8, %ecx
subl %eax, %ecx
sarl $0x3, %ecx
movslq %ecx, %rbx
movq 0x18(%rsp), %r14
subq 0x20(%rsp), %r14
cmpq %rbx, %r14
jae 0x420b
movq 0x8(%rsp), %rax
movq (%rax), %rdi
movq 0x8(%rax), %rsi
leaq 0x6f7b(%rip), %rdx      # 0xb17d
xorl %eax, %eax
callq 0x1030
jmp 0x4222
leaq 0x10(%rsp), %rdi
movl $0x1, %esi
callq 0x2cf9
movl %eax, 0x164(%rbp,%r15,4)
cmpq %rbx, %r14
jb 0x3475
movzbl 0x30(%rsp), %eax
movl $0x8, %ecx
subl %eax, %ecx
sarl $0x3, %ecx
movslq %ecx, %rbx
movq 0x18(%rsp), %r14
subq 0x20(%rsp), %r14
cmpq %rbx, %r14
jae 0x4268
movq 0x8(%rsp), %rax
movq (%rax), %rdi
movq 0x8(%rax), %rsi
leaq 0x6f1e(%rip), %rdx      # 0xb17d
xorl %eax, %eax
callq 0x1030
jmp 0x427f
leaq 0x10(%rsp), %rdi
movl $0x1, %esi
callq 0x2cf9
movl %eax, 0x564(%rbp,%r15,4)
cmpq %rbx, %r14
jb 0x3475
movzbl 0x30(%rsp), %eax
movl $0xa, %ecx
subl %eax, %ecx
sarl $0x3, %ecx
movslq %ecx, %rbx
movq 0x18(%rsp), %r14
subq 0x20(%rsp), %r14
cmpq %rbx, %r14
jae 0x42c5
movq 0x8(%rsp), %rax
movq (%rax), %rdi
movq 0x8(%rax), %rsi
leaq 0x6ec1(%rip), %rdx      # 0xb17d
xorl %eax, %eax
callq 0x1030
jmp 0x42dc
leaq 0x10(%rsp), %rdi
movl $0x3, %esi
callq 0x2cf9
movb %al, 0x964(%rbp,%r15)
cmpq %rbx, %r14
jb 0x3475
cmpb $0x0, 0x964(%rbp,%r15)
je 0x4363
xorl %ebx, %ebx
movq %rbp, %r12
movzbl 0x30(%rsp), %eax
movl $0xf, %ecx
subl %eax, %ecx
sarl $0x3, %ecx
movslq %ecx, %r14
movq 0x18(%rsp), %rbp
subq 0x20(%rsp), %rbp
cmpq %r14, %rbp
jae 0x4332
movq 0x8(%rsp), %rax
movq (%rax), %rdi
movq 0x8(%rax), %rsi
leaq 0x6e54(%rip), %rdx      # 0xb17d
xorl %eax, %eax
callq 0x1030
jmp 0x4346
leaq 0x10(%rsp), %rdi
movl $0x8, %esi
callq 0x2cf9
movb %al, (%r13,%rbx)
cmpq %r14, %rbp
jb 0x3475
incq %rbx
movq %r12, %rbp
movzbl 0x964(%r12,%r15), %eax
cmpq %rax, %rbx
jb 0x42f2
incq %r15
movzbl 0x61(%rbp), %eax
addq $0x8, %r13
cmpq %rax, %r15
jb 0x4174
jmp 0x3a57
leaq 0x10(%rsp), %rdi
movl $0x1, %esi
callq 0x2cf9
movl %eax, 0x1280(%rbp)
cmpq %rbx, %r14
jb 0x3475
cmpl $0x0, 0x1280(%rbp)
je 0x403f
movq %rbp, %r15
movzbl 0x30(%rsp), %eax
movl $0xd, %ecx
subl %eax, %ecx
sarl $0x3, %ecx
movslq %ecx, %rbx
movq 0x18(%rsp), %r14
subq 0x20(%rsp), %r14
cmpq %rbx, %r14
jae 0x43e7
movq 0x8(%rsp), %rax
movq (%rax), %rdi
movq 0x8(%rax), %rsi
leaq 0x6d9f(%rip), %rdx      # 0xb17d
xorl %eax, %eax
callq 0x1030
jmp 0x43fd
leaq 0x10(%rsp), %rdi
movl $0x6, %esi
callq 0x2cf9
movb %al, 0x1277(%r15)
cmpq %rbx, %r14
jb 0x3475
movzbl 0x30(%rsp), %eax
movl $0x8, %ecx
subl %eax, %ecx
sarl $0x3, %ecx
movslq %ecx, %rbx
movq 0x18(%rsp), %r14
subq 0x20(%rsp), %r14
cmpq %rbx, %r14
jae 0x4443
movq 0x8(%rsp), %rax
movq (%rax), %rdi
movq 0x8(%rax), %rsi
leaq 0x6d43(%rip), %rdx      # 0xb17d
xorl %eax, %eax
callq 0x1030
jmp 0x4459
leaq 0x10(%rsp), %rdi
movl $0x1, %esi
callq 0x2cf9
movl %eax, 0x1284(%r15)
cmpq %rbx, %r14
jb 0x3475
movq %r15, %rbp
cmpl $0x0, 0x1284(%r15)
je 0x403f
movzbl 0x30(%rsp), %eax
movl $0xc, %ecx
subl %eax, %ecx
sarl $0x3, %ecx
movslq %ecx, %rbx
movq 0x18(%rsp), %r14
subq 0x20(%rsp), %r14
cmpq %rbx, %r14
jae 0x44b0
movq 0x8(%rsp), %rax
movq (%rax), %rdi
movq 0x8(%rax), %rsi
leaq 0x6cd6(%rip), %rdx      # 0xb17d
xorl %eax, %eax
callq 0x1030
jmp 0x44c6
leaq 0x10(%rsp), %rdi
movl $0x5, %esi
callq 0x2cf9
movb %al, 0x1278(%r15)
cmpq %rbx, %r14
movq %r15, %rbp
jb 0x3475
jmp 0x403f