	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function decode_cabac_mb_ref
_decode_cabac_mb_ref:                   ## @decode_cabac_mb_ref
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movslq	%esi, %rax
	movq	(%rdi), %rcx
	movq	8(%rdi), %rsi
	movq	(%rcx,%rax,8), %rdi
	movq	_scan8@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movslq	%edx, %rcx
	movslq	(%rax,%rcx,4), %rax
	movl	-32(%rdi,%rax,4), %ecx
	movl	-4(%rdi,%rax,4), %edx
	movq	_AV_PICTURE_TYPE_B@GOTPCREL(%rip), %rdi
	cmpq	(%rdi), %rsi
	jne	LBB0_6
## %bb.1:
	testl	%edx, %edx
	jle	LBB0_2
## %bb.3:
	movq	16(%r14), %rdx
	movq	_MB_TYPE_DIRECT2@GOTPCREL(%rip), %rsi
	movl	(%rsi), %esi
	sarl	%esi
	xorl	%ebx, %ebx
	testl	%esi, -4(%rdx,%rax,4)
	sete	%bl
	testl	%ecx, %ecx
	jg	LBB0_5
	jmp	LBB0_7
LBB0_6:
	xorl	%eax, %eax
	testl	%edx, %edx
	setg	%al
	leal	2(%rax), %ebx
	testl	%ecx, %ecx
	cmovlel	%eax, %ebx
	jmp	LBB0_7
LBB0_2:
	xorl	%ebx, %ebx
	testl	%ecx, %ecx
	jle	LBB0_7
LBB0_5:
	movq	16(%r14), %rcx
	movq	_MB_TYPE_DIRECT2@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	sarl	%edx
	leal	2(%rbx), %esi
	testl	%edx, -32(%rcx,%rax,4)
	cmovnel	%ebx, %esi
	movl	%esi, %ebx
LBB0_7:
	leaq	32(%r14), %r15
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	leal	54(%rbx), %esi
	shlq	$2, %rsi
	addq	24(%r14), %rsi
	movq	%r15, %rdi
	callq	_get_cabac
	testq	%rax, %rax
	je	LBB0_11
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	incl	%r12d
	sarl	$2, %ebx
	addl	$4, %ebx
	cmpl	$32, %r12d
	jne	LBB0_8
## %bb.10:
	movl	$-1, %r12d
LBB0_11:
	movl	%r12d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_scan8,8,3                      ## @scan8
	.comm	_AV_PICTURE_TYPE_B,8,3          ## @AV_PICTURE_TYPE_B
	.comm	_MB_TYPE_DIRECT2,4,2            ## @MB_TYPE_DIRECT2
	.no_dead_strip	_decode_cabac_mb_ref
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function decode_cabac_mb_ref
_decode_cabac_mb_ref:                   ; @decode_cabac_mb_ref
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x19, x0
	ldp	x8, x10, [x0]
	ldr	x9, [x8, w1, sxtw #3]
Lloh0:
	adrp	x8, _scan8@GOTPAGE
Lloh1:
	ldr	x8, [x8, _scan8@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	ldr	w8, [x8, w2, sxtw #2]
	sub	w11, w8, #1
	ldr	w12, [x9, w11, sxtw #2]
	sub	w8, w8, #8
	ldr	w9, [x9, w8, sxtw #2]
Lloh3:
	adrp	x13, _AV_PICTURE_TYPE_B@GOTPAGE
Lloh4:
	ldr	x13, [x13, _AV_PICTURE_TYPE_B@GOTPAGEOFF]
Lloh5:
	ldr	x13, [x13]
	cmp	x10, x13
	b.ne	LBB0_3
; %bb.1:
Lloh6:
	adrp	x10, _MB_TYPE_DIRECT2@GOTPAGE
Lloh7:
	ldr	x10, [x10, _MB_TYPE_DIRECT2@GOTPAGEOFF]
	cmp	w12, #1
	b.lt	LBB0_4
; %bb.2:
	sxtw	x11, w11
	ldr	x12, [x19, #16]
	ldr	w11, [x12, x11, lsl #2]
	ldr	w12, [x10]
	tst	w11, w12, asr #1
	cset	w22, eq
	cmp	w9, #1
	b.ge	LBB0_5
	b	LBB0_6
LBB0_3:
	cmp	w12, #0
	cset	w8, gt
	orr	w10, w8, #0x2
	cmp	w9, #0
	csel	w22, w10, w8, gt
	b	LBB0_6
LBB0_4:
	mov	w22, #0
	cmp	w9, #1
	b.lt	LBB0_6
LBB0_5:
	sxtw	x8, w8
	ldr	x9, [x19, #16]
	ldr	w8, [x9, x8, lsl #2]
	ldr	w9, [x10]
	orr	w10, w22, #0x2
	tst	w8, w9, asr #1
	csel	w22, w10, w22, eq
LBB0_6:
	mov	w20, #0
	add	x21, x19, #32
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #24]
	add	w9, w22, #54
	add	x1, x8, w9, uxtw #2
	mov	x0, x21
	bl	_get_cabac
	cbz	x0, LBB0_10
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	add	w20, w20, #1
	asr	w8, w22, #2
	add	w22, w8, #4
	cmp	w20, #32
	b.ne	LBB0_7
; %bb.9:
	mov	w20, #-1
LBB0_10:
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_scan8,8,3                      ; @scan8
	.comm	_AV_PICTURE_TYPE_B,8,3          ; @AV_PICTURE_TYPE_B
	.comm	_MB_TYPE_DIRECT2,4,2            ; @MB_TYPE_DIRECT2
	.no_dead_strip	_decode_cabac_mb_ref
.subsections_via_symbols
