	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function qsv_device_create
_qsv_device_create:                     ## @qsv_device_create
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %rbx
	movq	%rsi, %r13
	movq	%rdi, %r15
	movl	$8, %edi
	callq	_av_mallocz
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	movq	%rax, %r14
	movq	%rax, 8(%r15)
	movq	_qsv_device_free@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r15)
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_av_dict_get
	movq	%rax, %r12
	movq	$0, -48(%rbp)
	movq	_CONFIG_VAAPI@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_5
## %bb.4:
	movq	%r13, -56(%rbp)                 ## 8-byte Spill
	movq	_AV_HWDEVICE_TYPE_VAAPI@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	leaq	L_.str.1(%rip), %rsi
	leaq	L_.str.2(%rip), %rdx
	leaq	-48(%rbp), %rbx
	movq	%rbx, %rdi
	xorl	%ecx, %ecx
	callq	_av_dict_set
	leaq	L_.str.3(%rip), %rsi
	leaq	L_.str.4(%rip), %rdx
	movq	%rbx, %rdi
	xorl	%ecx, %ecx
	callq	_av_dict_set
	testq	%r12, %r12
	je	LBB0_8
LBB0_9:
	movq	(%r12), %rdx
	jmp	LBB0_10
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_5:
	movq	_CONFIG_DXVA2@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_13
## %bb.6:
	movq	%r13, -56(%rbp)                 ## 8-byte Spill
	movq	_AV_HWDEVICE_TYPE_DXVA2@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	testq	%r12, %r12
	jne	LBB0_9
LBB0_8:
	xorl	%edx, %edx
LBB0_10:
	movq	-48(%rbp), %rcx
	movq	%r14, %rdi
	movl	%r13d, %esi
	xorl	%r8d, %r8d
	callq	_av_hwdevice_ctx_create
	movl	%eax, %ebx
	leaq	-48(%rbp), %rdi
	callq	_av_dict_free
	testl	%ebx, %ebx
	js	LBB0_12
## %bb.11:
	movq	(%r14), %rax
	movq	(%rax), %rbx
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_choose_implementation
	movq	%r15, %rdi
	movl	%eax, %esi
	movq	%rbx, %rdx
	xorl	%ecx, %ecx
	callq	_qsv_device_derive_from_child
	movl	%eax, %ebx
LBB0_12:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_13:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.5(%rip), %rdx
	movq	%r15, %rdi
	callq	_av_log
	movq	_ENOSYS@GOTPCREL(%rip), %rax
LBB0_2:
	movl	(%rax), %edi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_AVERROR                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_qsv_device_free,4,2            ## @qsv_device_free
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"child_device"

	.comm	_CONFIG_VAAPI,8,3               ## @CONFIG_VAAPI
	.comm	_AV_HWDEVICE_TYPE_VAAPI,4,2     ## @AV_HWDEVICE_TYPE_VAAPI
L_.str.1:                               ## @.str.1
	.asciz	"kernel_driver"

L_.str.2:                               ## @.str.2
	.asciz	"i915"

L_.str.3:                               ## @.str.3
	.asciz	"driver"

L_.str.4:                               ## @.str.4
	.asciz	"iHD"

	.comm	_CONFIG_DXVA2,8,3               ## @CONFIG_DXVA2
	.comm	_AV_HWDEVICE_TYPE_DXVA2,4,2     ## @AV_HWDEVICE_TYPE_DXVA2
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
L_.str.5:                               ## @.str.5
	.asciz	"No supported child device type is enabled\n"

	.comm	_ENOSYS,4,2                     ## @ENOSYS
	.no_dead_strip	_qsv_device_create
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function qsv_device_create
_qsv_device_create:                     ; @qsv_device_create
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x22, x2
	mov	x20, x1
	mov	x19, x0
	mov	w0, #8
	bl	_av_mallocz
	cbz	x0, LBB0_4
; %bb.1:
	mov	x21, x0
	str	x0, [x19, #8]
Lloh0:
	adrp	x8, _qsv_device_free@GOTPAGE
Lloh1:
	ldr	x8, [x8, _qsv_device_free@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [x19]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x22
	mov	x2, #0
	mov	w3, #0
	bl	_av_dict_get
	mov	x22, x0
	str	xzr, [sp, #8]
Lloh5:
	adrp	x8, _CONFIG_VAAPI@GOTPAGE
Lloh6:
	ldr	x8, [x8, _CONFIG_VAAPI@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
	cbz	x8, LBB0_5
; %bb.2:
Lloh8:
	adrp	x8, _AV_HWDEVICE_TYPE_VAAPI@GOTPAGE
Lloh9:
	ldr	x8, [x8, _AV_HWDEVICE_TYPE_VAAPI@GOTPAGEOFF]
Lloh10:
	ldr	w23, [x8]
Lloh11:
	adrp	x1, l_.str.1@PAGE
Lloh12:
	add	x1, x1, l_.str.1@PAGEOFF
Lloh13:
	adrp	x2, l_.str.2@PAGE
Lloh14:
	add	x2, x2, l_.str.2@PAGEOFF
	add	x0, sp, #8
	mov	w3, #0
	bl	_av_dict_set
Lloh15:
	adrp	x1, l_.str.3@PAGE
Lloh16:
	add	x1, x1, l_.str.3@PAGEOFF
Lloh17:
	adrp	x2, l_.str.4@PAGE
Lloh18:
	add	x2, x2, l_.str.4@PAGEOFF
	add	x0, sp, #8
	mov	w3, #0
	bl	_av_dict_set
	cbz	x22, LBB0_7
LBB0_3:
	ldr	x2, [x22]
	b	LBB0_8
LBB0_4:
Lloh19:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh20:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_12
LBB0_5:
Lloh21:
	adrp	x8, _CONFIG_DXVA2@GOTPAGE
Lloh22:
	ldr	x8, [x8, _CONFIG_DXVA2@GOTPAGEOFF]
Lloh23:
	ldr	x8, [x8]
	cbz	x8, LBB0_11
; %bb.6:
Lloh24:
	adrp	x8, _AV_HWDEVICE_TYPE_DXVA2@GOTPAGE
Lloh25:
	ldr	x8, [x8, _AV_HWDEVICE_TYPE_DXVA2@GOTPAGEOFF]
Lloh26:
	ldr	w23, [x8]
	cbnz	x22, LBB0_3
LBB0_7:
	mov	x2, #0
LBB0_8:
	ldr	x3, [sp, #8]
	mov	x0, x21
	mov	x1, x23
	mov	w4, #0
	bl	_av_hwdevice_ctx_create
	mov	x22, x0
	add	x0, sp, #8
	bl	_av_dict_free
	tbnz	w22, #31, LBB0_10
; %bb.9:
	ldr	x8, [x21]
	ldr	x21, [x8]
	mov	x0, x20
	bl	_choose_implementation
	mov	x1, x0
	mov	x0, x19
	mov	x2, x21
	mov	w3, #0
	bl	_qsv_device_derive_from_child
	mov	x22, x0
LBB0_10:
	mov	x0, x22
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_11:
Lloh27:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh28:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh29:
	ldr	w1, [x8]
Lloh30:
	adrp	x2, l_.str.5@PAGE
Lloh31:
	add	x2, x2, l_.str.5@PAGEOFF
	mov	x0, x19
	bl	_av_log
Lloh32:
	adrp	x8, _ENOSYS@GOTPAGE
Lloh33:
	ldr	x8, [x8, _ENOSYS@GOTPAGEOFF]
LBB0_12:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	b	_AVERROR
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh32, Lloh33
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_qsv_device_free,4,2            ; @qsv_device_free
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"child_device"

	.comm	_CONFIG_VAAPI,8,3               ; @CONFIG_VAAPI
	.comm	_AV_HWDEVICE_TYPE_VAAPI,4,2     ; @AV_HWDEVICE_TYPE_VAAPI
l_.str.1:                               ; @.str.1
	.asciz	"kernel_driver"

l_.str.2:                               ; @.str.2
	.asciz	"i915"

l_.str.3:                               ; @.str.3
	.asciz	"driver"

l_.str.4:                               ; @.str.4
	.asciz	"iHD"

	.comm	_CONFIG_DXVA2,8,3               ; @CONFIG_DXVA2
	.comm	_AV_HWDEVICE_TYPE_DXVA2,4,2     ; @AV_HWDEVICE_TYPE_DXVA2
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
l_.str.5:                               ; @.str.5
	.asciz	"No supported child device type is enabled\n"

	.comm	_ENOSYS,4,2                     ; @ENOSYS
	.no_dead_strip	_qsv_device_create
.subsections_via_symbols
