	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function qsv_decode_init
_qsv_decode_init:                       ## @qsv_decode_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %rbx
	movq	%rsi, %r14
	movq	%rdi, %r15
	movl	20(%rdx), %eax
	movl	%eax, 4(%rdi)
	movl	16(%rdx), %eax
	movl	%eax, (%rdi)
	movsd	8(%rdx), %xmm0                  ## xmm0 = mem[0],zero
	movsd	24(%rdx), %xmm1                 ## xmm1 = mem[0],zero
	movlhps	%xmm0, %xmm1                    ## xmm1 = xmm1[0],xmm0[0]
	movups	%xmm1, 20(%rdi)
	movl	4(%rdx), %edi
	callq	_ff_qsv_map_picstruct
	movl	%eax, 16(%r15)
	movl	(%rbx), %edi
	callq	_ff_qsv_map_fourcc
	movl	%eax, 8(%r15)
	movl	28(%r14), %edi
	movq	%rbx, %rsi
	callq	_MFXVideoDECODE_Init
	testl	%eax, %eax
	js	LBB0_4
## %bb.1:
	movq	16(%rbx), %rax
	movq	%rax, 20(%r14)
	movups	(%rbx), %xmm0
	movups	%xmm0, 4(%r14)
	cmpl	$0, 12(%r15)
	jne	LBB0_3
## %bb.2:
	movl	4(%r15), %edi
	movl	8(%r15), %r12d
	movl	$128, %esi
	callq	_FFALIGN
	movl	%eax, %ebx
	movl	(%r15), %edi
	movl	$64, %esi
	callq	_FFALIGN
	movl	%r12d, %edi
	movl	%ebx, %esi
	movl	%eax, %edx
	movl	$1, %ecx
	callq	_av_image_get_buffer_size
	movq	_av_buffer_allocz@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	%eax, %edi
	callq	_av_buffer_pool_init
	movl	%eax, (%r14)
LBB0_3:
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	leaq	L_.str(%rip), %rdx
	movq	%r15, %rdi
	movl	%eax, %esi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ff_qsv_print_error             ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Error initializing the MFX video decoder"

	.comm	_av_buffer_allocz,4,2           ## @av_buffer_allocz
	.no_dead_strip	_qsv_decode_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function qsv_decode_init
_qsv_decode_init:                       ; @qsv_decode_init
	.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	x21, x2
	mov	x19, x1
	mov	x20, x0
	ldr	d0, [x2, #16]
	str	d0, [x0]
	ldr	d0, [x2, #8]
	ldr	d1, [x2, #24]
	mov.d	v1[1], v0[0]
	stur	q1, [x0, #20]
	ldr	w0, [x2, #4]
	bl	_ff_qsv_map_picstruct
	str	w0, [x20, #16]
	ldr	w0, [x21]
	bl	_ff_qsv_map_fourcc
	str	w0, [x20, #8]
	ldr	w0, [x19, #28]
	mov	x1, x21
	bl	_MFXVideoDECODE_Init
	tbnz	w0, #31, LBB0_4
; %bb.1:
	ldr	q0, [x21]
	ldr	x8, [x21, #16]
	stur	x8, [x19, #20]
	stur	q0, [x19, #4]
	ldr	w8, [x20, #12]
	cbnz	w8, LBB0_3
; %bb.2:
	ldp	w0, w21, [x20, #4]
	mov	w1, #128
	bl	_FFALIGN
	mov	x22, x0
	ldr	w0, [x20]
	mov	w1, #64
	bl	_FFALIGN
	mov	x2, x0
	mov	x0, x21
	mov	x1, x22
	mov	w3, #1
	bl	_av_image_get_buffer_size
Lloh0:
	adrp	x8, _av_buffer_allocz@GOTPAGE
Lloh1:
	ldr	x8, [x8, _av_buffer_allocz@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_av_buffer_pool_init
	str	w0, [x19]
LBB0_3:
	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
LBB0_4:
	mov	x1, x0
Lloh3:
	adrp	x2, l_.str@PAGE
Lloh4:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x20
	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	_ff_qsv_print_error
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Error initializing the MFX video decoder"

	.comm	_av_buffer_allocz,4,2           ; @av_buffer_allocz
	.no_dead_strip	_qsv_decode_init
.subsections_via_symbols
