// File: /workspace/github_c_makefile_star2_O0/akumrao[P]videoAnalyzer/encoder/set.c
// Function: x264_pps_init(x264_pps_t*, int, x264_param_t*, x264_sps_t*)
void x264_pps_init(x264_pps_t *pps, int i_id, x264_param_t *param, x264_sps_t *sps) {LOG_CALL;
    pps->i_id = i_id;
    pps->i_sps_id = sps->i_id;
    pps->b_cabac = param->b_cabac;

    pps->b_pic_order = 0;
    pps->i_num_slice_groups = 1;

    if (pps->i_num_slice_groups > 1)
    {
        int i;

        pps->i_slice_group_map_type = 0;
        if (pps->i_slice_group_map_type == 0)
        {
            for (i = 0; i < pps->i_num_slice_groups; i++)
            {
                pps->i_run_length[i] = 1;
            }
        }
        else if (pps->i_slice_group_map_type == 2)
        {
            for (i = 0; i < pps->i_num_slice_groups; i++)
            {
                pps->i_top_left[i] = 0;
                pps->i_bottom_right[i] = 0;
            }
        }
        else if (pps->i_slice_group_map_type >= 3 &&
                pps->i_slice_group_map_type <= 5)
        {
            pps->b_slice_group_change_direction = 0;
            pps->i_slice_group_change_rate = 0;
        }
        else if (pps->i_slice_group_map_type == 6)
        {
            pps->i_pic_size_in_map_units = 1;
            for (i = 0; i < pps->i_pic_size_in_map_units; i++)
            {
                pps->i_slice_group_id[i] = 0;
            }
        }
    }
    pps->i_num_ref_idx_l0_active = 1;
    pps->i_num_ref_idx_l1_active = 1;

    pps->b_weighted_pred = 0;
    pps->b_weighted_bipred = 0;

    pps->i_pic_init_qp = 26;
    pps->i_pic_init_qs = 26;

    pps->i_chroma_qp_index_offset = 0;
#if 0  
    if (!param->b_deblocking_filter)
    {
        pps->b_deblocking_filter_control = 1;
    }
    else
    {
        pps->b_deblocking_filter_control = 1;
    }
#endif  
    pps->b_deblocking_filter_control = 1;
    pps->b_constrained_intra_pred = 0;
    pps->b_redundant_pic_cnt = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
leaq 0x5222(%rip), %rdi      # 0x28eb0
leaq 0xc9e3(%rip), %rsi      # 0x30678
leaq 0xcbcc(%rip), %rdx      # 0x30868
movb $0x0, %al
callq 0x4d20
movl -0xc(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, (%rax)
movq -0x20(%rbp), %rax
movl (%rax), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x4(%rax)
movq -0x18(%rbp), %rax
movl 0x2c(%rax), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0xc(%rax)
movq -0x8(%rbp), %rax
movl $0x1, 0x10(%rax)
movq -0x8(%rbp), %rax
cmpl $0x1, 0x10(%rax)
jle 0x23e0e
movq -0x8(%rbp), %rax
movl $0x0, 0x14(%rax)
movq -0x8(%rbp), %rax
cmpl $0x0, 0x14(%rax)
jne 0x23d33
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x10(%rcx), %eax
jge 0x23d2e
movq -0x8(%rbp), %rax
movslq -0x24(%rbp), %rcx
movl $0x1, 0x18(%rax,%rcx,4)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x23d07
jmp 0x23e0c
movq -0x8(%rbp), %rax
cmpl $0x2, 0x14(%rax)
jne 0x23d86
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x10(%rcx), %eax
jge 0x23d81
movq -0x8(%rbp), %rax
movslq -0x24(%rbp), %rcx
movl $0x0, 0x418(%rax,%rcx,4)
movq -0x8(%rbp), %rax
movslq -0x24(%rbp), %rcx
movl $0x0, 0x818(%rax,%rcx,4)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x23d44
jmp 0x23e0a
movq -0x8(%rbp), %rax
cmpl $0x3, 0x14(%rax)
jl 0x23db8
movq -0x8(%rbp), %rax
cmpl $0x5, 0x14(%rax)
jg 0x23db8
movq -0x8(%rbp), %rax
movl $0x0, 0xc18(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0xc1c(%rax)
jmp 0x23e08
movq -0x8(%rbp), %rax
cmpl $0x6, 0x14(%rax)
jne 0x23e06
movq -0x8(%rbp), %rax
movl $0x1, 0xc20(%rax)
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0xc20(%rcx), %eax
jge 0x23e04
movq -0x8(%rbp), %rax
movslq -0x24(%rbp), %rcx
movl $0x0, 0xc24(%rax,%rcx,4)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x23dd7
jmp 0x23e06
jmp 0x23e08
jmp 0x23e0a
jmp 0x23e0c
jmp 0x23e0e
movq -0x8(%rbp), %rax
movl $0x1, 0x1024(%rax)
movq -0x8(%rbp), %rax
movl $0x1, 0x1028(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x102c(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x1030(%rax)
movq -0x8(%rbp), %rax
movl $0x1a, 0x1034(%rax)
movq -0x8(%rbp), %rax
movl $0x1a, 0x1038(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x103c(%rax)
movq -0x8(%rbp), %rax
movl $0x1, 0x1040(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x1044(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x1048(%rax)
addq $0x30, %rsp
popq %rbp
retq