	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ff_vaapi_decode_init           ## -- Begin function ff_vaapi_decode_init
	.p2align	4, 0x90
_ff_vaapi_decode_init:                  ## @ff_vaapi_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, %r14
	movq	24(%rdi), %rax
	movq	(%rax), %rbx
	movq	_VA_INVALID_ID@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%rbx)
	movq	%rax, 16(%rbx)
	movq	_AV_HWDEVICE_TYPE_VAAPI@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_ff_decode_get_hw_frames_ctx
	testl	%eax, %eax
	js	LBB0_4
## %bb.1:
	movq	8(%r14), %rcx
	movq	(%rcx), %rax
	movq	%rax, 40(%rbx)
	movq	16(%rax), %rdx
	movq	%rdx, 24(%rbx)
	movq	8(%rax), %rdx
	movq	%rdx, 48(%rbx)
	movq	(%rdx), %rdx
	movq	%rdx, 32(%rbx)
	movl	(%rax), %esi
	movq	%r14, %rdi
	movq	%rbx, %rdx
	callq	_vaapi_decode_make_config
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_5
## %bb.2:
	leaq	16(%rbx), %r10
	movq	32(%rbx), %rcx
	movl	(%rcx), %edi
	movl	(%r14), %ecx
	movl	4(%r14), %edx
	movq	_VA_PROGRESSIVE@GOTPCREL(%rip), %rsi
	movl	(%rsi), %r8d
	movq	(%rbx), %rsi
	movq	24(%rbx), %rax
	movl	(%rax), %r11d
	movl	4(%rax), %r9d
	pushq	%r10
	pushq	%r11
	callq	_vaCreateContext
	addq	$16, %rsp
	movq	%rax, %r15
	movq	_VA_STATUS_SUCCESS@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r15
	jne	LBB0_3
## %bb.7:
	movq	_AV_LOG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	(%rbx), %rcx
	movq	16(%rbx), %r8
	leaq	L_.str.1(%rip), %rdx
	xorl	%r15d, %r15d
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_av_log
	jmp	LBB0_6
LBB0_3:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	%r15, %rdi
	callq	_vaErrorStr
	leaq	L_.str(%rip), %rdx
	movq	%r14, %rdi
	movl	%ebx, %esi
	movq	%r15, %rcx
	movq	%rax, %r8
	xorl	%eax, %eax
	callq	_av_log
	movq	_EIO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_AVERROR
LBB0_4:
	movl	%eax, %r15d
LBB0_5:
	movq	%r14, %rdi
	callq	_ff_vaapi_decode_uninit
LBB0_6:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_VA_INVALID_ID,8,3              ## @VA_INVALID_ID
	.comm	_AV_HWDEVICE_TYPE_VAAPI,4,2     ## @AV_HWDEVICE_TYPE_VAAPI
	.comm	_VA_PROGRESSIVE,4,2             ## @VA_PROGRESSIVE
	.comm	_VA_STATUS_SUCCESS,8,3          ## @VA_STATUS_SUCCESS
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to create decode context: %d (%s).\n"

	.comm	_EIO,4,2                        ## @EIO
	.comm	_AV_LOG_DEBUG,4,2               ## @AV_LOG_DEBUG
L_.str.1:                               ## @.str.1
	.asciz	"Decode context initialised: %#x/%#x.\n"

	.comm	_AV_LOG_WARNING,4,2             ## @AV_LOG_WARNING
	.comm	_AV_VAAPI_DRIVER_QUIRK_RENDER_PARAM_BUFFERS,4,2 ## @AV_VAAPI_DRIVER_QUIRK_RENDER_PARAM_BUFFERS
	.comm	_ENOMEM,4,2                     ## @ENOMEM
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ff_vaapi_decode_init           ; -- Begin function ff_vaapi_decode_init
	.p2align	2
_ff_vaapi_decode_init:                  ; @ff_vaapi_decode_init
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x0
	ldr	x8, [x0, #24]
	ldr	x20, [x8]
Lloh0:
	adrp	x8, _VA_INVALID_ID@GOTPAGE
Lloh1:
	ldr	x8, [x8, _VA_INVALID_ID@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [x20]
	mov	x21, x20
	str	x8, [x21, #16]!
Lloh3:
	adrp	x8, _AV_HWDEVICE_TYPE_VAAPI@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AV_HWDEVICE_TYPE_VAAPI@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	bl	_ff_decode_get_hw_frames_ctx
	tbnz	w0, #31, LBB0_5
; %bb.1:
	ldr	x3, [x19, #8]
	ldr	x8, [x3]
	ldp	x10, x9, [x8, #8]
	stp	x8, x10, [x20, #40]
	ldr	x10, [x10]
	stp	x9, x10, [x20, #24]
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x20
	bl	_vaapi_decode_make_config
	mov	x22, x0
	cbnz	w0, LBB0_6
; %bb.2:
	ldp	x9, x8, [x20, #24]
	ldr	w0, [x8]
	ldr	x1, [x20]
	ldp	w3, w2, [x19]
Lloh6:
	adrp	x8, _VA_PROGRESSIVE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _VA_PROGRESSIVE@GOTPAGEOFF]
Lloh8:
	ldr	w4, [x8]
	ldp	w6, w5, [x9]
	mov	x7, x21
	bl	_vaCreateContext
Lloh9:
	adrp	x8, _VA_STATUS_SUCCESS@GOTPAGE
Lloh10:
	ldr	x8, [x8, _VA_STATUS_SUCCESS@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_4
; %bb.3:
Lloh12:
	adrp	x8, _AV_LOG_DEBUG@GOTPAGE
Lloh13:
	ldr	x8, [x8, _AV_LOG_DEBUG@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	ldr	x8, [x20]
	ldr	x9, [x20, #16]
	stp	x8, x9, [sp]
Lloh15:
	adrp	x2, l_.str.1@PAGE
Lloh16:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_av_log
	mov	w22, #0
	b	LBB0_7
LBB0_4:
	mov	x21, x0
Lloh17:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh18:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh19:
	ldr	w20, [x8]
	bl	_vaErrorStr
	stp	x21, x0, [sp]
Lloh20:
	adrp	x2, l_.str@PAGE
Lloh21:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
	mov	x1, x20
	bl	_av_log
Lloh22:
	adrp	x8, _EIO@GOTPAGE
Lloh23:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh24:
	ldr	w0, [x8]
	bl	_AVERROR
LBB0_5:
	mov	x22, x0
LBB0_6:
	mov	x0, x19
	bl	_ff_vaapi_decode_uninit
LBB0_7:
	mov	x0, x22
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_VA_INVALID_ID,8,3              ; @VA_INVALID_ID
	.comm	_AV_HWDEVICE_TYPE_VAAPI,4,2     ; @AV_HWDEVICE_TYPE_VAAPI
	.comm	_VA_PROGRESSIVE,4,2             ; @VA_PROGRESSIVE
	.comm	_VA_STATUS_SUCCESS,8,3          ; @VA_STATUS_SUCCESS
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to create decode context: %d (%s).\n"

	.comm	_EIO,4,2                        ; @EIO
	.comm	_AV_LOG_DEBUG,4,2               ; @AV_LOG_DEBUG
l_.str.1:                               ; @.str.1
	.asciz	"Decode context initialised: %#x/%#x.\n"

	.comm	_AV_LOG_WARNING,4,2             ; @AV_LOG_WARNING
	.comm	_AV_VAAPI_DRIVER_QUIRK_RENDER_PARAM_BUFFERS,4,2 ; @AV_VAAPI_DRIVER_QUIRK_RENDER_PARAM_BUFFERS
	.comm	_ENOMEM,4,2                     ; @ENOMEM
.subsections_via_symbols
