	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dxva2_vc1_decode_slice
_dxva2_vc1_decode_slice:                ## @dxva2_vc1_decode_slice
	.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
	movl	%edx, %r14d
	movq	%rdi, %r15
	movq	8(%rdi), %rax
	movq	(%rax), %rax
	movq	(%rax), %rbx
	movq	(%rbx), %rdx
	movq	_MAX_SLICES@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdx
	jge	LBB0_1
## %bb.2:
	movq	%rsi, %r12
	cmpl	$4, %r14d
	jl	LBB0_6
## %bb.3:
	movq	_AV_CODEC_ID_VC1@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	%rax, (%r15)
	jne	LBB0_6
## %bb.4:
	movq	%r12, %rdi
	callq	_AV_RB32
	movl	%eax, %edi
	callq	_IS_MARKER
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	addq	$16, %r12
	addl	$-4, %r14d
LBB0_6:
	movq	24(%rbx), %rax
	testq	%rax, %rax
	jne	LBB0_8
## %bb.7:
	movq	%r12, 24(%rbx)
	movq	%r12, %rax
LBB0_8:
	addl	%r14d, 8(%rbx)
	subq	%rax, %r12
	shrq	$2, %r12
	movq	(%rbx), %rsi
	leaq	1(%rsi), %rax
	movq	%rax, (%rbx)
	shlq	$2, %rsi
	addq	16(%rbx), %rsi
	movq	%r15, %rdi
	movl	%r12d, %edx
	movl	%r14d, %ecx
	callq	_fill_slice
	xorl	%eax, %eax
	jmp	LBB0_9
LBB0_1:
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	callq	_avpriv_request_sample
	movl	$-1, %eax
LBB0_9:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_SLICES,8,3                 ## @MAX_SLICES
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%d slices in dxva2"

	.comm	_AV_CODEC_ID_VC1,8,3            ## @AV_CODEC_ID_VC1
	.no_dead_strip	_dxva2_vc1_decode_slice
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dxva2_vc1_decode_slice
_dxva2_vc1_decode_slice:                ; @dxva2_vc1_decode_slice
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x2
	mov	x20, x0
	ldr	x8, [x0, #8]
	ldr	x8, [x8]
	ldr	x22, [x8]
	ldr	x2, [x22]
Lloh0:
	adrp	x8, _MAX_SLICES@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MAX_SLICES@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x2, x8
	b.ge	LBB0_7
; %bb.1:
	mov	x21, x1
	subs	w23, w19, #4
	b.lt	LBB0_4
; %bb.2:
	ldr	x8, [x20]
Lloh3:
	adrp	x9, _AV_CODEC_ID_VC1@GOTPAGE
Lloh4:
	ldr	x9, [x9, _AV_CODEC_ID_VC1@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.3:
	mov	x0, x21
	bl	_AV_RB32
	bl	_IS_MARKER
	add	x8, x21, #16
	cmp	x0, #0
	csel	x21, x21, x8, eq
	csel	w19, w19, w23, eq
LBB0_4:
	ldr	x8, [x22, #24]
	cbnz	x8, LBB0_6
; %bb.5:
	str	x21, [x22, #24]
	mov	x8, x21
LBB0_6:
	ldr	w9, [x22, #8]
	add	w9, w9, w19
	str	w9, [x22, #8]
	sub	x8, x21, x8
	lsr	x2, x8, #2
	ldr	x8, [x22, #16]
	ldr	x9, [x22]
	add	x10, x9, #1
	str	x10, [x22]
	add	x1, x8, x9, lsl #2
	mov	x0, x20
                                        ; kill: def $w2 killed $w2 killed $x2
	mov	x3, x19
	bl	_fill_slice
	mov	w0, #0
	b	LBB0_8
LBB0_7:
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_avpriv_request_sample
	mov	w0, #-1
LBB0_8:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_SLICES,8,3                 ; @MAX_SLICES
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%d slices in dxva2"

	.comm	_AV_CODEC_ID_VC1,8,3            ; @AV_CODEC_ID_VC1
	.no_dead_strip	_dxva2_vc1_decode_slice
.subsections_via_symbols
