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

    do {
        bool status;
        uint8_t  profile_idc;
        uint8_t  constraint_flags;
        uint8_t  level_idc;
        uint32_t seq_parameter_set_id;

        s.read_u8(profile_idc);
        s.read_u8(constraint_flags);
        s.read_u8(level_idc);

        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];

        sps.profile_idc = profile_idc;
        sps.constraint_flags = constraint_flags;
        sps.level_idc = level_idc;
        sps.seq_parameter_set_id = seq_parameter_set_id;

        if (sps.profile_idc == 100 || sps.profile_idc == 110 ||
            sps.profile_idc == 122 || sps.profile_idc == 244 ||
            sps.profile_idc ==  44 || sps.profile_idc ==  83 ||
            sps.profile_idc ==  86 || sps.profile_idc == 118 ||
            sps.profile_idc == 128 || sps.profile_idc == 144) {

            s.read_exp_golomb_u(sps.chroma_format_idc);
            if (!CHK_STRUCT_RANGE(sps, chroma_format_idc, 0U, 3U, std::cout)) {
                s.mark_corrupted();
                break;
            }

            if (sps.chroma_format_idc == 3)
                s.read_bits(1, sps.separate_colour_plane_flag);
            else
                sps.separate_colour_plane_flag = 0;

            s.read_exp_golomb_u(sps.bit_depth_luma_minus8);
            if (!CHK_STRUCT_RANGE(sps, bit_depth_luma_minus8, 0U, 6U, std::cout)) {
                s.mark_corrupted();
                break;
            }

            s.read_exp_golomb_u(sps.bit_depth_chroma_minus8);
            if (!CHK_STRUCT_RANGE(sps, bit_depth_chroma_minus8, 0U, 6U, std::cout)) {
                s.mark_corrupted();
                break;
            }

            s.read_bits(1, sps.qpprime_y_zero_transform_bypass_flag);

            s.read_bits(1, sps.seq_scaling_matrix_present_flag);
            if (sps.seq_scaling_matrix_present_flag) {
                status = parse_scaling_matrices(s, sps.sm, true, sps.chroma_format_idc);
                if (!status)
                    break;
                /* 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 (!sps.sm.scaling_matrices_4x4[SL_4x4_INTRA_Y].scaling_list_present_flag)
                    sps.sm.scaling_matrices_4x4[SL_4x4_INTRA_Y].copy(h264::scaling_list_default_4x4[0]);
                if (!sps.sm.scaling_matrices_4x4[SL_4x4_INTRA_Cb].scaling_list_present_flag)
                    sps.sm.scaling_matrices_4x4[SL_4x4_INTRA_Cb].copy(sps.sm.scaling_matrices_4x4[SL_4x4_INTRA_Y].scaling_list);
                if (!sps.sm.scaling_matrices_4x4[SL_4x4_INTRA_Cr].scaling_list_present_flag)
                    sps.sm.scaling_matrices_4x4[SL_4x4_INTRA_Cr].copy(sps.sm.scaling_matrices_4x4[SL_4x4_INTRA_Cb].scaling_list);
                if (!sps.sm.scaling_matrices_4x4[SL_4x4_INTER_Y].scaling_list_present_flag)
                    sps.sm.scaling_matrices_4x4[SL_4x4_INTER_Y].copy(h264::scaling_list_default_4x4[1]);
                if (!sps.sm.scaling_matrices_4x4[SL_4x4_INTER_Cb].scaling_list_present_flag)
                    sps.sm.scaling_matrices_4x4[SL_4x4_INTER_Cb].copy(sps.sm.scaling_matrices_4x4[SL_4x4_INTER_Y].scaling_list);
                if (!sps.sm.scaling_matrices_4x4[SL_4x4_INTER_Cr].scaling_list_present_flag)
                    sps.sm.scaling_matrices_4x4[SL_4x4_INTER_Cr].copy(sps.sm.scaling_matrices_4x4[SL_4x4_INTER_Cb].scaling_list);

                if (!sps.sm.scaling_matrices_8x8[SL_8x8_INTRA_Y].scaling_list_present_flag)
                    sps.sm.scaling_matrices_8x8[SL_8x8_INTRA_Y].copy(h264::scaling_list_default_8x8[0]);
                if (!sps.sm.scaling_matrices_8x8[SL_8x8_INTER_Y].scaling_list_present_flag)
                    sps.sm.scaling_matrices_8x8[SL_8x8_INTER_Y].copy(h264::scaling_list_default_8x8[1]);

                if (sps.chroma_format_idc == 3) {
                    if (!sps.sm.scaling_matrices_8x8[SL_8x8_INTRA_Cb].scaling_list_present_flag)
                        sps.sm.scaling_matrices_8x8[SL_8x8_INTRA_Cb].copy(sps.sm.scaling_matrices_8x8[SL_8x8_INTRA_Y].scaling_list);
                    if (!sps.sm.scaling_matrices_8x8[SL_8x8_INTER_Cb].scaling_list_present_flag)
                        sps.sm.scaling_matrices_8x8[SL_8x8_INTER_Cb].copy(sps.sm.scaling_matrices_8x8[SL_8x8_INTER_Y].scaling_list);
                    if (!sps.sm.scaling_matrices_8x8[SL_8x8_INTRA_Cr].scaling_list_present_flag)
                        sps.sm.scaling_matrices_8x8[SL_8x8_INTRA_Cr].copy(sps.sm.scaling_matrices_8x8[SL_8x8_INTRA_Cb].scaling_list);
                    if (!sps.sm.scaling_matrices_8x8[SL_8x8_INTER_Cr].scaling_list_present_flag)
                        sps.sm.scaling_matrices_8x8[SL_8x8_INTER_Cr].copy(sps.sm.scaling_matrices_8x8[SL_8x8_INTER_Cb].scaling_list);
                }
            }
            else
                sps.sm.set_defaults();
        }
        else {
            sps.chroma_format_idc = 1;
            sps.separate_colour_plane_flag = 0;
            sps.bit_depth_luma_minus8 = 0;
            sps.bit_depth_chroma_minus8 = 0;
            sps.qpprime_y_zero_transform_bypass_flag = 0;
            sps.seq_scaling_matrix_present_flag = 0;
            sps.sm.set_defaults();
        }

        s.read_exp_golomb_u(sps.log2_max_frame_num_minus4);
        if (!CHK_STRUCT_RANGE(sps, log2_max_frame_num_minus4, 0U, 12U, std::cout)) {
            s.mark_corrupted();
            break;
        }

        s.read_exp_golomb_u(sps.pic_order_cnt_type);
        if (!CHK_STRUCT_RANGE(sps, pic_order_cnt_type, 0U, 2U, std::cout)) {
            s.mark_corrupted();
            break;
        }

        if (0 == sps.pic_order_cnt_type)
            s.read_exp_golomb_u(sps.t0.log2_max_pic_order_cnt_lsb_minus4);
        else
        if (1 == sps.pic_order_cnt_type) {
            s.read_bits(1, sps.t1.delta_pic_order_always_zero_flag);
            s.read_exp_golomb_s(sps.t1.offset_for_non_ref_pic);
            s.read_exp_golomb_s(sps.t1.offset_for_top_to_bottom_field);
            s.read_exp_golomb_u(sps.t1.num_ref_frames_in_pic_order_cnt_cycle);
            if (!CHK_STRUCT_RANGE(sps, t1.num_ref_frames_in_pic_order_cnt_cycle, 0U, 255U, std::cout)) {
                s.mark_corrupted();
                break;
            }
            for (uint32_t i = 0; i < sps.t1.num_ref_frames_in_pic_order_cnt_cycle; ++i)
                if (!s.read_exp_golomb_s(sps.t1.offset_for_ref_frame[i]))
                    break;
        }
        else {
            /* do nothing */
        }

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

        s.read_exp_golomb_u(sps.max_num_ref_frames);
        s.read_bits(1, sps.gaps_in_frame_num_value_allowed_flag);
        s.read_exp_golomb_u(sps.pic_width_in_mbs_minus1);
        s.read_exp_golomb_u(sps.pic_height_in_map_units_minus1);

        s.read_bits(1, sps.frame_mbs_only_flag);
        if (!sps.frame_mbs_only_flag)
            s.read_bits(1, sps.mb_adaptive_frame_field_flag);
        else
            sps.mb_adaptive_frame_field_flag = 0;

        s.read_bits(1, sps.direct_8x8_inference_flag);

        s.read_bits(1, sps.frame_cropping_flag);
        if (sps.frame_cropping_flag) {
            s.read_exp_golomb_u(sps.frame_crop_left_offset);
            s.read_exp_golomb_u(sps.frame_crop_right_offset);
            s.read_exp_golomb_u(sps.frame_crop_top_offset);
            s.read_exp_golomb_u(sps.frame_crop_bottom_offset);
        }
        else {
            sps.frame_crop_left_offset = 0;
            sps.frame_crop_right_offset = 0;
            sps.frame_crop_top_offset = 0;
            sps.frame_crop_bottom_offset = 0;
        }

        s.read_bits(1, sps.vui_parameters_present_flag);
        if (sps.vui_parameters_present_flag)
            parse_vui_parameters(s, sps.vui);

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

        m_recent_sps = seq_parameter_set_id;

        sps.set_valid(true);
        retval = h264_parser_status_e::SPS_PARSED;
    } while (0);

    return retval;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0xb(%rsp), %rsi
movq %rbx, %rdi
callq 0x7b70
leaq 0xa(%rsp), %rsi
movq %rbx, %rdi
callq 0x7b70
leaq 0x9(%rsp), %rsi
movq %rbx, %rdi
callq 0x7b70
leaq 0xc(%rsp), %rsi
movq %rbx, %rdi
callq 0x727a
testb %al, %al
jne 0x4b6e
movl %eax, %ebp
movq 0x1d4cd(%rip), %r15     # 0x21fc0
movq (%r15), %rax
movq -0x18(%rax), %rax
testb $0x5, 0x20(%r15,%rax)
jne 0x4b65
leaq 0x15258(%rip), %rsi     # 0x19d61
movl $0x7, %edx
movq %r15, %rdi
callq 0x21d0
leaq 0x14b6d(%rip), %rsi     # 0x1968a
movl $0x29, %edx
movq %r15, %rdi
callq 0x21d0
leaq 0x15238(%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 0x518b
movl 0xc(%rsp), %esi
leaq 0x14a67(%rip), %rdi     # 0x195e0
movq 0x1d440(%rip), %r8      # 0x21fc0
xorl %edx, %edx
movl $0x1f, %ecx
callq 0x735c
testb %al, %al
je 0x518b
movl 0xc(%rsp), %ecx
imulq $0xb00, %rcx, %r12      # imm = 0xB00
leaq (%r14,%r12), %r13
addq $0x128, %r13            # imm = 0x128
movzbl 0xb(%rsp), %eax
movb %al, 0x9(%r13)
movb 0xa(%rsp), %dl
movb %dl, 0xa(%r13)
movb 0x9(%rsp), %dl
movb %dl, 0xb(%r13)
movl %ecx, 0xc(%r13)
leal -0x53(%rax), %ecx
cmpl $0x3d, %ecx
ja 0x4c35
movabsq $0x2000208808020009, %rdx # imm = 0x2000208808020009
btq %rcx, %rdx
jae 0x4c35
leaq 0x10(%r13), %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x727a
movl 0x10(%r13), %esi
leaq 0x14abb(%rip), %rdi     # 0x196b4
movq 0x1d3c0(%rip), %r8      # 0x21fc0
xorl %edx, %edx
movl $0x3, %ecx
callq 0x735c
testb %al, %al
je 0x518b
leaq 0x14(%r13), %rdx
cmpl $0x3, 0x10(%r13)
jne 0x4cb8
movq %rbx, %rdi
movl $0x1, %esi
callq 0x70a0
jmp 0x4cbe
cmpl $0xf4, %eax
je 0x4bdf
cmpl $0x2c, %eax
je 0x4bdf
movl $0x1, 0x10(%r13)
xorps %xmm0, %xmm0
movups %xmm0, 0x14(%r13)
movl $0x0, 0x24(%r13)
leaq (%r12,%r14), %rax
addq $0x170, %rax            # imm = 0x170
xorl %ecx, %ecx
movaps 0x14964(%rip), %xmm0    # 0x195d0
movaps %xmm0, (%rax,%rcx)
movb $0x1, -0x8(%rax,%rcx)
addq $0x20, %rcx
cmpq $0xc0, %rcx
jne 0x4c6c
leaq (%r12,%r14), %rax
addq $0x230, %rax            # imm = 0x230
xorl %ecx, %ecx
movaps %xmm0, 0x30(%rax,%rcx)
movaps %xmm0, 0x20(%rax,%rcx)
movaps %xmm0, 0x10(%rax,%rcx)
movaps %xmm0, (%rax,%rcx)
movb $0x1, -0x8(%rax,%rcx)
addq $0x50, %rcx
cmpq $0x1e0, %rcx            # imm = 0x1E0
jne 0x4c8e
jmp 0x506e
movl $0x0, (%rdx)
leaq 0x18(%r13), %rsi
movq %rbx, %rdi
callq 0x727a
movl 0x18(%r13), %esi
leaq 0x149f5(%rip), %rdi     # 0x196ca
movq 0x1d2e4(%rip), %r8      # 0x21fc0
xorl %edx, %edx
movl $0x6, %ecx
callq 0x735c
testb %al, %al
je 0x518b
leaq 0x1c(%r13), %rsi
movq %rbx, %rdi
callq 0x727a
movl 0x1c(%r13), %esi
leaq 0x149dd(%rip), %rdi     # 0x196e4
movq 0x1d2b2(%rip), %r8      # 0x21fc0
xorl %edx, %edx
movl $0x6, %ecx
callq 0x735c
testb %al, %al
je 0x518b
leaq 0x20(%r13), %rdx
movq %rbx, %rdi
movl $0x1, %esi
callq 0x70a0
leaq 0x24(%r13), %rdx
movq %rbx, %rdi
movl $0x1, %esi
callq 0x70a0
cmpl $0x0, 0x24(%r13)
je 0x5014
leaq 0x28(%r13), %rdx
movl 0x10(%r13), %r8d
movq %rbx, %rsi
movl $0x1, %ecx
callq 0x40b2
movl $0x2, %ebp
testb %al, %al
je 0x5194
cmpl $0x0, 0x44(%r13)
jne 0x4d89
movaps 0x150e1(%rip), %xmm0    # 0x19e60
movaps %xmm0, 0x48(%r13)
movb $0x1, 0x40(%r13)
cmpl $0x0, 0x64(%r13)
jne 0x4d9f
movaps 0x48(%r13), %xmm0
movaps %xmm0, 0x68(%r13)
movb $0x1, 0x60(%r13)
cmpl $0x0, 0x84(%r13)
jne 0x4dbe
movaps 0x68(%r13), %xmm0
movaps %xmm0, 0x88(%r13)
movb $0x1, 0x80(%r13)
cmpl $0x0, 0xa4(%r13)
jne 0x4ddf
movaps 0x150a1(%rip), %xmm0    # 0x19e70
movaps %xmm0, 0xa8(%r13)
movb $0x1, 0xa0(%r13)
cmpl $0x0, 0xc4(%r13)
jne 0x4e01
movaps 0xa8(%r13), %xmm0
movaps %xmm0, 0xc8(%r13)
movb $0x1, 0xc0(%r13)
cmpl $0x0, 0xe4(%r13)
jne 0x4e23
movaps 0xc8(%r13), %xmm0
movaps %xmm0, 0xe8(%r13)
movb $0x1, 0xe0(%r13)
cmpl $0x0, 0x104(%r13)
jne 0x4e71
movaps 0x1507c(%rip), %xmm0    # 0x19eb0
movaps %xmm0, 0x138(%r13)
movaps 0x1505d(%rip), %xmm0    # 0x19ea0
movaps %xmm0, 0x128(%r13)
movaps 0x1503e(%rip), %xmm0    # 0x19e90
movaps %xmm0, 0x118(%r13)
movaps 0x1501f(%rip), %xmm0    # 0x19e80
movaps %xmm0, 0x108(%r13)
movb $0x1, 0x100(%r13)
cmpl $0x0, 0x154(%r13)
jne 0x4ebf
movaps 0x1506e(%rip), %xmm0    # 0x19ef0
movaps %xmm0, 0x188(%r13)
movaps 0x1504f(%rip), %xmm0    # 0x19ee0
movaps %xmm0, 0x178(%r13)
movaps 0x15030(%rip), %xmm0    # 0x19ed0
movaps %xmm0, 0x168(%r13)
movaps 0x15011(%rip), %xmm0    # 0x19ec0
movaps %xmm0, 0x158(%r13)
movb $0x1, 0x150(%r13)
cmpl $0x3, (%r15)
jne 0x5079
cmpl $0x0, 0x1a4(%r13)
jne 0x4f1b
movaps 0x108(%r13), %xmm0
movaps 0x118(%r13), %xmm1
movaps 0x128(%r13), %xmm2
movaps 0x138(%r13), %xmm3
movaps %xmm3, 0x1d8(%r13)
movaps %xmm2, 0x1c8(%r13)
movaps %xmm1, 0x1b8(%r13)
movaps %xmm0, 0x1a8(%r13)
movb $0x1, 0x1a0(%r13)
cmpl $0x0, 0x1f4(%r13)
jne 0x4f6d
movaps 0x158(%r13), %xmm0
movaps 0x168(%r13), %xmm1
movaps 0x178(%r13), %xmm2
movaps 0x188(%r13), %xmm3
movaps %xmm3, 0x228(%r13)
movaps %xmm2, 0x218(%r13)
movaps %xmm1, 0x208(%r13)
movaps %xmm0, 0x1f8(%r13)
movb $0x1, 0x1f0(%r13)
cmpl $0x0, 0x244(%r13)
jne 0x4fbf
movaps 0x1a8(%r13), %xmm0
movaps 0x1b8(%r13), %xmm1
movaps 0x1c8(%r13), %xmm2
movaps 0x1d8(%r13), %xmm3
movaps %xmm3, 0x278(%r13)
movaps %xmm2, 0x268(%r13)
movaps %xmm1, 0x258(%r13)
movaps %xmm0, 0x248(%r13)
movb $0x1, 0x240(%r13)
cmpl $0x0, 0x294(%r13)
jne 0x5079
movaps 0x1f8(%r13), %xmm0
movaps 0x208(%r13), %xmm1
movaps 0x218(%r13), %xmm2
movaps 0x228(%r13), %xmm3
movaps %xmm3, 0x2c8(%r13)
movaps %xmm2, 0x2b8(%r13)
movaps %xmm1, 0x2a8(%r13)
movaps %xmm0, 0x298(%r13)
movl $0x290, %eax            # imm = 0x290
jmp 0x5073
leaq (%r12,%r14), %rax
addq $0x170, %rax            # imm = 0x170
xorl %ecx, %ecx
movaps 0x145a9(%rip), %xmm0    # 0x195d0
movaps %xmm0, (%rax,%rcx)
movb $0x1, -0x8(%rax,%rcx)
addq $0x20, %rcx
cmpq $0xc0, %rcx
jne 0x5027
leaq (%r12,%r14), %rax
addq $0x230, %rax            # imm = 0x230
xorl %ecx, %ecx
movaps %xmm0, 0x30(%rax,%rcx)
movaps %xmm0, 0x20(%rax,%rcx)
movaps %xmm0, 0x10(%rax,%rcx)
movaps %xmm0, (%rax,%rcx)
movb $0x1, -0x8(%rax,%rcx)
addq $0x50, %rcx
cmpq $0x1e0, %rcx            # imm = 0x1E0
jne 0x5049
movl $0x30, %eax
movb $0x1, (%r13,%rax)
leaq 0x2d8(%r13), %rsi
movq %rbx, %rdi
callq 0x727a
movl 0x2d8(%r13), %esi
leaq 0x1466a(%rip), %rdi     # 0x19700
movq 0x1cf23(%rip), %r8      # 0x21fc0
xorl %edx, %edx
movl $0xc, %ecx
callq 0x735c
testb %al, %al
je 0x518b
leaq 0x2dc(%r13), %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x727a
movl 0x2dc(%r13), %esi
leaq 0x1464d(%rip), %rdi     # 0x1971e
movq 0x1cee8(%rip), %r8      # 0x21fc0
movl $0x2, %ebp
xorl %edx, %edx
movl $0x2, %ecx
callq 0x735c
testb %al, %al
je 0x5252
movl (%r15), %eax
cmpl $0x1, %eax
je 0x51a5
testl %eax, %eax
jne 0x5110
leaq 0x2e0(%r13), %rsi
movq %rbx, %rdi
callq 0x727a
cmpl $0x0, 0x20(%rbx)
jne 0x5194
leaq 0x6ec(%r13), %rsi
movq %rbx, %rdi
callq 0x727a
leaq 0x6f0(%r13), %rdx
movq %rbx, %rdi
movl $0x1, %esi
callq 0x70a0
leaq 0x6f4(%r13), %rsi
movq %rbx, %rdi
callq 0x727a
leaq 0x6f8(%r13), %rsi
movq %rbx, %rdi
callq 0x727a
leaq 0x6fc(%r13), %rdx
movq %rbx, %rdi
movl $0x1, %esi
callq 0x70a0
leaq 0x700(%r13), %rdx
cmpl $0x0, 0x6fc(%r13)
je 0x525b
movl $0x0, (%rdx)
jmp 0x5268
orb $0x4, 0x20(%rbx)
movl $0x2, %ebp
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2e0(%r13), %rdx
movq %rbx, %rdi
movl $0x1, %esi
callq 0x70a0
leaq 0x2e4(%r13), %rsi
movq %rbx, %rdi
callq 0x7600
leaq 0x2e8(%r13), %rsi
movq %rbx, %rdi
callq 0x7600
leaq 0x2ec(%r13), %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x727a
movl 0x2ec(%r13), %esi
leaq 0x1453e(%rip), %rdi     # 0x19735
movq 0x1cdc2(%rip), %r8      # 0x21fc0
xorl %edx, %edx
movl $0xff, %ecx
callq 0x735c
testb %al, %al
je 0x5252
movq %r15, 0x10(%rsp)
cmpl $0x0, (%r15)
je 0x5110
leaq 0x2f0(%r13), %r12
xorl %r15d, %r15d
movq %rbx, %rdi
movq %r12, %rsi
callq 0x7600
testb %al, %al
je 0x5110
incq %r15
movq 0x10(%rsp), %rax
movl (%rax), %eax
addq $0x4, %r12
cmpq %rax, %r15
jb 0x5227
jmp 0x5110
orb $0x4, 0x20(%rbx)
jmp 0x5194
movq %rbx, %rdi
movl $0x1, %esi
callq 0x70a0
leaq 0x704(%r13), %rdx
movq %rbx, %rdi
movl $0x1, %esi
callq 0x70a0
leaq 0x708(%r13), %rdx
movq %rbx, %rdi
movl $0x1, %esi
callq 0x70a0
leaq 0x70c(%r13), %rsi
cmpl $0x0, 0x708(%r13)
je 0x52d8
movq %rbx, %rdi
callq 0x727a
leaq 0x710(%r13), %rsi
movq %rbx, %rdi
callq 0x727a
leaq 0x714(%r13), %rsi
movq %rbx, %rdi
callq 0x727a
leaq 0x718(%r13), %rsi
movq %rbx, %rdi
callq 0x727a
jmp 0x52de
xorps %xmm0, %xmm0
movups %xmm0, (%rsi)
leaq 0x71c(%r13), %rdx
movq %rbx, %rdi
movl $0x1, %esi
callq 0x70a0
cmpl $0x0, 0x71c(%r13)
je 0x530b
leaq 0x720(%r13), %rdx
movq %rbx, %rsi
callq 0x42ee
cmpl $0x0, 0x20(%rbx)
jne 0x5194
movl 0xc(%rsp), %eax
movl %eax, 0x16128(%r14)
movb $0x1, 0x8(%r13)
movl $0x4, %ebp
jmp 0x5194
nop