	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vaapi_device_connect
_vaapi_device_connect:                  ## @vaapi_device_connect
	.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
	movl	%esi, %eax
	movq	%rdi, %r14
	movq	(%rdi), %rcx
	movl	%esi, (%rcx)
	leaq	-32(%rbp), %rsi
	leaq	-28(%rbp), %rdx
	movl	%eax, %edi
	callq	_vaInitialize
	movq	%rax, %rbx
	movq	_VA_STATUS_SUCCESS@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rbx
	jne	LBB0_1
## %bb.2:
	movq	_AV_LOG_VERBOSE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	-32(%rbp), %ecx
	movl	-28(%rbp), %r8d
	leaq	L_.str.1(%rip), %rdx
	movq	%r14, %rdi
	callq	_av_log
	xorl	%eax, %eax
	jmp	LBB0_3
LBB0_1:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	%rbx, %rdi
	callq	_vaErrorStr
	leaq	L_.str(%rip), %rdx
	movq	%r14, %rdi
	movl	%r15d, %esi
	movl	%ebx, %ecx
	movl	%eax, %r8d
	callq	_av_log
	movq	_EIO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_AVERROR
LBB0_3:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.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 initialise VAAPI connection: %d (%s).\n"

	.comm	_EIO,4,2                        ## @EIO
	.comm	_AV_LOG_VERBOSE,4,2             ## @AV_LOG_VERBOSE
L_.str.1:                               ## @.str.1
	.asciz	"Initialised VAAPI connection: version %d.%d\n"

	.comm	_vaapi_device_log_error,4,2     ## @vaapi_device_log_error
	.comm	_vaapi_device_log_info,4,2      ## @vaapi_device_log_info
	.no_dead_strip	_vaapi_device_connect
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vaapi_device_connect
_vaapi_device_connect:                  ; @vaapi_device_connect
	.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	x8, x1
	mov	x19, x0
	ldr	x9, [x0]
	str	w1, [x9]
	add	x1, sp, #12
	add	x2, sp, #8
	mov	x0, x8
	bl	_vaInitialize
Lloh0:
	adrp	x8, _VA_STATUS_SUCCESS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _VA_STATUS_SUCCESS@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _AV_LOG_VERBOSE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AV_LOG_VERBOSE@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	ldp	w4, w3, [sp, #8]
Lloh6:
	adrp	x2, l_.str.1@PAGE
Lloh7:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_av_log
	mov	w0, #0
	b	LBB0_3
LBB0_2:
	mov	x20, x0
Lloh8:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh9:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh10:
	ldr	w21, [x8]
	bl	_vaErrorStr
	mov	x4, x0
Lloh11:
	adrp	x2, l_.str@PAGE
Lloh12:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
	mov	x1, x21
	mov	x3, x20
	bl	_av_log
Lloh13:
	adrp	x8, _EIO@GOTPAGE
Lloh14:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh15:
	ldr	w0, [x8]
	bl	_AVERROR
LBB0_3:
	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	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.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 initialise VAAPI connection: %d (%s).\n"

	.comm	_EIO,4,2                        ; @EIO
	.comm	_AV_LOG_VERBOSE,4,2             ; @AV_LOG_VERBOSE
l_.str.1:                               ; @.str.1
	.asciz	"Initialised VAAPI connection: version %d.%d\n"

	.comm	_vaapi_device_log_error,4,2     ; @vaapi_device_log_error
	.comm	_vaapi_device_log_info,4,2      ; @vaapi_device_log_info
	.no_dead_strip	_vaapi_device_connect
.subsections_via_symbols
