// File: /workspace/github_c_makefile_star2_O0/akumrao[P]videoAnalyzer/decoder/decoder.c
// Function: x264_slice_header_part2_read(bs_s*, x264_slice_header_t*)
static int x264_slice_header_part2_read(bs_t *s, x264_slice_header_t *sh) {LOG_CALL;
    if (sh->pps->b_cabac && sh->i_type != SLICE_TYPE_I && sh->i_type != SLICE_TYPE_SI)
    {
        sh->i_cabac_init_idc = bs_read_ue(s,"i_cabac_init_idc");
    }
    sh->i_qp_delta = bs_read_se(s,"i_qp_delta");

    if (sh->i_type == SLICE_TYPE_SI || sh->i_type == SLICE_TYPE_SP)
    {
        if (sh->i_type == SLICE_TYPE_SP)
        {
            sh->b_sp_for_swidth = bs_read1(s,"b_sp_for_swidth");
        }
        sh->i_qs_delta = bs_read_se(s,"i_qs_delta");
    }

    if (sh->pps->b_deblocking_filter_control)
    {
        sh->i_disable_deblocking_filter_idc = bs_read_ue(s,"i_disable_deblocking_filter_idc");
        if (sh->i_disable_deblocking_filter_idc != 1)
        {
            sh->i_alpha_c0_offset = bs_read_se(s,"i_alpha_c0_offset");
            sh->i_beta_offset = bs_read_se(s,"i_beta_offset");
        }
    } else
    {
        sh->i_alpha_c0_offset = 0;
        sh->i_beta_offset = 0;
    }

    if (sh->pps->i_num_slice_groups > 1 && sh->pps->i_slice_group_map_type >= 3 && sh->pps->i_slice_group_map_type <= 5)
    {
        /* FIXME */
        return -1;
    }
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
leaq 0x18649(%rip), %rdi     # 0x28eb0
leaq 0x1aa4a(%rip), %rsi     # 0x2b2b8
leaq 0x1ae78(%rip), %rdx     # 0x2b6ed
movb $0x0, %al
callq 0x4d20
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
cmpl $0x0, 0x8(%rax)
je 0x108b7
movq -0x18(%rbp), %rax
cmpl $0x2, 0x10(%rax)
je 0x108b7
movq -0x18(%rbp), %rax
cmpl $0x4, 0x10(%rax)
je 0x108b7
movq -0x10(%rbp), %rdi
leaq 0x1ae61(%rip), %rsi     # 0x2b70a
callq 0x109f0
movl %eax, %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x50(%rax)
movq -0x10(%rbp), %rdi
leaq 0x1ae59(%rip), %rsi     # 0x2b71b
callq 0x10cf0
movl %eax, %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x54(%rax)
movq -0x18(%rbp), %rax
cmpl $0x4, 0x10(%rax)
je 0x108e4
movq -0x18(%rbp), %rax
cmpl $0x3, 0x10(%rax)
jne 0x10920
movq -0x18(%rbp), %rax
cmpl $0x3, 0x10(%rax)
jne 0x10907
movq -0x10(%rbp), %rdi
leaq 0x1ae2d(%rip), %rsi     # 0x2b726
callq 0x10c40
movl %eax, %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x58(%rax)
movq -0x10(%rbp), %rdi
leaq 0x1ae24(%rip), %rsi     # 0x2b736
callq 0x10cf0
movl %eax, %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x5c(%rax)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
cmpl $0x0, 0x1040(%rax)
je 0x10988
movq -0x10(%rbp), %rdi
leaq 0x1ae05(%rip), %rsi     # 0x2b741
callq 0x109f0
movl %eax, %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x60(%rax)
movq -0x18(%rbp), %rax
cmpl $0x1, 0x60(%rax)
je 0x10986
movq -0x10(%rbp), %rdi
leaq 0x1ae02(%rip), %rsi     # 0x2b761
callq 0x10cf0
movl %eax, %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x64(%rax)
movq -0x10(%rbp), %rdi
leaq 0x1adfb(%rip), %rsi     # 0x2b773
callq 0x10cf0
movl %eax, %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x68(%rax)
jmp 0x1099e
movq -0x18(%rbp), %rax
movl $0x0, 0x64(%rax)
movq -0x18(%rbp), %rax
movl $0x0, 0x68(%rax)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
cmpl $0x1, 0x10(%rax)
jle 0x109d1
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
cmpl $0x3, 0x14(%rax)
jl 0x109d1
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
cmpl $0x5, 0x14(%rax)
jg 0x109d1
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x109d8
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)