	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function qsv_init_internal_session
_qsv_init_internal_session:             ## @qsv_init_internal_session
	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	movq	%rsi, %r14
	movq	%rdi, %r12
	movq	16(%rdi), %rax
	movq	(%rax), %rbx
	movq	(%rdi), %rax
	movq	8(%rdi), %rcx
	movq	(%rax), %rax
	movq	(%rax), %r13
	movq	_MFX_MEMTYPE_OPAQUE_FRAME@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	andl	(%rcx), %r15d
	movq	_frame_free@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -112(%rbp)
	movq	_frame_get_hdl@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -108(%rbp)
	movq	_frame_unlock@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -104(%rbp)
	movq	_frame_lock@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -100(%rbp)
	movq	_frame_alloc@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -96(%rbp)
	movq	%rdi, -88(%rbp)
	movl	16(%r13), %edi
	leaq	12(%r13), %rsi
	movq	%r14, %rdx
	callq	_MFXInit
	movq	_MFX_ERR_NONE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_1
## %bb.2:
	movq	(%r13), %rdx
	testq	%rdx, %rdx
	je	LBB0_5
## %bb.3:
	movq	(%r14), %rdi
	movl	8(%r13), %esi
	movq	%rcx, %r13
	callq	_MFXVideoCORE_SetHandle
	movq	%r13, %rcx
	cmpq	(%r13), %rax
	jne	LBB0_4
LBB0_5:
	testl	%r15d, %r15d
	je	LBB0_6
## %bb.11:
	movq	%rcx, %r15
	leaq	-80(%rbp), %rdi
	xorl	%esi, %esi
	movl	$32, %edx
	callq	_memset
	movl	(%rbx), %edi
	movl	%edi, -52(%rbp)
	callq	_FF_ARRAY_ELEMS
	movl	%eax, -56(%rbp)
	movq	_MFX_IOPATTERN_IN_OPAQUE_MEMORY@GOTPCREL(%rip), %rax
	movq	_MFX_IOPATTERN_OUT_OPAQUE_MEMORY@GOTPCREL(%rip), %rcx
	jmp	LBB0_8
LBB0_1:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	%r12, %rdi
	callq	_av_log
LBB0_4:
	movq	_AVERROR_UNKNOWN@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
LBB0_10:
	movl	%ebx, %eax
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movq	(%r14), %rdi
	leaq	-112(%rbp), %rsi
	movq	%rcx, %r15
	callq	_MFXVideoCORE_SetFrameAllocator
	movq	%r15, %rcx
	cmpq	(%r15), %rax
	jne	LBB0_4
## %bb.7:
	leaq	-80(%rbp), %rdi
	xorl	%esi, %esi
	movl	$32, %edx
	callq	_memset
	movq	_MFX_IOPATTERN_IN_VIDEO_MEMORY@GOTPCREL(%rip), %rax
	movq	_MFX_IOPATTERN_OUT_VIDEO_MEMORY@GOTPCREL(%rip), %rcx
LBB0_8:
	movl	(%rcx), %ecx
	movl	(%rax), %eax
	movq	_MFX_IOPATTERN_IN_SYSTEM_MEMORY@GOTPCREL(%rip), %rdx
	movq	_MFX_IOPATTERN_OUT_SYSTEM_MEMORY@GOTPCREL(%rip), %rsi
	orl	(%rsi), %eax
	orl	(%rdx), %ecx
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	cmovel	%eax, %ecx
	movl	%ecx, -60(%rbp)
	movabsq	$107374182401, %rax             ## imm = 0x1900000001
	movq	%rax, -80(%rbp)
	movl	$1, -72(%rbp)
	movq	-76(%rbp), %rax
	movq	%rax, -68(%rbp)
	movq	(%r14), %rdi
	leaq	-80(%rbp), %rsi
	callq	_MFXVideoVPP_Init
	xorl	%ebx, %ebx
	cmpq	(%r15), %rax
	je	LBB0_10
## %bb.9:
	movq	_AV_LOG_VERBOSE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdx
	movq	%r12, %rdi
	callq	_av_log
	movq	(%r14), %rdi
	callq	_MFXClose
	movq	$0, (%r14)
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_MFX_MEMTYPE_OPAQUE_FRAME,4,2   ## @MFX_MEMTYPE_OPAQUE_FRAME
	.comm	_frame_free,4,2                 ## @frame_free
	.comm	_frame_get_hdl,4,2              ## @frame_get_hdl
	.comm	_frame_unlock,4,2               ## @frame_unlock
	.comm	_frame_lock,4,2                 ## @frame_lock
	.comm	_frame_alloc,4,2                ## @frame_alloc
	.comm	_MFX_ERR_NONE,8,3               ## @MFX_ERR_NONE
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Error initializing an internal session\n"

	.comm	_AVERROR_UNKNOWN,4,2            ## @AVERROR_UNKNOWN
	.comm	_MFX_IOPATTERN_OUT_OPAQUE_MEMORY,4,2 ## @MFX_IOPATTERN_OUT_OPAQUE_MEMORY
	.comm	_MFX_IOPATTERN_IN_OPAQUE_MEMORY,4,2 ## @MFX_IOPATTERN_IN_OPAQUE_MEMORY
	.comm	_MFX_IOPATTERN_OUT_VIDEO_MEMORY,4,2 ## @MFX_IOPATTERN_OUT_VIDEO_MEMORY
	.comm	_MFX_IOPATTERN_IN_VIDEO_MEMORY,4,2 ## @MFX_IOPATTERN_IN_VIDEO_MEMORY
	.comm	_MFX_IOPATTERN_IN_SYSTEM_MEMORY,4,2 ## @MFX_IOPATTERN_IN_SYSTEM_MEMORY
	.comm	_MFX_IOPATTERN_OUT_SYSTEM_MEMORY,4,2 ## @MFX_IOPATTERN_OUT_SYSTEM_MEMORY
	.comm	_AV_LOG_VERBOSE,4,2             ## @AV_LOG_VERBOSE
L_.str.1:                               ## @.str.1
	.asciz	"Error opening the internal VPP session.Surface upload/download will not be possible\n"

	.no_dead_strip	_qsv_init_internal_session
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function qsv_init_internal_session
lCPI0_0:
	.long	1                               ; 0x1
	.long	25                              ; 0x19
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_qsv_init_internal_session:             ; @qsv_init_internal_session
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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	x21, x2
	mov	x19, x1
	mov	x20, x0
	ldr	x8, [x0, #16]
	ldr	x23, [x8]
	ldp	x9, x8, [x0]
	ldr	x9, [x9]
	ldr	x26, [x9]
	ldr	w24, [x8]
Lloh0:
	adrp	x8, _MFX_MEMTYPE_OPAQUE_FRAME@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MFX_MEMTYPE_OPAQUE_FRAME@GOTPAGEOFF]
Lloh2:
	ldr	w25, [x8]
Lloh3:
	adrp	x8, _frame_free@GOTPAGE
Lloh4:
	ldr	x8, [x8, _frame_free@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
Lloh6:
	adrp	x9, _frame_get_hdl@GOTPAGE
Lloh7:
	ldr	x9, [x9, _frame_get_hdl@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	stp	w8, w9, [sp, #32]
Lloh9:
	adrp	x8, _frame_unlock@GOTPAGE
Lloh10:
	ldr	x8, [x8, _frame_unlock@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
Lloh12:
	adrp	x9, _frame_lock@GOTPAGE
Lloh13:
	ldr	x9, [x9, _frame_lock@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
Lloh15:
	adrp	x10, _frame_alloc@GOTPAGE
Lloh16:
	ldr	x10, [x10, _frame_alloc@GOTPAGEOFF]
	stp	w8, w9, [sp, #40]
Lloh17:
	ldr	w8, [x10]
	str	w8, [sp, #48]
	str	x0, [sp, #56]
	ldr	w0, [x26, #16]
	add	x1, x26, #12
	mov	x2, x19
	bl	_MFXInit
Lloh18:
	adrp	x22, _MFX_ERR_NONE@GOTPAGE
Lloh19:
	ldr	x22, [x22, _MFX_ERR_NONE@GOTPAGEOFF]
	ldr	x8, [x22]
	cmp	x0, x8
	b.ne	LBB0_5
; %bb.1:
	ldr	x2, [x26]
	cbz	x2, LBB0_3
; %bb.2:
	ldr	x0, [x19]
	ldr	w1, [x26, #8]
	bl	_MFXVideoCORE_SetHandle
	ldr	x8, [x22]
	cmp	x0, x8
	b.ne	LBB0_6
LBB0_3:
	and	w8, w25, w24
	cbz	w8, LBB0_8
; %bb.4:
	mov	x0, sp
	mov	w1, #0
	mov	w2, #32
	bl	_memset
	ldr	w0, [x23]
	str	w0, [sp, #28]
	bl	_FF_ARRAY_ELEMS
	str	w0, [sp, #24]
Lloh20:
	adrp	x8, _MFX_IOPATTERN_IN_OPAQUE_MEMORY@GOTPAGE
Lloh21:
	ldr	x8, [x8, _MFX_IOPATTERN_IN_OPAQUE_MEMORY@GOTPAGEOFF]
Lloh22:
	adrp	x9, _MFX_IOPATTERN_OUT_OPAQUE_MEMORY@GOTPAGE
Lloh23:
	ldr	x9, [x9, _MFX_IOPATTERN_OUT_OPAQUE_MEMORY@GOTPAGEOFF]
	b	LBB0_10
LBB0_5:
Lloh24:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh25:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh26:
	ldr	w1, [x8]
Lloh27:
	adrp	x2, l_.str@PAGE
Lloh28:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x20
	bl	_av_log
LBB0_6:
Lloh29:
	adrp	x8, _AVERROR_UNKNOWN@GOTPAGE
Lloh30:
	ldr	x8, [x8, _AVERROR_UNKNOWN@GOTPAGEOFF]
Lloh31:
	ldr	w0, [x8]
LBB0_7:
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
LBB0_8:
	ldr	x0, [x19]
	add	x1, sp, #32
	bl	_MFXVideoCORE_SetFrameAllocator
	ldr	x8, [x22]
	cmp	x0, x8
	b.ne	LBB0_6
; %bb.9:
	mov	x0, sp
	mov	w1, #0
	mov	w2, #32
	bl	_memset
Lloh32:
	adrp	x8, _MFX_IOPATTERN_IN_VIDEO_MEMORY@GOTPAGE
Lloh33:
	ldr	x8, [x8, _MFX_IOPATTERN_IN_VIDEO_MEMORY@GOTPAGEOFF]
Lloh34:
	adrp	x9, _MFX_IOPATTERN_OUT_VIDEO_MEMORY@GOTPAGE
Lloh35:
	ldr	x9, [x9, _MFX_IOPATTERN_OUT_VIDEO_MEMORY@GOTPAGEOFF]
LBB0_10:
	ldr	w9, [x9]
Lloh36:
	adrp	x10, _MFX_IOPATTERN_IN_SYSTEM_MEMORY@GOTPAGE
Lloh37:
	ldr	x10, [x10, _MFX_IOPATTERN_IN_SYSTEM_MEMORY@GOTPAGEOFF]
	ldr	w8, [x8]
Lloh38:
	ldr	w10, [x10]
Lloh39:
	adrp	x11, _MFX_IOPATTERN_OUT_SYSTEM_MEMORY@GOTPAGE
Lloh40:
	ldr	x11, [x11, _MFX_IOPATTERN_OUT_SYSTEM_MEMORY@GOTPAGEOFF]
Lloh41:
	ldr	w11, [x11]
	orr	w8, w8, w11
	orr	w9, w9, w10
	cmp	w21, #0
	csel	w8, w8, w9, eq
Lloh42:
	adrp	x9, lCPI0_0@PAGE
Lloh43:
	ldr	d0, [x9, lCPI0_0@PAGEOFF]
	str	d0, [sp]
	mov	w9, #1
	str	w8, [sp, #20]
	str	w9, [sp, #8]
	ldur	x8, [sp, #4]
	stur	x8, [sp, #12]
	ldr	x0, [x19]
	mov	x1, sp
	bl	_MFXVideoVPP_Init
	ldr	x8, [x22]
	cmp	x0, x8
	b.ne	LBB0_12
; %bb.11:
	mov	w0, #0
	b	LBB0_7
LBB0_12:
Lloh44:
	adrp	x8, _AV_LOG_VERBOSE@GOTPAGE
Lloh45:
	ldr	x8, [x8, _AV_LOG_VERBOSE@GOTPAGEOFF]
Lloh46:
	ldr	w1, [x8]
Lloh47:
	adrp	x2, l_.str.1@PAGE
Lloh48:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_av_log
	ldr	x0, [x19]
	bl	_MFXClose
	mov	w0, #0
	str	xzr, [x19]
	b	LBB0_7
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGot	Lloh34, Lloh35
	.loh AdrpLdrGot	Lloh32, Lloh33
	.loh AdrpLdr	Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpAdd	Lloh47, Lloh48
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.cfi_endproc
                                        ; -- End function
	.comm	_MFX_MEMTYPE_OPAQUE_FRAME,4,2   ; @MFX_MEMTYPE_OPAQUE_FRAME
	.comm	_frame_free,4,2                 ; @frame_free
	.comm	_frame_get_hdl,4,2              ; @frame_get_hdl
	.comm	_frame_unlock,4,2               ; @frame_unlock
	.comm	_frame_lock,4,2                 ; @frame_lock
	.comm	_frame_alloc,4,2                ; @frame_alloc
	.comm	_MFX_ERR_NONE,8,3               ; @MFX_ERR_NONE
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Error initializing an internal session\n"

	.comm	_AVERROR_UNKNOWN,4,2            ; @AVERROR_UNKNOWN
	.comm	_MFX_IOPATTERN_OUT_OPAQUE_MEMORY,4,2 ; @MFX_IOPATTERN_OUT_OPAQUE_MEMORY
	.comm	_MFX_IOPATTERN_IN_OPAQUE_MEMORY,4,2 ; @MFX_IOPATTERN_IN_OPAQUE_MEMORY
	.comm	_MFX_IOPATTERN_OUT_VIDEO_MEMORY,4,2 ; @MFX_IOPATTERN_OUT_VIDEO_MEMORY
	.comm	_MFX_IOPATTERN_IN_VIDEO_MEMORY,4,2 ; @MFX_IOPATTERN_IN_VIDEO_MEMORY
	.comm	_MFX_IOPATTERN_IN_SYSTEM_MEMORY,4,2 ; @MFX_IOPATTERN_IN_SYSTEM_MEMORY
	.comm	_MFX_IOPATTERN_OUT_SYSTEM_MEMORY,4,2 ; @MFX_IOPATTERN_OUT_SYSTEM_MEMORY
	.comm	_AV_LOG_VERBOSE,4,2             ; @AV_LOG_VERBOSE
l_.str.1:                               ; @.str.1
	.asciz	"Error opening the internal VPP session.Surface upload/download will not be possible\n"

	.no_dead_strip	_qsv_init_internal_session
.subsections_via_symbols
