	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function qsv_decode_header
_qsv_decode_header:                     ## @qsv_decode_header
	.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
	subq	$40, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	xorps	%xmm0, %xmm0
	movaps	%xmm0, -48(%rbp)
	movaps	%xmm0, -64(%rbp)
	movq	8(%rdx), %rax
	testq	%rax, %rax
	je	LBB0_11
## %bb.1:
	movq	%r8, %r14
	movq	%rsi, %rbx
	movq	%rdi, %r15
	movl	16(%rdx), %esi
	movl	%esi, -40(%rbp)
	movq	%rax, -56(%rbp)
	movq	%rax, -48(%rbp)
	movl	(%rdx), %eax
	movl	%eax, -60(%rbp)
	movq	(%rdi), %rax
	movq	_AV_FIELD_PROGRESSIVE@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rax
	jne	LBB0_3
## %bb.2:
	movq	_MFX_BITSTREAM_COMPLETE_FRAME@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -64(%rbp)
LBB0_3:
	cmpl	$0, (%rbx)
	jne	LBB0_5
## %bb.4:
	movq	%r15, %rdi
	movq	%rbx, %rsi
	movl	%ecx, %edx
	movq	%r14, %rcx
	callq	_qsv_decode_preinit
	testl	%eax, %eax
	js	LBB0_10
LBB0_5:
	movl	8(%r15), %edi
	callq	_ff_qsv_codec_id_to_mfx
	testl	%eax, %eax
	js	LBB0_10
## %bb.6:
	movl	%eax, (%r14)
	movl	(%rbx), %edi
	leaq	-64(%rbp), %rsi
	movq	%r14, %rdx
	callq	_MFXVideoDECODE_DecodeHeader
	movl	%eax, %esi
	movq	_MFX_ERR_MORE_DATA@GOTPCREL(%rip), %rax
	cmpl	%esi, (%rax)
	jne	LBB0_8
## %bb.7:
	movq	_EAGAIN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_AVERROR
	jmp	LBB0_10
LBB0_11:
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_10
LBB0_8:
	xorl	%eax, %eax
	testl	%esi, %esi
	jns	LBB0_10
## %bb.9:
	leaq	L_.str(%rip), %rdx
	movq	%r15, %rdi
	callq	_ff_qsv_print_error
LBB0_10:
	addq	$40, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AV_FIELD_PROGRESSIVE,8,3       ## @AV_FIELD_PROGRESSIVE
	.comm	_MFX_BITSTREAM_COMPLETE_FRAME,4,2 ## @MFX_BITSTREAM_COMPLETE_FRAME
	.comm	_AVERROR_INVALIDDATA,4,2        ## @AVERROR_INVALIDDATA
	.comm	_MFX_ERR_MORE_DATA,4,2          ## @MFX_ERR_MORE_DATA
	.comm	_EAGAIN,4,2                     ## @EAGAIN
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Error decoding stream header"

	.no_dead_strip	_qsv_decode_header
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function qsv_decode_header
_qsv_decode_header:                     ; @qsv_decode_header
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	movi.2d	v0, #0000000000000000
	stp	q0, q0, [sp]
	ldr	x8, [x2, #8]
	cbz	x8, LBB0_8
; %bb.1:
	mov	x20, x4
	mov	x21, x1
	mov	x19, x0
	ldr	w9, [x2, #16]
	str	w9, [sp, #24]
	stp	x8, x8, [sp, #8]
	ldr	w8, [x2]
	str	w8, [sp, #4]
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _AV_FIELD_PROGRESSIVE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _AV_FIELD_PROGRESSIVE@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_3
; %bb.2:
Lloh3:
	adrp	x8, _MFX_BITSTREAM_COMPLETE_FRAME@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MFX_BITSTREAM_COMPLETE_FRAME@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	str	w8, [sp]
LBB0_3:
	ldr	w8, [x21]
	cbnz	w8, LBB0_5
; %bb.4:
	mov	x0, x19
	mov	x1, x21
	mov	x2, x3
	mov	x3, x20
	bl	_qsv_decode_preinit
	tbnz	w0, #31, LBB0_12
LBB0_5:
	ldr	w0, [x19, #8]
	bl	_ff_qsv_codec_id_to_mfx
	tbnz	w0, #31, LBB0_12
; %bb.6:
	str	w0, [x20]
	ldr	w0, [x21]
	mov	x1, sp
	mov	x2, x20
	bl	_MFXVideoDECODE_DecodeHeader
Lloh6:
	adrp	x8, _MFX_ERR_MORE_DATA@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MFX_ERR_MORE_DATA@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	cmp	w8, w0
	b.ne	LBB0_9
; %bb.7:
Lloh9:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
	bl	_AVERROR
	b	LBB0_12
LBB0_8:
Lloh12:
	adrp	x8, _AVERROR_INVALIDDATA@GOTPAGE
Lloh13:
	ldr	x8, [x8, _AVERROR_INVALIDDATA@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
	b	LBB0_12
LBB0_9:
	mov	x1, x0
	tbnz	w0, #31, LBB0_11
; %bb.10:
	mov	w0, #0
	b	LBB0_12
LBB0_11:
Lloh15:
	adrp	x2, l_.str@PAGE
Lloh16:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
	bl	_ff_qsv_print_error
LBB0_12:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_AV_FIELD_PROGRESSIVE,8,3       ; @AV_FIELD_PROGRESSIVE
	.comm	_MFX_BITSTREAM_COMPLETE_FRAME,4,2 ; @MFX_BITSTREAM_COMPLETE_FRAME
	.comm	_AVERROR_INVALIDDATA,4,2        ; @AVERROR_INVALIDDATA
	.comm	_MFX_ERR_MORE_DATA,4,2          ; @MFX_ERR_MORE_DATA
	.comm	_EAGAIN,4,2                     ; @EAGAIN
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Error decoding stream header"

	.no_dead_strip	_qsv_decode_header
.subsections_via_symbols
