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

    do {
        uint32_t pic_parameter_set_id;
        uint32_t seq_parameter_set_id;
        uint32_t slice_type;
        bool status;

        h264::slice_header& slice_header = m_slice_header;
        slice_header.reset();

        slice_header.nal_ref_idc = nal_ref_idc;
        slice_header.nal_unit_type = nal_unit_type;

        s.read_exp_golomb_u(slice_header.first_mb_in_slice);

        if (!CHK_EXPR(s.read_exp_golomb_u(slice_type), std::cout) ||
            !CHK_RANGE(slice_type, 0U, 9U, std::cout)) {
            s.mark_corrupted();
            break;
        }

        slice_header.slice_type = slice_type;

        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];
        if (!pps.is_valid()) {
            std::cout << "error: slice header refers to pps #" << pic_parameter_set_id << " which is not valid";
            std::cout << std::endl;
            break;
        }

        seq_parameter_set_id = pps.seq_parameter_set_id;

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

        slice_header.pic_parameter_set_id = pic_parameter_set_id;
        slice_header.set_active_pps(&m_pps_table[pic_parameter_set_id]);

        if (sps.separate_colour_plane_flag)
            s.read_bits(2, slice_header.colour_plane_id);
        else
            slice_header.colour_plane_id = 3;//TODO: #define INVALID_COLOUR_PLANE_ID

        s.read_bits(sps.log2_max_frame_num_minus4 + 4, slice_header.frame_num);

        if (!sps.frame_mbs_only_flag) {
            s.read_bits(1, slice_header.field_pic_flag);
            if (slice_header.field_pic_flag)
                s.read_bits(1, slice_header.bottom_field_flag);
        }
        else
            slice_header.field_pic_flag = 0;

        if (nal_unit_type == 5)
            s.read_exp_golomb_u(slice_header.idr_pic_id);

        if (sps.pic_order_cnt_type == 0) {
            s.read_bits(sps.t0.log2_max_pic_order_cnt_lsb_minus4 + 4, slice_header.pic_order_cnt_lsb);
            if (pps.bottom_field_pic_order_in_frame_present_flag && !slice_header.field_pic_flag)
                s.read_exp_golomb_s(slice_header.delta_pic_order_cnt_bottom);
        }

        if (sps.pic_order_cnt_type == 1 && !sps.t1.delta_pic_order_always_zero_flag) {
            s.read_exp_golomb_s(slice_header.delta_pic_order_cnt[0]);
            if (pps.bottom_field_pic_order_in_frame_present_flag && !slice_header.field_pic_flag)
                s.read_exp_golomb_s(slice_header.delta_pic_order_cnt[1]);
        }

        if (pps.redundant_pic_cnt_present_flag)
            s.read_exp_golomb_u(slice_header.redundant_pic_cnt);

        if (h264::slice_type_e::B == slice_type)
            s.read_bits(1, slice_header.direct_spatial_mv_pred_flag);

        if (h264::slice_type_e::P  == slice_type ||
            h264::slice_type_e::SP == slice_type ||
            h264::slice_type_e::B  == slice_type) {
            s.read_bits(1, slice_header.num_ref_idx_active_override_flag);
            if (slice_header.num_ref_idx_active_override_flag) {
                if (!CHK_EXPR(s.read_exp_golomb_u(slice_header.num_ref_idx_l0_active_minus1), std::cout) ||
                    !CHK_STRUCT_RANGE(slice_header, num_ref_idx_l0_active_minus1, 0U, 31U, std::cout)) {
                    s.mark_corrupted();
                    break;
                }
                if (h264::slice_type_e::B == slice_type)
                    if (!CHK_EXPR(s.read_exp_golomb_u(slice_header.num_ref_idx_l1_active_minus1), std::cout) ||
                        !CHK_STRUCT_RANGE(slice_header, num_ref_idx_l1_active_minus1, 0U, 31U, std::cout)) {
                        s.mark_corrupted();
                        break;
                    }
            }
            else {
                slice_header.num_ref_idx_l0_active_minus1 = pps.num_ref_idx_l0_default_active_minus1;
                if (h264::slice_type_e::B == slice_type)
                    slice_header.num_ref_idx_l1_active_minus1 = pps.num_ref_idx_l1_default_active_minus1;
            }
        }

        if ((h264::slice_type_e::I != slice_type) &&
            (h264::slice_type_e::SI != slice_type)) {
            status = parse_ref_pic_list_modification(s, slice_header.rplm_l0);
            if (!status)
                break;
        }

        if (h264::slice_type_e::B == slice_type) {
            status = parse_ref_pic_list_modification(s, slice_header.rplm_l1);
            if (!status)
                break;
        }

        if ((pps.weighted_pred_flag && ((h264::slice_type_e::P == slice_type) || (h264::slice_type_e::SP == slice_type))) ||
            (pps.weighted_bipred_idc == 1 && (h264::slice_type_e::B == slice_type))) {
            h264::pred_weight_table& pwt = slice_header.pwt;

            pwt.slice_type = h264::to_slice_type_e(slice_type);
            pwt.chroma_components_present = sps.chroma_format_idc && !sps.separate_colour_plane_flag;
            pwt.num_ref_idx_l0_active_minus1 = slice_header.num_ref_idx_l0_active_minus1;
            pwt.num_ref_idx_l1_active_minus1 = slice_header.num_ref_idx_l1_active_minus1;

            status = parse_pred_weight_table(s, pwt);
            if (!status)
                break;
        }

        if (nal_ref_idc != 0) {
            if (nal_unit_type == 5)
                parse_dec_ref_pic_marking_idr(s, slice_header.drpm_idr);
            else
                parse_dec_ref_pic_marking_nonidr(s, slice_header.drpm_nonidr);
        }

        if ((pps.entropy_coding_mode_flag) &&
            (h264::slice_type_e::I != slice_type) && (h264::slice_type_e::SI != slice_type)) {
            if (!CHK_EXPR(s.read_exp_golomb_u(slice_header.cabac_init_idc), std::cout) ||
                !CHK_STRUCT_RANGE(slice_header, cabac_init_idc, 0U, 2U, std::cout)) {
                s.mark_corrupted();
                break;
            }
        }

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

        if ((h264::slice_type_e::SI == slice_type) && (h264::slice_type_e::SP == slice_type)) {
            if (h264::slice_type_e::SP == slice_type)
                s.read_bits(1, slice_header.sp_for_switch_flag);
            s.read_exp_golomb_s(slice_header.slice_qs_delta);
        }

        if (pps.deblocking_filter_control_present_flag) {
            s.read_exp_golomb_u(slice_header.disable_deblocking_filter_idc);
            if (slice_header.disable_deblocking_filter_idc != 1) {
                s.read_exp_golomb_s(slice_header.slice_alpha_c0_offset_div2);
                s.read_exp_golomb_s(slice_header.slice_beta_offset_div2);
            }
        }

        if ((pps.num_slice_groups_minus1 > 0) &&
            ((pps.slice_group_map_type >= 3) && (pps.slice_group_map_type <= 5))) {
            s.read_bits(
                ilog2(pps.t2.slice_group_change_rate_minus1 + 1),
                slice_header.slice_group_change_cycle);
        }

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

        set_slice_data(s);

        slice_header.set_valid(true);
        retval = h264_parser_status_e::SLICE_PARSED;
    } while (0);

    return retval;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %ecx, %ebp
movl %edx, %r15d
movq %rsi, %rbx
movq %rdi, %r14
movb $0x0, 0x87968(%rdi)
movl %edx, 0x8796c(%rdi)
movl %ecx, 0x87970(%rdi)
leaq 0x87974(%rdi), %rsi
movq %rbx, %rdi
callq 0x727a
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x727a
testb %al, %al
jne 0x6389
movl %eax, %r12d
movq 0x1bcb4(%rip), %r13     # 0x21fc0
movq (%r13), %rax
movq -0x18(%rax), %rax
testb $0x5, 0x20(%r13,%rax)
jne 0x6380
leaq 0x13a3e(%rip), %rsi     # 0x19d61
movl $0x7, %edx
movq %r13, %rdi
callq 0x21d0
leaq 0x136be(%rip), %rsi     # 0x199f5
movl $0x1f, %edx
movq %r13, %rdi
callq 0x21d0
leaq 0x13a1e(%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 %r12b, %r12b
je 0x6b68
movl (%rsp), %esi
leaq 0x13277(%rip), %rdi     # 0x1960a
movq 0x1bc26(%rip), %r12     # 0x21fc0
xorl %edx, %edx
movl $0x9, %ecx
movq %r12, %r8
callq 0x735c
testb %al, %al
je 0x6b68
movl (%rsp), %eax
movl %eax, 0x87978(%r14)
leaq 0x4(%rsp), %rsi
movq %rbx, %rdi
callq 0x727a
testb %al, %al
jne 0x6450
movl %eax, %r13d
movq (%r12), %rax
movq -0x18(%rax), %rax
testb $0x5, 0x20(%r12,%rax)
jne 0x6447
leaq 0x13977(%rip), %rsi     # 0x19d61
movl $0x7, %edx
movq %r12, %rdi
callq 0x21d0
leaq 0x13364(%rip), %rsi     # 0x19762
movl $0x29, %edx
movq %r12, %rdi
callq 0x21d0
leaq 0x13957(%rip), %rsi     # 0x19d69
movl $0x7, %edx
movq %r12, %rdi
callq 0x21d0
movq (%r12), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x2150
movsbl %al, %esi
movq %r12, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2110
testb %r13b, %r13b
je 0x6b68
movl 0x4(%rsp), %esi
leaq 0x1319a(%rip), %rdi     # 0x195f5
movq 0x1bb5e(%rip), %r12     # 0x21fc0
xorl %edx, %edx
movl $0xff, %ecx
movq %r12, %r8
callq 0x735c
testb %al, %al
je 0x6b68
movl 0x4(%rsp), %eax
imulq $0x718, %rax, %rcx      # imm = 0x718
cmpb $0x0, 0x16138(%r14,%rcx)
je 0x64f2
leaq (%r14,%rcx), %r13
addq $0x16130, %r13          # imm = 0x16130
movl 0x10(%r13), %r12d
imulq $0xb00, %r12, %rcx      # imm = 0xB00
cmpb $0x0, 0x130(%r14,%rcx)
je 0x6553
leaq (%r14,%rcx), %r12
addq $0x128, %r12            # imm = 0x128
movl %eax, 0x8797c(%r14)
movq %r13, 0x882d8(%r14)
leaq 0x87980(%r14), %rdx
cmpl $0x0, 0x14(%r12)
je 0x65ba
movq %rbx, %rdi
movl $0x2, %esi
callq 0x70a0
jmp 0x65c0
leaq 0x1351c(%rip), %rsi     # 0x19a15
movl $0x23, %edx
movq %r12, %rdi
callq 0x21d0
movl 0x4(%rsp), %esi
movq %r12, %rdi
callq 0x2100
leaq 0x13291(%rip), %rsi     # 0x197aa
movl $0x13, %edx
movq %rax, %rdi
callq 0x21d0
movq (%r12), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x2150
movsbl %al, %esi
movq %r12, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2110
jmp 0x6b6c
movq 0x1ba66(%rip), %rbx     # 0x21fc0
leaq 0x1322b(%rip), %rsi     # 0x1978c
movl $0xc, %edx
movq %rbx, %rdi
callq 0x21d0
movl 0x4(%rsp), %esi
movq %rbx, %rdi
callq 0x2100
leaq 0x13218(%rip), %rsi     # 0x19799
movl $0x10, %edx
movq %rbx, %rdi
callq 0x21d0
movq %rbx, %rdi
movq %r12, %rsi
callq 0x2100
leaq 0x1320a(%rip), %rsi     # 0x197aa
movl $0x13, %edx
movq %rax, %rdi
callq 0x21d0
movq %rbx, %rdi
callq 0x20c0
jmp 0x6b6c
movl $0x3, (%rdx)
movl 0x2d8(%r12), %esi
addl $0x4, %esi
leaq 0x87984(%r14), %rdx
movq %rbx, %rdi
callq 0x70a0
movq %r12, %rax
leaq 0x87988(%r14), %r12
movq %rax, 0x10(%rsp)
cmpl $0x0, 0x6fc(%rax)
je 0x65fc
movl $0x0, (%r12)
jmp 0x6627
movq %rbx, %rdi
movl $0x1, %esi
movq %r12, %rdx
callq 0x70a0
cmpl $0x0, (%r12)
je 0x6627
leaq 0x8798c(%r14), %rdx
movq %rbx, %rdi
movl $0x1, %esi
callq 0x70a0
cmpl $0x5, %ebp
movq 0x10(%rsp), %r12
jne 0x6640
leaq 0x87990(%r14), %rsi
movq %rbx, %rdi
callq 0x727a
cmpl $0x0, 0x2dc(%r12)
jne 0x6685
movl 0x2e0(%r12), %esi
addl $0x4, %esi
leaq 0x87994(%r14), %rdx
movq %rbx, %rdi
callq 0x70a0
cmpl $0x0, 0x18(%r13)
je 0x6685
cmpl $0x0, 0x87988(%r14)
jne 0x6685
leaq 0x87998(%r14), %rsi
movq %rbx, %rdi
callq 0x7600
cmpl $0x1, 0x2dc(%r12)
jne 0x66ca
cmpl $0x0, 0x2e0(%r12)
jne 0x66ca
leaq 0x8799c(%r14), %rsi
movq %rbx, %rdi
callq 0x7600
cmpl $0x0, 0x18(%r13)
je 0x66ca
cmpl $0x0, 0x87988(%r14)
jne 0x66ca
leaq 0x879a0(%r14), %rsi
movq %rbx, %rdi
callq 0x7600
cmpl $0x0, 0x44c(%r13)
je 0x66e3
leaq 0x879a4(%r14), %rsi
movq %rbx, %rdi
callq 0x727a
movq %r13, 0x8(%rsp)
imull $0xcccccccd, (%rsp), %eax # imm = 0xCCCCCCCD
addl $0x33333333, %eax       # imm = 0x33333333
cmpl $0x33333332, %eax       # imm = 0x33333332
ja 0x670f
leaq 0x879a8(%r14), %rdx
movq %rbx, %rdi
movl $0x1, %esi
callq 0x70a0
movl (%rsp), %eax
movl $0xcccccccd, %r13d      # imm = 0xCCCCCCCD
movq %rax, %rcx
imulq %r13, %rcx
shrq $0x22, %rcx
leal (%rcx,%rcx,4), %ecx
subl %ecx, %eax
cmpl $0x3, %eax
ja 0x6857
cmpl $0x2, %eax
je 0x6857
leaq 0x879ac(%r14), %rdx
movq %rbx, %rdi
movl $0x1, %esi
callq 0x70a0
cmpl $0x0, 0x879ac(%r14)
je 0x6820
leaq 0x879b0(%r14), %r12
movq %rbx, %rdi
movq %r12, %rsi
callq 0x727a
movzbl %al, %esi
leaq 0x132c1(%rip), %rdi     # 0x19a39
movq 0x1b841(%rip), %rdx     # 0x21fc0
callq 0x71c7
testb %al, %al
je 0x6b68
movl (%r12), %esi
leaq 0x132e1(%rip), %rdi     # 0x19a78
movq 0x1b822(%rip), %r8      # 0x21fc0
xorl %edx, %edx
movl $0x1f, %ecx
callq 0x735c
testb %al, %al
je 0x6b68
imull $0xcccccccd, (%rsp), %eax # imm = 0xCCCCCCCD
addl $0x33333333, %eax       # imm = 0x33333333
cmpl $0x33333332, %eax       # imm = 0x33333332
ja 0x6857
leaq 0x879b4(%r14), %r12
movq %rbx, %rdi
movq %r12, %rsi
callq 0x727a
movzbl %al, %esi
leaq 0x132bd(%rip), %rdi     # 0x19aa2
movq 0x1b7d4(%rip), %rdx     # 0x21fc0
callq 0x71c7
testb %al, %al
je 0x6b68
movl (%r12), %esi
leaq 0x132dd(%rip), %rdi     # 0x19ae1
movq 0x1b7b5(%rip), %r8      # 0x21fc0
xorl %edx, %edx
movl $0x1f, %ecx
callq 0x735c
testb %al, %al
jne 0x6857
jmp 0x6b68
movq 0x8(%rsp), %rax
movl 0x428(%rax), %eax
movl %eax, 0x879b0(%r14)
imull $0xcccccccd, (%rsp), %eax # imm = 0xCCCCCCCD
addl $0x33333333, %eax       # imm = 0x33333333
cmpl $0x33333332, %eax       # imm = 0x33333332
ja 0x6857
movq 0x8(%rsp), %rax
movl 0x42c(%rax), %eax
movl %eax, 0x879b4(%r14)
movl (%rsp), %eax
imulq %rax, %r13
shrq $0x22, %r13
leal (%r13,%r13,4), %ecx
subl %ecx, %eax
cmpl $0x2, %eax
movq 0x8(%rsp), %r12
je 0x6896
cmpl $0x4, %eax
je 0x6896
leaq 0x879b8(%r14), %rdx
movq %rbx, %rsi
callq 0x45a2
movl %eax, %ecx
movl $0x2, %eax
testb %cl, %cl
je 0x6b71
imull $0xcccccccd, (%rsp), %eax # imm = 0xCCCCCCCD
addl $0x33333333, %eax       # imm = 0x33333333
cmpl $0x33333332, %eax       # imm = 0x33333332
ja 0x68c7
leaq 0x879e8(%r14), %rdx
movq %rbx, %rsi
callq 0x45a2
movl %eax, %ecx
movl $0x2, %eax
testb %cl, %cl
je 0x6b71
cmpl $0x0, 0x430(%r12)
je 0x68ee
movl (%rsp), %eax
movl $0xcccccccd, %ecx       # imm = 0xCCCCCCCD
imulq %rax, %rcx
shrq $0x22, %rcx
leal (%rcx,%rcx,4), %ecx
subl %ecx, %eax
je 0x6910
cmpl $0x3, %eax
je 0x6910
cmpl $0x1, 0x434(%r12)
jne 0x6983
imull $0xcccccccd, (%rsp), %eax # imm = 0xCCCCCCCD
addl $0x33333333, %eax       # imm = 0x33333333
cmpl $0x33333332, %eax       # imm = 0x33333332
ja 0x6983
leaq 0x87a18(%r14), %rdx
movl (%rsp), %eax
movl $0xcccccccd, %ecx       # imm = 0xCCCCCCCD
imulq %rax, %rcx
shrq $0x22, %rcx
leal (%rcx,%rcx,4), %ecx
subl %ecx, %eax
movl %eax, 0x87a24(%r14)
movq 0x10(%rsp), %rax
cmpl $0x0, 0x10(%rax)
je 0x6947
cmpl $0x0, 0x14(%rax)
sete %al
jmp 0x6949
xorl %eax, %eax
movb %al, 0x87a28(%r14)
movl 0x879b0(%r14), %eax
movl 0x879b4(%r14), %ecx
movl %eax, 0x87a34(%r14)
movl %ecx, 0x87e38(%r14)
movq %rbx, %rsi
callq 0x4656
movl %eax, %ecx
movl $0x2, %eax
testb %cl, %cl
je 0x6b71
testl %r15d, %r15d
je 0x69ad
cmpl $0x5, %ebp
jne 0x699e
leaq 0x88240(%r14), %rdx
movq %rbx, %rsi
callq 0x481c
jmp 0x69ad
leaq 0x88258(%r14), %rdx
movq %rbx, %rsi
callq 0x4862
cmpl $0x0, 0x14(%r12)
je 0x69d8
movl (%rsp), %eax
movl $0xcccccccd, %ecx       # imm = 0xCCCCCCCD
imulq %rax, %rcx
shrq $0x22, %rcx
leal (%rcx,%rcx,4), %ecx
subl %ecx, %eax
cmpl $0x2, %eax
je 0x69d8
cmpl $0x4, %eax
jne 0x6b17
leaq 0x882bc(%r14), %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x7600
movzbl %al, %esi
leaq 0x13164(%rip), %rdi     # 0x19b58
movq 0x1b5c5(%rip), %rdx     # 0x21fc0
callq 0x71c7
testb %al, %al
je 0x6b68
movl (%r15), %esi
movq 0x10(%rsp), %rax
movl 0x18(%rax), %eax
addl %eax, %eax
leal (%rax,%rax,2), %eax
movl 0x438(%r12), %edi
addl %edi, %eax
movl $0xffffffe6, %edx       # imm = 0xFFFFFFE6
subl %eax, %edx
movl $0x19, %ecx
subl %edi, %ecx
leaq 0x13152(%rip), %rdi     # 0x19b89
movq 0x1b582(%rip), %r8      # 0x21fc0
callq 0x7707
testb %al, %al
je 0x6b68
cmpl $0x0, 0x444(%r12)
je 0x6a8d
leaq 0x882c8(%r14), %rsi
movq %rbx, %rdi
callq 0x727a
cmpl $0x1, 0x882c8(%r14)
je 0x6a8d
leaq 0x882cc(%r14), %rsi
movq %rbx, %rdi
callq 0x7600
leaq 0x882d0(%r14), %rsi
movq %rbx, %rdi
callq 0x7600
cmpl $0x0, 0x1c(%r12)
je 0x6abf
movl 0x20(%r12), %eax
addl $-0x3, %eax
cmpl $0x2, %eax
ja 0x6abf
movl 0x28(%r12), %edi
incl %edi
callq 0x6b80
leaq 0x882d4(%r14), %rdx
movq %rbx, %rdi
movl %eax, %esi
callq 0x70a0
movl $0x2, %eax
cmpl $0x0, 0x20(%rbx)
jne 0x6b71
movb $0x0, 0x882e8(%r14)
movq 0x10(%rbx), %rax
movq (%rbx), %rcx
addq %rax, %rcx
movq %rcx, 0x882f0(%r14)
movq 0x8(%rbx), %rcx
subq %rax, %rcx
movq %rcx, 0x882f8(%r14)
movq 0x18(%rbx), %rax
movq %rax, 0x88300(%r14)
movb $0x1, %al
movb %al, 0x882e8(%r14)
movb %al, 0x87968(%r14)
movl $0x7, %eax
jmp 0x6b71
leaq 0x882b8(%r14), %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x727a
movzbl %al, %esi
leaq 0x12fd8(%rip), %rdi     # 0x19b0b
movq 0x1b486(%rip), %rdx     # 0x21fc0
callq 0x71c7
testb %al, %al
je 0x6b68
movl (%r15), %esi
leaq 0x12fef(%rip), %rdi     # 0x19b3c
movq 0x1b46c(%rip), %r8      # 0x21fc0
xorl %edx, %edx
movl $0x2, %ecx
callq 0x735c
testb %al, %al
jne 0x69d8
orb $0x4, 0x20(%rbx)
movl $0x2, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq