	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function qsv_init_surface
_qsv_init_surface:                      ## @qsv_init_surface
	.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, %r15
	movq	%rdi, %r14
	movl	8(%rdi), %edi
	callq	_av_pix_fmt_desc_get
	testq	%rax, %rax
	je	LBB0_8
## %bb.1:
	movq	%rax, %rbx
	movl	8(%r14), %edi
	callq	_qsv_fourcc_from_pix_fmt
	testq	%rax, %rax
	je	LBB0_8
## %bb.2:
	movq	16(%rbx), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, (%r15)
	movl	%ecx, 4(%r15)
	xorl	%edx, %edx
	cmpl	$9, %ecx
	setge	%dl
	movl	%edx, 8(%r15)
	cmpq	$0, (%rbx)
	je	LBB0_3
## %bb.4:
	cmpq	$0, 8(%rbx)
	jne	LBB0_5
## %bb.6:
	movq	_MFX_CHROMAFORMAT_YUV422@GOTPCREL(%rip), %rcx
	jmp	LBB0_7
LBB0_8:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_AVERROR                        ## TAILCALL
LBB0_3:
	movq	_MFX_CHROMAFORMAT_YUV444@GOTPCREL(%rip), %rcx
	jmp	LBB0_7
LBB0_5:
	movq	_MFX_CHROMAFORMAT_YUV420@GOTPCREL(%rip), %rcx
LBB0_7:
	movl	(%rcx), %ecx
	movl	%ecx, 64(%r15)
	movq	%rax, 56(%r15)
	movl	4(%r14), %edi
	movl	$16, %esi
	callq	_FFALIGN
	movq	%rax, 48(%r15)
	movl	4(%r14), %eax
	movl	%eax, 40(%r15)
	movl	(%r14), %edi
	movl	$16, %esi
	callq	_FFALIGN
	movq	%rax, 32(%r15)
	movl	(%r14), %eax
	movl	%eax, 24(%r15)
	movabsq	$4294967321, %rax               ## imm = 0x100000019
	movq	%rax, 12(%r15)
	movq	_MFX_PICSTRUCT_PROGRESSIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 20(%r15)
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_MFX_CHROMAFORMAT_YUV420,4,2    ## @MFX_CHROMAFORMAT_YUV420
	.comm	_MFX_CHROMAFORMAT_YUV422,4,2    ## @MFX_CHROMAFORMAT_YUV422
	.comm	_MFX_CHROMAFORMAT_YUV444,4,2    ## @MFX_CHROMAFORMAT_YUV444
	.comm	_MFX_PICSTRUCT_PROGRESSIVE,4,2  ## @MFX_PICSTRUCT_PROGRESSIVE
	.no_dead_strip	_qsv_init_surface
.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_surface
lCPI0_0:
	.long	25                              ; 0x19
	.long	1                               ; 0x1
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_qsv_init_surface:                      ; @qsv_init_surface
	.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
	mov	x20, x0
	ldr	w0, [x0, #8]
	bl	_av_pix_fmt_desc_get
	cbz	x0, LBB0_4
; %bb.1:
	mov	x21, x0
	ldr	w0, [x20, #8]
	bl	_qsv_fourcc_from_pix_fmt
	cbz	x0, LBB0_4
; %bb.2:
	ldr	x8, [x21, #16]
	ldr	w8, [x8]
	stp	w8, w8, [x19]
	cmp	w8, #8
	cset	w8, gt
	str	w8, [x19, #8]
	ldr	x8, [x21]
	cbz	x8, LBB0_5
; %bb.3:
	ldr	x8, [x21, #8]
Lloh0:
	adrp	x9, _MFX_CHROMAFORMAT_YUV420@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MFX_CHROMAFORMAT_YUV420@GOTPAGEOFF]
Lloh2:
	adrp	x10, _MFX_CHROMAFORMAT_YUV422@GOTPAGE
Lloh3:
	ldr	x10, [x10, _MFX_CHROMAFORMAT_YUV422@GOTPAGEOFF]
	cmp	x8, #0
	csel	x8, x10, x9, eq
	b	LBB0_6
LBB0_4:
Lloh4:
	adrp	x8, _EINVAL@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh6:
	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_5:
Lloh7:
	adrp	x8, _MFX_CHROMAFORMAT_YUV444@GOTPAGE
Lloh8:
	ldr	x8, [x8, _MFX_CHROMAFORMAT_YUV444@GOTPAGEOFF]
LBB0_6:
	ldr	w8, [x8]
	str	w8, [x19, #64]
	str	x0, [x19, #56]
	ldr	w0, [x20, #4]
	mov	w1, #16
	bl	_FFALIGN
	str	x0, [x19, #48]
	ldp	w0, w8, [x20]
	str	w8, [x19, #40]
	mov	w1, #16
	bl	_FFALIGN
	str	x0, [x19, #32]
	ldr	w8, [x20]
Lloh9:
	adrp	x9, lCPI0_0@PAGE
Lloh10:
	ldr	d0, [x9, lCPI0_0@PAGEOFF]
	stur	d0, [x19, #12]
Lloh11:
	adrp	x9, _MFX_PICSTRUCT_PROGRESSIVE@GOTPAGE
Lloh12:
	ldr	x9, [x9, _MFX_PICSTRUCT_PROGRESSIVE@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	stp	w9, w8, [x19, #20]
	mov	w0, #0
	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
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdrp	Lloh9, Lloh11
	.loh AdrpLdr	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_MFX_CHROMAFORMAT_YUV420,4,2    ; @MFX_CHROMAFORMAT_YUV420
	.comm	_MFX_CHROMAFORMAT_YUV422,4,2    ; @MFX_CHROMAFORMAT_YUV422
	.comm	_MFX_CHROMAFORMAT_YUV444,4,2    ; @MFX_CHROMAFORMAT_YUV444
	.comm	_MFX_PICSTRUCT_PROGRESSIVE,4,2  ; @MFX_PICSTRUCT_PROGRESSIVE
	.no_dead_strip	_qsv_init_surface
.subsections_via_symbols
