	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vaapi_device_init
_vaapi_device_init:                     ## @vaapi_device_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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	(%rdi), %r15
	movq	8(%rdi), %rax
	movq	(%rax), %r12
	movl	4(%r15), %edi
	callq	_vaMaxNumImageFormats
	movl	%eax, -44(%rbp)
	testl	%eax, %eax
	jle	LBB0_1
## %bb.4:
	shll	$2, %eax
	movl	%eax, %edi
	callq	_av_malloc
	testq	%rax, %rax
	je	LBB0_5
## %bb.6:
	movq	%rax, %rbx
	movl	4(%r15), %edi
	leaq	-44(%rbp), %rdx
	movq	%rax, %rsi
	callq	_vaQueryImageFormats
	movq	_VA_STATUS_SUCCESS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_7
## %bb.9:
	movl	-44(%rbp), %edi
	shll	$3, %edi
	callq	_av_malloc
	movq	%rax, 8(%r12)
	testq	%rax, %rax
	je	LBB0_10
## %bb.11:
	movq	%r15, -72(%rbp)                 ## 8-byte Spill
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	movq	$0, (%r12)
	cmpl	$0, -44(%rbp)
	jle	LBB0_17
## %bb.12:
	xorl	%r15d, %r15d
	movq	%r12, -64(%rbp)                 ## 8-byte Spill
	jmp	LBB0_13
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_13 Depth=1
	movl	%r13d, %edi
	callq	_av_get_pix_fmt_name
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	%r14d, %esi
	leaq	L_.str.1(%rip), %rdx
	movl	%r12d, %ecx
	movl	%eax, %r8d
	xorl	%eax, %eax
	callq	_av_log
	movq	-64(%rbp), %r12                 ## 8-byte Reload
	movq	(%r12), %rax
	movq	8(%r12), %rcx
	movl	%r13d, (%rcx,%rax,8)
	movl	(%rbx,%r15,4), %edx
	movl	%edx, 4(%rcx,%rax,8)
	incq	%rax
	movq	%rax, (%r12)
LBB0_16:                                ##   in Loop: Header=BB0_13 Depth=1
	incq	%r15
	movslq	-44(%rbp), %rax
	cmpq	%rax, %r15
	jge	LBB0_17
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	movl	(%rbx,%r15,4), %r12d
	movl	%r12d, %edi
	callq	_vaapi_pix_fmt_from_fourcc
	movl	%eax, %r13d
	movq	_AV_LOG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	_AV_PIX_FMT_NONE@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r13d
	jne	LBB0_15
## %bb.14:                              ##   in Loop: Header=BB0_13 Depth=1
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	%r14d, %esi
	leaq	L_.str(%rip), %rdx
	movl	%r12d, %ecx
	xorl	%eax, %eax
	callq	_av_log
	jmp	LBB0_16
LBB0_1:
	movq	_EIO@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_5:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_2:
	movl	(%rax), %edi
	callq	_AVERROR
	movl	%eax, %r14d
	xorl	%ebx, %ebx
	jmp	LBB0_3
LBB0_7:
	movq	_EIO@GOTPCREL(%rip), %rax
	jmp	LBB0_8
LBB0_17:
	movq	-72(%rbp), %r14                 ## 8-byte Reload
	movl	4(%r14), %edi
	callq	_vaQueryVendorString
	testq	%rax, %rax
	je	LBB0_18
## %bb.20:
	movq	%rax, %r12
	movq	_AV_LOG_VERBOSE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.2(%rip), %rdx
	xorl	%r15d, %r15d
	movq	-56(%rbp), %r13                 ## 8-byte Reload
	movq	%r13, %rdi
	movq	%r12, %rcx
	xorl	%eax, %eax
	callq	_av_log
	movl	(%r14), %ecx
	movq	_AV_VAAPI_DRIVER_QUIRK_USER_SET@GOTPCREL(%rip), %rax
	testl	%ecx, (%rax)
	jne	LBB0_21
## %bb.22:
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	movl	$0, (%r14)
	movq	_vaapi_driver_quirks_table@GOTPCREL(%rip), %r13
	movq	(%r13), %rdi
	callq	_FF_ARRAY_ELEMS
	testl	%eax, %eax
	movq	_AV_LOG_VERBOSE@GOTPCREL(%rip), %r14
	jle	LBB0_27
## %bb.23:
	xorl	%ebx, %ebx
	xorl	%r15d, %r15d
	.p2align	4, 0x90
LBB0_24:                                ## =>This Inner Loop Header: Depth=1
	movq	(%r13), %rax
	movl	8(%rax,%rbx), %esi
	movq	%r12, %rdi
	callq	_strstr
	testq	%rax, %rax
	jne	LBB0_25
## %bb.26:                              ##   in Loop: Header=BB0_24 Depth=1
	incq	%r15
	movq	(%r13), %rdi
	callq	_FF_ARRAY_ELEMS
	cltq
	addq	$12, %rbx
	cmpq	%rax, %r15
	jl	LBB0_24
	jmp	LBB0_27
LBB0_10:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_8:
	movl	(%rax), %edi
	callq	_AVERROR
	movl	%eax, %r14d
LBB0_3:
	addq	$8, %r12
	movq	%r12, %rdi
	callq	_av_freep
	movq	%rbx, %rdi
	callq	_av_free
LBB0_31:
	movl	%r14d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_18:
	movl	(%r14), %ecx
	movq	_AV_VAAPI_DRIVER_QUIRK_USER_SET@GOTPCREL(%rip), %rax
	testl	%ecx, (%rax)
	movq	-56(%rbp), %r13                 ## 8-byte Reload
	je	LBB0_19
LBB0_21:
	movq	_AV_LOG_VERBOSE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.3(%rip), %rdx
	movq	%r13, %rdi
	xorl	%eax, %eax
	callq	_av_log
	jmp	LBB0_30
LBB0_19:
	movl	$0, (%r14)
	movq	_AV_LOG_VERBOSE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.6(%rip), %rdx
	movq	%r13, %rdi
	jmp	LBB0_29
LBB0_25:
	movl	(%r14), %esi
	movq	(%r13), %rax
	movl	(%rax,%rbx), %r8d
	movl	4(%rax,%rbx), %ecx
	leaq	L_.str.4(%rip), %rdx
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	xorl	%eax, %eax
	callq	_av_log
	movq	(%r13), %rax
	movl	(%rax,%rbx), %eax
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	orl	%eax, (%rcx)
LBB0_27:
	movq	(%r13), %rdi
	callq	_FF_ARRAY_ELEMS
	cmpl	%eax, %r15d
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	jl	LBB0_30
## %bb.28:
	movl	(%r14), %esi
	leaq	L_.str.5(%rip), %rdx
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
LBB0_29:
	xorl	%eax, %eax
	callq	_av_log
LBB0_30:
	movq	%rbx, %rdi
	callq	_av_free
	xorl	%r14d, %r14d
	jmp	LBB0_31
	.cfi_endproc
                                        ## -- End function
	.comm	_EIO,4,2                        ## @EIO
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_VA_STATUS_SUCCESS,8,3          ## @VA_STATUS_SUCCESS
	.comm	_AV_PIX_FMT_NONE,4,2            ## @AV_PIX_FMT_NONE
	.comm	_AV_LOG_DEBUG,4,2               ## @AV_LOG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Format %#x -> unknown.\n"

L_.str.1:                               ## @.str.1
	.asciz	"Format %#x -> %s.\n"

	.comm	_AV_LOG_VERBOSE,4,2             ## @AV_LOG_VERBOSE
L_.str.2:                               ## @.str.2
	.asciz	"VAAPI driver: %s.\n"

	.comm	_AV_VAAPI_DRIVER_QUIRK_USER_SET,4,2 ## @AV_VAAPI_DRIVER_QUIRK_USER_SET
L_.str.3:                               ## @.str.3
	.asciz	"Using quirks set by user (%#x).\n"

	.comm	_vaapi_driver_quirks_table,8,3  ## @vaapi_driver_quirks_table
L_.str.4:                               ## @.str.4
	.asciz	"Matched driver string as known nonstandard driver \"%s\", setting quirks (%#x).\n"

L_.str.5:                               ## @.str.5
	.asciz	"Driver not found in known nonstandard list, using standard behaviour.\n"

L_.str.6:                               ## @.str.6
	.asciz	"Driver has no vendor string, assuming standard behaviour.\n"

	.no_dead_strip	_vaapi_device_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vaapi_device_init
_vaapi_device_init:                     ; @vaapi_device_init
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x20, x0
	ldp	x26, x8, [x0]
	ldr	x27, [x8]
	ldr	w0, [x26, #4]
	bl	_vaMaxNumImageFormats
	str	w0, [sp, #28]
	cmp	w0, #0
	b.le	LBB0_10
; %bb.1:
	lsl	w0, w0, #2
	bl	_av_malloc
	mov	x19, x0
	cbz	x0, LBB0_11
; %bb.2:
	ldr	w0, [x26, #4]
	add	x2, sp, #28
	mov	x1, x19
	bl	_vaQueryImageFormats
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_12
; %bb.3:
	ldr	w8, [sp, #28]
	lsl	w0, w8, #3
	bl	_av_malloc
	str	x0, [x27, #8]
	cbz	x0, LBB0_11
; %bb.4:
	str	xzr, [x27]
	ldr	w8, [sp, #28]
	cmp	w8, #1
	b.lt	LBB0_16
; %bb.5:
	mov	x28, #0
Lloh3:
	adrp	x21, _AV_PIX_FMT_NONE@GOTPAGE
Lloh4:
	ldr	x21, [x21, _AV_PIX_FMT_NONE@GOTPAGEOFF]
Lloh5:
	adrp	x22, _AV_LOG_DEBUG@GOTPAGE
Lloh6:
	ldr	x22, [x22, _AV_LOG_DEBUG@GOTPAGEOFF]
	b	LBB0_8
LBB0_6:                                 ;   in Loop: Header=BB0_8 Depth=1
	mov	x23, x0
	bl	_av_get_pix_fmt_name
                                        ; kill: def $w0 killed $w0 def $x0
                                        ; kill: def $w25 killed $w25 killed $x25 def $x25
	stp	x25, x0, [sp]
	mov	x0, x20
	mov	x1, x24
Lloh7:
	adrp	x2, l_.str.1@PAGE
Lloh8:
	add	x2, x2, l_.str.1@PAGEOFF
	bl	_av_log
	ldp	x9, x8, [x27]
	add	x8, x8, x9, lsl #3
	str	w23, [x8]
	ldr	w10, [x19, x28, lsl #2]
	str	w10, [x8, #4]
	add	x8, x9, #1
	str	x8, [x27]
LBB0_7:                                 ;   in Loop: Header=BB0_8 Depth=1
	add	x28, x28, #1
	ldrsw	x8, [sp, #28]
	cmp	x28, x8
	b.ge	LBB0_16
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w25, [x19, x28, lsl #2]
	mov	x0, x25
	bl	_vaapi_pix_fmt_from_fourcc
	ldr	w8, [x21]
	ldr	w24, [x22]
	cmp	w0, w8
	b.ne	LBB0_6
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	str	x25, [sp]
	mov	x0, x20
	mov	x1, x24
Lloh9:
	adrp	x2, l_.str@PAGE
Lloh10:
	add	x2, x2, l_.str@PAGEOFF
	bl	_av_log
	b	LBB0_7
LBB0_10:
Lloh11:
	adrp	x8, _EIO@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
	bl	_AVERROR
	mov	x20, x0
	mov	x19, #0
	b	LBB0_14
LBB0_11:
Lloh14:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_13
LBB0_12:
Lloh16:
	adrp	x8, _EIO@GOTPAGE
Lloh17:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
LBB0_13:
	ldr	w0, [x8]
	bl	_AVERROR
	mov	x20, x0
LBB0_14:
	add	x0, x27, #8
	bl	_av_freep
	mov	x0, x19
	bl	_av_free
LBB0_15:
	mov	x0, x20
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_16:
	ldr	w0, [x26, #4]
	bl	_vaQueryVendorString
Lloh18:
	adrp	x22, _AV_LOG_VERBOSE@GOTPAGE
Lloh19:
	ldr	x22, [x22, _AV_LOG_VERBOSE@GOTPAGEOFF]
	cbz	x0, LBB0_22
; %bb.17:
	mov	x21, x0
	ldr	w1, [x22]
	str	x0, [sp]
Lloh20:
	adrp	x2, l_.str.2@PAGE
Lloh21:
	add	x2, x2, l_.str.2@PAGEOFF
	mov	x0, x20
	bl	_av_log
	ldr	w8, [x26]
Lloh22:
	adrp	x9, _AV_VAAPI_DRIVER_QUIRK_USER_SET@GOTPAGE
Lloh23:
	ldr	x9, [x9, _AV_VAAPI_DRIVER_QUIRK_USER_SET@GOTPAGEOFF]
Lloh24:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_23
; %bb.18:
	str	wzr, [x26]
Lloh25:
	adrp	x23, _vaapi_driver_quirks_table@GOTPAGE
Lloh26:
	ldr	x23, [x23, _vaapi_driver_quirks_table@GOTPAGEOFF]
	ldr	x0, [x23]
	bl	_FF_ARRAY_ELEMS
	cmp	w0, #1
	b.lt	LBB0_27
; %bb.19:
	mov	x25, #0
	mov	x24, #0
LBB0_20:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x23]
	add	x8, x8, x25
	ldr	w1, [x8, #8]
	mov	x0, x21
	bl	_strstr
	cbnz	x0, LBB0_28
; %bb.21:                               ;   in Loop: Header=BB0_20 Depth=1
	add	x24, x24, #1
	ldr	x0, [x23]
	bl	_FF_ARRAY_ELEMS
	add	x25, x25, #12
	cmp	x24, w0, sxtw
	b.lt	LBB0_20
	b	LBB0_29
LBB0_22:
	ldr	w8, [x26]
Lloh27:
	adrp	x9, _AV_VAAPI_DRIVER_QUIRK_USER_SET@GOTPAGE
Lloh28:
	ldr	x9, [x9, _AV_VAAPI_DRIVER_QUIRK_USER_SET@GOTPAGEOFF]
Lloh29:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_26
LBB0_23:
	ldr	w1, [x22]
	str	x8, [sp]
Lloh30:
	adrp	x2, l_.str.3@PAGE
Lloh31:
	add	x2, x2, l_.str.3@PAGEOFF
LBB0_24:
	mov	x0, x20
	bl	_av_log
LBB0_25:
	mov	x0, x19
	bl	_av_free
	mov	w20, #0
	b	LBB0_15
LBB0_26:
	str	wzr, [x26]
	ldr	w1, [x22]
Lloh32:
	adrp	x2, l_.str.6@PAGE
Lloh33:
	add	x2, x2, l_.str.6@PAGEOFF
	b	LBB0_24
LBB0_27:
	mov	w24, #0
	b	LBB0_29
LBB0_28:
	ldr	w1, [x22]
	ldr	x8, [x23]
	add	x8, x8, x25
	ldp	w8, w9, [x8]
	stp	x9, x8, [sp]
Lloh34:
	adrp	x2, l_.str.4@PAGE
Lloh35:
	add	x2, x2, l_.str.4@PAGEOFF
	mov	x0, x20
	bl	_av_log
	ldr	x8, [x23]
	ldr	w8, [x8, x25]
	ldr	w9, [x26]
	orr	w8, w9, w8
	str	w8, [x26]
LBB0_29:
	ldr	x0, [x23]
	bl	_FF_ARRAY_ELEMS
	cmp	w24, w0
	b.lt	LBB0_25
; %bb.30:
	ldr	w1, [x22]
Lloh36:
	adrp	x2, l_.str.5@PAGE
Lloh37:
	add	x2, x2, l_.str.5@PAGEOFF
	b	LBB0_24
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpAdd	Lloh36, Lloh37
	.cfi_endproc
                                        ; -- End function
	.comm	_EIO,4,2                        ; @EIO
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_VA_STATUS_SUCCESS,8,3          ; @VA_STATUS_SUCCESS
	.comm	_AV_PIX_FMT_NONE,4,2            ; @AV_PIX_FMT_NONE
	.comm	_AV_LOG_DEBUG,4,2               ; @AV_LOG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Format %#x -> unknown.\n"

l_.str.1:                               ; @.str.1
	.asciz	"Format %#x -> %s.\n"

	.comm	_AV_LOG_VERBOSE,4,2             ; @AV_LOG_VERBOSE
l_.str.2:                               ; @.str.2
	.asciz	"VAAPI driver: %s.\n"

	.comm	_AV_VAAPI_DRIVER_QUIRK_USER_SET,4,2 ; @AV_VAAPI_DRIVER_QUIRK_USER_SET
l_.str.3:                               ; @.str.3
	.asciz	"Using quirks set by user (%#x).\n"

	.comm	_vaapi_driver_quirks_table,8,3  ; @vaapi_driver_quirks_table
l_.str.4:                               ; @.str.4
	.asciz	"Matched driver string as known nonstandard driver \"%s\", setting quirks (%#x).\n"

l_.str.5:                               ; @.str.5
	.asciz	"Driver not found in known nonstandard list, using standard behaviour.\n"

l_.str.6:                               ; @.str.6
	.asciz	"Driver has no vendor string, assuming standard behaviour.\n"

	.no_dead_strip	_vaapi_device_init
.subsections_via_symbols
