	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function qsvenc_init_session
_qsvenc_init_session:                   ## @qsvenc_init_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	16(%rdi), %rax
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movl	(%rax), %eax
	jmp	LBB0_12
LBB0_2:
	movq	%rdi, %rbx
	movq	8(%rdi), %rdi
	testq	%rdi, %rdi
	je	LBB0_6
## %bb.3:
	callq	_av_buffer_ref
	movl	%eax, 12(%r14)
	testl	%eax, %eax
	je	LBB0_9
## %bb.4:
	leaq	12(%r14), %r15
	movq	16(%r14), %rax
	movq	_MFX_IOPATTERN_IN_OPAQUE_MEMORY@GOTPCREL(%rip), %rcx
	xorl	%r8d, %r8d
	cmpq	(%rcx), %rax
	movl	8(%r14), %ecx
	sete	%r8b
	movq	_MFX_GPUCOPY_OFF@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	movq	%rbx, %rdi
	movq	%r14, %rsi
	movq	%r15, %rdx
	callq	_ff_qsv_init_session_frames
	testl	%eax, %eax
	jns	LBB0_11
## %bb.5:
	movl	%eax, %ebx
	movq	%r15, %rdi
	callq	_av_buffer_unref
	jmp	LBB0_13
LBB0_6:
	movq	(%rbx), %rdx
	testq	%rdx, %rdx
	je	LBB0_10
## %bb.7:
	movl	8(%r14), %ecx
	movq	_MFX_GPUCOPY_OFF@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_ff_qsv_init_session_device
	testl	%eax, %eax
	js	LBB0_8
LBB0_11:
	movl	(%r14), %eax
LBB0_12:
	movl	%eax, 4(%r14)
	xorl	%ebx, %ebx
LBB0_13:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_AVERROR                        ## TAILCALL
LBB0_10:
	movl	8(%r14), %edx
	movq	_MFX_GPUCOPY_OFF@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_ff_qsv_init_internal_session
	testl	%eax, %eax
	jns	LBB0_11
LBB0_8:
	movl	%eax, %ebx
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_MFX_IOPATTERN_IN_OPAQUE_MEMORY,8,3 ## @MFX_IOPATTERN_IN_OPAQUE_MEMORY
	.comm	_MFX_GPUCOPY_OFF,4,2            ## @MFX_GPUCOPY_OFF
	.no_dead_strip	_qsvenc_init_session
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function qsvenc_init_session
_qsvenc_init_session:                   ; @qsvenc_init_session
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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	x19, x1
	ldr	x8, [x0, #16]
	cbz	x8, LBB0_2
; %bb.1:
	mov	w20, #0
	ldr	w8, [x8]
	b	LBB0_9
LBB0_2:
	mov	x20, x0
	ldr	x0, [x0, #8]
	cbz	x0, LBB0_6
; %bb.3:
	bl	_av_buffer_ref
	mov	x21, x19
	str	w0, [x21, #12]!
	cbz	w0, LBB0_11
; %bb.4:
	ldr	w3, [x19, #8]
	ldr	x8, [x19, #16]
Lloh0:
	adrp	x9, _MFX_IOPATTERN_IN_OPAQUE_MEMORY@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MFX_IOPATTERN_IN_OPAQUE_MEMORY@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w4, eq
Lloh3:
	adrp	x8, _MFX_GPUCOPY_OFF@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MFX_GPUCOPY_OFF@GOTPAGEOFF]
Lloh5:
	ldr	w5, [x8]
	mov	x0, x20
	mov	x1, x19
	mov	x2, x21
	bl	_ff_qsv_init_session_frames
	tbz	w0, #31, LBB0_8
; %bb.5:
	mov	x20, x0
	mov	x0, x21
	bl	_av_buffer_unref
	b	LBB0_10
LBB0_6:
	ldr	x2, [x20]
	cbz	x2, LBB0_12
; %bb.7:
	ldr	w3, [x19, #8]
Lloh6:
	adrp	x8, _MFX_GPUCOPY_OFF@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MFX_GPUCOPY_OFF@GOTPAGEOFF]
Lloh8:
	ldr	w4, [x8]
	mov	x0, x20
	mov	x1, x19
	bl	_ff_qsv_init_session_device
	tbnz	w0, #31, LBB0_13
LBB0_8:
	mov	w20, #0
	ldr	w8, [x19]
LBB0_9:
	str	w8, [x19, #4]
LBB0_10:
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_11:
Lloh9:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_AVERROR
LBB0_12:
	ldr	w2, [x19, #8]
Lloh12:
	adrp	x8, _MFX_GPUCOPY_OFF@GOTPAGE
Lloh13:
	ldr	x8, [x8, _MFX_GPUCOPY_OFF@GOTPAGEOFF]
Lloh14:
	ldr	w3, [x8]
	mov	x0, x20
	mov	x1, x19
	bl	_ff_qsv_init_internal_session
	tbz	w0, #31, LBB0_8
LBB0_13:
	mov	x20, x0
	b	LBB0_10
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_MFX_IOPATTERN_IN_OPAQUE_MEMORY,8,3 ; @MFX_IOPATTERN_IN_OPAQUE_MEMORY
	.comm	_MFX_GPUCOPY_OFF,4,2            ; @MFX_GPUCOPY_OFF
	.no_dead_strip	_qsvenc_init_session
.subsections_via_symbols
