	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function qsv_device_init
_qsv_device_init:                       ## @qsv_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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rdi), %rax
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	movq	8(%rdi), %r12
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	_supported_handle_types@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	8(%rax), %rsi
	testq	%rsi, %rsi
	je	LBB0_5
## %bb.1:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	leaq	8(%rax), %rbx
	movl	$24, %r15d
	xorl	%r14d, %r14d
	movq	_MFX_ERR_NONE@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r12), %edi
	movq	%rbx, %rdx
	callq	_MFXVideoCORE_GetHandle
	cmpq	(%r13), %rax
	je	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	incq	%r14
	movq	_supported_handle_types@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%rax,%r15), %rsi
	addq	$16, %r15
	testq	%rsi, %rsi
	jne	LBB0_2
	jmp	LBB0_5
LBB0_3:
	movl	%r14d, %eax
	movq	_supported_handle_types@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	shlq	$4, %rax
	movq	8(%rcx,%rax), %rdx
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movq	%rdx, 24(%rsi)
	movl	4(%rcx,%rax), %edx
	movl	%edx, 16(%rsi)
	movl	(%rcx,%rax), %eax
	movl	%eax, 12(%rsi)
LBB0_5:
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	cmpl	$0, 8(%rbx)
	jne	LBB0_7
## %bb.6:
	movq	_AV_LOG_VERBOSE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_av_log
LBB0_7:
	movl	(%r12), %edi
	leaq	4(%rbx), %rsi
	callq	_MFXQueryIMPL
	movq	_MFX_ERR_NONE@GOTPCREL(%rip), %r14
	movq	(%r14), %rdx
	cmpq	%rdx, %rax
	jne	LBB0_9
## %bb.8:
	movl	(%r12), %edi
	movq	%rbx, %rsi
	callq	_MFXQueryVersion
	movq	(%r14), %rdx
LBB0_9:
	xorl	%ecx, %ecx
	cmpq	%rdx, %rax
	je	LBB0_11
## %bb.10:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdx
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_av_log
	movq	_AVERROR_UNKNOWN@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
LBB0_11:
	movl	%ecx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_supported_handle_types,8,3     ## @supported_handle_types
	.comm	_MFX_ERR_NONE,8,3               ## @MFX_ERR_NONE
	.comm	_AV_LOG_VERBOSE,4,2             ## @AV_LOG_VERBOSE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"No supported hw handle could be retrieved from the session\n"

	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
L_.str.1:                               ## @.str.1
	.asciz	"Error querying the session attributes\n"

	.comm	_AVERROR_UNKNOWN,4,2            ## @AVERROR_UNKNOWN
	.no_dead_strip	_qsv_device_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function qsv_device_init
_qsv_device_init:                       ; @qsv_device_init
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x0
	ldp	x8, x22, [x0]
	ldr	x20, [x8]
Lloh0:
	adrp	x24, _supported_handle_types@GOTPAGE
Lloh1:
	ldr	x24, [x24, _supported_handle_types@GOTPAGEOFF]
	ldr	x8, [x24]
	ldr	x1, [x8, #8]
Lloh2:
	adrp	x23, _MFX_ERR_NONE@GOTPAGE
Lloh3:
	ldr	x23, [x23, _MFX_ERR_NONE@GOTPAGEOFF]
	cbz	x1, LBB0_4
; %bb.1:
	mov	x25, #0
	add	x21, x20, #8
	mov	w26, #24
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x22]
	mov	x2, x21
	bl	_MFXVideoCORE_GetHandle
	ldr	x8, [x23]
	cmp	x0, x8
	b.eq	LBB0_12
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x25, x25, #1
	ldr	x8, [x24]
	ldr	x1, [x8, x26]
	add	x26, x26, #16
	cbnz	x1, LBB0_2
LBB0_4:
	ldr	w8, [x20, #8]
	cbnz	w8, LBB0_6
LBB0_5:
Lloh4:
	adrp	x8, _AV_LOG_VERBOSE@GOTPAGE
Lloh5:
	ldr	x8, [x8, _AV_LOG_VERBOSE@GOTPAGEOFF]
Lloh6:
	ldr	w1, [x8]
Lloh7:
	adrp	x2, l_.str@PAGE
Lloh8:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
	bl	_av_log
LBB0_6:
	ldr	w0, [x22]
	add	x1, x20, #4
	bl	_MFXQueryIMPL
	ldr	x8, [x23]
	cmp	x0, x8
	b.ne	LBB0_8
; %bb.7:
	ldr	w0, [x22]
	mov	x1, x20
	bl	_MFXQueryVersion
	ldr	x8, [x23]
LBB0_8:
	cmp	x0, x8
	b.ne	LBB0_10
; %bb.9:
	mov	w0, #0
	b	LBB0_11
LBB0_10:
Lloh9:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh10:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
Lloh12:
	adrp	x2, l_.str.1@PAGE
Lloh13:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_av_log
Lloh14:
	adrp	x8, _AVERROR_UNKNOWN@GOTPAGE
Lloh15:
	ldr	x8, [x8, _AVERROR_UNKNOWN@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
LBB0_11:
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_12:
	ldr	x8, [x24]
	add	x8, x8, w25, uxtw #4
	ldr	x9, [x8, #8]
	str	x9, [x20, #24]
	ldr	d0, [x8]
	stur	d0, [x20, #12]
	ldr	w8, [x20, #8]
	cbnz	w8, LBB0_6
	b	LBB0_5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_supported_handle_types,8,3     ; @supported_handle_types
	.comm	_MFX_ERR_NONE,8,3               ; @MFX_ERR_NONE
	.comm	_AV_LOG_VERBOSE,4,2             ; @AV_LOG_VERBOSE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"No supported hw handle could be retrieved from the session\n"

	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
l_.str.1:                               ; @.str.1
	.asciz	"Error querying the session attributes\n"

	.comm	_AVERROR_UNKNOWN,4,2            ; @AVERROR_UNKNOWN
	.no_dead_strip	_qsv_device_init
.subsections_via_symbols
