	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function qsv_retrieve_enc_params
_qsv_retrieve_enc_params:               ## @qsv_retrieve_enc_params
	.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	$1080, %rsp                     ## imm = 0x438
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movq	%rsp, -1080(%rbp)               ## 8-byte Spill
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movabsq	$2199023256064, %rax            ## imm = 0x20000000200
	movq	%rax, -1120(%rbp)
	leaq	-1072(%rbp), %rax
	movq	%rax, -1112(%rbp)
	leaq	-560(%rbp), %rax
	movq	%rax, -1104(%rbp)
	movl	$32, -1096(%rbp)
	movq	_MFX_EXTBUFF_CODING_OPTION_SPSPPS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -1092(%rbp)
	movl	$8, -1088(%rbp)
	movq	_MFX_EXTBUFF_CODING_OPTION@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -1084(%rbp)
	movq	_QSV_HAVE_CO2@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_QSV_HAVE_CO3@GOTPCREL(%rip), %rcx
	addl	(%rcx), %eax
	movq	_QSV_HAVE_CO_VPS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	addl	%ecx, %eax
	addl	$2, %eax
	shlq	$3, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r15
	movq	(%r14), %r12
	movq	_AV_CODEC_ID_MPEG2VIDEO@GOTPCREL(%rip), %rax
	movq	(%rax), %r13
	leaq	-1120(%rbp), %rax
	movq	%rax, (%r15)
	leaq	-1088(%rbp), %rax
	movq	%rax, 8(%r15)
	leaq	8(%rbx), %rsi
	movq	%r15, 24(%rbx)
	movl	$2, 8(%rbx)
	movl	32(%rbx), %edi
	callq	_MFXVideoENCODE_GetVideoParam
	testl	%eax, %eax
	js	LBB0_5
## %bb.1:
	movl	12(%rbx), %eax
	imull	16(%rbx), %eax
	imull	$1000, %eax, %eax               ## imm = 0x3E8
	movl	%eax, 4(%rbx)
	movl	-1120(%rbp), %eax
	testl	%eax, %eax
	je	LBB0_4
## %bb.2:
	movl	-1116(%rbp), %edi
	cmpq	%r13, %r12
	je	LBB0_10
## %bb.3:
	testl	%edi, %edi
	jne	LBB0_10
LBB0_4:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdx
	movq	%r14, %rdi
	callq	_av_log
	movq	_AVERROR_UNKNOWN@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	jmp	LBB0_7
LBB0_5:
	leaq	L_.str(%rip), %rdx
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_ff_qsv_print_error
LBB0_6:
	movl	%eax, %r12d
LBB0_7:
	movq	-1080(%rbp), %r13               ## 8-byte Reload
LBB0_8:
	movq	%r13, %rsp
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_17
## %bb.9:
	movl	%r12d, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	xorl	%ecx, %ecx
	cmpq	%r13, %r12
	cmovel	%ecx, %edi
	addl	%eax, %edi
	movl	%edi, 8(%r14)
	movq	_AV_INPUT_BUFFER_PADDING_SIZE@GOTPCREL(%rip), %rax
	addl	(%rax), %edi
	callq	_av_malloc
	movl	%eax, 12(%r14)
	testl	%eax, %eax
	je	LBB0_15
## %bb.11:
	movl	-1120(%rbp), %edx
	leaq	-560(%rbp), %rsi
	movl	%eax, %edi
	callq	_memcpy
	cmpq	%r13, %r12
	je	LBB0_13
## %bb.12:
	movl	12(%r14), %edi
	addl	-1120(%rbp), %edi
	movl	-1116(%rbp), %edx
	leaq	-1072(%rbp), %rsi
	callq	_memcpy
LBB0_13:
	movl	8(%r14), %edi
	addl	12(%r14), %edi
	movq	_AV_INPUT_BUFFER_PADDING_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%r12d, %r12d
	xorl	%esi, %esi
	callq	_memset
	movq	%r14, %rdi
	callq	_ff_add_cpb_side_data
	testq	%rax, %rax
	movq	-1080(%rbp), %r13               ## 8-byte Reload
	je	LBB0_16
## %bb.14:
	addq	$8, %r15
	movups	16(%r14), %xmm0
	movups	%xmm0, (%rax)
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movq	%r15, %rdx
	callq	_dump_video_param
	jmp	LBB0_8
LBB0_15:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_AVERROR
	jmp	LBB0_6
LBB0_16:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_AVERROR
	movl	%eax, %r12d
	jmp	LBB0_8
LBB0_17:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_MFX_EXTBUFF_CODING_OPTION_SPSPPS,4,2 ## @MFX_EXTBUFF_CODING_OPTION_SPSPPS
	.comm	_MFX_EXTBUFF_CODING_OPTION,4,2  ## @MFX_EXTBUFF_CODING_OPTION
	.comm	_QSV_HAVE_CO2,4,2               ## @QSV_HAVE_CO2
	.comm	_QSV_HAVE_CO3,4,2               ## @QSV_HAVE_CO3
	.comm	_QSV_HAVE_CO_VPS,4,2            ## @QSV_HAVE_CO_VPS
	.comm	_AV_CODEC_ID_MPEG2VIDEO,8,3     ## @AV_CODEC_ID_MPEG2VIDEO
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Error calling GetVideoParam"

	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
L_.str.1:                               ## @.str.1
	.asciz	"No extradata returned from libmfx.\n"

	.comm	_AVERROR_UNKNOWN,4,2            ## @AVERROR_UNKNOWN
	.comm	_AV_INPUT_BUFFER_PADDING_SIZE,4,2 ## @AV_INPUT_BUFFER_PADDING_SIZE
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_AV_CODEC_ID_HEVC,8,3           ## @AV_CODEC_ID_HEVC
	.comm	_MFX_EXTBUFF_CODING_OPTION2,4,2 ## @MFX_EXTBUFF_CODING_OPTION2
	.comm	_MFX_EXTBUFF_CODING_OPTION3,4,2 ## @MFX_EXTBUFF_CODING_OPTION3
	.comm	_MFX_EXTBUFF_CODING_OPTION_VPS,4,2 ## @MFX_EXTBUFF_CODING_OPTION_VPS
	.no_dead_strip	_qsv_retrieve_enc_params
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function qsv_retrieve_enc_params
_qsv_retrieve_enc_params:               ; @qsv_retrieve_enc_params
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	sub	sp, sp, #1072
	mov	x19, sp
	mov	x21, x1
	mov	x20, x0
	mov	x23, sp
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-88]
	movi.2s	v0, #2, lsl #8
	str	d0, [x19, #8]
	add	x8, x19, #40
	add	x9, x19, #552
	stp	x8, x9, [x19, #16]
	mov	w8, #32
Lloh3:
	adrp	x9, _MFX_EXTBUFF_CODING_OPTION_SPSPPS@GOTPAGE
Lloh4:
	ldr	x9, [x9, _MFX_EXTBUFF_CODING_OPTION_SPSPPS@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	stp	w8, w9, [x19, #32]
	mov	w8, #8
Lloh6:
	adrp	x9, _MFX_EXTBUFF_CODING_OPTION@GOTPAGE
Lloh7:
	ldr	x9, [x9, _MFX_EXTBUFF_CODING_OPTION@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	stp	w8, w9, [x19]
Lloh9:
	adrp	x8, _QSV_HAVE_CO2@GOTPAGE
Lloh10:
	ldr	x8, [x8, _QSV_HAVE_CO2@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
Lloh12:
	adrp	x9, _QSV_HAVE_CO3@GOTPAGE
Lloh13:
	ldr	x9, [x9, _QSV_HAVE_CO3@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
Lloh15:
	adrp	x10, _QSV_HAVE_CO_VPS@GOTPAGE
Lloh16:
	ldr	x10, [x10, _QSV_HAVE_CO_VPS@GOTPAGEOFF]
Lloh17:
	ldr	w10, [x10]
	add	w8, w8, w9
	add	w8, w8, w10
	add	w8, w8, #2
	lsl	x9, x8, #3
	add	x8, x9, #15
	and	x8, x8, #0xffffffff0
Lloh18:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh19:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	sub	x8, x9, x8
	mov	sp, x8
	ldr	x24, [x0]
Lloh20:
	adrp	x9, _AV_CODEC_ID_MPEG2VIDEO@GOTPAGE
Lloh21:
	ldr	x9, [x9, _AV_CODEC_ID_MPEG2VIDEO@GOTPAGEOFF]
Lloh22:
	ldr	x25, [x9]
	add	x9, x19, #8
	str	x9, [x8]
	add	x9, x19, #0
	mov	x22, x8
	str	x9, [x22, #8]!
	mov	w9, #2
	str	w9, [x1, #8]!
	str	x8, [x1, #16]
	ldr	w0, [x1, #24]
	bl	_MFXVideoENCODE_GetVideoParam
	tbnz	w0, #31, LBB0_5
; %bb.1:
	ldp	w8, w9, [x21, #12]
	mul	w8, w8, w9
	mov	w9, #1000
	mul	w8, w8, w9
	str	w8, [x21, #4]
	ldr	w8, [x19, #8]
	cbz	w8, LBB0_4
; %bb.2:
	ldr	w9, [x19, #12]
	cmp	x24, x25
	b.eq	LBB0_6
; %bb.3:
	cbnz	w9, LBB0_6
LBB0_4:
Lloh23:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh24:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh25:
	ldr	w1, [x8]
Lloh26:
	adrp	x2, l_.str.1@PAGE
Lloh27:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_av_log
Lloh28:
	adrp	x8, _AVERROR_UNKNOWN@GOTPAGE
Lloh29:
	ldr	x8, [x8, _AVERROR_UNKNOWN@GOTPAGEOFF]
Lloh30:
	ldr	w0, [x8]
	b	LBB0_12
LBB0_5:
	mov	x1, x0
Lloh31:
	adrp	x2, l_.str@PAGE
Lloh32:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x20
	bl	_ff_qsv_print_error
	b	LBB0_12
LBB0_6:
	cmp	x24, x25
	csel	w9, wzr, w9, eq
Lloh33:
	adrp	x26, _AV_INPUT_BUFFER_PADDING_SIZE@GOTPAGE
Lloh34:
	ldr	x26, [x26, _AV_INPUT_BUFFER_PADDING_SIZE@GOTPAGEOFF]
	ldr	w10, [x26]
	add	w8, w9, w8
	add	w0, w10, w8
	str	w8, [x20, #8]
	bl	_av_malloc
	str	w0, [x20, #12]
	cbz	w0, LBB0_11
; %bb.7:
	ldr	w2, [x19, #8]
	add	x1, x19, #552
	bl	_memcpy
	cmp	x24, x25
	b.eq	LBB0_9
; %bb.8:
	ldr	w8, [x20, #12]
	ldp	w9, w2, [x19, #8]
	add	w0, w8, w9
	add	x1, x19, #40
	bl	_memcpy
LBB0_9:
	ldp	w9, w8, [x20, #8]
	add	w0, w9, w8
	ldr	w2, [x26]
	mov	w1, #0
	bl	_memset
	mov	x0, x20
	bl	_ff_add_cpb_side_data
	cbz	x0, LBB0_11
; %bb.10:
	ldr	q0, [x20, #16]
	str	q0, [x0]
	mov	x0, x20
	mov	x1, x21
	mov	x2, x22
	bl	_dump_video_param
	mov	w0, #0
	b	LBB0_12
LBB0_11:
Lloh35:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh36:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh37:
	ldr	w0, [x8]
	bl	_AVERROR
LBB0_12:
	mov	sp, x23
	ldur	x8, [x29, #-88]
Lloh38:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh39:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh40:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_14
; %bb.13:
	sub	sp, x29, #80
	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
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_14:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpLdrGot	Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.cfi_endproc
                                        ; -- End function
	.comm	_MFX_EXTBUFF_CODING_OPTION_SPSPPS,4,2 ; @MFX_EXTBUFF_CODING_OPTION_SPSPPS
	.comm	_MFX_EXTBUFF_CODING_OPTION,4,2  ; @MFX_EXTBUFF_CODING_OPTION
	.comm	_QSV_HAVE_CO2,4,2               ; @QSV_HAVE_CO2
	.comm	_QSV_HAVE_CO3,4,2               ; @QSV_HAVE_CO3
	.comm	_QSV_HAVE_CO_VPS,4,2            ; @QSV_HAVE_CO_VPS
	.comm	_AV_CODEC_ID_MPEG2VIDEO,8,3     ; @AV_CODEC_ID_MPEG2VIDEO
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Error calling GetVideoParam"

	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
l_.str.1:                               ; @.str.1
	.asciz	"No extradata returned from libmfx.\n"

	.comm	_AVERROR_UNKNOWN,4,2            ; @AVERROR_UNKNOWN
	.comm	_AV_INPUT_BUFFER_PADDING_SIZE,4,2 ; @AV_INPUT_BUFFER_PADDING_SIZE
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_AV_CODEC_ID_HEVC,8,3           ; @AV_CODEC_ID_HEVC
	.comm	_MFX_EXTBUFF_CODING_OPTION2,4,2 ; @MFX_EXTBUFF_CODING_OPTION2
	.comm	_MFX_EXTBUFF_CODING_OPTION3,4,2 ; @MFX_EXTBUFF_CODING_OPTION3
	.comm	_MFX_EXTBUFF_CODING_OPTION_VPS,4,2 ; @MFX_EXTBUFF_CODING_OPTION_VPS
	.no_dead_strip	_qsv_retrieve_enc_params
.subsections_via_symbols
