	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ff_qsv_enc_init                ## -- Begin function ff_qsv_enc_init
	.p2align	4, 0x90
_ff_qsv_enc_init:                       ## @ff_qsv_enc_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %r14
	movl	(%rsi), %ebx
	movl	%ebx, 16(%rsi)
	xorl	%r13d, %r13d
	xorl	%eax, %eax
	callq	_qsv_fifo_item_size
	imull	%eax, %ebx
	movl	%ebx, %edi
	callq	_av_fifo_alloc
	movl	%eax, 68(%r15)
	testl	%eax, %eax
	je	LBB0_40
## %bb.1:
	movq	8(%r14), %rcx
	movl	$0, %eax
	testq	%rcx, %rcx
	je	LBB0_3
## %bb.2:
	movl	(%rcx), %eax
	movl	4(%rcx), %r13d
LBB0_3:
	movq	16(%r14), %rcx
	testq	%rcx, %rcx
	je	LBB0_10
## %bb.4:
	testl	%eax, %eax
	jne	LBB0_10
## %bb.5:
	movq	(%rcx), %rax
	movq	(%rax), %rax
	movl	(%rax), %ecx
	movq	_MFX_MEMTYPE_OPAQUE_FRAME@GOTPCREL(%rip), %rax
	testl	%ecx, (%rax)
	je	LBB0_7
## %bb.6:
	movq	_MFX_IOPATTERN_IN_OPAQUE_MEMORY@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_7:
	movq	_MFX_MEMTYPE_VIDEO_MEMORY_DECODER_TARGET@GOTPCREL(%rip), %rdx
	movq	_MFX_MEMTYPE_VIDEO_MEMORY_PROCESSOR_TARGET@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	(%rdx), %eax
	andl	%ecx, %eax
	je	LBB0_10
## %bb.8:
	movq	_MFX_IOPATTERN_IN_VIDEO_MEMORY@GOTPCREL(%rip), %rax
LBB0_9:
	movl	(%rax), %eax
LBB0_10:
	testl	%eax, %eax
	jne	LBB0_12
## %bb.11:
	movq	_MFX_IOPATTERN_IN_SYSTEM_MEMORY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_12:
	movl	%eax, 20(%r15)
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_qsvenc_init_session
	testl	%eax, %eax
	js	LBB0_16
## %bb.13:
	movl	40(%r15), %edi
	leaq	64(%r15), %rsi
	callq	_MFXQueryVersion
	testl	%eax, %eax
	js	LBB0_17
## %bb.14:
	cmpl	$129, (%r14)
	jne	LBB0_19
## %bb.15:
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_init_video_param_jpeg
	jmp	LBB0_20
LBB0_17:
	leaq	L_.str(%rip), %rdx
LBB0_18:
	movq	%r14, %rdi
	movl	%eax, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ff_qsv_print_error             ## TAILCALL
LBB0_19:
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_init_video_param
LBB0_20:
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_63
## %bb.21:
	movq	8(%r14), %r12
	testq	%r12, %r12
	je	LBB0_41
## %bb.22:
	movl	4(%r15), %edi
	addl	8(%r12), %edi
	movl	$8, %esi
	callq	_av_mallocz_array
	movq	%rax, 56(%r15)
	testq	%rax, %rax
	je	LBB0_40
## %bb.23:
	movq	%rax, 32(%r15)
	movl	8(%r12), %ecx
	testl	%ecx, %ecx
	jle	LBB0_31
## %bb.24:
	movq	16(%r12), %rdx
	movq	(%rdx), %rdx
	movq	%rdx, (%rax)
	cmpl	$1, %ecx
	je	LBB0_31
## %bb.25:
	leaq	-1(%rcx), %rsi
	leaq	-2(%rcx), %rdi
	movl	%esi, %eax
	andl	$3, %eax
	movl	$1, %edx
	cmpq	$3, %rdi
	jb	LBB0_29
## %bb.26:
	andq	$-4, %rsi
	xorl	%edx, %edx
	.p2align	4, 0x90
LBB0_27:                                ## =>This Inner Loop Header: Depth=1
	movq	32(%r15), %rdi
	movq	16(%r12), %rbx
	movq	8(%rbx,%rdx,8), %rbx
	movq	%rbx, 8(%rdi,%rdx,8)
	movq	32(%r15), %rdi
	movq	16(%r12), %rbx
	movq	16(%rbx,%rdx,8), %rbx
	movq	%rbx, 16(%rdi,%rdx,8)
	movq	32(%r15), %rdi
	movq	16(%r12), %rbx
	movq	24(%rbx,%rdx,8), %rbx
	movq	%rbx, 24(%rdi,%rdx,8)
	movq	32(%r15), %rdi
	movq	16(%r12), %rbx
	movq	32(%rbx,%rdx,8), %rbx
	movq	%rbx, 32(%rdi,%rdx,8)
	addq	$4, %rdx
	cmpq	%rdx, %rsi
	jne	LBB0_27
## %bb.28:
	incq	%rdx
LBB0_29:
	testq	%rax, %rax
	je	LBB0_31
	.p2align	4, 0x90
LBB0_30:                                ## =>This Inner Loop Header: Depth=1
	movq	32(%r15), %rsi
	movq	16(%r12), %rdi
	movq	(%rdi,%rdx,8), %rdi
	movq	%rdi, (%rsi,%rdx,8)
	incq	%rdx
	decq	%rax
	jne	LBB0_30
LBB0_31:
	movl	%ecx, 24(%r15)
	movl	4(%r15), %r8d
	testl	%r8d, %r8d
	jle	LBB0_42
## %bb.32:
	xorl	%edx, %edx
	movl	%ecx, %r9d
	jmp	LBB0_36
	.p2align	4, 0x90
LBB0_33:                                ##   in Loop: Header=BB0_36 Depth=1
	movq	48(%r15), %rax
	movq	(%rax,%rdx,8), %r10
LBB0_34:                                ##   in Loop: Header=BB0_36 Depth=1
	movq	32(%r15), %rax
	movslq	%r9d, %rsi
	leal	1(%r9), %edi
	movl	%edi, 24(%r15)
	movq	%r10, (%rax,%rsi,8)
	movl	%edi, %r9d
LBB0_35:                                ##   in Loop: Header=BB0_36 Depth=1
	incq	%rdx
	cmpq	%r8, %rdx
	je	LBB0_42
LBB0_36:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_38 Depth 2
	testl	%ecx, %ecx
	jle	LBB0_33
## %bb.37:                              ##   in Loop: Header=BB0_36 Depth=1
	movq	16(%r12), %rbx
	movq	48(%r15), %rax
	movq	(%rax,%rdx,8), %r10
	movq	(%r10), %rax
	xorl	%esi, %esi
	.p2align	4, 0x90
LBB0_38:                                ##   Parent Loop BB0_36 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	(%rbx,%rsi,8), %rdi
	cmpq	%rax, (%rdi)
	je	LBB0_35
## %bb.39:                              ##   in Loop: Header=BB0_38 Depth=2
	incq	%rsi
	cmpq	%rsi, %rcx
	jne	LBB0_38
	jmp	LBB0_34
LBB0_40:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_AVERROR                        ## TAILCALL
LBB0_41:
	movq	48(%r15), %rax
	movq	%rax, 32(%r15)
	movl	4(%r15), %eax
	movl	%eax, 24(%r15)
LBB0_42:
	leaq	16(%r15), %r12
	movl	40(%r15), %edi
	movq	%r12, %rsi
	movq	%r12, %rdx
	callq	_MFXVideoENCODE_Query
	movq	_MFX_WRN_PARTIAL_ACCELERATION@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_44
## %bb.43:
	movq	_AV_LOG_WARNING@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdx
	movq	%r14, %rdi
	callq	_av_log
	jmp	LBB0_45
LBB0_44:
	testl	%eax, %eax
	js	LBB0_55
LBB0_45:
	movl	40(%r15), %edi
	leaq	44(%r15), %rdx
	movq	%r12, %rsi
	callq	_MFXVideoENCODE_QueryIOSurf
	testl	%eax, %eax
	js	LBB0_54
## %bb.46:
	testl	%r13d, %r13d
	je	LBB0_48
## %bb.47:
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_qsv_init_opaque_alloc
	testl	%eax, %eax
	js	LBB0_16
LBB0_48:
	movl	40(%r15), %edi
	movq	%r12, %rsi
	callq	_MFXVideoENCODE_Init
	testl	%eax, %eax
	js	LBB0_56
## %bb.49:
	je	LBB0_51
## %bb.50:
	leaq	L_.str.5(%rip), %rdx
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_ff_qsv_print_warning
LBB0_51:
	movl	(%r14), %eax
	movq	%r14, %rdi
	movq	%r15, %rsi
	cmpl	$128, %eax
	je	LBB0_58
## %bb.52:
	cmpl	$129, %eax
	jne	LBB0_59
## %bb.53:
	callq	_qsv_retrieve_enc_jpeg_params
	jmp	LBB0_60
LBB0_16:
	movl	%eax, %ebx
LBB0_63:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_54:
	leaq	L_.str.3(%rip), %rdx
	jmp	LBB0_18
LBB0_55:
	leaq	L_.str.2(%rip), %rdx
	jmp	LBB0_18
LBB0_56:
	leaq	L_.str.4(%rip), %rdx
	jmp	LBB0_18
LBB0_58:
	callq	_qsv_retrieve_enc_vp9_params
	jmp	LBB0_60
LBB0_59:
	callq	_qsv_retrieve_enc_params
LBB0_60:
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_62
## %bb.61:
	movq	%r14, 8(%r15)
	xorl	%ebx, %ebx
	jmp	LBB0_63
LBB0_62:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.6(%rip), %rdx
	movq	%r14, %rdi
	callq	_av_log
	jmp	LBB0_63
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_MFX_MEMTYPE_OPAQUE_FRAME,4,2   ## @MFX_MEMTYPE_OPAQUE_FRAME
	.comm	_MFX_IOPATTERN_IN_OPAQUE_MEMORY,4,2 ## @MFX_IOPATTERN_IN_OPAQUE_MEMORY
	.comm	_MFX_MEMTYPE_VIDEO_MEMORY_DECODER_TARGET,4,2 ## @MFX_MEMTYPE_VIDEO_MEMORY_DECODER_TARGET
	.comm	_MFX_MEMTYPE_VIDEO_MEMORY_PROCESSOR_TARGET,4,2 ## @MFX_MEMTYPE_VIDEO_MEMORY_PROCESSOR_TARGET
	.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
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Error querying mfx version"

	.comm	_MFX_WRN_PARTIAL_ACCELERATION,4,2 ## @MFX_WRN_PARTIAL_ACCELERATION
	.comm	_AV_LOG_WARNING,4,2             ## @AV_LOG_WARNING
L_.str.1:                               ## @.str.1
	.asciz	"Encoder will work with partial HW acceleration\n"

L_.str.2:                               ## @.str.2
	.asciz	"Error querying encoder params"

L_.str.3:                               ## @.str.3
	.asciz	"Error querying (IOSurf) the encoding parameters"

L_.str.4:                               ## @.str.4
	.asciz	"Error initializing the encoder"

L_.str.5:                               ## @.str.5
	.asciz	"Warning in encoder initialization"

	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
L_.str.6:                               ## @.str.6
	.asciz	"Error retrieving encoding parameters.\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ff_qsv_enc_init                ; -- Begin function ff_qsv_enc_init
	.p2align	2
_ff_qsv_enc_init:                       ; @ff_qsv_enc_init
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x20, x1
	mov	x19, x0
	ldr	w22, [x1]
	mov	x21, x1
	str	w22, [x21, #16]!
	bl	_qsv_fifo_item_size
	mul	w0, w0, w22
	bl	_av_fifo_alloc
	str	w0, [x21, #52]
	cbz	w0, LBB0_30
; %bb.1:
	ldr	x9, [x19, #8]
	cbz	x9, LBB0_3
; %bb.2:
	ldp	w8, w23, [x9]
	ldr	x9, [x19, #16]
	cbnz	x9, LBB0_4
	b	LBB0_8
LBB0_3:
	mov	w23, #0
	mov	w8, #0
	ldr	x9, [x19, #16]
	cbz	x9, LBB0_8
LBB0_4:
	cbnz	w8, LBB0_8
; %bb.5:
	ldr	x8, [x9]
	ldr	x8, [x8]
	ldr	w8, [x8]
Lloh0:
	adrp	x9, _MFX_MEMTYPE_OPAQUE_FRAME@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MFX_MEMTYPE_OPAQUE_FRAME@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_7
; %bb.6:
Lloh3:
	adrp	x8, _MFX_IOPATTERN_IN_OPAQUE_MEMORY@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MFX_IOPATTERN_IN_OPAQUE_MEMORY@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	b	LBB0_8
LBB0_7:
Lloh6:
	adrp	x9, _MFX_MEMTYPE_VIDEO_MEMORY_DECODER_TARGET@GOTPAGE
Lloh7:
	ldr	x9, [x9, _MFX_MEMTYPE_VIDEO_MEMORY_DECODER_TARGET@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
Lloh9:
	adrp	x10, _MFX_MEMTYPE_VIDEO_MEMORY_PROCESSOR_TARGET@GOTPAGE
Lloh10:
	ldr	x10, [x10, _MFX_MEMTYPE_VIDEO_MEMORY_PROCESSOR_TARGET@GOTPAGEOFF]
Lloh11:
	ldr	w10, [x10]
	orr	w9, w10, w9
Lloh12:
	adrp	x10, _MFX_IOPATTERN_IN_VIDEO_MEMORY@GOTPAGE
Lloh13:
	ldr	x10, [x10, _MFX_IOPATTERN_IN_VIDEO_MEMORY@GOTPAGEOFF]
Lloh14:
	ldr	w10, [x10]
	tst	w9, w8
	csel	w8, wzr, w10, eq
LBB0_8:
Lloh15:
	adrp	x9, _MFX_IOPATTERN_IN_SYSTEM_MEMORY@GOTPAGE
Lloh16:
	ldr	x9, [x9, _MFX_IOPATTERN_IN_SYSTEM_MEMORY@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	cmp	w8, #0
	csel	w8, w9, w8, eq
	str	w8, [x20, #20]
	mov	x0, x19
	mov	x1, x20
	bl	_qsvenc_init_session
	tbnz	w0, #31, LBB0_44
; %bb.9:
	ldr	w0, [x20, #40]
	add	x1, x20, #64
	bl	_MFXQueryVersion
	tbnz	w0, #31, LBB0_12
; %bb.10:
	ldr	w8, [x19]
	mov	x0, x19
	mov	x1, x20
	cmp	w8, #129
	b.ne	LBB0_14
; %bb.11:
	bl	_init_video_param_jpeg
	mov	x22, x0
	tbz	w0, #31, LBB0_15
	b	LBB0_45
LBB0_12:
	mov	x1, x0
Lloh18:
	adrp	x2, l_.str@PAGE
Lloh19:
	add	x2, x2, l_.str@PAGEOFF
LBB0_13:
	mov	x0, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_ff_qsv_print_error
LBB0_14:
	bl	_init_video_param
	mov	x22, x0
	tbnz	w0, #31, LBB0_45
LBB0_15:
	ldr	x22, [x19, #8]
	cbz	x22, LBB0_31
; %bb.16:
	ldr	w8, [x22, #8]
	ldr	w9, [x20, #4]
	add	w0, w9, w8
	mov	w1, #8
	bl	_av_mallocz_array
	str	x0, [x20, #56]
	cbz	x0, LBB0_30
; %bb.17:
	str	x0, [x20, #32]
	ldr	w8, [x22, #8]
	cmp	w8, #1
	b.lt	LBB0_21
; %bb.18:
	ldr	x9, [x22, #16]
	ldr	x9, [x9]
	str	x9, [x0]
	cmp	w8, #1
	b.eq	LBB0_21
; %bb.19:
	mov	w9, #1
LBB0_20:                                ; =>This Inner Loop Header: Depth=1
	ldr	x10, [x20, #32]
	ldr	x11, [x22, #16]
	lsl	x12, x9, #3
	ldr	x11, [x11, x12]
	str	x11, [x10, x12]
	add	x9, x9, #1
	cmp	x8, x9
	b.ne	LBB0_20
LBB0_21:
	str	w8, [x20, #24]
	ldr	w9, [x20, #4]
	cmp	w9, #1
	b.lt	LBB0_32
; %bb.22:
	mov	x10, #0
	mov	x11, x8
	b	LBB0_26
LBB0_23:                                ;   in Loop: Header=BB0_26 Depth=1
	ldr	x12, [x20, #48]
	ldr	x12, [x12, x10, lsl #3]
LBB0_24:                                ;   in Loop: Header=BB0_26 Depth=1
	ldr	x13, [x20, #32]
	str	x12, [x13, w11, sxtw #3]
	add	w11, w11, #1
	str	w11, [x20, #24]
LBB0_25:                                ;   in Loop: Header=BB0_26 Depth=1
	add	x10, x10, #1
	cmp	x10, x9
	b.eq	LBB0_32
LBB0_26:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_28 Depth 2
	cmp	w8, #0
	b.le	LBB0_23
; %bb.27:                               ;   in Loop: Header=BB0_26 Depth=1
	ldr	x13, [x22, #16]
	ldr	x12, [x20, #48]
	ldr	x12, [x12, x10, lsl #3]
	ldr	x14, [x12]
	mov	x15, x8
LBB0_28:                                ;   Parent Loop BB0_26 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x16, [x13]
	ldr	x16, [x16]
	cmp	x16, x14
	b.eq	LBB0_25
; %bb.29:                               ;   in Loop: Header=BB0_28 Depth=2
	add	x13, x13, #8
	subs	x15, x15, #1
	b.ne	LBB0_28
	b	LBB0_24
LBB0_30:
Lloh20:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh21:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh22:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_AVERROR
LBB0_31:
	ldr	x8, [x20, #48]
	str	x8, [x20, #32]
	ldr	w8, [x20, #4]
	str	w8, [x20, #24]
LBB0_32:
	ldr	w0, [x20, #40]
	mov	x1, x21
	mov	x2, x21
	bl	_MFXVideoENCODE_Query
Lloh23:
	adrp	x8, _MFX_WRN_PARTIAL_ACCELERATION@GOTPAGE
Lloh24:
	ldr	x8, [x8, _MFX_WRN_PARTIAL_ACCELERATION@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_34
; %bb.33:
Lloh26:
	adrp	x8, _AV_LOG_WARNING@GOTPAGE
Lloh27:
	ldr	x8, [x8, _AV_LOG_WARNING@GOTPAGEOFF]
Lloh28:
	ldr	w1, [x8]
Lloh29:
	adrp	x2, l_.str.1@PAGE
Lloh30:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_av_log
	b	LBB0_35
LBB0_34:
	mov	x1, x0
	tbnz	w0, #31, LBB0_47
LBB0_35:
	ldr	w0, [x20, #40]
	add	x2, x20, #44
	mov	x1, x21
	bl	_MFXVideoENCODE_QueryIOSurf
	tbnz	w0, #31, LBB0_46
; %bb.36:
	cbz	w23, LBB0_38
; %bb.37:
	mov	x0, x19
	mov	x1, x20
	bl	_qsv_init_opaque_alloc
	tbnz	w0, #31, LBB0_44
LBB0_38:
	ldr	w0, [x20, #40]
	mov	x1, x21
	bl	_MFXVideoENCODE_Init
	mov	x1, x0
	tbnz	w0, #31, LBB0_48
; %bb.39:
	cbz	w1, LBB0_41
; %bb.40:
Lloh31:
	adrp	x2, l_.str.5@PAGE
Lloh32:
	add	x2, x2, l_.str.5@PAGEOFF
	mov	x0, x19
	bl	_ff_qsv_print_warning
LBB0_41:
	ldr	w8, [x19]
	mov	x0, x19
	mov	x1, x20
	cmp	w8, #128
	b.eq	LBB0_49
; %bb.42:
	cmp	w8, #129
	b.ne	LBB0_50
; %bb.43:
	bl	_qsv_retrieve_enc_jpeg_params
	b	LBB0_51
LBB0_44:
	mov	x22, x0
LBB0_45:
	mov	x0, x22
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_46:
	mov	x1, x0
Lloh33:
	adrp	x2, l_.str.3@PAGE
Lloh34:
	add	x2, x2, l_.str.3@PAGEOFF
	b	LBB0_13
LBB0_47:
Lloh35:
	adrp	x2, l_.str.2@PAGE
Lloh36:
	add	x2, x2, l_.str.2@PAGEOFF
	b	LBB0_13
LBB0_48:
Lloh37:
	adrp	x2, l_.str.4@PAGE
Lloh38:
	add	x2, x2, l_.str.4@PAGEOFF
	b	LBB0_13
LBB0_49:
	bl	_qsv_retrieve_enc_vp9_params
	b	LBB0_51
LBB0_50:
	bl	_qsv_retrieve_enc_params
LBB0_51:
	mov	x22, x0
	tbnz	w0, #31, LBB0_53
; %bb.52:
	mov	w22, #0
	str	x19, [x20, #8]
	b	LBB0_45
LBB0_53:
Lloh39:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh40:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh41:
	ldr	w1, [x8]
Lloh42:
	adrp	x2, l_.str.6@PAGE
Lloh43:
	add	x2, x2, l_.str.6@PAGEOFF
	mov	x0, x19
	bl	_av_log
	b	LBB0_45
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpAdd	Lloh35, Lloh36
	.loh AdrpAdd	Lloh37, Lloh38
	.loh AdrpAdd	Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_MFX_MEMTYPE_OPAQUE_FRAME,4,2   ; @MFX_MEMTYPE_OPAQUE_FRAME
	.comm	_MFX_IOPATTERN_IN_OPAQUE_MEMORY,4,2 ; @MFX_IOPATTERN_IN_OPAQUE_MEMORY
	.comm	_MFX_MEMTYPE_VIDEO_MEMORY_DECODER_TARGET,4,2 ; @MFX_MEMTYPE_VIDEO_MEMORY_DECODER_TARGET
	.comm	_MFX_MEMTYPE_VIDEO_MEMORY_PROCESSOR_TARGET,4,2 ; @MFX_MEMTYPE_VIDEO_MEMORY_PROCESSOR_TARGET
	.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
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Error querying mfx version"

	.comm	_MFX_WRN_PARTIAL_ACCELERATION,4,2 ; @MFX_WRN_PARTIAL_ACCELERATION
	.comm	_AV_LOG_WARNING,4,2             ; @AV_LOG_WARNING
l_.str.1:                               ; @.str.1
	.asciz	"Encoder will work with partial HW acceleration\n"

l_.str.2:                               ; @.str.2
	.asciz	"Error querying encoder params"

l_.str.3:                               ; @.str.3
	.asciz	"Error querying (IOSurf) the encoding parameters"

l_.str.4:                               ; @.str.4
	.asciz	"Error initializing the encoder"

l_.str.5:                               ; @.str.5
	.asciz	"Warning in encoder initialization"

	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
l_.str.6:                               ; @.str.6
	.asciz	"Error retrieving encoding parameters.\n"

.subsections_via_symbols
