// File: /workspace/github_c_makefile_star2_O0/tvlabs[P]edge264/./edge264_slice.c
// Function: parse_residual_block_2x2_cavlc
static noinline void parse_residual_block_2x2_cavlc(Edge264Context *ctx) {
		static const int16_t tokens[8 * 4] = {
			133, 133, 133, 133,
			256, 256, 256, 256,
			394, 394, 394, 394,
			776, 783, 777, 772,
			784, 784, 780, 780,
			910, 910, 909, 909,
			1042, 1042, 1041, 1041,
			915, 915, 915, 915,
		};
		int leadingZeroBits = clz(ctx->t._gb.msb_cache | (size_t)1 << (SIZE_BIT - 8));
		unsigned suffix = ctx->t._gb.msb_cache >> (SIZE_BIT - 3 - leadingZeroBits) & 3;
		int token = tokens[leadingZeroBits * 4 + suffix];
		int coeff_token = token & 127;
		int v = token >> 7;
		ctx->t._gb.msb_cache = shld(ctx->t._gb.lsb_cache, ctx->t._gb.msb_cache, v);
		if (!(ctx->t._gb.lsb_cache <<= v))
			refill(&ctx->t._gb, 0);
		if (coeff_token) {
			log_mb(ctx, "    - {nC: -1, c: [");
			parse_residual_coeffs_cavlc(ctx, 0, 3, coeff_token);
		} else {
			log_mb(ctx, "    - {nC: -1}\n");
		}
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x20(%rbp)
movq -0x20(%rbp), %rcx
movabsq $0x100000000000000, %rax # imm = 0x100000000000000
orq 0x18(%rcx), %rax
lzcntq %rax, %rax
movl %eax, -0x24(%rbp)
movq -0x20(%rbp), %rax
movq 0x18(%rax), %rax
movl $0x3d, %ecx
subl -0x24(%rbp), %ecx
movl %ecx, %ecx
shrq %cl, %rax
andq $0x3, %rax
movl %eax, -0x28(%rbp)
movl -0x24(%rbp), %eax
shll $0x2, %eax
addl -0x28(%rbp), %eax
movl %eax, %eax
movl %eax, %ecx
leaq 0x2f2aa(%rip), %rax     # 0xcf170
movswl (%rax,%rcx,2), %eax
movl %eax, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
andl $0x7f, %eax
movl %eax, -0x30(%rbp)
movl -0x2c(%rbp), %eax
sarl $0x7, %eax
movl %eax, -0x34(%rbp)
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rdx
movq -0x20(%rbp), %rax
movq 0x18(%rax), %rcx
movl -0x34(%rbp), %eax
movq %rdx, -0x8(%rbp)
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
movq -0x10(%rbp), %rax
movq -0x8(%rbp), %rdx
movl -0x14(%rbp), %ecx
shldq %cl, %rdx, %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x18(%rax)
movl -0x34(%rbp), %ecx
movq -0x20(%rbp), %rax
movq %rax, -0x40(%rbp)
movq 0x10(%rax), %rax
movl %ecx, %ecx
shlq %cl, %rax
movq -0x40(%rbp), %rcx
movq %rax, 0x10(%rcx)
cmpq $0x0, %rax
jne 0x9ff49
movq -0x20(%rbp), %rdi
xorl %esi, %esi
callq 0x65d80
cmpl $0x0, -0x30(%rbp)
je 0x9ffcb
movq -0x20(%rbp), %rax
movswq 0x1cd0(%rax), %rax
cmpq $0x1000, %rax           # imm = 0x1000
jae 0x9ffb6
movq -0x20(%rbp), %rdi
addq $0x1cd2, %rdi           # imm = 0x1CD2
movq -0x20(%rbp), %rax
movswl 0x1cd0(%rax), %eax
cltq
addq %rax, %rdi
movq -0x20(%rbp), %rax
movswq 0x1cd0(%rax), %rax
movl $0x1000, %esi           # imm = 0x1000
subq %rax, %rsi
leaq 0x30a73(%rip), %rdx     # 0xd0a0c
movb $0x0, %al
callq 0x7070
movl %eax, %edx
movq -0x20(%rbp), %rax
movswl 0x1cd0(%rax), %ecx
addl %edx, %ecx
movw %cx, 0x1cd0(%rax)
movq -0x20(%rbp), %rdi
movl -0x30(%rbp), %ecx
xorl %esi, %esi
movl $0x3, %edx
callq 0x9f6f0
jmp 0xa0034
movq -0x20(%rbp), %rax
movswq 0x1cd0(%rax), %rax
cmpq $0x1000, %rax           # imm = 0x1000
jae 0xa0032
movq -0x20(%rbp), %rdi
addq $0x1cd2, %rdi           # imm = 0x1CD2
movq -0x20(%rbp), %rax
movswl 0x1cd0(%rax), %eax
cltq
addq %rax, %rdi
movq -0x20(%rbp), %rax
movswq 0x1cd0(%rax), %rax
movl $0x1000, %esi           # imm = 0x1000
subq %rax, %rsi
leaq 0x30a0b(%rip), %rdx     # 0xd0a20
movb $0x0, %al
callq 0x7070
movl %eax, %edx
movq -0x20(%rbp), %rax
movswl 0x1cd0(%rax), %ecx
addl %edx, %ecx
movw %cx, 0x1cd0(%rax)
jmp 0xa0034
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)