// File: /workspace/github_cpp_makefile_star2_O2/lukasz-wiecaszek[P]h264iframedecoder/h264_parser.cpp
// Function: ymn::h264_parser::parse_pps(ymn::istream<0>&)
h264_parser_status_e h264_parser::parse_pps(istream_be& s)
{
    h264_parser_status_e retval = h264_parser_status_e::NAL_UNIT_CORRUPTED;

    do {
        bool status;
        uint32_t pic_parameter_set_id;
        uint32_t seq_parameter_set_id;

        if (!CHK_EXPR(s.read_exp_golomb_u(pic_parameter_set_id), std::cout) ||
            !CHK_RANGE(pic_parameter_set_id, 0U, static_cast<unsigned>(H264_PARSER_MAX_NUMBER_OF_PPS - 1), std::cout)) {
            s.mark_corrupted();
            break;
        }

        h264::pps& pps = m_pps_table[pic_parameter_set_id];
        pps.reset();

        if (!CHK_EXPR(s.read_exp_golomb_u(seq_parameter_set_id), std::cout) ||
            !CHK_RANGE(seq_parameter_set_id, 0U, static_cast<unsigned>(H264_PARSER_MAX_NUMBER_OF_SPS - 1), std::cout)) {
            s.mark_corrupted();
            break;
        }

        h264::sps& sps = m_sps_table[seq_parameter_set_id];
        if (!sps.is_valid()) {
            std::cout << "error: pps #" << pic_parameter_set_id;
            std::cout << " refers to sps #" << seq_parameter_set_id << " which is not valid";
            std::cout << std::endl;
            break;
        }

        pps.pic_parameter_set_id = pic_parameter_set_id;
        pps.seq_parameter_set_id = seq_parameter_set_id;

        pps.set_active_sps(&m_sps_table[seq_parameter_set_id]);

        s.read_bits(1, pps.entropy_coding_mode_flag);
        s.read_bits(1, pps.bottom_field_pic_order_in_frame_present_flag);

        if (!CHK_EXPR(s.read_exp_golomb_u(pps.num_slice_groups_minus1), std::cout) ||
            !CHK_STRUCT_RANGE(pps, num_slice_groups_minus1, 0U, 7U, std::cout)) {
            s.mark_corrupted();
            break;
        }

        if (pps.num_slice_groups_minus1 > 0) {
            /* 7.4.2.2 Picture parameter set RBSP semantics */
            /* slice_group_map_type specifies how the mapping of slice group map */
            /* units to slice groups is coded. The value of slice_group_map_type */
            /* shall be in the range of 0 to 6, inclusive.*/
            if (!CHK_EXPR(s.read_exp_golomb_u(pps.slice_group_map_type), std::cout) ||
                !CHK_STRUCT_RANGE(pps, slice_group_map_type, 0U, 6U, std::cout)) {
                s.mark_corrupted();
                break;
            }

            if (pps.slice_group_map_type == 0) {
                for (uint32_t iGroup = 0; iGroup <= pps.num_slice_groups_minus1; ++iGroup)
                    s.read_exp_golomb_u(pps.t0.run_length_minus1[iGroup]);
            }
            else
            if (pps.slice_group_map_type == 2) {
                for (uint32_t iGroup = 0; iGroup < pps.num_slice_groups_minus1; ++iGroup) {
                    s.read_exp_golomb_u(pps.t1.top_left[iGroup]);
                    s.read_exp_golomb_u(pps.t1.bottom_right[iGroup]);
                }
            }
            else
            if ((pps.slice_group_map_type == 3) ||
                (pps.slice_group_map_type == 4) ||
                (pps.slice_group_map_type == 5)) {
                s.read_bits(1, pps.t2.slice_group_change_direction_flag);
                s.read_exp_golomb_u(pps.t2.slice_group_change_rate_minus1);
            }
            else
            if (pps.slice_group_map_type == 6) {
                s.read_exp_golomb_u(pps.t3.pic_size_in_map_units_minus1);
                for (uint32_t i = 0; i <= pps.t3.pic_size_in_map_units_minus1; ++i)
                    s.read_bits(ilog2_roundup(pps.num_slice_groups_minus1 + 1), pps.t3.slice_group_id[i]);
            }
        }

        if (!CHK_EXPR(s.read_exp_golomb_u(pps.num_ref_idx_l0_default_active_minus1), std::cout) ||
            !CHK_STRUCT_RANGE(pps, num_ref_idx_l0_default_active_minus1, 0U, 31U, std::cout)) {
            s.mark_corrupted();
            break;
        }

        if (!CHK_EXPR(s.read_exp_golomb_u(pps.num_ref_idx_l1_default_active_minus1), std::cout) ||
            !CHK_STRUCT_RANGE(pps, num_ref_idx_l1_default_active_minus1, 0U, 31U, std::cout)) {
            s.mark_corrupted();
            break;
        }

        s.read_bits(1, pps.weighted_pred_flag);
        s.read_bits(2, pps.weighted_bipred_idc);

        if (!CHK_EXPR(s.read_exp_golomb_s(pps.pic_init_qp_minus26), std::cout) ||
            !CHK_STRUCT_RANGE(pps, pic_init_qp_minus26, -26 - 6 * static_cast<int>(sps.bit_depth_luma_minus8), +25, std::cout)) {
            s.mark_corrupted();
            break;
        }

        if (!CHK_EXPR(s.read_exp_golomb_s(pps.pic_init_qs_minus26), std::cout) ||
            !CHK_STRUCT_RANGE(pps, pic_init_qs_minus26, -26, +25, std::cout)) {
            s.mark_corrupted();
            break;
        }

        if (!CHK_EXPR(s.read_exp_golomb_s(pps.chroma_qp_index_offset), std::cout) ||
            !CHK_STRUCT_RANGE(pps, chroma_qp_index_offset, -12, +12, std::cout)) {
            s.mark_corrupted();
            break;
        }

        s.read_bits(1, pps.deblocking_filter_control_present_flag);
        s.read_bits(1, pps.constrained_intra_pred_flag);
        s.read_bits(1, pps.redundant_pic_cnt_present_flag);

        if (more_rbsp_data(s)) {
            s.read_bits(1, pps.transform_8x8_mode_flag);

            s.read_bits(1, pps.pic_scaling_matrix_present_flag);
            if (pps.pic_scaling_matrix_present_flag) {
                status = parse_scaling_matrices(s, pps.sm, pps.transform_8x8_mode_flag, sps.chroma_format_idc);
                if (!status)
                    break;
                const uint8_t (&fallback_4x4_intra)[16] =
                    sps.seq_scaling_matrix_present_flag ?
                        sps.sm.scaling_matrices_4x4[SL_4x4_INTRA_Y].scaling_list : h264::scaling_list_default_4x4[0];
                const uint8_t (&fallback_4x4_inter)[16] =
                    sps.seq_scaling_matrix_present_flag ?
                        sps.sm.scaling_matrices_4x4[SL_4x4_INTER_Y].scaling_list : h264::scaling_list_default_4x4[1];
                const uint8_t (&fallback_8x8_intra)[64] =
                    sps.seq_scaling_matrix_present_flag ?
                        sps.sm.scaling_matrices_8x8[SL_8x8_INTRA_Y].scaling_list : h264::scaling_list_default_8x8[0];
                const uint8_t (&fallback_8x8_inter)[64] =
                    sps.seq_scaling_matrix_present_flag ?
                        sps.sm.scaling_matrices_8x8[SL_8x8_INTER_Y].scaling_list : h264::scaling_list_default_8x8[1];

                /* for each list which is not transmited, use the fall-back scaling list
                   as defined in Table 7-2 � Assignment of mnemonic names to scaling list
                   indices and specification of fall-back rule */
                if (!pps.sm.scaling_matrices_4x4[SL_4x4_INTRA_Y].scaling_list_present_flag)
                    pps.sm.scaling_matrices_4x4[SL_4x4_INTRA_Y].copy(fallback_4x4_intra);
                if (!pps.sm.scaling_matrices_4x4[SL_4x4_INTRA_Cb].scaling_list_present_flag)
                    pps.sm.scaling_matrices_4x4[SL_4x4_INTRA_Cb].copy(sps.sm.scaling_matrices_4x4[SL_4x4_INTRA_Y].scaling_list);
                if (!pps.sm.scaling_matrices_4x4[SL_4x4_INTRA_Cr].scaling_list_present_flag)
                    pps.sm.scaling_matrices_4x4[SL_4x4_INTRA_Cr].copy(sps.sm.scaling_matrices_4x4[SL_4x4_INTRA_Cb].scaling_list);
                if (!pps.sm.scaling_matrices_4x4[SL_4x4_INTER_Y].scaling_list_present_flag)
                    pps.sm.scaling_matrices_4x4[SL_4x4_INTER_Y].copy(fallback_4x4_inter);
                if (!pps.sm.scaling_matrices_4x4[SL_4x4_INTER_Cb].scaling_list_present_flag)
                    pps.sm.scaling_matrices_4x4[SL_4x4_INTER_Cb].copy(sps.sm.scaling_matrices_4x4[SL_4x4_INTER_Y].scaling_list);
                if (!pps.sm.scaling_matrices_4x4[SL_4x4_INTER_Cr].scaling_list_present_flag)
                    pps.sm.scaling_matrices_4x4[SL_4x4_INTER_Cr].copy(sps.sm.scaling_matrices_4x4[SL_4x4_INTER_Cb].scaling_list);

                if (pps.transform_8x8_mode_flag) {
                    if (!pps.sm.scaling_matrices_8x8[SL_8x8_INTRA_Y].scaling_list_present_flag)
                        pps.sm.scaling_matrices_8x8[SL_8x8_INTRA_Y].copy(fallback_8x8_intra);
                    if (!pps.sm.scaling_matrices_8x8[SL_8x8_INTER_Y].scaling_list_present_flag)
                        pps.sm.scaling_matrices_8x8[SL_8x8_INTER_Y].copy(fallback_8x8_inter);

                    if (sps.chroma_format_idc == 3) {
                        if (!pps.sm.scaling_matrices_8x8[SL_8x8_INTRA_Cb].scaling_list_present_flag)
                            pps.sm.scaling_matrices_8x8[SL_8x8_INTRA_Cb].copy(sps.sm.scaling_matrices_8x8[SL_8x8_INTRA_Y].scaling_list);
                        if (!pps.sm.scaling_matrices_8x8[SL_8x8_INTER_Cb].scaling_list_present_flag)
                            pps.sm.scaling_matrices_8x8[SL_8x8_INTER_Cb].copy(sps.sm.scaling_matrices_8x8[SL_8x8_INTER_Y].scaling_list);
                        if (!pps.sm.scaling_matrices_8x8[SL_8x8_INTRA_Cr].scaling_list_present_flag)
                            pps.sm.scaling_matrices_8x8[SL_8x8_INTRA_Cr].copy(sps.sm.scaling_matrices_8x8[SL_8x8_INTRA_Cb].scaling_list);
                        if (!pps.sm.scaling_matrices_8x8[SL_8x8_INTER_Cr].scaling_list_present_flag)
                            pps.sm.scaling_matrices_8x8[SL_8x8_INTER_Cr].copy(sps.sm.scaling_matrices_8x8[SL_8x8_INTER_Cb].scaling_list);
                    }
                 }
            }
            else
                pps.sm = sps.sm; /* copy scaling matrices from corresponding sps */

            s.read_exp_golomb_s(pps.second_chroma_qp_index_offset);
        }
        else {
            pps.transform_8x8_mode_flag = 0;
            pps.sm = sps.sm; /* copy scaling matrices from corresponding sps */
            pps.second_chroma_qp_index_offset = pps.chroma_qp_index_offset;
        }

        if (s.status() != ISTREAM_STATUS_OK)
            break;

        m_recent_pps = pic_parameter_set_id;

        pps.set_valid(true);
        retval = h264_parser_status_e::PPS_PARSED;
    } while (0);

    return retval;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x4(%rsp), %rsi
movq %rbx, %rdi
callq 0x6160
movzbl %al, %esi
leaq 0xfcf1(%rip), %rdi      # 0x147e2
movq 0x194c8(%rip), %rdx     # 0x1dfc0
callq 0x6109
testb %al, %al
je 0x523a
movl 0x4(%rsp), %esi
leaq 0xfb65(%rip), %rdi      # 0x14675
movq 0x194a9(%rip), %r8      # 0x1dfc0
xorl %edx, %edx
movl $0xff, %ecx
callq 0x61f6
testb %al, %al
je 0x523a
movl 0x4(%rsp), %eax
imulq $0x718, %rax, %r15      # imm = 0x718
movb $0x0, 0x16138(%r14,%r15)
leaq 0x14(%rsp), %rsi
movq %rbx, %rdi
callq 0x6160
movzbl %al, %esi
leaq 0xfbb4(%rip), %rdi      # 0x1470a
movq 0x19463(%rip), %rdx     # 0x1dfc0
callq 0x6109
testb %al, %al
je 0x523a
movl 0x14(%rsp), %esi
leaq 0xfaeb(%rip), %rdi      # 0x14660
movq 0x19444(%rip), %r8      # 0x1dfc0
pushq $0x1f
popq %rcx
xorl %edx, %edx
callq 0x61f6
testb %al, %al
je 0x523a
movl 0x14(%rsp), %eax
imulq $0xb00, %rax, %rcx      # imm = 0xB00
cmpb $0x0, 0x130(%r14,%rcx)
je 0x5252
addq %r14, %r15
addq $0x16130, %r15          # imm = 0x16130
leaq 0x128(%r14,%rcx), %r13
movl 0x4(%rsp), %ecx
movl %ecx, 0xc(%r15)
movl %eax, 0x10(%r15)
movq %r13, 0x710(%r15)
leaq 0x14(%r15), %rdx
pushq $0x1
popq %rbp
movq %rbx, %rdi
movl %ebp, %esi
callq 0x5fee
leaq 0x18(%r15), %rdx
movq %rbx, %rdi
movl %ebp, %esi
callq 0x5fee
leaq 0x1c(%r15), %r12
movq %rbx, %rdi
movq %r12, %rsi
callq 0x6160
movzbl %al, %esi
leaq 0xfc39(%rip), %rdi      # 0x1483e
movq 0x193b4(%rip), %rdx     # 0x1dfc0
callq 0x6109
testb %al, %al
je 0x523a
movl (%r12), %esi
leaq 0xfc4b(%rip), %rdi      # 0x1486f
movq 0x19395(%rip), %r8      # 0x1dfc0
pushq $0x7
popq %rcx
xorl %edx, %edx
callq 0x61f6
testb %al, %al
je 0x523a
movq %r13, 0x8(%rsp)
cmpl $0x0, (%r12)
je 0x4cd3
leaq 0x20(%r15), %r13
movq %rbx, %rdi
movq %r13, %rsi
callq 0x6160
movzbl %al, %esi
leaq 0xfc25(%rip), %rdi      # 0x1488b
movq 0x19353(%rip), %rdx     # 0x1dfc0
callq 0x6109
testb %al, %al
je 0x523a
movl (%r13), %esi
leaq 0xfc34(%rip), %rdi      # 0x148b9
movq 0x19334(%rip), %r8      # 0x1dfc0
pushq $0x6
popq %rcx
xorl %edx, %edx
callq 0x61f6
testb %al, %al
je 0x523a
movl (%r13), %eax
cmpq $0x6, %rax
ja 0x4cd3
leaq 0xf8e1(%rip), %rcx      # 0x14590
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x24(%r15), %rdx
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0x5fee
leaq 0x28(%r15), %rsi
movq %rbx, %rdi
callq 0x6160
leaq 0x428(%r15), %r12
movq %rbx, %rdi
movq %r12, %rsi
callq 0x6160
movzbl %al, %esi
leaq 0xfbe3(%rip), %rdi      # 0x148d2
movq 0x192ca(%rip), %rdx     # 0x1dfc0
callq 0x6109
testb %al, %al
je 0x523a
movl (%r12), %esi
leaq 0xfc02(%rip), %rdi      # 0x14910
movq 0x192ab(%rip), %r8      # 0x1dfc0
pushq $0x1f
popq %rcx
xorl %edx, %edx
callq 0x61f6
testb %al, %al
je 0x523a
leaq 0x42c(%r15), %r12
movq %rbx, %rdi
movq %r12, %rsi
callq 0x6160
movzbl %al, %esi
leaq 0xfbf6(%rip), %rdi      # 0x14939
movq 0x19276(%rip), %rdx     # 0x1dfc0
callq 0x6109
testb %al, %al
je 0x523a
movl (%r12), %esi
leaq 0xfc15(%rip), %rdi      # 0x14977
movq 0x19257(%rip), %r8      # 0x1dfc0
pushq $0x1f
popq %rcx
xorl %edx, %edx
callq 0x61f6
testb %al, %al
je 0x523a
leaq 0x430(%r15), %rdx
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0x5fee
leaq 0x434(%r15), %rdx
pushq $0x2
popq %rbp
movq %rbx, %rdi
movl %ebp, %esi
callq 0x5fee
leaq 0x438(%r15), %r12
movq %rbx, %rdi
movq %r12, %rsi
callq 0x644a
movzbl %al, %esi
leaq 0xfbe3(%rip), %rdi      # 0x149a0
movq 0x191fc(%rip), %rdx     # 0x1dfc0
callq 0x6109
testb %al, %al
je 0x52a8
movl (%r12), %esi
movq 0x8(%rsp), %rax
imull $-0x6, 0x18(%rax), %edx
addl $-0x1a, %edx
leaq 0xfbe5(%rip), %rdi      # 0x149cd
movq 0x191d1(%rip), %r8      # 0x1dfc0
pushq $0x19
popq %rcx
callq 0x64f5
testb %al, %al
je 0x52a8
leaq 0x43c(%r15), %r12
movq %rbx, %rdi
movq %r12, %rsi
callq 0x644a
movzbl %al, %esi
leaq 0xfbca(%rip), %rdi      # 0x149e5
movq 0x1919e(%rip), %rdx     # 0x1dfc0
callq 0x6109
testb %al, %al
je 0x52a8
movl (%r12), %esi
leaq 0xfbd8(%rip), %rdi      # 0x14a12
movq 0x1917f(%rip), %r8      # 0x1dfc0
pushq $-0x1a
popq %rdx
pushq $0x19
popq %rcx
callq 0x64f5
testb %al, %al
je 0x52a8
leaq 0x440(%r15), %r12
movq %rbx, %rdi
movq %r12, %rsi
callq 0x644a
movzbl %al, %esi
leaq 0xfbba(%rip), %rdi      # 0x14a2a
movq 0x19149(%rip), %rdx     # 0x1dfc0
callq 0x6109
testb %al, %al
je 0x52a8
movl (%r12), %esi
leaq 0xfbcb(%rip), %rdi      # 0x14a5a
movq 0x1912a(%rip), %r8      # 0x1dfc0
pushq $-0xc
popq %rdx
pushq $0xc
popq %rcx
callq 0x64f5
testb %al, %al
je 0x52a8
leaq 0x444(%r15), %rdx
pushq $0x1
popq %r12
movq %rbx, %rdi
movl %r12d, %esi
callq 0x5fee
leaq 0x448(%r15), %rdx
movq %rbx, %rdi
movl %r12d, %esi
callq 0x5fee
leaq 0x44c(%r15), %rdx
movq %rbx, %rdi
movl %r12d, %esi
callq 0x5fee
movq %rbx, %rdi
callq 0x66e5
testb %al, %al
je 0x5364
leaq 0x450(%r15), %r12
pushq $0x1
popq %r13
movq %rbx, %rdi
movl %r13d, %esi
movq %r12, %rdx
callq 0x5fee
leaq 0x454(%r15), %rdx
movq %rbx, %rdi
movl %r13d, %esi
callq 0x5fee
cmpl $0x0, 0x454(%r15)
je 0x5391
leaq 0x458(%r15), %rdx
xorl %ecx, %ecx
cmpl $0x0, 0x450(%r15)
setne %cl
movq 0x8(%rsp), %rax
movl 0x10(%rax), %r8d
movq %rbx, %rsi
callq 0x3ac4
testb %al, %al
je 0x5241
movq 0x8(%rsp), %rax
movl 0x24(%rax), %r10d
leaq 0x48(%rax), %r9
leaq 0xa8(%rax), %rdi
leaq 0x108(%rax), %rcx
addq $0x158, %rax            # imm = 0x158
testl %r10d, %r10d
leaq 0xff8c(%rip), %r8       # 0x14f10
cmovneq %rdi, %r8
leaq 0xff91(%rip), %rsi      # 0x14f20
cmovneq %rcx, %rsi
leaq 0xffc6(%rip), %rdx      # 0x14f60
cmovneq %rax, %rdx
cmpl $0x0, 0x474(%r15)
jne 0x4fca
testl %r10d, %r10d
leaq 0xff4e(%rip), %r10      # 0x14f00
cmovneq %r9, %r10
movups (%r10), %xmm0
movups %xmm0, 0x478(%r15)
movb $0x1, 0x470(%r15)
cmpl $0x0, 0x494(%r15)
jne 0x4fe8
movups (%r9), %xmm0
movups %xmm0, 0x498(%r15)
movb $0x1, 0x490(%r15)
cmpl $0x0, 0x4b4(%r15)
jne 0x500c
movq 0x8(%rsp), %r9
movups 0x68(%r9), %xmm0
movups %xmm0, 0x4b8(%r15)
movb $0x1, 0x4b0(%r15)
cmpl $0x0, 0x4d4(%r15)
jne 0x502a
movups (%r8), %xmm0
movups %xmm0, 0x4d8(%r15)
movb $0x1, 0x4d0(%r15)
cmpl $0x0, 0x4f4(%r15)
jne 0x5047
movups (%rdi), %xmm0
movups %xmm0, 0x4f8(%r15)
movb $0x1, 0x4f0(%r15)
cmpl $0x0, 0x514(%r15)
jne 0x506d
movq 0x8(%rsp), %rdi
movups 0xc8(%rdi), %xmm0
movups %xmm0, 0x518(%r15)
movb $0x1, 0x510(%r15)
cmpl $0x0, (%r12)
je 0x53a6
cmpl $0x0, 0x534(%r15)
jne 0x50b9
movups (%rsi), %xmm0
movups 0x10(%rsi), %xmm1
movups 0x20(%rsi), %xmm2
movups 0x30(%rsi), %xmm3
movups %xmm3, 0x568(%r15)
movups %xmm2, 0x558(%r15)
movups %xmm1, 0x548(%r15)
movups %xmm0, 0x538(%r15)
movb $0x1, 0x530(%r15)
cmpl $0x0, 0x584(%r15)
jne 0x50fa
movups (%rdx), %xmm0
movups 0x10(%rdx), %xmm1
movups 0x20(%rdx), %xmm2
movups 0x30(%rdx), %xmm3
movups %xmm3, 0x5b8(%r15)
movups %xmm2, 0x5a8(%r15)
movups %xmm1, 0x598(%r15)
movups %xmm0, 0x588(%r15)
movb $0x1, 0x580(%r15)
movq 0x8(%rsp), %rdx
cmpl $0x3, 0x10(%rdx)
jne 0x53a6
cmpl $0x0, 0x5d4(%r15)
jne 0x514a
movups (%rcx), %xmm0
movups 0x10(%rcx), %xmm1
movups 0x20(%rcx), %xmm2
movups 0x30(%rcx), %xmm3
movups %xmm3, 0x608(%r15)
movups %xmm2, 0x5f8(%r15)
movups %xmm1, 0x5e8(%r15)
movups %xmm0, 0x5d8(%r15)
movb $0x1, 0x5d0(%r15)
cmpl $0x0, 0x624(%r15)
jne 0x518b
movups (%rax), %xmm0
movups 0x10(%rax), %xmm1
movups 0x20(%rax), %xmm2
movups 0x30(%rax), %xmm3
movups %xmm3, 0x658(%r15)
movups %xmm2, 0x648(%r15)
movups %xmm1, 0x638(%r15)
movups %xmm0, 0x628(%r15)
movb $0x1, 0x620(%r15)
cmpl $0x0, 0x674(%r15)
jne 0x51de
movq 0x8(%rsp), %rax
movups 0x1a8(%rax), %xmm0
movups 0x1b8(%rax), %xmm1
movups 0x1c8(%rax), %xmm2
movups 0x1d8(%rax), %xmm3
movups %xmm3, 0x6a8(%r15)
movups %xmm2, 0x698(%r15)
movups %xmm1, 0x688(%r15)
movups %xmm0, 0x678(%r15)
movb $0x1, 0x670(%r15)
cmpl $0x0, 0x6c4(%r15)
jne 0x53a6
movq 0x8(%rsp), %rax
movups 0x1f8(%rax), %xmm0
movups 0x208(%rax), %xmm1
movups 0x218(%rax), %xmm2
movups 0x228(%rax), %xmm3
movups %xmm3, 0x6f8(%r15)
movups %xmm2, 0x6e8(%r15)
movups %xmm1, 0x6d8(%r15)
movups %xmm0, 0x6c8(%r15)
movb $0x1, 0x6c0(%r15)
jmp 0x53a6
orb $0x4, 0x20(%rbx)
pushq $0x2
popq %rbp
movl %ebp, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x18d67(%rip), %rbx     # 0x1dfc0
leaq 0xf5ac(%rip), %rsi      # 0x1480c
movq %rbx, %rdi
callq 0x2120
movl 0x4(%rsp), %esi
movq %rax, %rdi
callq 0x20e0
leaq 0xf59e(%rip), %rsi      # 0x14819
movq %rbx, %rdi
callq 0x2120
movl 0x14(%rsp), %esi
movq %rax, %rdi
callq 0x20e0
leaq 0xf594(%rip), %rsi      # 0x1482a
movq %rax, %rdi
callq 0x2120
movq %rbx, %rdi
callq 0x20b0
jmp 0x523e
orb $0x4, 0x20(%rbx)
jmp 0x5241
leaq 0x24(%r15), %rsi
movq %rbx, %rdi
movq %rsi, 0x20(%rsp)
callq 0x6160
leaq 0x28(%r15), %rax
movq %rax, 0x18(%rsp)
xorl %r13d, %r13d
movq 0x20(%rsp), %rax
cmpl (%rax), %r13d
ja 0x4cd3
movl (%r12), %ebp
leal 0x1(%rbp), %edi
andl %edi, %ebp
callq 0x5b8e
cmpl $0x1, %ebp
sbbl $-0x1, %eax
movl %r13d, %ecx
movq 0x18(%rsp), %rdx
leaq (%rdx,%rcx,4), %rdx
movq %rbx, %rdi
movl %eax, %esi
callq 0x5fee
incl %r13d
jmp 0x52cb
leaq 0x24(%r15), %r13
xorl %ebp, %ebp
cmpl (%r12), %ebp
ja 0x4cd3
movl %ebp, %eax
leaq (,%rax,4), %rsi
addq %r13, %rsi
movq %rbx, %rdi
callq 0x6160
incl %ebp
jmp 0x530e
leaq 0x24(%r15), %r13
xorl %ebp, %ebp
movl (%r12), %eax
cmpq %rax, %rbp
jae 0x4cd3
movq %rbx, %rdi
movq %r13, %rsi
callq 0x6160
leaq 0x20(%r13), %rsi
movq %rbx, %rdi
callq 0x6160
incq %rbp
addq $0x4, %r13
jmp 0x5337
andl $0x0, 0x450(%r15)
movq 0x8(%rsp), %rsi
addq $0x28, %rsi
leaq 0x458(%r15), %rdi
callq 0x6734
movl 0x440(%r15), %eax
movl %eax, 0x708(%r15)
jmp 0x53b5
movq 0x8(%rsp), %rsi
addq $0x28, %rsi
leaq 0x458(%r15), %rdi
callq 0x6734
leaq 0x708(%r15), %rsi
movq %rbx, %rdi
callq 0x644a
cmpl $0x0, 0x20(%rbx)
jne 0x5241
movl 0x4(%rsp), %eax
movl %eax, 0x87930(%r14)
movb $0x1, 0x8(%r15)
pushq $0x5
jmp 0x5240