// File: /workspace/github_c_makefile_star2_O0/akumrao[P]videoAnalyzer/core/common.c
// Function: x264_picture_new(x264_t*)
x264_picture_t *x264_picture_new( x264_t *h )
{
    x264_picture_t *pic =(x264_picture_t *) x264_aligned_alloc( sizeof( x264_picture_t ) );
    int i_stride;
    int i_lines;

    pic->i_width = h->param.i_width;
    pic->i_height= h->param.i_height;

    i_stride = ( h->param.i_width + 15 )&0xfffff0;
    i_lines  = ( h->param.i_height + 15 )&0xfffff0;

    pic->i_plane = 3;

    pic->i_stride[0] = i_stride;
    pic->i_stride[1] = i_stride / 2;
    pic->i_stride[2] = i_stride / 2;
    pic->i_stride[3] = 0;

    pic->plane[0] =  (uint8_t *)x264_aligned_alloc( i_lines * pic->i_stride[0] );
    pic->plane[1] = (uint8_t *)x264_aligned_alloc( i_lines / 2 * pic->i_stride[1] );
    pic->plane[2] = (uint8_t *)x264_aligned_alloc( i_lines / 2 * pic->i_stride[2] );
    pic->plane[3] = NULL;

    memset( pic->plane[0],  128, i_lines * pic->i_stride[0] );
    memset( pic->plane[1], 128, i_lines / 2 * pic->i_stride[1] );
    memset( pic->plane[2], 128, i_lines / 2 * pic->i_stride[2] );

    return pic;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl $0x40, %edi
callq 0x4160
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movl 0x84(%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, (%rax)
movq -0x8(%rbp), %rax
movl 0x88(%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x4(%rax)
movq -0x8(%rbp), %rax
movl 0x84(%rax), %eax
addl $0xf, %eax
andl $0xfffff0, %eax         # imm = 0xFFFFF0
movl %eax, -0x14(%rbp)
movq -0x8(%rbp), %rax
movl 0x88(%rax), %eax
addl $0xf, %eax
andl $0xfffff0, %eax         # imm = 0xFFFFF0
movl %eax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movl $0x3, 0x8(%rax)
movl -0x14(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0xc(%rax)
movl -0x14(%rbp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x10(%rax)
movl -0x14(%rbp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x14(%rax)
movq -0x10(%rbp), %rax
movl $0x0, 0x18(%rax)
movl -0x18(%rbp), %edi
movq -0x10(%rbp), %rax
imull 0xc(%rax), %edi
callq 0x4160
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x20(%rax)
movl -0x18(%rbp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, %edi
movq -0x10(%rbp), %rax
imull 0x10(%rax), %edi
callq 0x4160
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x28(%rax)
movl -0x18(%rbp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, %edi
movq -0x10(%rbp), %rax
imull 0x14(%rax), %edi
callq 0x4160
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x30(%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0x38(%rax)
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rdi
movl -0x18(%rbp), %eax
movq -0x10(%rbp), %rcx
imull 0xc(%rcx), %eax
movslq %eax, %rdx
movl $0x80, %esi
callq 0x2070
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rdi
movl -0x18(%rbp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movq -0x10(%rbp), %rcx
imull 0x10(%rcx), %eax
movslq %eax, %rdx
movl $0x80, %esi
callq 0x2070
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rdi
movl -0x18(%rbp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movq -0x10(%rbp), %rcx
imull 0x14(%rcx), %eax
movslq %eax, %rdx
movl $0x80, %esi
callq 0x2070
movq -0x10(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)