	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dxva2_mpeg2_decode_slice
_dxva2_mpeg2_decode_slice:              ## @dxva2_mpeg2_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
	movl	%edx, %r9d
	movq	%rsi, %r8
	movq	(%rdi), %rsi
	movq	(%rsi), %rax
	movq	(%rax), %r11
	movq	(%r11), %rdx
	movq	_MAX_SLICES@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rdx
	jge	LBB0_1
## %bb.2:
	movq	16(%r11), %r10
	testq	%r10, %r10
	jne	LBB0_4
## %bb.3:
	movq	%r8, 16(%r11)
	movq	%r8, %r10
LBB0_4:
	addl	%r9d, 24(%r11)
	movq	%r8, %rcx
	subq	%r10, %rcx
	shrq	$2, %rcx
	leaq	1(%rdx), %rax
	movq	%rax, (%r11)
	shlq	$2, %rdx
	addq	8(%r11), %rdx
                                        ## kill: def $ecx killed $ecx killed $rcx
	callq	_fill_slice
	xorl	%eax, %eax
	popq	%rbp
	retq
LBB0_1:
	leaq	L_.str(%rip), %rsi
	callq	_avpriv_request_sample
	movl	$-1, %eax
	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"

	.no_dead_strip	_dxva2_mpeg2_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_mpeg2_decode_slice
_dxva2_mpeg2_decode_slice:              ; @dxva2_mpeg2_decode_slice
	.cfi_startproc
; %bb.0:
	stp	x29, x30, [sp, #-16]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 16
	mov	x29, sp
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	mov	x5, x2
	mov	x4, x1
	ldr	x1, [x0]
	ldr	x8, [x1]
	ldr	x8, [x8]
	ldr	x2, [x8]
Lloh0:
	adrp	x9, _MAX_SLICES@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MAX_SLICES@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x2, x9
	b.ge	LBB0_4
; %bb.1:
	ldr	x9, [x8, #16]
	cbnz	x9, LBB0_3
; %bb.2:
	str	x4, [x8, #16]
	mov	x9, x4
LBB0_3:
	ldr	w10, [x8, #24]
	add	w10, w10, w5
	str	w10, [x8, #24]
	sub	x9, x4, x9
	lsr	x3, x9, #2
	ldr	x9, [x8, #8]
	add	x10, x2, #1
	str	x10, [x8]
	add	x2, x9, x2, lsl #2
                                        ; kill: def $w3 killed $w3 killed $x3
	bl	_fill_slice
	mov	w0, #0
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
LBB0_4:
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_avpriv_request_sample
	mov	w0, #-1
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_SLICES,8,3                 ; @MAX_SLICES
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%d slices in dxva2"

	.no_dead_strip	_dxva2_mpeg2_decode_slice
.subsections_via_symbols
