	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ff_dxva2_decode_init           ## -- Begin function ff_dxva2_decode_init
	.p2align	4, 0x90
_ff_dxva2_decode_init:                  ## @ff_dxva2_decode_init
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	callq	_DXVA_SHARED_CONTEXT
	xorl	%r14d, %r14d
	cmpq	$0, 16(%rbx)
	je	LBB0_1
LBB0_8:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movq	%rax, %r15
	movq	8(%rbx), %rax
	movq	(%rax), %rax
	movq	_AV_PIX_FMT_DXVA2_VLD@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_2
## %bb.3:
	movq	_AV_HWDEVICE_TYPE_DXVA2@GOTPCREL(%rip), %rcx
	jmp	LBB0_4
LBB0_2:
	movq	_AV_HWDEVICE_TYPE_D3D11VA@GOTPCREL(%rip), %rcx
LBB0_4:
	movl	(%rcx), %esi
	movq	%rax, (%r15)
	movq	%rbx, %rdi
	callq	_ff_decode_get_hw_frames_ctx
	testl	%eax, %eax
	js	LBB0_5
## %bb.6:
	movq	(%rbx), %rax
	movq	(%rax), %rax
	movq	16(%rax), %rcx
	movq	%rcx, 104(%r15)
	movq	(%rax), %rax
	cmpq	(%r15), %rax
	je	LBB0_8
## %bb.7:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	%rbx, %rdi
	callq	_av_log
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_AVERROR
	movl	%eax, %r14d
	movq	%rbx, %rdi
	callq	_ff_dxva2_decode_uninit
	jmp	LBB0_8
LBB0_5:
	movl	%eax, %r14d
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_AV_PIX_FMT_DXVA2_VLD,8,3       ## @AV_PIX_FMT_DXVA2_VLD
	.comm	_AV_HWDEVICE_TYPE_DXVA2,4,2     ## @AV_HWDEVICE_TYPE_DXVA2
	.comm	_AV_HWDEVICE_TYPE_D3D11VA,4,2   ## @AV_HWDEVICE_TYPE_D3D11VA
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Invalid pixfmt for hwaccel!\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_AV_PIX_FMT_D3D11,8,3           ## @AV_PIX_FMT_D3D11
	.comm	_INVALID_HANDLE_VALUE,4,2       ## @INVALID_HANDLE_VALUE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ff_dxva2_decode_init           ; -- Begin function ff_dxva2_decode_init
	.p2align	2
_ff_dxva2_decode_init:                  ; @ff_dxva2_decode_init
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	bl	_DXVA_SHARED_CONTEXT
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_3
LBB0_1:
	mov	w0, #0
LBB0_2:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_3:
	mov	x20, x0
	ldr	x8, [x19, #8]
	ldr	x8, [x8]
Lloh0:
	adrp	x9, _AV_PIX_FMT_DXVA2_VLD@GOTPAGE
Lloh1:
	ldr	x9, [x9, _AV_PIX_FMT_DXVA2_VLD@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
Lloh3:
	adrp	x10, _AV_HWDEVICE_TYPE_DXVA2@GOTPAGE
Lloh4:
	ldr	x10, [x10, _AV_HWDEVICE_TYPE_DXVA2@GOTPAGEOFF]
Lloh5:
	adrp	x11, _AV_HWDEVICE_TYPE_D3D11VA@GOTPAGE
Lloh6:
	ldr	x11, [x11, _AV_HWDEVICE_TYPE_D3D11VA@GOTPAGEOFF]
	cmp	x8, x9
	csel	x9, x10, x11, eq
	ldr	w1, [x9]
	str	x8, [x0]
	mov	x0, x19
	bl	_ff_decode_get_hw_frames_ctx
	tbnz	w0, #31, LBB0_2
; %bb.4:
	ldr	x8, [x19]
	ldr	x8, [x8]
	ldr	x9, [x8, #16]
	str	x9, [x20, #104]
	ldr	x8, [x8]
	ldr	x9, [x20]
	cmp	x8, x9
	b.eq	LBB0_1
; %bb.5:
Lloh7:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh8:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
Lloh10:
	adrp	x2, l_.str@PAGE
Lloh11:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
	bl	_av_log
Lloh12:
	adrp	x8, _EINVAL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
	bl	_AVERROR
	mov	x20, x0
	mov	x0, x19
	bl	_ff_dxva2_decode_uninit
	mov	x0, x20
	b	LBB0_2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_AV_PIX_FMT_DXVA2_VLD,8,3       ; @AV_PIX_FMT_DXVA2_VLD
	.comm	_AV_HWDEVICE_TYPE_DXVA2,4,2     ; @AV_HWDEVICE_TYPE_DXVA2
	.comm	_AV_HWDEVICE_TYPE_D3D11VA,4,2   ; @AV_HWDEVICE_TYPE_D3D11VA
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Invalid pixfmt for hwaccel!\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_AV_PIX_FMT_D3D11,8,3           ; @AV_PIX_FMT_D3D11
	.comm	_INVALID_HANDLE_VALUE,4,2       ; @INVALID_HANDLE_VALUE
.subsections_via_symbols
