// File: /workspace/github_c_makefile_star2_O0/akumrao[P]videoAnalyzer/encoder/set.c
// Function: x264_pps_write(bs_s*, x264_pps_t*)
void x264_pps_write(bs_t *s, x264_pps_t *pps) {LOG_CALL;
    bs_write_ue(s, pps->i_id,"i_id");
    bs_write_ue(s, pps->i_sps_id,"i_sps_id");

    bs_write(s, 1, pps->b_cabac,"b_cabac");
    bs_write(s, 1, pps->b_pic_order,"b_pic_order");
    bs_write_ue(s, pps->i_num_slice_groups - 1,"i_num_slice_groups");

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

        bs_write_ue(s, pps->i_slice_group_map_type,"i_slice_group_map_type");
        if (pps->i_slice_group_map_type == 0)
        {
            for (i = 0; i < pps->i_num_slice_groups; i++)
            {
                bs_write_ue(s, pps->i_run_length[i] - 1,"i_run_length");
            }
        }
        else if (pps->i_slice_group_map_type == 2)
        {
            for (i = 0; i < pps->i_num_slice_groups; i++)
            {
                bs_write_ue(s, pps->i_top_left[i],"i_top_left[i]");
                bs_write_ue(s, pps->i_bottom_right[i],"i_bottom_right[i]");
            }
        }
        else if (pps->i_slice_group_map_type >= 3 &&
                pps->i_slice_group_map_type <= 5)
        {
            bs_write(s, 1, pps->b_slice_group_change_direction,"b_slice_group_change_direction");
            bs_write_ue(s, pps->b_slice_group_change_direction - 1,"b_slice_group_change_direction");
        }
        else if (pps->i_slice_group_map_type == 6)
        {
            bs_write_ue(s, pps->i_pic_size_in_map_units - 1,"i_pic_size_in_map_units");
            for (i = 0; i < pps->i_pic_size_in_map_units; i++)
            {
                /* FIXME */
                /* bs_write( s, ceil( log2( pps->i_pic_size_in_map_units +1 ) ), 
                 *              pps->i_slice_group_id[i] ); 
                 */
            }
        }
    }

    bs_write_ue(s, pps->i_num_ref_idx_l0_active - 1,"i_num_ref_idx_l0_active");
    bs_write_ue(s, pps->i_num_ref_idx_l1_active - 1,"i_num_ref_idx_l1_active");
    bs_write(s, 1, pps->b_weighted_pred,"b_weighted_pred");
    bs_write(s, 2, pps->b_weighted_bipred,"b_weighted_bipred");

    bs_write_se(s, pps->i_pic_init_qp - 26,"i_pic_init_qp");
    bs_write_se(s, pps->i_pic_init_qs - 26,"i_pic_init_qs");
    bs_write_se(s, pps->i_chroma_qp_index_offset,"i_chroma_qp_index_offset");

    bs_write(s, 1, pps->b_deblocking_filter_control,"b_deblocking_filter_control");
    bs_write(s, 1, pps->b_constrained_intra_pred,"b_constrained_intra_pred");
    bs_write(s, 1, pps->b_redundant_pic_cnt,"b_redundant_pic_cnt");

    bs_rbsp_trailing(s);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq 0x4ff9(%rip), %rdi      # 0x28eb0
leaq 0xc7ba(%rip), %rsi      # 0x30678
leaq 0xc9b1(%rip), %rdx      # 0x30876
movb $0x0, %al
callq 0x4d20
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movl (%rax), %esi
leaq 0xc82e(%rip), %rdx      # 0x3070b
callq 0x23a20
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0x4(%rax), %esi
leaq 0x824d(%rip), %rdx      # 0x2c141
callq 0x23a20
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0x8(%rax), %edx
movl $0x1, %esi
leaq 0x823a(%rip), %rcx      # 0x2c14a
callq 0x23930
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0xc(%rax), %edx
movl $0x1, %esi
leaq 0x8226(%rip), %rcx      # 0x2c152
callq 0x23930
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0x10(%rax), %esi
subl $0x1, %esi
leaq 0x8218(%rip), %rdx      # 0x2c15e
callq 0x23a20
movq -0x10(%rbp), %rax
cmpl $0x1, 0x10(%rax)
jle 0x240cd
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0x14(%rax), %esi
leaq 0x8218(%rip), %rdx      # 0x2c183
callq 0x23a20
movq -0x10(%rbp), %rax
cmpl $0x0, 0x14(%rax)
jne 0x23fbc
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x10(%rcx), %eax
jge 0x23fb7
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movl 0x18(%rax,%rcx,4), %esi
subl $0x1, %esi
leaq 0x81f3(%rip), %rdx      # 0x2c19a
callq 0x23a20
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x23f81
jmp 0x240cb
movq -0x10(%rbp), %rax
cmpl $0x2, 0x14(%rax)
jne 0x24027
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x10(%rcx), %eax
jge 0x24022
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movl 0x418(%rax,%rcx,4), %esi
leaq 0xc892(%rip), %rdx      # 0x30885
callq 0x23a20
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movl 0x818(%rax,%rcx,4), %esi
leaq 0xc881(%rip), %rdx      # 0x30893
callq 0x23a20
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x23fcd
jmp 0x240c9
movq -0x10(%rbp), %rax
cmpl $0x3, 0x14(%rax)
jl 0x24079
movq -0x10(%rbp), %rax
cmpl $0x5, 0x14(%rax)
jg 0x24079
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0xc18(%rax), %edx
movl $0x1, %esi
leaq 0x816c(%rip), %rcx      # 0x2c1c1
callq 0x23930
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0xc18(%rax), %esi
subl $0x1, %esi
leaq 0x814f(%rip), %rdx      # 0x2c1c1
callq 0x23a20
jmp 0x240c7
movq -0x10(%rbp), %rax
cmpl $0x6, 0x14(%rax)
jne 0x240c5
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0xc20(%rax), %esi
subl $0x1, %esi
leaq 0x815f(%rip), %rdx      # 0x2c1fa
callq 0x23a20
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0xc20(%rcx), %eax
jge 0x240c3
jmp 0x240b8
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x240a7
jmp 0x240c5
jmp 0x240c7
jmp 0x240c9
jmp 0x240cb
jmp 0x240cd
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0x1024(%rax), %esi
subl $0x1, %esi
leaq 0x74a5(%rip), %rdx      # 0x2b58a
callq 0x23a20
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0x1028(%rax), %esi
subl $0x1, %esi
leaq 0x74a0(%rip), %rdx      # 0x2b5a2
callq 0x23a20
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0x102c(%rax), %edx
movl $0x1, %esi
leaq 0x80f1(%rip), %rcx      # 0x2c212
callq 0x23930
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0x1030(%rax), %edx
movl $0x2, %esi
leaq 0x80e2(%rip), %rcx      # 0x2c222
callq 0x23930
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0x1034(%rax), %esi
subl $0x1a, %esi
leaq 0x80d7(%rip), %rdx      # 0x2c234
callq 0x23ae0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0x1038(%rax), %esi
subl $0x1a, %esi
leaq 0x80c8(%rip), %rdx      # 0x2c242
callq 0x23ae0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0x103c(%rax), %esi
leaq 0x80bc(%rip), %rdx      # 0x2c250
callq 0x23ae0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0x1040(%rax), %edx
movl $0x1, %esi
leaq 0x80b6(%rip), %rcx      # 0x2c269
callq 0x23930
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0x1044(%rax), %edx
movl $0x1, %esi
leaq 0x80b3(%rip), %rcx      # 0x2c285
callq 0x23930
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0x1048(%rax), %edx
movl $0x1, %esi
leaq 0x80ad(%rip), %rcx      # 0x2c29e
callq 0x23930
movq -0x8(%rbp), %rdi
callq 0x23c10
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)