	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dxva2_h264_decode_slice
_dxva2_h264_decode_slice:               ## @dxva2_h264_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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r14d
	movq	%rsi, %r15
	movq	%rdi, %r12
	movq	(%rdi), %rbx
	movq	8(%rbx), %r13
	callq	_DXVA_CONTEXT
	movq	(%rbx), %rcx
	movq	(%rcx), %rbx
	movq	(%rbx), %rdx
	movq	_MAX_SLICES@GOTPCREL(%rip), %rsi
	movl	$-1, %ecx
	cmpq	(%rsi), %rdx
	jae	LBB0_9
## %bb.1:
	movq	32(%rbx), %rcx
	testq	%rcx, %rcx
	jne	LBB0_3
## %bb.2:
	movq	%r15, 32(%rbx)
	movq	%r15, %rcx
LBB0_3:
	addl	%r14d, 40(%rbx)
	subq	%rcx, %r15
	shrq	$2, %r15
	movq	%r12, %rdi
	movq	%rax, %rsi
	callq	_is_slice_short
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	(%rbx), %rdi
	shlq	$2, %rdi
	addq	24(%rbx), %rdi
	movl	%r15d, %esi
	movl	%r14d, %edx
	callq	_fill_slice_short
	jmp	LBB0_6
LBB0_5:
	movq	(%rbx), %rsi
	shlq	$2, %rsi
	addq	16(%rbx), %rsi
	leaq	8(%rbx), %rdx
	movq	%r12, %rdi
	movl	%r15d, %ecx
	movl	%r14d, %r8d
	callq	_fill_slice_long
LBB0_6:
	incq	(%rbx)
	movq	(%r13), %rax
	movq	_AV_PICTURE_TYPE_I@GOTPCREL(%rip), %rdx
	xorl	%ecx, %ecx
	cmpq	(%rdx), %rax
	je	LBB0_9
## %bb.7:
	movq	_AV_PICTURE_TYPE_SI@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rax
	je	LBB0_9
## %bb.8:
	andb	$127, 9(%rbx)
LBB0_9:
	movl	%ecx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_SLICES,8,3                 ## @MAX_SLICES
	.comm	_AV_PICTURE_TYPE_I,8,3          ## @AV_PICTURE_TYPE_I
	.comm	_AV_PICTURE_TYPE_SI,8,3         ## @AV_PICTURE_TYPE_SI
	.no_dead_strip	_dxva2_h264_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_h264_decode_slice
_dxva2_h264_decode_slice:               ; @dxva2_h264_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	x21, x1
	mov	x20, x0
	ldr	x22, [x0]
	ldr	x23, [x22, #8]
	bl	_DXVA_CONTEXT
	ldr	x8, [x22]
	ldr	x22, [x8]
	ldr	x8, [x22]
Lloh0:
	adrp	x9, _MAX_SLICES@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MAX_SLICES@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.hs	LBB0_5
; %bb.1:
	mov	x1, x0
	ldr	x8, [x22, #32]
	cbnz	x8, LBB0_3
; %bb.2:
	str	x21, [x22, #32]
	mov	x8, x21
LBB0_3:
	ldr	w9, [x22, #40]
	add	w9, w9, w19
	str	w9, [x22, #40]
	sub	x8, x21, x8
	lsr	x21, x8, #2
	mov	x0, x20
	bl	_is_slice_short
	cbz	x0, LBB0_6
; %bb.4:
	ldr	x8, [x22, #24]
	ldr	x9, [x22]
	add	x0, x8, x9, lsl #2
	mov	x1, x21
	mov	x2, x19
	bl	_fill_slice_short
	b	LBB0_7
LBB0_5:
	mov	w0, #-1
	b	LBB0_9
LBB0_6:
	ldr	x8, [x22, #16]
	ldr	x9, [x22]
	add	x1, x8, x9, lsl #2
	add	x2, x22, #8
	mov	x0, x20
	mov	x3, x21
	mov	x4, x19
	bl	_fill_slice_long
LBB0_7:
	ldr	x8, [x22]
	add	x8, x8, #1
	str	x8, [x22]
	ldr	x8, [x23]
Lloh3:
	adrp	x9, _AV_PICTURE_TYPE_I@GOTPAGE
Lloh4:
	ldr	x9, [x9, _AV_PICTURE_TYPE_I@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
Lloh6:
	adrp	x10, _AV_PICTURE_TYPE_SI@GOTPAGE
Lloh7:
	ldr	x10, [x10, _AV_PICTURE_TYPE_SI@GOTPAGEOFF]
Lloh8:
	ldr	x10, [x10]
	cmp	x8, x9
	mov	w0, #0
	ccmp	x8, x10, #4, ne
	b.eq	LBB0_9
; %bb.8:
	ldr	w8, [x22, #8]
	and	w8, w8, #0xffff7fff
	str	w8, [x22, #8]
LBB0_9:
	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	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_SLICES,8,3                 ; @MAX_SLICES
	.comm	_AV_PICTURE_TYPE_I,8,3          ; @AV_PICTURE_TYPE_I
	.comm	_AV_PICTURE_TYPE_SI,8,3         ; @AV_PICTURE_TYPE_SI
	.no_dead_strip	_dxva2_h264_decode_slice
.subsections_via_symbols
