// File: 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:
subq $0x98, %rsp
movq %rdi, 0x90(%rsp)
movq %rsi, 0x88(%rsp)
movq 0x90(%rsp), %rax
movq %rax, 0x30(%rsp)
movl $0x2, 0x84(%rsp)
movq 0x88(%rsp), %rdi
leaq 0x7c(%rsp), %rsi
callq 0x17200
movzbl %al, %esi
andl $0x1, %esi
leaq 0x10e07(%rip), %rdi     # 0x253b5
movq 0x19a0b(%rip), %rdx     # 0x2dfc0
callq 0x17180
testb $0x1, %al
jne 0x145c0
jmp 0x145e2
movl 0x7c(%rsp), %esi
leaq 0xf4d9(%rip), %rdi      # 0x23aa4
xorl %edx, %edx
movl $0xff, %ecx
movq 0x199e7(%rip), %r8      # 0x2dfc0
callq 0x17330
testb $0x1, %al
jne 0x145f4
movq 0x88(%rsp), %rdi
callq 0x17130
jmp 0x15256
movq 0x30(%rsp), %rax
addq $0x16130, %rax          # imm = 0x16130
movl 0x7c(%rsp), %ecx
imulq $0x718, %rcx, %rcx      # imm = 0x718
addq %rcx, %rax
movq %rax, 0x70(%rsp)
movq 0x70(%rsp), %rdi
callq 0x17530
movq 0x88(%rsp), %rdi
leaq 0x78(%rsp), %rsi
callq 0x17200
movzbl %al, %esi
andl $0x1, %esi
leaq 0x10ca2(%rip), %rdi     # 0x252dd
movq 0x1997e(%rip), %rdx     # 0x2dfc0
callq 0x17180
testb $0x1, %al
jne 0x1464d
jmp 0x1466f
movl 0x78(%rsp), %esi
leaq 0xf1ed(%rip), %rdi      # 0x23845
xorl %edx, %edx
movl $0x1f, %ecx
movq 0x1995a(%rip), %r8      # 0x2dfc0
callq 0x17330
testb $0x1, %al
jne 0x14681
movq 0x88(%rsp), %rdi
callq 0x17130
jmp 0x15256
movq 0x30(%rsp), %rax
addq $0x128, %rax            # imm = 0x128
movl 0x78(%rsp), %ecx
imulq $0xb00, %rcx, %rcx      # imm = 0xB00
addq %rcx, %rax
movq %rax, 0x68(%rsp)
movq 0x68(%rsp), %rdi
callq 0x16ec0
testb $0x1, %al
jne 0x14712
movq 0x1990c(%rip), %rdi     # 0x2dfc0
leaq 0x10d24(%rip), %rsi     # 0x253df
callq 0x2140
movq %rax, %rdi
movl 0x7c(%rsp), %esi
callq 0x2220
movq 0x198ed(%rip), %rdi     # 0x2dfc0
leaq 0x10d12(%rip), %rsi     # 0x253ec
callq 0x2140
movq %rax, %rdi
movl 0x78(%rsp), %esi
callq 0x2220
movq %rax, %rdi
leaq 0x10d08(%rip), %rsi     # 0x253fd
callq 0x2140
movq 0x198bf(%rip), %rdi     # 0x2dfc0
movq 0x198a0(%rip), %rsi     # 0x2dfa8
callq 0x2180
jmp 0x15256
movq 0x30(%rsp), %rsi
movl 0x7c(%rsp), %ecx
movq 0x70(%rsp), %rax
movl %ecx, 0xc(%rax)
movl 0x78(%rsp), %ecx
movq 0x70(%rsp), %rax
movl %ecx, 0x10(%rax)
movq 0x70(%rsp), %rdi
addq $0x128, %rsi            # imm = 0x128
movl 0x78(%rsp), %eax
imulq $0xb00, %rax, %rax      # imm = 0xB00
addq %rax, %rsi
callq 0x177f0
movq 0x88(%rsp), %rdi
movq 0x70(%rsp), %rdx
addq $0x14, %rdx
movl $0x1, %esi
callq 0x16f30
movq 0x88(%rsp), %rdi
movq 0x70(%rsp), %rdx
addq $0x18, %rdx
movl $0x1, %esi
callq 0x16f30
movq 0x88(%rsp), %rdi
movq 0x70(%rsp), %rsi
addq $0x1c, %rsi
callq 0x17200
movzbl %al, %esi
andl $0x1, %esi
leaq 0x10c6a(%rip), %rdi     # 0x25411
movq 0x19812(%rip), %rdx     # 0x2dfc0
callq 0x17180
testb $0x1, %al
jne 0x147b9
jmp 0x147df
movq 0x70(%rsp), %rax
movl 0x1c(%rax), %esi
leaq 0x10c7a(%rip), %rdi     # 0x25442
xorl %edx, %edx
movl $0x7, %ecx
movq 0x197ea(%rip), %r8      # 0x2dfc0
callq 0x17330
testb $0x1, %al
jne 0x147f1
movq 0x88(%rsp), %rdi
callq 0x17130
jmp 0x15256
movq 0x70(%rsp), %rax
cmpl $0x0, 0x1c(%rax)
jbe 0x14a24
movq 0x88(%rsp), %rdi
movq 0x70(%rsp), %rsi
addq $0x20, %rsi
callq 0x17200
movzbl %al, %esi
andl $0x1, %esi
leaq 0x10c3b(%rip), %rdi     # 0x2545e
movq 0x19796(%rip), %rdx     # 0x2dfc0
callq 0x17180
testb $0x1, %al
jne 0x14835
jmp 0x1485b
movq 0x70(%rsp), %rax
movl 0x20(%rax), %esi
leaq 0x10c48(%rip), %rdi     # 0x2548c
xorl %edx, %edx
movl $0x6, %ecx
movq 0x1976e(%rip), %r8      # 0x2dfc0
callq 0x17330
testb $0x1, %al
jne 0x1486d
movq 0x88(%rsp), %rdi
callq 0x17130
jmp 0x15256
movq 0x70(%rsp), %rax
cmpl $0x0, 0x20(%rax)
jne 0x148c1
movl $0x0, 0x64(%rsp)
movl 0x64(%rsp), %eax
movq 0x70(%rsp), %rcx
cmpl 0x1c(%rcx), %eax
ja 0x148bc
movq 0x88(%rsp), %rdi
movq 0x70(%rsp), %rsi
addq $0x24, %rsi
movl 0x64(%rsp), %eax
shlq $0x2, %rax
addq %rax, %rsi
callq 0x17200
movl 0x64(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x64(%rsp)
jmp 0x14880
jmp 0x14a22
movq 0x70(%rsp), %rax
cmpl $0x2, 0x20(%rax)
jne 0x1493a
movl $0x0, 0x60(%rsp)
movl 0x60(%rsp), %eax
movq 0x70(%rsp), %rcx
cmpl 0x1c(%rcx), %eax
jae 0x14935
movq 0x88(%rsp), %rdi
movq 0x70(%rsp), %rsi
addq $0x24, %rsi
movl 0x60(%rsp), %eax
shlq $0x2, %rax
addq %rax, %rsi
callq 0x17200
movq 0x88(%rsp), %rdi
movq 0x70(%rsp), %rsi
addq $0x24, %rsi
addq $0x20, %rsi
movl 0x60(%rsp), %eax
shlq $0x2, %rax
addq %rax, %rsi
callq 0x17200
movl 0x60(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x60(%rsp)
jmp 0x148d4
jmp 0x14a20
movq 0x70(%rsp), %rax
cmpl $0x3, 0x20(%rax)
je 0x1495b
movq 0x70(%rsp), %rax
cmpl $0x4, 0x20(%rax)
je 0x1495b
movq 0x70(%rsp), %rax
cmpl $0x5, 0x20(%rax)
jne 0x14995
movq 0x88(%rsp), %rdi
movq 0x70(%rsp), %rdx
addq $0x24, %rdx
movl $0x1, %esi
callq 0x16f30
movq 0x88(%rsp), %rdi
movq 0x70(%rsp), %rsi
addq $0x24, %rsi
addq $0x4, %rsi
callq 0x17200
jmp 0x14a1e
movq 0x70(%rsp), %rax
cmpl $0x6, 0x20(%rax)
jne 0x14a1c
movq 0x88(%rsp), %rdi
movq 0x70(%rsp), %rsi
addq $0x24, %rsi
callq 0x17200
movl $0x0, 0x5c(%rsp)
movl 0x5c(%rsp), %eax
movq 0x70(%rsp), %rcx
cmpl 0x24(%rcx), %eax
ja 0x14a1a
movq 0x88(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x70(%rsp), %rax
movl 0x1c(%rax), %edi
addl $0x1, %edi
callq 0x15270
movq 0x28(%rsp), %rdi
movl %eax, %esi
movq 0x70(%rsp), %rdx
addq $0x24, %rdx
addq $0x4, %rdx
movl 0x5c(%rsp), %eax
shlq $0x2, %rax
addq %rax, %rdx
callq 0x16f30
movl 0x5c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x5c(%rsp)
jmp 0x149be
jmp 0x14a1c
jmp 0x14a1e
jmp 0x14a20
jmp 0x14a22
jmp 0x14a24
movq 0x88(%rsp), %rdi
movq 0x70(%rsp), %rsi
addq $0x428, %rsi            # imm = 0x428
callq 0x17200
movzbl %al, %esi
andl $0x1, %esi
leaq 0x10a5b(%rip), %rdi     # 0x254a5
movq 0x1956f(%rip), %rdx     # 0x2dfc0
callq 0x17180
testb $0x1, %al
jne 0x14a5c
jmp 0x14a85
movq 0x70(%rsp), %rax
movl 0x428(%rax), %esi
leaq 0x10a75(%rip), %rdi     # 0x254e3
xorl %edx, %edx
movl $0x1f, %ecx
movq 0x19544(%rip), %r8      # 0x2dfc0
callq 0x17330
testb $0x1, %al
jne 0x14a97
movq 0x88(%rsp), %rdi
callq 0x17130
jmp 0x15256
movq 0x88(%rsp), %rdi
movq 0x70(%rsp), %rsi
addq $0x42c, %rsi            # imm = 0x42C
callq 0x17200
movzbl %al, %esi
andl $0x1, %esi
leaq 0x10a4f(%rip), %rdi     # 0x2550c
movq 0x194fc(%rip), %rdx     # 0x2dfc0
callq 0x17180
testb $0x1, %al
jne 0x14acf
jmp 0x14af8
movq 0x70(%rsp), %rax
movl 0x42c(%rax), %esi
leaq 0x10a69(%rip), %rdi     # 0x2554a
xorl %edx, %edx
movl $0x1f, %ecx
movq 0x194d1(%rip), %r8      # 0x2dfc0
callq 0x17330
testb $0x1, %al
jne 0x14b0a
movq 0x88(%rsp), %rdi
callq 0x17130
jmp 0x15256
movq 0x88(%rsp), %rdi
movq 0x70(%rsp), %rdx
addq $0x430, %rdx            # imm = 0x430
movl $0x1, %esi
callq 0x16f30
movq 0x88(%rsp), %rdi
movq 0x70(%rsp), %rdx
addq $0x434, %rdx            # imm = 0x434
movl $0x2, %esi
callq 0x16f30
movq 0x88(%rsp), %rdi
movq 0x70(%rsp), %rsi
addq $0x438, %rsi            # imm = 0x438
callq 0x17690
movzbl %al, %esi
andl $0x1, %esi
leaq 0x10a07(%rip), %rdi     # 0x25573
movq 0x1944d(%rip), %rdx     # 0x2dfc0
callq 0x17180
testb $0x1, %al
jne 0x14b7e
jmp 0x14bb5
movq 0x70(%rsp), %rax
movl 0x438(%rax), %esi
movq 0x68(%rsp), %rax
imull $0x6, 0x18(%rax), %eax
movl $0xffffffe6, %edx       # imm = 0xFFFFFFE6
subl %eax, %edx
leaq 0x10a00(%rip), %rdi     # 0x255a0
movl $0x19, %ecx
movq 0x19414(%rip), %r8      # 0x2dfc0
callq 0x17810
testb $0x1, %al
jne 0x14bc7
movq 0x88(%rsp), %rdi
callq 0x17130
jmp 0x15256
movq 0x88(%rsp), %rdi
movq 0x70(%rsp), %rsi
addq $0x43c, %rsi            # imm = 0x43C
callq 0x17690
movzbl %al, %esi
andl $0x1, %esi
leaq 0x109cb(%rip), %rdi     # 0x255b8
movq 0x193cc(%rip), %rdx     # 0x2dfc0
callq 0x17180
testb $0x1, %al
jne 0x14bff
jmp 0x14c2b
movq 0x70(%rsp), %rax
movl 0x43c(%rax), %esi
leaq 0x109d4(%rip), %rdi     # 0x255e5
movl $0xffffffe6, %edx       # imm = 0xFFFFFFE6
movl $0x19, %ecx
movq 0x1939e(%rip), %r8      # 0x2dfc0
callq 0x17810
testb $0x1, %al
jne 0x14c3d
movq 0x88(%rsp), %rdi
callq 0x17130
jmp 0x15256
movq 0x88(%rsp), %rdi
movq 0x70(%rsp), %rsi
addq $0x440, %rsi            # imm = 0x440
callq 0x17690
movzbl %al, %esi
andl $0x1, %esi
leaq 0x1099a(%rip), %rdi     # 0x255fd
movq 0x19356(%rip), %rdx     # 0x2dfc0
callq 0x17180
testb $0x1, %al
jne 0x14c75
jmp 0x14ca1
movq 0x70(%rsp), %rax
movl 0x440(%rax), %esi
leaq 0x109a6(%rip), %rdi     # 0x2562d
movl $0xfffffff4, %edx       # imm = 0xFFFFFFF4
movl $0xc, %ecx
movq 0x19328(%rip), %r8      # 0x2dfc0
callq 0x17810
testb $0x1, %al
jne 0x14cb3
movq 0x88(%rsp), %rdi
callq 0x17130
jmp 0x15256
movq 0x88(%rsp), %rdi
movq 0x70(%rsp), %rdx
addq $0x444, %rdx            # imm = 0x444
movl $0x1, %esi
callq 0x16f30
movq 0x88(%rsp), %rdi
movq 0x70(%rsp), %rdx
addq $0x448, %rdx            # imm = 0x448
movl $0x1, %esi
callq 0x16f30
movq 0x88(%rsp), %rdi
movq 0x70(%rsp), %rdx
addq $0x44c, %rdx            # imm = 0x44C
movl $0x1, %esi
callq 0x16f30
movq 0x88(%rsp), %rdi
callq 0x17a10
testb $0x1, %al
jne 0x14d23
jmp 0x151da
movq 0x88(%rsp), %rdi
movq 0x70(%rsp), %rdx
addq $0x450, %rdx            # imm = 0x450
movl $0x1, %esi
callq 0x16f30
movq 0x88(%rsp), %rdi
movq 0x70(%rsp), %rdx
addq $0x454, %rdx            # imm = 0x454
movl $0x1, %esi
callq 0x16f30
movq 0x70(%rsp), %rax
cmpl $0x0, 0x454(%rax)
je 0x151a5
movq 0x30(%rsp), %rdi
movq 0x88(%rsp), %rsi
movq 0x70(%rsp), %rdx
addq $0x458, %rdx            # imm = 0x458
movq 0x70(%rsp), %rax
cmpl $0x0, 0x450(%rax)
setne %al
movq 0x68(%rsp), %rcx
movl 0x10(%rcx), %r8d
movzbl %al, %ecx
andl $0x1, %ecx
callq 0x12d20
andb $0x1, %al
movb %al, 0x83(%rsp)
testb $0x1, 0x83(%rsp)
jne 0x14dc5
jmp 0x15256
movq 0x68(%rsp), %rax
cmpl $0x0, 0x24(%rax)
je 0x14de8
movq 0x68(%rsp), %rax
addq $0x28, %rax
addq $0x10, %rax
addq $0x10, %rax
movq %rax, 0x20(%rsp)
jmp 0x14df6
leaq 0x10b21(%rip), %rax     # 0x25910
movq %rax, 0x20(%rsp)
jmp 0x14df6
movq 0x20(%rsp), %rax
movq %rax, 0x50(%rsp)
movq 0x68(%rsp), %rax
cmpl $0x0, 0x24(%rax)
je 0x14e27
movq 0x68(%rsp), %rax
addq $0x28, %rax
addq $0x10, %rax
addq $0x60, %rax
addq $0x10, %rax
movq %rax, 0x18(%rsp)
jmp 0x14e39
leaq 0x10ae2(%rip), %rax     # 0x25910
addq $0x10, %rax
movq %rax, 0x18(%rsp)
jmp 0x14e39
movq 0x18(%rsp), %rax
movq %rax, 0x48(%rsp)
movq 0x68(%rsp), %rax
cmpl $0x0, 0x24(%rax)
je 0x14e68
movq 0x68(%rsp), %rax
addq $0x28, %rax
addq $0xd0, %rax
addq $0x10, %rax
movq %rax, 0x10(%rsp)
jmp 0x14e76
leaq 0x10ac1(%rip), %rax     # 0x25930
movq %rax, 0x10(%rsp)
jmp 0x14e76
movq 0x10(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0x68(%rsp), %rax
cmpl $0x0, 0x24(%rax)
je 0x14ea9
movq 0x68(%rsp), %rax
addq $0x28, %rax
addq $0xd0, %rax
addq $0x50, %rax
addq $0x10, %rax
movq %rax, 0x8(%rsp)
jmp 0x14ebb
leaq 0x10a80(%rip), %rax     # 0x25930
addq $0x40, %rax
movq %rax, 0x8(%rsp)
jmp 0x14ebb
movq 0x8(%rsp), %rax
movq %rax, 0x38(%rsp)
movq 0x70(%rsp), %rax
cmpl $0x0, 0x474(%rax)
jne 0x14eed
movq 0x70(%rsp), %rdi
addq $0x458, %rdi            # imm = 0x458
addq $0x10, %rdi
movq 0x50(%rsp), %rsi
callq 0x17570
movq 0x70(%rsp), %rax
cmpl $0x0, 0x494(%rax)
jne 0x14f25
movq 0x70(%rsp), %rdi
addq $0x458, %rdi            # imm = 0x458
addq $0x10, %rdi
addq $0x20, %rdi
movq 0x68(%rsp), %rsi
addq $0x28, %rsi
addq $0x10, %rsi
addq $0x10, %rsi
callq 0x17570
movq 0x70(%rsp), %rax
cmpl $0x0, 0x4b4(%rax)
jne 0x14f61
movq 0x70(%rsp), %rdi
addq $0x458, %rdi            # imm = 0x458
addq $0x10, %rdi
addq $0x40, %rdi
movq 0x68(%rsp), %rsi
addq $0x28, %rsi
addq $0x10, %rsi
addq $0x20, %rsi
addq $0x10, %rsi
callq 0x17570
movq 0x70(%rsp), %rax
cmpl $0x0, 0x4d4(%rax)
jne 0x14f8d
movq 0x70(%rsp), %rdi
addq $0x458, %rdi            # imm = 0x458
addq $0x10, %rdi
addq $0x60, %rdi
movq 0x48(%rsp), %rsi
callq 0x17570
movq 0x70(%rsp), %rax
cmpl $0x0, 0x4f4(%rax)
jne 0x14fcc
movq 0x70(%rsp), %rdi
addq $0x458, %rdi            # imm = 0x458
addq $0x10, %rdi
addq $0x80, %rdi
movq 0x68(%rsp), %rsi
addq $0x28, %rsi
addq $0x10, %rsi
addq $0x60, %rsi
addq $0x10, %rsi
callq 0x17570
movq 0x70(%rsp), %rax
cmpl $0x0, 0x514(%rax)
jne 0x1500e
movq 0x70(%rsp), %rdi
addq $0x458, %rdi            # imm = 0x458
addq $0x10, %rdi
addq $0xa0, %rdi
movq 0x68(%rsp), %rsi
addq $0x28, %rsi
addq $0x10, %rsi
addq $0x80, %rsi
addq $0x10, %rsi
callq 0x17570
movq 0x70(%rsp), %rax
cmpl $0x0, 0x450(%rax)
je 0x151a3
movq 0x70(%rsp), %rax
cmpl $0x0, 0x534(%rax)
jne 0x1504b
movq 0x70(%rsp), %rdi
addq $0x458, %rdi            # imm = 0x458
addq $0xd0, %rdi
movq 0x40(%rsp), %rsi
callq 0x175b0
movq 0x70(%rsp), %rax
cmpl $0x0, 0x584(%rax)
jne 0x1507a
movq 0x70(%rsp), %rdi
addq $0x458, %rdi            # imm = 0x458
addq $0xd0, %rdi
addq $0x50, %rdi
movq 0x38(%rsp), %rsi
callq 0x175b0
movq 0x68(%rsp), %rax
cmpl $0x3, 0x10(%rax)
jne 0x151a1
movq 0x70(%rsp), %rax
cmpl $0x0, 0x5d4(%rax)
jne 0x150ca
movq 0x70(%rsp), %rdi
addq $0x458, %rdi            # imm = 0x458
addq $0xd0, %rdi
addq $0xa0, %rdi
movq 0x68(%rsp), %rsi
addq $0x28, %rsi
addq $0xd0, %rsi
addq $0x10, %rsi
callq 0x175b0
movq 0x70(%rsp), %rax
cmpl $0x0, 0x624(%rax)
jne 0x1510f
movq 0x70(%rsp), %rdi
addq $0x458, %rdi            # imm = 0x458
addq $0xd0, %rdi
addq $0xf0, %rdi
movq 0x68(%rsp), %rsi
addq $0x28, %rsi
addq $0xd0, %rsi
addq $0x50, %rsi
addq $0x10, %rsi
callq 0x175b0
movq 0x70(%rsp), %rax
cmpl $0x0, 0x674(%rax)
jne 0x15157
movq 0x70(%rsp), %rdi
addq $0x458, %rdi            # imm = 0x458
addq $0xd0, %rdi
addq $0x140, %rdi            # imm = 0x140
movq 0x68(%rsp), %rsi
addq $0x28, %rsi
addq $0xd0, %rsi
addq $0xa0, %rsi
addq $0x10, %rsi
callq 0x175b0
movq 0x70(%rsp), %rax
cmpl $0x0, 0x6c4(%rax)
jne 0x1519f
movq 0x70(%rsp), %rdi
addq $0x458, %rdi            # imm = 0x458
addq $0xd0, %rdi
addq $0x190, %rdi            # imm = 0x190
movq 0x68(%rsp), %rsi
addq $0x28, %rsi
addq $0xd0, %rsi
addq $0xf0, %rsi
addq $0x10, %rsi
callq 0x175b0
jmp 0x151a1
jmp 0x151a3
jmp 0x151bf
movq 0x68(%rsp), %rsi
addq $0x28, %rsi
movq 0x70(%rsp), %rdi
addq $0x458, %rdi            # imm = 0x458
callq 0x17af0
movq 0x88(%rsp), %rdi
movq 0x70(%rsp), %rsi
addq $0x708, %rsi            # imm = 0x708
callq 0x17690
jmp 0x15219
movq 0x70(%rsp), %rax
movl $0x0, 0x450(%rax)
movq 0x68(%rsp), %rsi
addq $0x28, %rsi
movq 0x70(%rsp), %rdi
addq $0x458, %rdi            # imm = 0x458
callq 0x17af0
movq 0x70(%rsp), %rax
movl 0x440(%rax), %ecx
movq 0x70(%rsp), %rax
movl %ecx, 0x708(%rax)
movq 0x88(%rsp), %rdi
callq 0x17150
cmpl $0x0, %eax
je 0x1522d
jmp 0x15256
movq 0x30(%rsp), %rax
movl 0x7c(%rsp), %ecx
movl %ecx, 0x87930(%rax)
movq 0x70(%rsp), %rdi
movl $0x1, %esi
callq 0x17160
movl $0x5, 0x84(%rsp)
movl 0x84(%rsp), %eax
addq $0x98, %rsp
retq
nopw %cs:(%rax,%rax)