	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function qsv_decode_preinit
_qsv_decode_preinit:                    ## @qsv_decode_preinit
	.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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, -72(%rbp)                 ## 8-byte Spill
	movq	%rsi, %r14
	movq	%rdi, %r13
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_AV_PIX_FMT_QSV@GOTPCREL(%rip), %r12
	movl	(%r12), %eax
	movl	%eax, -60(%rbp)
	movl	%edx, -56(%rbp)
	movq	_AV_PIX_FMT_NONE@GOTPCREL(%rip), %r15
	movl	(%r15), %eax
	movl	%eax, -52(%rbp)
	leaq	-60(%rbp), %rsi
	callq	_ff_get_format
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	cmpq	$0, 24(%r14)
	jne	LBB0_5
## %bb.3:
	movl	4(%r14), %ebx
	xorl	%eax, %eax
	callq	_qsv_fifo_item_size
	imull	%eax, %ebx
	movl	%ebx, %edi
	callq	_av_fifo_alloc
	movq	%rax, 24(%r14)
	testq	%rax, %rax
	je	LBB0_4
LBB0_5:
	movl	(%r13), %eax
	cmpl	(%r12), %eax
	jne	LBB0_6
## %bb.7:
	movq	16(%r13), %rax
	testq	%rax, %rax
	je	LBB0_6
## %bb.8:
	movq	16(%rax), %r12
	movl	(%rax), %esi
	movl	8(%rax), %ecx
	movl	%ecx, 16(%r14)
	movl	4(%rax), %eax
	movl	%eax, 12(%r14)
	jmp	LBB0_9
LBB0_1:
	movl	%eax, %ebx
	movl	(%r15), %eax
	movl	%eax, (%r13)
	movl	%eax, (%r14)
	jmp	LBB0_21
LBB0_6:
	xorl	%esi, %esi
	xorl	%r12d, %r12d
LBB0_9:
	movq	8(%r13), %rax
	testq	%rax, %rax
	je	LBB0_16
## %bb.10:
	testl	%esi, %esi
	jne	LBB0_16
## %bb.11:
	movq	(%rax), %rax
	movq	(%rax), %rax
	movl	(%rax), %esi
	movq	_MFX_MEMTYPE_OPAQUE_FRAME@GOTPCREL(%rip), %rax
	testl	%esi, (%rax)
	je	LBB0_13
## %bb.12:
	movq	_MFX_IOPATTERN_OUT_OPAQUE_MEMORY@GOTPCREL(%rip), %rax
	jmp	LBB0_15
LBB0_13:
	movq	_MFX_MEMTYPE_VIDEO_MEMORY_DECODER_TARGET@GOTPCREL(%rip), %rax
	andl	(%rax), %esi
	je	LBB0_16
## %bb.14:
	movq	_MFX_IOPATTERN_OUT_VIDEO_MEMORY@GOTPCREL(%rip), %rax
LBB0_15:
	movl	(%rax), %esi
LBB0_16:
	testl	%esi, %esi
	jne	LBB0_18
## %bb.17:
	movq	_MFX_IOPATTERN_OUT_SYSTEM_MEMORY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
LBB0_18:
	movl	%esi, 8(%r14)
	leaq	L_.str(%rip), %rdx
	movq	%r13, %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_ff_qsv_print_iopattern
	movq	8(%r13), %rcx
	movl	4(%r13), %r8d
	movq	%r13, %rdi
	movq	%r14, %rsi
	movq	%r12, %rdx
	callq	_qsv_init_session
	testl	%eax, %eax
	js	LBB0_19
## %bb.20:
	movdqu	4(%r14), %xmm0
	pshufd	$225, %xmm0, %xmm0              ## xmm0 = xmm0[1,0,2,3]
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movdqu	%xmm0, (%rax)
	xorl	%ebx, %ebx
	jmp	LBB0_21
LBB0_19:
	movl	%eax, %ebx
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdx
	movq	%r13, %rdi
	callq	_av_log
	jmp	LBB0_21
LBB0_4:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_AVERROR
	movl	%eax, %ebx
LBB0_21:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_23
## %bb.22:
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_23:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_AV_PIX_FMT_QSV,4,2             ## @AV_PIX_FMT_QSV
	.comm	_AV_PIX_FMT_NONE,4,2            ## @AV_PIX_FMT_NONE
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_MFX_MEMTYPE_OPAQUE_FRAME,4,2   ## @MFX_MEMTYPE_OPAQUE_FRAME
	.comm	_MFX_IOPATTERN_OUT_OPAQUE_MEMORY,4,2 ## @MFX_IOPATTERN_OUT_OPAQUE_MEMORY
	.comm	_MFX_MEMTYPE_VIDEO_MEMORY_DECODER_TARGET,4,2 ## @MFX_MEMTYPE_VIDEO_MEMORY_DECODER_TARGET
	.comm	_MFX_IOPATTERN_OUT_VIDEO_MEMORY,4,2 ## @MFX_IOPATTERN_OUT_VIDEO_MEMORY
	.comm	_MFX_IOPATTERN_OUT_SYSTEM_MEMORY,4,2 ## @MFX_IOPATTERN_OUT_SYSTEM_MEMORY
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Decoder"

	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
L_.str.1:                               ## @.str.1
	.asciz	"Error initializing an MFX session\n"

	.no_dead_strip	_qsv_decode_preinit
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function qsv_decode_preinit
_qsv_decode_preinit:                    ; @qsv_decode_preinit
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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, x3
	mov	x21, x1
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #24]
Lloh3:
	adrp	x23, _AV_PIX_FMT_QSV@GOTPAGE
Lloh4:
	ldr	x23, [x23, _AV_PIX_FMT_QSV@GOTPAGEOFF]
	ldr	w8, [x23]
	stp	w8, w2, [sp, #12]
Lloh5:
	adrp	x24, _AV_PIX_FMT_NONE@GOTPAGE
Lloh6:
	ldr	x24, [x24, _AV_PIX_FMT_NONE@GOTPAGEOFF]
	ldr	w8, [x24]
	str	w8, [sp, #20]
	add	x1, sp, #12
	bl	_ff_get_format
	tbnz	w0, #31, LBB0_6
; %bb.1:
	ldr	x8, [x21, #24]
	cbnz	x8, LBB0_3
; %bb.2:
	ldr	w22, [x21, #4]
	bl	_qsv_fifo_item_size
	mul	w0, w0, w22
	bl	_av_fifo_alloc
	str	x0, [x21, #24]
	cbz	x0, LBB0_15
LBB0_3:
	ldr	w8, [x19]
	ldr	w9, [x23]
	cmp	w8, w9
	b.ne	LBB0_7
; %bb.4:
	ldr	x9, [x19, #16]
	cbz	x9, LBB0_7
; %bb.5:
	ldr	x22, [x9, #16]
	ldr	w8, [x9]
	ldur	d0, [x9, #4]
	stur	d0, [x21, #12]
	ldr	x9, [x19, #8]
	cbnz	x9, LBB0_8
	b	LBB0_12
LBB0_6:
	mov	x22, x0
	ldr	w8, [x24]
	str	w8, [x19]
	str	w8, [x21]
	b	LBB0_16
LBB0_7:
	mov	w8, #0
	mov	x22, #0
	ldr	x9, [x19, #8]
	cbz	x9, LBB0_12
LBB0_8:
	cbnz	w8, LBB0_12
; %bb.9:
	ldr	x8, [x9]
	ldr	x8, [x8]
	ldr	w8, [x8]
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.eq	LBB0_11
; %bb.10:
Lloh10:
	adrp	x8, _MFX_IOPATTERN_OUT_OPAQUE_MEMORY@GOTPAGE
Lloh11:
	ldr	x8, [x8, _MFX_IOPATTERN_OUT_OPAQUE_MEMORY@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	b	LBB0_12
LBB0_11:
Lloh13:
	adrp	x9, _MFX_MEMTYPE_VIDEO_MEMORY_DECODER_TARGET@GOTPAGE
Lloh14:
	ldr	x9, [x9, _MFX_MEMTYPE_VIDEO_MEMORY_DECODER_TARGET@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
Lloh16:
	adrp	x10, _MFX_IOPATTERN_OUT_VIDEO_MEMORY@GOTPAGE
Lloh17:
	ldr	x10, [x10, _MFX_IOPATTERN_OUT_VIDEO_MEMORY@GOTPAGEOFF]
Lloh18:
	ldr	w10, [x10]
	tst	w9, w8
	csel	w8, wzr, w10, eq
LBB0_12:
Lloh19:
	adrp	x9, _MFX_IOPATTERN_OUT_SYSTEM_MEMORY@GOTPAGE
Lloh20:
	ldr	x9, [x9, _MFX_IOPATTERN_OUT_SYSTEM_MEMORY@GOTPAGEOFF]
Lloh21:
	ldr	w9, [x9]
	cmp	w8, #0
	csel	w1, w9, w8, eq
	str	w1, [x21, #8]
Lloh22:
	adrp	x2, l_.str@PAGE
Lloh23:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
	bl	_ff_qsv_print_iopattern
	ldr	x3, [x19, #8]
	ldr	w4, [x19, #4]
	mov	x0, x19
	mov	x1, x21
	mov	x2, x22
	bl	_qsv_init_session
	tbnz	w0, #31, LBB0_14
; %bb.13:
	mov	w22, #0
	ldur	q0, [x21, #4]
	mov.16b	v1, v0
	mov.s	v1[0], v0[1]
	mov.s	v1[1], v0[0]
	str	q1, [x20]
	b	LBB0_16
LBB0_14:
	mov	x22, x0
Lloh24:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh25:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh26:
	ldr	w1, [x8]
Lloh27:
	adrp	x2, l_.str.1@PAGE
Lloh28:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_av_log
	b	LBB0_16
LBB0_15:
Lloh29:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh30:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh31:
	ldr	w0, [x8]
	bl	_AVERROR
	mov	x22, x0
LBB0_16:
	ldr	x8, [sp, #24]
Lloh32:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh33:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh34:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_18
; %bb.17:
	mov	x0, x22
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_18:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.cfi_endproc
                                        ; -- End function
	.comm	_AV_PIX_FMT_QSV,4,2             ; @AV_PIX_FMT_QSV
	.comm	_AV_PIX_FMT_NONE,4,2            ; @AV_PIX_FMT_NONE
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_MFX_MEMTYPE_OPAQUE_FRAME,4,2   ; @MFX_MEMTYPE_OPAQUE_FRAME
	.comm	_MFX_IOPATTERN_OUT_OPAQUE_MEMORY,4,2 ; @MFX_IOPATTERN_OUT_OPAQUE_MEMORY
	.comm	_MFX_MEMTYPE_VIDEO_MEMORY_DECODER_TARGET,4,2 ; @MFX_MEMTYPE_VIDEO_MEMORY_DECODER_TARGET
	.comm	_MFX_IOPATTERN_OUT_VIDEO_MEMORY,4,2 ; @MFX_IOPATTERN_OUT_VIDEO_MEMORY
	.comm	_MFX_IOPATTERN_OUT_SYSTEM_MEMORY,4,2 ; @MFX_IOPATTERN_OUT_SYSTEM_MEMORY
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Decoder"

	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
l_.str.1:                               ; @.str.1
	.asciz	"Error initializing an MFX session\n"

	.no_dead_strip	_qsv_decode_preinit
.subsections_via_symbols
