// File: /workspace/github_c_makefile_star2_O0/akumrao[P]videoAnalyzer/encoder/macroblock.c
// Function: x264_cabac_mb_cbp_luma(x264_t*, x264_macroblock_t*)
static void x264_cabac_mb_cbp_luma(x264_t *h, x264_macroblock_t *mb) {LOG_CALL;
    int idx;
    x264_macroblock_t *mba;
    x264_macroblock_t *mbb;

    for (idx = 0; idx < 16; idx += 4)
    {
        int i_ctxIdxInc;
        int i8x8a, i8x8b;
        int x, y;

        mba = mb->context->block[idx].mba;
        mbb = mb->context->block[idx].mbb;

        x = block_idx_x[idx];
        y = block_idx_y[idx];

        i8x8a = block_idx_xy[(x - 1)&0x03][y] / 4;
        i8x8b = block_idx_xy[x][(y - 1)&0x03] / 4;

        i_ctxIdxInc = 0;
        if (mba != NULL && mba->i_type != I_PCM &&
                (IS_SKIP(mba->i_type) || ((mba->i_cbp_luma >> i8x8a)&0x01) == 0))
        {
            i_ctxIdxInc++;
        }
        if (mbb != NULL && mbb->i_type != I_PCM &&
                (IS_SKIP(mbb->i_type) || ((mbb->i_cbp_luma >> i8x8b)&0x01) == 0))
        {
            i_ctxIdxInc += 2;
        }
        x264_cabac_encode_decision(&h->cabac, 73 + i_ctxIdxInc, (mb->i_cbp_luma >> (idx / 4))&0x01);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq 0x9629(%rip), %rdi      # 0x28eb0
leaq 0x10246(%rip), %rsi     # 0x2fad4
leaq 0x10824(%rip), %rdx     # 0x300b9
movb $0x0, %al
callq 0x4d20
movl $0x0, -0x14(%rbp)
cmpl $0x10, -0x14(%rbp)
jge 0x1fa43
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
addq $0x4e8, %rax            # imm = 0x4E8
movslq -0x14(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
addq $0x4e8, %rax            # imm = 0x4E8
movslq -0x14(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
movq %rax, -0x28(%rbp)
movslq -0x14(%rbp), %rcx
leaq 0xdd67(%rip), %rax      # 0x2d660
movzbl (%rax,%rcx), %eax
movl %eax, -0x38(%rbp)
movslq -0x14(%rbp), %rcx
leaq 0xdd65(%rip), %rax      # 0x2d670
movzbl (%rax,%rcx), %eax
movl %eax, -0x3c(%rbp)
movl -0x38(%rbp), %eax
subl $0x1, %eax
andl $0x3, %eax
movslq %eax, %rcx
leaq 0x1014b(%rip), %rax     # 0x2fa70
shlq $0x2, %rcx
addq %rcx, %rax
movslq -0x3c(%rbp), %rcx
movzbl (%rax,%rcx), %eax
movl $0x4, %ecx
cltd
idivl %ecx
movl %eax, -0x30(%rbp)
movslq -0x38(%rbp), %rcx
leaq 0x10126(%rip), %rax     # 0x2fa70
shlq $0x2, %rcx
addq %rcx, %rax
movl -0x3c(%rbp), %ecx
subl $0x1, %ecx
andl $0x3, %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %eax
movl $0x4, %ecx
cltd
idivl %ecx
movl %eax, -0x34(%rbp)
movl $0x0, -0x2c(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x1f9b8
movq -0x20(%rbp), %rax
cmpl $0x2, 0x18(%rax)
je 0x1f9b8
movq -0x20(%rbp), %rax
cmpl $0x5, 0x18(%rax)
je 0x1f9af
movq -0x20(%rbp), %rax
cmpl $0x11, 0x18(%rax)
je 0x1f9af
movq -0x20(%rbp), %rax
movl 0x2b8(%rax), %eax
movl -0x30(%rbp), %ecx
sarl %cl, %eax
andl $0x1, %eax
cmpl $0x0, %eax
jne 0x1f9b8
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x1f9fd
movq -0x28(%rbp), %rax
cmpl $0x2, 0x18(%rax)
je 0x1f9fd
movq -0x28(%rbp), %rax
cmpl $0x5, 0x18(%rax)
je 0x1f9f4
movq -0x28(%rbp), %rax
cmpl $0x11, 0x18(%rax)
je 0x1f9f4
movq -0x28(%rbp), %rax
movl 0x2b8(%rax), %eax
movl -0x34(%rbp), %ecx
sarl %cl, %eax
andl $0x1, %eax
cmpl $0x0, %eax
jne 0x1f9fd
movl -0x2c(%rbp), %eax
addl $0x2, %eax
movl %eax, -0x2c(%rbp)
movq -0x8(%rbp), %rdi
addq $0x10db60, %rdi         # imm = 0x10DB60
movl -0x2c(%rbp), %esi
addl $0x49, %esi
movq -0x10(%rbp), %rax
movl 0x2b8(%rax), %eax
movl %eax, -0x40(%rbp)
movl -0x14(%rbp), %eax
movl $0x4, %ecx
cltd
idivl %ecx
movl -0x40(%rbp), %edx
movl %eax, %ecx
sarl %cl, %edx
andl $0x1, %edx
callq 0x3970
movl -0x14(%rbp), %eax
addl $0x4, %eax
movl %eax, -0x14(%rbp)
jmp 0x1f8a3
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)