// File: /workspace/github_cpp_makefile_star2_O1/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 0xc(%rsp), %rsi
movq %rbx, %rdi
callq 0x727a
testb %al, %al
jne 0x53dd
movl %eax, %ebp
movq 0x1cc5e(%rip), %r15     # 0x21fc0
movq (%r15), %rax
movq -0x18(%rax), %rax
testb $0x5, 0x20(%r15,%rax)
jne 0x53d4
leaq 0x149e9(%rip), %rsi     # 0x19d61
movl $0x7, %edx
movq %r15, %rdi
callq 0x21d0
leaq 0x143d6(%rip), %rsi     # 0x19762
movl $0x29, %edx
movq %r15, %rdi
callq 0x21d0
leaq 0x149c9(%rip), %rsi     # 0x19d69
movl $0x7, %edx
movq %r15, %rdi
callq 0x21d0
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x2150
movsbl %al, %esi
movq %r15, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2110
testb %bpl, %bpl
je 0x5d35
movl 0xc(%rsp), %esi
leaq 0x1420d(%rip), %rdi     # 0x195f5
movq 0x1cbd1(%rip), %r15     # 0x21fc0
xorl %edx, %edx
movl $0xff, %ecx
movq %r15, %r8
callq 0x735c
testb %al, %al
je 0x5d35
movl 0xc(%rsp), %eax
imulq $0x718, %rax, %r12      # imm = 0x718
movb $0x0, 0x16138(%r14,%r12)
leaq 0x1c(%rsp), %rsi
movq %rbx, %rdi
callq 0x727a
testb %al, %al
jne 0x54a8
movl %eax, %ebp
movq (%r15), %rax
movq -0x18(%rax), %rax
testb $0x5, 0x20(%r15,%rax)
jne 0x549f
leaq 0x1491e(%rip), %rsi     # 0x19d61
movl $0x7, %edx
movq %r15, %rdi
callq 0x21d0
leaq 0x14233(%rip), %rsi     # 0x1968a
movl $0x29, %edx
movq %r15, %rdi
callq 0x21d0
leaq 0x148fe(%rip), %rsi     # 0x19d69
movl $0x7, %edx
movq %r15, %rdi
callq 0x21d0
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x2150
movsbl %al, %esi
movq %r15, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2110
testb %bpl, %bpl
je 0x5d35
movl 0x1c(%rsp), %esi
leaq 0x1412d(%rip), %rdi     # 0x195e0
movq 0x1cb06(%rip), %r13     # 0x21fc0
xorl %edx, %edx
movl $0x1f, %ecx
movq %r13, %r8
callq 0x735c
testb %al, %al
je 0x5d35
movl 0x1c(%rsp), %eax
imulq $0xb00, %rax, %rcx      # imm = 0xB00
cmpb $0x0, 0x130(%r14,%rcx)
je 0x568e
leaq (%r14,%r12), %r15
addq $0x16130, %r15          # imm = 0x16130
leaq 0x128(%r14,%rcx), %rdx
movl 0xc(%rsp), %ecx
movl %ecx, 0xc(%r15)
movl %eax, 0x10(%r15)
movq %rdx, 0x10(%rsp)
movq %rdx, 0x710(%r15)
leaq 0x14(%r15), %rdx
movq %rbx, %rdi
movl $0x1, %esi
callq 0x70a0
leaq 0x18(%r15), %rdx
movq %rbx, %rdi
movl $0x1, %esi
callq 0x70a0
leaq 0x1c(%r15), %r12
movq %rbx, %rdi
movq %r12, %rsi
callq 0x727a
testb %al, %al
jne 0x55ca
movl %eax, %ebp
movq (%r13), %rax
movq -0x18(%rax), %rax
testb $0x5, 0x20(%r13,%rax)
jne 0x55c1
leaq 0x147fd(%rip), %rsi     # 0x19d61
movl $0x7, %edx
movq %r13, %rdi
callq 0x21d0
leaq 0x14246(%rip), %rsi     # 0x197be
movl $0x30, %edx
movq %r13, %rdi
callq 0x21d0
leaq 0x147dd(%rip), %rsi     # 0x19d69
movl $0x7, %edx
movq %r13, %rdi
callq 0x21d0
movq (%r13), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x2150
movsbl %al, %esi
movq %r13, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2110
testb %bpl, %bpl
je 0x5d35
movl (%r12), %esi
leaq 0x1421a(%rip), %rdi     # 0x197ef
movq 0x1c9e4(%rip), %r8      # 0x21fc0
xorl %edx, %edx
movl $0x7, %ecx
callq 0x735c
testb %al, %al
je 0x5d35
cmpl $0x0, (%r12)
je 0x57b2
leaq 0x20(%r15), %r13
movq %rbx, %rdi
movq %r13, %rsi
callq 0x727a
movzbl %al, %esi
leaq 0x141f7(%rip), %rdi     # 0x1980b
movq 0x1c9a5(%rip), %rdx     # 0x21fc0
callq 0x71c7
testb %al, %al
je 0x5d35
movl (%r13), %esi
leaq 0x14206(%rip), %rdi     # 0x19839
movq 0x1c986(%rip), %r8      # 0x21fc0
xorl %edx, %edx
movl $0x6, %ecx
callq 0x735c
testb %al, %al
je 0x5d35
movl (%r13), %eax
cmpq $0x6, %rax
ja 0x57b2
leaq 0x13f2d(%rip), %rcx     # 0x19590
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x24(%r15), %rdx
movq %rbx, %rdi
movl $0x1, %esi
callq 0x70a0
leaq 0x28(%r15), %rsi
movq %rbx, %rdi
callq 0x727a
jmp 0x57b2
leaq 0x140f7(%rip), %rsi     # 0x1978c
movl $0xc, %edx
movq %r13, %rdi
callq 0x21d0
movl 0xc(%rsp), %esi
movq %r13, %rdi
callq 0x2100
leaq 0x140e4(%rip), %rsi     # 0x19799
movl $0x10, %edx
movq %r13, %rdi
callq 0x21d0
movl 0x1c(%rsp), %esi
movq %r13, %rdi
callq 0x2100
leaq 0x140d5(%rip), %rsi     # 0x197aa
movl $0x13, %edx
movq %rax, %rdi
callq 0x21d0
movq (%r13), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x2150
movsbl %al, %esi
movq %r13, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2110
jmp 0x5d39
leaq 0x24(%r15), %rsi
movq %rbx, %rdi
movq %rsi, 0x20(%rsp)
callq 0x727a
leaq 0x28(%r15), %rbp
xorl %r13d, %r13d
movl (%r12), %edi
incl %edi
callq 0x5dc9
movl %r13d, %ecx
leaq (,%rcx,4), %rdx
addq %rbp, %rdx
movq %rbx, %rdi
movl %eax, %esi
callq 0x70a0
incl %r13d
movq 0x20(%rsp), %rax
cmpl (%rax), %r13d
jbe 0x5727
jmp 0x57b2
leaq 0x24(%r15), %r13
xorl %ebp, %ebp
movl %ebp, %eax
leaq (,%rax,4), %rsi
addq %r13, %rsi
movq %rbx, %rdi
callq 0x727a
incl %ebp
cmpl (%r12), %ebp
jbe 0x575f
jmp 0x57b2
cmpl $0x0, (%r12)
je 0x57b2
leaq 0x24(%r15), %r13
xorl %ebp, %ebp
movq %rbx, %rdi
movq %r13, %rsi
callq 0x727a
leaq 0x20(%r13), %rsi
movq %rbx, %rdi
callq 0x727a
incq %rbp
movl (%r12), %eax
addq $0x4, %r13
cmpq %rax, %rbp
jb 0x578b
leaq 0x428(%r15), %r12
movq %rbx, %rdi
movq %r12, %rsi
callq 0x727a
movzbl %al, %esi
leaq 0x14084(%rip), %rdi     # 0x19852
movq 0x1c7eb(%rip), %rdx     # 0x21fc0
callq 0x71c7
testb %al, %al
je 0x5d35
movl (%r12), %esi
leaq 0x140a3(%rip), %rdi     # 0x19890
movq 0x1c7cc(%rip), %r8      # 0x21fc0
xorl %edx, %edx
movl $0x1f, %ecx
callq 0x735c
testb %al, %al
je 0x5d35
leaq 0x42c(%r15), %r12
movq %rbx, %rdi
movq %r12, %rsi
callq 0x727a
movzbl %al, %esi
leaq 0x14095(%rip), %rdi     # 0x198b9
movq 0x1c795(%rip), %rdx     # 0x21fc0
callq 0x71c7
testb %al, %al
je 0x5d35
movl (%r12), %esi
leaq 0x140b4(%rip), %rdi     # 0x198f7
movq 0x1c776(%rip), %r8      # 0x21fc0
xorl %edx, %edx
movl $0x1f, %ecx
callq 0x735c
testb %al, %al
je 0x5d35
leaq 0x430(%r15), %rdx
movq %rbx, %rdi
movl $0x1, %esi
callq 0x70a0
leaq 0x434(%r15), %rdx
movl $0x2, %ebp
movq %rbx, %rdi
movl $0x2, %esi
callq 0x70a0
leaq 0x438(%r15), %r12
movq %rbx, %rdi
movq %r12, %rsi
callq 0x7600
movzbl %al, %esi
leaq 0x14079(%rip), %rdi     # 0x19920
movq 0x1c712(%rip), %rdx     # 0x21fc0
callq 0x71c7
testb %al, %al
je 0x5d4f
movl (%r12), %esi
movq 0x10(%rsp), %rax
movl 0x18(%rax), %eax
addl %eax, %eax
leal (%rax,%rax,2), %eax
movl $0xffffffe6, %edx       # imm = 0xFFFFFFE6
subl %eax, %edx
leaq 0x14073(%rip), %rdi     # 0x1994d
movq 0x1c6df(%rip), %r8      # 0x21fc0
movl $0x19, %ecx
callq 0x7707
testb %al, %al
je 0x5d4f
leaq 0x43c(%r15), %r12
movq %rbx, %rdi
movq %r12, %rsi
callq 0x7600
movzbl %al, %esi
leaq 0x14056(%rip), %rdi     # 0x19965
movq 0x1c6aa(%rip), %rdx     # 0x21fc0
callq 0x71c7
testb %al, %al
je 0x5d4f
movl (%r12), %esi
leaq 0x14064(%rip), %rdi     # 0x19992
movq 0x1c68b(%rip), %r8      # 0x21fc0
movl $0xffffffe6, %edx       # imm = 0xFFFFFFE6
movl $0x19, %ecx
callq 0x7707
testb %al, %al
je 0x5d4f
leaq 0x440(%r15), %r12
movq %rbx, %rdi
movq %r12, %rsi
callq 0x7600
movzbl %al, %esi
leaq 0x14042(%rip), %rdi     # 0x199aa
movq 0x1c651(%rip), %rdx     # 0x21fc0
callq 0x71c7
testb %al, %al
je 0x5d4f
movl (%r12), %esi
leaq 0x14053(%rip), %rdi     # 0x199da
movq 0x1c632(%rip), %r8      # 0x21fc0
movl $0xfffffff4, %edx       # imm = 0xFFFFFFF4
movl $0xc, %ecx
callq 0x7707
testb %al, %al
je 0x5d4f
leaq 0x444(%r15), %rdx
movq %rbx, %rdi
movl $0x1, %esi
callq 0x70a0
leaq 0x448(%r15), %rdx
movq %rbx, %rdi
movl $0x1, %esi
callq 0x70a0
leaq 0x44c(%r15), %rdx
movq %rbx, %rdi
movl $0x1, %esi
callq 0x70a0
movq %rbx, %rdi
callq 0x79a3
testb %al, %al
je 0x5d55
leaq 0x450(%r15), %r12
movq %rbx, %rdi
movl $0x1, %esi
movq %r12, %rdx
callq 0x70a0
leaq 0x454(%r15), %rdx
movq %rbx, %rdi
movl $0x1, %esi
callq 0x70a0
cmpl $0x0, 0x454(%r15)
je 0x5d85
leaq 0x458(%r15), %rdx
xorl %ecx, %ecx
cmpl $0x0, 0x450(%r15)
setne %cl
movq 0x10(%rsp), %rax
movl 0x10(%rax), %r8d
movq %rbx, %rsi
callq 0x40b2
testb %al, %al
je 0x5d3e
movq 0x10(%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 0x143ee(%rip), %r8      # 0x19e70
cmovneq %rdi, %r8
leaq 0x143f3(%rip), %rsi     # 0x19e80
cmovneq %rcx, %rsi
leaq 0x14428(%rip), %rdx     # 0x19ec0
cmovneq %rax, %rdx
cmpl $0x0, 0x474(%r15)
jne 0x5ac8
testl %r10d, %r10d
leaq 0x143b0(%rip), %r10     # 0x19e60
cmovneq %r9, %r10
movups (%r10), %xmm0
movups %xmm0, 0x478(%r15)
movb $0x1, 0x470(%r15)
cmpl $0x0, 0x494(%r15)
jne 0x5ae6
movups (%r9), %xmm0
movups %xmm0, 0x498(%r15)
movb $0x1, 0x490(%r15)
cmpl $0x0, 0x4b4(%r15)
jne 0x5b0a
movq 0x10(%rsp), %r9
movups 0x68(%r9), %xmm0
movups %xmm0, 0x4b8(%r15)
movb $0x1, 0x4b0(%r15)
cmpl $0x0, 0x4d4(%r15)
jne 0x5b28
movups (%r8), %xmm0
movups %xmm0, 0x4d8(%r15)
movb $0x1, 0x4d0(%r15)
cmpl $0x0, 0x4f4(%r15)
jne 0x5b45
movups (%rdi), %xmm0
movups %xmm0, 0x4f8(%r15)
movb $0x1, 0x4f0(%r15)
cmpl $0x0, 0x514(%r15)
jne 0x5b6b
movq 0x10(%rsp), %rdi
movups 0xc8(%rdi), %xmm0
movups %xmm0, 0x518(%r15)
movb $0x1, 0x510(%r15)
cmpl $0x0, (%r12)
je 0x5d9a
cmpl $0x0, 0x534(%r15)
jne 0x5bb7
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 0x5bf8
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 0x10(%rsp), %rdx
cmpl $0x3, 0x10(%rdx)
jne 0x5d9a
cmpl $0x0, 0x5d4(%r15)
jne 0x5c48
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 0x5c89
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 0x5cdc
movq 0x10(%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 0x5d9a
movq 0x10(%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 0x5d9a
orb $0x4, 0x20(%rbx)
movl $0x2, %ebp
movl %ebp, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
orb $0x4, 0x20(%rbx)
jmp 0x5d3e
movl $0x0, 0x450(%r15)
movq 0x10(%rsp), %rsi
addq $0x28, %rsi
leaq 0x458(%r15), %rdi
callq 0x79f6
movl 0x440(%r15), %eax
movl %eax, 0x708(%r15)
jmp 0x5da9
movq 0x10(%rsp), %rsi
addq $0x28, %rsi
leaq 0x458(%r15), %rdi
callq 0x79f6
leaq 0x708(%r15), %rsi
movq %rbx, %rdi
callq 0x7600
cmpl $0x0, 0x20(%rbx)
jne 0x5d3e
movl 0xc(%rsp), %eax
movl %eax, 0x87930(%r14)
movb $0x1, 0x8(%r15)
movl $0x5, %ebp
jmp 0x5d3e