// File: /workspace/github_cpp_makefile_star2_O3/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 0x7946
leaq 0xa(%rsp), %rsi
movq %rbx, %rdi
callq 0x7946
leaq 0x9(%rsp), %rsi
movq %rbx, %rdi
callq 0x7946
leaq 0xc(%rsp), %rsi
movq %rbx, %rdi
callq 0x70b4
testb %al, %al
je 0x4a65
movl 0xc(%rsp), %esi
leaq 0x13c3f(%rip), %rdi     # 0x185e0
movq 0x1c618(%rip), %r8      # 0x20fc0
xorl %edx, %edx
movl $0x1f, %ecx
callq 0x716b
testb %al, %al
je 0x5045
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 0x4ae7
movabsq $0x2000208808020009, %rdx # imm = 0x2000208808020009
btq %rcx, %rdx
jae 0x4ae7
leaq 0x10(%r13), %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x70b4
movl 0x10(%r13), %esi
leaq 0x13c8b(%rip), %rdi     # 0x186b4
movq 0x1c590(%rip), %r8      # 0x20fc0
xorl %edx, %edx
movl $0x3, %ecx
callq 0x716b
testb %al, %al
je 0x5045
leaq 0x14(%r13), %rdx
cmpl $0x3, 0x10(%r13)
jne 0x4b72
movq %rbx, %rdi
movl $0x1, %esi
callq 0x6ee2
jmp 0x4b78
movq 0x1c554(%rip), %r14     # 0x20fc0
movq (%r14), %rax
movq -0x18(%rax), %rax
testb $0x5, 0x20(%r14,%rax)
jne 0x5045
leaq 0x142db(%rip), %rsi     # 0x18d61
movl $0x7, %edx
movq %r14, %rdi
callq 0x21d0
leaq 0x13bf0(%rip), %rsi     # 0x1868a
movl $0x29, %edx
movq %r14, %rdi
callq 0x21d0
leaq 0x142bb(%rip), %rsi     # 0x18d69
movl $0x7, %edx
movq %r14, %rdi
callq 0x21d0
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x2150
movsbl %al, %esi
movq %r14, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2110
jmp 0x5045
cmpl $0xf4, %eax
je 0x4a0f
cmpl $0x2c, %eax
je 0x4a0f
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 0x13aaa(%rip), %xmm0    # 0x185d0
movaps %xmm0, (%rax,%rcx)
movb $0x1, -0x8(%rax,%rcx)
addq $0x20, %rcx
cmpq $0xc0, %rcx
jne 0x4b26
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 0x4b48
jmp 0x4f28
movl $0x0, (%rdx)
leaq 0x18(%r13), %rsi
movq %rbx, %rdi
callq 0x70b4
movl 0x18(%r13), %esi
leaq 0x13b3b(%rip), %rdi     # 0x186ca
movq 0x1c42a(%rip), %r8      # 0x20fc0
xorl %edx, %edx
movl $0x6, %ecx
callq 0x716b
testb %al, %al
je 0x5045
leaq 0x1c(%r13), %rsi
movq %rbx, %rdi
callq 0x70b4
movl 0x1c(%r13), %esi
leaq 0x13b23(%rip), %rdi     # 0x186e4
movq 0x1c3f8(%rip), %r8      # 0x20fc0
xorl %edx, %edx
movl $0x6, %ecx
callq 0x716b
testb %al, %al
je 0x5045
leaq 0x20(%r13), %rdx
movq %rbx, %rdi
movl $0x1, %esi
callq 0x6ee2
leaq 0x24(%r13), %rdx
movq %rbx, %rdi
movl $0x1, %esi
callq 0x6ee2
cmpl $0x0, 0x24(%r13)
je 0x4ece
leaq 0x28(%r13), %rdx
movl 0x10(%r13), %r8d
movq %rbx, %rsi
movl $0x1, %ecx
callq 0x3f54
movl $0x2, %ebp
testb %al, %al
je 0x504e
cmpl $0x0, 0x44(%r13)
jne 0x4c43
movaps 0x14227(%rip), %xmm0    # 0x18e60
movaps %xmm0, 0x48(%r13)
movb $0x1, 0x40(%r13)
cmpl $0x0, 0x64(%r13)
jne 0x4c59
movaps 0x48(%r13), %xmm0
movaps %xmm0, 0x68(%r13)
movb $0x1, 0x60(%r13)
cmpl $0x0, 0x84(%r13)
jne 0x4c78
movaps 0x68(%r13), %xmm0
movaps %xmm0, 0x88(%r13)
movb $0x1, 0x80(%r13)
cmpl $0x0, 0xa4(%r13)
jne 0x4c99
movaps 0x141e7(%rip), %xmm0    # 0x18e70
movaps %xmm0, 0xa8(%r13)
movb $0x1, 0xa0(%r13)
cmpl $0x0, 0xc4(%r13)
jne 0x4cbb
movaps 0xa8(%r13), %xmm0
movaps %xmm0, 0xc8(%r13)
movb $0x1, 0xc0(%r13)
cmpl $0x0, 0xe4(%r13)
jne 0x4cdd
movaps 0xc8(%r13), %xmm0
movaps %xmm0, 0xe8(%r13)
movb $0x1, 0xe0(%r13)
cmpl $0x0, 0x104(%r13)
jne 0x4d2b
movaps 0x141c2(%rip), %xmm0    # 0x18eb0
movaps %xmm0, 0x138(%r13)
movaps 0x141a3(%rip), %xmm0    # 0x18ea0
movaps %xmm0, 0x128(%r13)
movaps 0x14184(%rip), %xmm0    # 0x18e90
movaps %xmm0, 0x118(%r13)
movaps 0x14165(%rip), %xmm0    # 0x18e80
movaps %xmm0, 0x108(%r13)
movb $0x1, 0x100(%r13)
cmpl $0x0, 0x154(%r13)
jne 0x4d79
movaps 0x141b4(%rip), %xmm0    # 0x18ef0
movaps %xmm0, 0x188(%r13)
movaps 0x14195(%rip), %xmm0    # 0x18ee0
movaps %xmm0, 0x178(%r13)
movaps 0x14176(%rip), %xmm0    # 0x18ed0
movaps %xmm0, 0x168(%r13)
movaps 0x14157(%rip), %xmm0    # 0x18ec0
movaps %xmm0, 0x158(%r13)
movb $0x1, 0x150(%r13)
cmpl $0x3, (%r15)
jne 0x4f33
cmpl $0x0, 0x1a4(%r13)
jne 0x4dd5
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 0x4e27
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 0x4e79
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 0x4f33
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 0x4f2d
leaq (%r12,%r14), %rax
addq $0x170, %rax            # imm = 0x170
xorl %ecx, %ecx
movaps 0x136ef(%rip), %xmm0    # 0x185d0
movaps %xmm0, (%rax,%rcx)
movb $0x1, -0x8(%rax,%rcx)
addq $0x20, %rcx
cmpq $0xc0, %rcx
jne 0x4ee1
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 0x4f03
movl $0x30, %eax
movb $0x1, (%r13,%rax)
leaq 0x2d8(%r13), %rsi
movq %rbx, %rdi
callq 0x70b4
movl 0x2d8(%r13), %esi
leaq 0x137b0(%rip), %rdi     # 0x18700
movq 0x1c069(%rip), %r8      # 0x20fc0
xorl %edx, %edx
movl $0xc, %ecx
callq 0x716b
testb %al, %al
je 0x5045
leaq 0x2dc(%r13), %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x70b4
movl 0x2dc(%r13), %esi
leaq 0x13793(%rip), %rdi     # 0x1871e
movq 0x1c02e(%rip), %r8      # 0x20fc0
movl $0x2, %ebp
xorl %edx, %edx
movl $0x2, %ecx
callq 0x716b
testb %al, %al
je 0x510c
movl (%r15), %eax
cmpl $0x1, %eax
je 0x505f
testl %eax, %eax
jne 0x4fca
leaq 0x2e0(%r13), %rsi
movq %rbx, %rdi
callq 0x70b4
cmpl $0x0, 0x20(%rbx)
jne 0x504e
leaq 0x6ec(%r13), %rsi
movq %rbx, %rdi
callq 0x70b4
leaq 0x6f0(%r13), %rdx
movq %rbx, %rdi
movl $0x1, %esi
callq 0x6ee2
leaq 0x6f4(%r13), %rsi
movq %rbx, %rdi
callq 0x70b4
leaq 0x6f8(%r13), %rsi
movq %rbx, %rdi
callq 0x70b4
leaq 0x6fc(%r13), %rdx
movq %rbx, %rdi
movl $0x1, %esi
callq 0x6ee2
leaq 0x700(%r13), %rdx
cmpl $0x0, 0x6fc(%r13)
je 0x5115
movl $0x0, (%rdx)
jmp 0x5122
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 0x6ee2
leaq 0x2e4(%r13), %rsi
movq %rbx, %rdi
callq 0x7410
leaq 0x2e8(%r13), %rsi
movq %rbx, %rdi
callq 0x7410
leaq 0x2ec(%r13), %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x70b4
movl 0x2ec(%r13), %esi
leaq 0x13684(%rip), %rdi     # 0x18735
movq 0x1bf08(%rip), %r8      # 0x20fc0
xorl %edx, %edx
movl $0xff, %ecx
callq 0x716b
testb %al, %al
je 0x510c
movq %r15, 0x10(%rsp)
cmpl $0x0, (%r15)
je 0x4fca
leaq 0x2f0(%r13), %r12
xorl %r15d, %r15d
movq %rbx, %rdi
movq %r12, %rsi
callq 0x7410
testb %al, %al
je 0x4fca
incq %r15
movq 0x10(%rsp), %rax
movl (%rax), %eax
addq $0x4, %r12
cmpq %rax, %r15
jb 0x50e1
jmp 0x4fca
orb $0x4, 0x20(%rbx)
jmp 0x504e
movq %rbx, %rdi
movl $0x1, %esi
callq 0x6ee2
leaq 0x704(%r13), %rdx
movq %rbx, %rdi
movl $0x1, %esi
callq 0x6ee2
leaq 0x708(%r13), %rdx
movq %rbx, %rdi
movl $0x1, %esi
callq 0x6ee2
leaq 0x70c(%r13), %rsi
cmpl $0x0, 0x708(%r13)
je 0x5192
movq %rbx, %rdi
callq 0x70b4
leaq 0x710(%r13), %rsi
movq %rbx, %rdi
callq 0x70b4
leaq 0x714(%r13), %rsi
movq %rbx, %rdi
callq 0x70b4
leaq 0x718(%r13), %rsi
movq %rbx, %rdi
callq 0x70b4
jmp 0x5198
xorps %xmm0, %xmm0
movups %xmm0, (%rsi)
leaq 0x71c(%r13), %rdx
movq %rbx, %rdi
movl $0x1, %esi
callq 0x6ee2
cmpl $0x0, 0x71c(%r13)
je 0x51c5
leaq 0x720(%r13), %rdx
movq %rbx, %rsi
callq 0x4186
cmpl $0x0, 0x20(%rbx)
jne 0x504e
movl 0xc(%rsp), %eax
movl %eax, 0x16128(%r14)
movb $0x1, 0x8(%r13)
movl $0x4, %ebp
jmp 0x504e
nop