	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function qsv_frames_init
_qsv_frames_init:                       ## @qsv_frames_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	%rdi, %rbx
	movq	16(%rdi), %rax
	movq	(%rax), %r15
	movq	8(%rdi), %r12
	movq	_MFX_MEMTYPE_OPAQUE_FRAME@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	andl	(%r12), %r13d
	movl	4(%rdi), %edi
	callq	_qsv_fourcc_from_pix_fmt
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	cmpl	$0, (%rbx)
	jne	LBB0_5
## %bb.3:
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_qsv_init_pool
	testl	%eax, %eax
	js	LBB0_4
LBB0_5:
	movl	4(%r12), %edi
	testl	%r13d, %r13d
	je	LBB0_18
## %bb.6:
	movl	$8, %esi
	callq	_av_mallocz_array
	movq	%rax, 96(%r15)
	testq	%rax, %rax
	je	LBB0_10
## %bb.7:
	movl	4(%r12), %r8d
	testl	%r8d, %r8d
	jle	LBB0_17
## %bb.8:
	leaq	-1(%r8), %rsi
	movl	%r8d, %edx
	andl	$3, %edx
	cmpq	$3, %rsi
	jae	LBB0_12
## %bb.9:
	xorl	%esi, %esi
	jmp	LBB0_14
LBB0_1:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	%rbx, %rdi
	callq	_av_log
	movq	_ENOSYS@GOTPCREL(%rip), %rax
	jmp	LBB0_11
LBB0_18:
	movl	$4, %esi
	callq	_av_mallocz_array
	movq	%rax, 40(%r15)
	testq	%rax, %rax
	je	LBB0_10
## %bb.19:
	cmpl	$0, 4(%r12)
	jle	LBB0_22
## %bb.20:
	movq	8(%r12), %rcx
	xorl	%edx, %edx
	.p2align	4, 0x90
LBB0_21:                                ## =>This Inner Loop Header: Depth=1
	movl	(%rcx,%rdx,4), %esi
	movl	%esi, (%rax,%rdx,4)
	incq	%rdx
	movslq	4(%r12), %rsi
	cmpq	%rsi, %rdx
	jl	LBB0_21
	jmp	LBB0_22
LBB0_10:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_11:
	movl	(%rax), %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_AVERROR                        ## TAILCALL
LBB0_4:
	movl	%eax, %r14d
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdx
	movq	%rbx, %rdi
	callq	_av_log
	jmp	LBB0_23
LBB0_12:
	movl	%r8d, %edi
	andl	$-4, %edi
	movl	$8, %ebx
	xorl	%esi, %esi
	.p2align	4, 0x90
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	movq	8(%r12), %rcx
	addq	%rbx, %rcx
	addq	$-8, %rcx
	movq	%rcx, -16(%rax,%rbx,2)
	movq	96(%r15), %rax
	movq	8(%r12), %rcx
	leaq	-4(%rcx,%rbx), %rcx
	movq	%rcx, -8(%rax,%rbx,2)
	movq	96(%r15), %rax
	movq	8(%r12), %rcx
	addq	%rbx, %rcx
	movq	%rcx, (%rax,%rbx,2)
	movq	96(%r15), %rax
	movq	8(%r12), %rcx
	addq	%rbx, %rcx
	addq	$4, %rcx
	movq	%rcx, 8(%rax,%rbx,2)
	addq	$4, %rsi
	movq	96(%r15), %rax
	addq	$16, %rbx
	cmpq	%rsi, %rdi
	jne	LBB0_13
LBB0_14:
	testq	%rdx, %rdx
	je	LBB0_17
## %bb.15:
	shlq	$2, %rsi
	.p2align	4, 0x90
LBB0_16:                                ## =>This Inner Loop Header: Depth=1
	movq	8(%r12), %rcx
	addq	%rsi, %rcx
	movq	%rcx, (%rax,%rsi,2)
	movq	96(%r15), %rax
	addq	$4, %rsi
	decq	%rdx
	jne	LBB0_16
LBB0_17:
	leaq	48(%r15), %rcx
	movq	%rax, 64(%r15)
	movl	%r8d, 56(%r15)
	movl	(%r12), %eax
	movl	%eax, 60(%r15)
	movl	56(%r15), %eax
	movl	%eax, 72(%r15)
	movl	60(%r15), %eax
	movl	%eax, 76(%r15)
	movq	64(%r15), %rax
	movq	%rax, 80(%r15)
	movq	_MFX_EXTBUFF_OPAQUE_SURFACE_ALLOCATION@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 52(%r15)
	movl	$40, 48(%r15)
	movq	88(%r15), %rax
	movq	%rcx, (%rax)
LBB0_22:
	xorps	%xmm0, %xmm0
	movups	%xmm0, 24(%r15)
	movups	%xmm0, 8(%r15)
	xorl	%r14d, %r14d
LBB0_23:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MFX_MEMTYPE_OPAQUE_FRAME,4,2   ## @MFX_MEMTYPE_OPAQUE_FRAME
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unsupported pixel format\n"

	.comm	_ENOSYS,4,2                     ## @ENOSYS
L_.str.1:                               ## @.str.1
	.asciz	"Error creating an internal frame pool\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_MFX_EXTBUFF_OPAQUE_SURFACE_ALLOCATION,4,2 ## @MFX_EXTBUFF_OPAQUE_SURFACE_ALLOCATION
	.no_dead_strip	_qsv_frames_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function qsv_frames_init
_qsv_frames_init:                       ; @qsv_frames_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	x19, x0
	ldp	x22, x8, [x0, #8]
	ldr	x21, [x8]
	ldr	w23, [x22]
Lloh0:
	adrp	x8, _MFX_MEMTYPE_OPAQUE_FRAME@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MFX_MEMTYPE_OPAQUE_FRAME@GOTPAGEOFF]
Lloh2:
	ldr	w24, [x8]
	ldr	w0, [x0, #4]
	bl	_qsv_fourcc_from_pix_fmt
	cbz	w0, LBB0_9
; %bb.1:
	ldr	w8, [x19]
	cbnz	w8, LBB0_3
; %bb.2:
	mov	x1, x0
	mov	x0, x19
	bl	_qsv_init_pool
	tbnz	w0, #31, LBB0_17
LBB0_3:
	ldr	w0, [x22, #4]
	and	w8, w24, w23
	cbz	w8, LBB0_10
; %bb.4:
	mov	w1, #8
	bl	_av_mallocz_array
	str	x0, [x21, #96]
	cbz	x0, LBB0_15
; %bb.5:
	ldr	w8, [x22, #4]
	cmp	w8, #1
	b.lt	LBB0_8
; %bb.6:
	mov	x9, #0
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x10, [x22, #8]
	add	x10, x10, x9, lsl #2
	str	x10, [x0, x9, lsl #3]
	add	x9, x9, #1
	ldr	x0, [x21, #96]
	cmp	x9, x8
	b.ne	LBB0_7
LBB0_8:
	mov	w9, #40
	mov	x10, x21
	str	w9, [x10, #48]!
	str	x0, [x10, #16]
	ldr	w9, [x22]
	str	w9, [x10, #12]
Lloh3:
	adrp	x9, _MFX_EXTBUFF_OPAQUE_SURFACE_ALLOCATION@GOTPAGE
Lloh4:
	ldr	x9, [x9, _MFX_EXTBUFF_OPAQUE_SURFACE_ALLOCATION@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	stp	w9, w8, [x10, #4]
	ldur	q0, [x10, #8]
	stur	q0, [x10, #24]
	ldr	x8, [x10, #40]
	str	x10, [x8]
	b	LBB0_14
LBB0_9:
Lloh6:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh7:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
Lloh9:
	adrp	x2, l_.str@PAGE
Lloh10:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
	bl	_av_log
Lloh11:
	adrp	x8, _ENOSYS@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ENOSYS@GOTPAGEOFF]
	b	LBB0_16
LBB0_10:
	mov	w1, #4
	bl	_av_mallocz_array
	str	x0, [x21, #40]
	cbz	x0, LBB0_15
; %bb.11:
	ldr	w8, [x22, #4]
	cmp	w8, #1
	b.lt	LBB0_14
; %bb.12:
	mov	x8, #0
	ldr	x9, [x22, #8]
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	lsl	x10, x8, #2
	ldr	w11, [x9, x10]
	str	w11, [x0, x10]
	add	x8, x8, #1
	ldrsw	x10, [x22, #4]
	cmp	x8, x10
	b.lt	LBB0_13
LBB0_14:
	mov	w20, #0
	movi.2d	v0, #0000000000000000
	stur	q0, [x21, #24]
	stur	q0, [x21, #8]
	b	LBB0_18
LBB0_15:
Lloh13:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_16:
	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_17:
	mov	x20, x0
Lloh15:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh16:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
Lloh18:
	adrp	x2, l_.str.1@PAGE
Lloh19:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_av_log
LBB0_18:
	mov	x0, x20
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_MFX_MEMTYPE_OPAQUE_FRAME,4,2   ; @MFX_MEMTYPE_OPAQUE_FRAME
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unsupported pixel format\n"

	.comm	_ENOSYS,4,2                     ; @ENOSYS
l_.str.1:                               ; @.str.1
	.asciz	"Error creating an internal frame pool\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_MFX_EXTBUFF_OPAQUE_SURFACE_ALLOCATION,4,2 ; @MFX_EXTBUFF_OPAQUE_SURFACE_ALLOCATION
	.no_dead_strip	_qsv_frames_init
.subsections_via_symbols
