	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function qsv_init_pool
_qsv_init_pool:                         ## @qsv_init_pool
	.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	%rdi, %r14
	movl	(%rdi), %edi
	testl	%edi, %edi
	jle	LBB0_8
## %bb.1:
	movq	16(%r14), %rbx
	movq	8(%r14), %rax
	movq	8(%rax), %r12
	movl	$4, %esi
	callq	_av_mallocz_array
	movq	%rax, (%r12)
	testq	%rax, %rax
	je	LBB0_13
## %bb.2:
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	cmpl	$0, (%r14)
	jle	LBB0_9
## %bb.3:
	movq	%r14, %rdi
	movq	%rax, %rsi
	callq	_qsv_init_surface
	testl	%eax, %eax
	js	LBB0_16
## %bb.4:
	movl	$4, %esi
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	incq	%rbx
	movslq	(%r14), %rax
	cmpq	%rax, %rbx
	jge	LBB0_9
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	leaq	4(%rsi), %r15
	addq	(%r12), %rsi
	movq	%r14, %rdi
	callq	_qsv_init_surface
	movq	%r15, %rsi
	testl	%eax, %eax
	jns	LBB0_5
	jmp	LBB0_16
LBB0_8:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	%r14, %rdi
	callq	_av_log
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_14
LBB0_9:
	movq	_MFX_MEMTYPE_OPAQUE_FRAME@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	testl	%eax, (%rbx)
	jne	LBB0_11
## %bb.10:
	movq	%r14, %rdi
	callq	_qsv_init_child_ctx
	testl	%eax, %eax
	js	LBB0_16
LBB0_11:
	movq	_qsv_pool_alloc@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%r13d, %r13d
	movl	$4, %edi
	movq	%r14, %rsi
	xorl	%ecx, %ecx
	callq	_av_buffer_pool_init2
	movq	8(%r14), %rcx
	movl	%eax, (%rcx)
	testl	%eax, %eax
	je	LBB0_13
## %bb.12:
	movq	(%r12), %rax
	movq	%rax, 8(%rbx)
	movl	(%r14), %eax
	movl	%eax, 4(%rbx)
	jmp	LBB0_17
LBB0_13:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_14:
	movl	(%rax), %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_AVERROR                        ## TAILCALL
LBB0_16:
	movl	%eax, %r13d
LBB0_17:
	movl	%r13d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"QSV requires a fixed frame pool size\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_MFX_MEMTYPE_OPAQUE_FRAME,4,2   ## @MFX_MEMTYPE_OPAQUE_FRAME
	.comm	_qsv_pool_alloc,4,2             ## @qsv_pool_alloc
	.no_dead_strip	_qsv_init_pool
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function qsv_init_pool
_qsv_init_pool:                         ; @qsv_init_pool
	.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	x19, x0
	ldr	w0, [x0]
	cmp	w0, #0
	b.le	LBB0_7
; %bb.1:
	ldp	x8, x20, [x19, #8]
	ldr	x21, [x8, #8]
	mov	w1, #4
	bl	_av_mallocz_array
	str	x0, [x21]
	cbz	x0, LBB0_13
; %bb.2:
	ldr	w8, [x19]
	cmp	w8, #1
	b.lt	LBB0_8
; %bb.3:
	mov	x1, x0
	mov	x0, x19
	bl	_qsv_init_surface
	tbnz	w0, #31, LBB0_12
; %bb.4:
	mov	x22, #0
	mov	w8, #4
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	add	x22, x22, #1
	ldrsw	x9, [x19]
	cmp	x22, x9
	b.ge	LBB0_8
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	add	x23, x8, #4
	ldr	x9, [x21]
	add	x1, x9, x8
	mov	x0, x19
	bl	_qsv_init_surface
	mov	x8, x23
	tbz	w0, #31, LBB0_5
	b	LBB0_12
LBB0_7:
Lloh0:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x2, l_.str@PAGE
Lloh4:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
	bl	_av_log
Lloh5:
	adrp	x8, _EINVAL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_14
LBB0_8:
	ldr	w8, [x20]
Lloh7:
	adrp	x9, _MFX_MEMTYPE_OPAQUE_FRAME@GOTPAGE
Lloh8:
	ldr	x9, [x9, _MFX_MEMTYPE_OPAQUE_FRAME@GOTPAGEOFF]
Lloh9:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_10
; %bb.9:
	mov	x0, x19
	bl	_qsv_init_child_ctx
	tbnz	w0, #31, LBB0_12
LBB0_10:
Lloh10:
	adrp	x8, _qsv_pool_alloc@GOTPAGE
Lloh11:
	ldr	x8, [x8, _qsv_pool_alloc@GOTPAGEOFF]
Lloh12:
	ldr	w2, [x8]
	mov	w0, #4
	mov	x1, x19
	mov	x3, #0
	bl	_av_buffer_pool_init2
	ldr	x8, [x19, #8]
	str	w0, [x8]
	cbz	w0, LBB0_13
; %bb.11:
	mov	w0, #0
	ldr	x8, [x21]
	str	x8, [x20, #8]
	ldr	w8, [x19]
	str	w8, [x20, #4]
LBB0_12:
	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_13:
Lloh13:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_14:
	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
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"QSV requires a fixed frame pool size\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_MFX_MEMTYPE_OPAQUE_FRAME,4,2   ; @MFX_MEMTYPE_OPAQUE_FRAME
	.comm	_qsv_pool_alloc,4,2             ; @qsv_pool_alloc
	.no_dead_strip	_qsv_init_pool
.subsections_via_symbols
