	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function select_rc_mode
_select_rc_mode:                        ## @select_rc_mode
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movl	(%rsi), %r10d
	movl	4(%rsi), %ecx
	movq	_AV_CODEC_FLAG_QSCALE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	xorl	%r8d, %r8d
	andl	(%rdi), %eax
	setne	%r9b
	testl	%r10d, %r10d
	je	LBB0_5
## %bb.1:
	movq	_QSV_HAVE_LA@GOTPCREL(%rip), %rdx
	cmpl	$0, (%rdx)
	jne	LBB0_5
## %bb.2:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	jmp	LBB0_3
LBB0_5:
	testl	%ecx, %ecx
	je	LBB0_8
## %bb.6:
	movq	_QSV_HAVE_VCM@GOTPCREL(%rip), %rdx
	cmpl	$0, (%rdx)
	jne	LBB0_8
## %bb.7:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdx
LBB0_3:
	xorl	%eax, %eax
	callq	_av_log
	movq	_ENOSYS@GOTPCREL(%rip), %rax
LBB0_4:
	movl	(%rax), %edi
	popq	%rbp
	jmp	_AVERROR                        ## TAILCALL
LBB0_8:
	movb	%r9b, %r8b
	addl	%r10d, %ecx
	addl	%r8d, %ecx
	cmpl	$2, %ecx
	jl	LBB0_10
## %bb.9:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.2(%rip), %rdx
	xorl	%eax, %eax
	callq	_av_log
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_10:
	testl	%eax, %eax
	je	LBB0_12
## %bb.11:
	leaq	L_.str.4(%rip), %rcx
	movq	_MFX_RATECONTROL_CQP@GOTPCREL(%rip), %rax
	jmp	LBB0_16
LBB0_12:
	cmpq	$0, 8(%rdi)
	jle	LBB0_15
## %bb.13:
	movq	_QSV_HAVE_ICQ@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jne	LBB0_15
## %bb.14:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.3(%rip), %rdx
	jmp	LBB0_3
LBB0_15:
	movq	16(%rdi), %rax
	cmpq	24(%rdi), %rax
	movq	_MFX_RATECONTROL_VBR@GOTPCREL(%rip), %rax
	cmoveq	_MFX_RATECONTROL_CBR@GOTPCREL(%rip), %rax
	leaq	L_.str.5(%rip), %rdx
	leaq	L_.str.6(%rip), %rcx
	cmoveq	%rdx, %rcx
LBB0_16:
	movl	(%rax), %eax
	movl	%eax, 8(%rsi)
	movq	_AV_LOG_VERBOSE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.7(%rip), %rdx
	xorl	%eax, %eax
	callq	_av_log
	xorl	%eax, %eax
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AV_CODEC_FLAG_QSCALE,4,2       ## @AV_CODEC_FLAG_QSCALE
	.comm	_QSV_HAVE_LA,4,2                ## @QSV_HAVE_LA
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Lookahead ratecontrol mode requested, but is not supported by this SDK version\n"

	.comm	_ENOSYS,4,2                     ## @ENOSYS
	.comm	_QSV_HAVE_VCM,4,2               ## @QSV_HAVE_VCM
L_.str.1:                               ## @.str.1
	.asciz	"VCM ratecontrol mode requested, but is not supported by this SDK version\n"

L_.str.2:                               ## @.str.2
	.asciz	"More than one of: { constant qscale, lookahead, VCM } requested, only one of them can be used at a time.\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_QSV_HAVE_ICQ,4,2               ## @QSV_HAVE_ICQ
L_.str.3:                               ## @.str.3
	.asciz	"ICQ ratecontrol mode requested, but is not supported by this SDK version\n"

	.comm	_MFX_RATECONTROL_CQP,4,2        ## @MFX_RATECONTROL_CQP
L_.str.4:                               ## @.str.4
	.asciz	"constant quantization parameter (CQP)"

	.comm	_MFX_RATECONTROL_CBR,4,2        ## @MFX_RATECONTROL_CBR
L_.str.5:                               ## @.str.5
	.asciz	"constant bitrate (CBR)"

	.comm	_MFX_RATECONTROL_VBR,4,2        ## @MFX_RATECONTROL_VBR
L_.str.6:                               ## @.str.6
	.asciz	"variable bitrate (VBR)"

	.comm	_AV_LOG_VERBOSE,4,2             ## @AV_LOG_VERBOSE
L_.str.7:                               ## @.str.7
	.asciz	"Using the %s ratecontrol method\n"

	.comm	_MFX_RATECONTROL_AVBR,4,2       ## @MFX_RATECONTROL_AVBR
	.comm	_MFX_RATECONTROL_ICQ,4,2        ## @MFX_RATECONTROL_ICQ
	.comm	_MFX_RATECONTROL_LA,4,2         ## @MFX_RATECONTROL_LA
	.comm	_MFX_RATECONTROL_LA_ICQ,4,2     ## @MFX_RATECONTROL_LA_ICQ
	.comm	_MFX_RATECONTROL_QVBR,4,2       ## @MFX_RATECONTROL_QVBR
	.comm	_MFX_RATECONTROL_VCM,4,2        ## @MFX_RATECONTROL_VCM
	.no_dead_strip	_select_rc_mode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function select_rc_mode
_select_rc_mode:                        ; @select_rc_mode
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #32
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	ldr	w9, [x1]
	ldr	w8, [x0]
Lloh0:
	adrp	x10, _AV_CODEC_FLAG_QSCALE@GOTPAGE
Lloh1:
	ldr	x10, [x10, _AV_CODEC_FLAG_QSCALE@GOTPAGEOFF]
Lloh2:
	ldr	w10, [x10]
	ands	w8, w10, w8
	cset	w10, ne
Lloh3:
	adrp	x11, _QSV_HAVE_LA@GOTPAGE
Lloh4:
	ldr	x11, [x11, _QSV_HAVE_LA@GOTPAGEOFF]
Lloh5:
	ldr	w11, [x11]
	cmp	w9, #0
	ccmp	w11, #0, #0, ne
	b.eq	LBB0_4
; %bb.1:
	ldr	w11, [x1, #4]
	cbz	w11, LBB0_7
; %bb.2:
Lloh6:
	adrp	x12, _QSV_HAVE_VCM@GOTPAGE
Lloh7:
	ldr	x12, [x12, _QSV_HAVE_VCM@GOTPAGEOFF]
Lloh8:
	ldr	w12, [x12]
	cbnz	w12, LBB0_7
; %bb.3:
Lloh9:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh10:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
Lloh12:
	adrp	x2, l_.str.1@PAGE
Lloh13:
	add	x2, x2, l_.str.1@PAGEOFF
	b	LBB0_5
LBB0_4:
Lloh14:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh15:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
Lloh17:
	adrp	x2, l_.str@PAGE
Lloh18:
	add	x2, x2, l_.str@PAGEOFF
LBB0_5:
	bl	_av_log
Lloh19:
	adrp	x8, _ENOSYS@GOTPAGE
Lloh20:
	ldr	x8, [x8, _ENOSYS@GOTPAGEOFF]
LBB0_6:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #32
	b	_AVERROR
LBB0_7:
	add	w9, w11, w9
	add	w9, w9, w10
	cmp	w9, #2
	b.lt	LBB0_9
; %bb.8:
Lloh21:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh22:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh23:
	ldr	w1, [x8]
Lloh24:
	adrp	x2, l_.str.2@PAGE
Lloh25:
	add	x2, x2, l_.str.2@PAGEOFF
	bl	_av_log
Lloh26:
	adrp	x8, _EINVAL@GOTPAGE
Lloh27:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_6
LBB0_9:
	cbz	w8, LBB0_11
; %bb.10:
Lloh28:
	adrp	x8, l_.str.4@PAGE
Lloh29:
	add	x8, x8, l_.str.4@PAGEOFF
Lloh30:
	adrp	x9, _MFX_RATECONTROL_CQP@GOTPAGE
Lloh31:
	ldr	x9, [x9, _MFX_RATECONTROL_CQP@GOTPAGEOFF]
	b	LBB0_15
LBB0_11:
	ldr	x8, [x0, #8]
	cmp	x8, #1
	b.lt	LBB0_14
; %bb.12:
Lloh32:
	adrp	x8, _QSV_HAVE_ICQ@GOTPAGE
Lloh33:
	ldr	x8, [x8, _QSV_HAVE_ICQ@GOTPAGEOFF]
Lloh34:
	ldr	w8, [x8]
	cbnz	w8, LBB0_14
; %bb.13:
Lloh35:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh36:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh37:
	ldr	w1, [x8]
Lloh38:
	adrp	x2, l_.str.3@PAGE
Lloh39:
	add	x2, x2, l_.str.3@PAGEOFF
	b	LBB0_5
LBB0_14:
	ldp	x8, x9, [x0, #16]
Lloh40:
	adrp	x10, _MFX_RATECONTROL_VBR@GOTPAGE
Lloh41:
	ldr	x10, [x10, _MFX_RATECONTROL_VBR@GOTPAGEOFF]
Lloh42:
	adrp	x11, _MFX_RATECONTROL_CBR@GOTPAGE
Lloh43:
	ldr	x11, [x11, _MFX_RATECONTROL_CBR@GOTPAGEOFF]
	cmp	x8, x9
	csel	x9, x11, x10, eq
Lloh44:
	adrp	x8, l_.str.6@PAGE
Lloh45:
	add	x8, x8, l_.str.6@PAGEOFF
Lloh46:
	adrp	x10, l_.str.5@PAGE
Lloh47:
	add	x10, x10, l_.str.5@PAGEOFF
	csel	x8, x10, x8, eq
LBB0_15:
	ldr	w9, [x9]
	str	w9, [x1, #8]
Lloh48:
	adrp	x9, _AV_LOG_VERBOSE@GOTPAGE
Lloh49:
	ldr	x9, [x9, _AV_LOG_VERBOSE@GOTPAGEOFF]
Lloh50:
	ldr	w1, [x9]
	str	x8, [sp]
Lloh51:
	adrp	x2, l_.str.7@PAGE
Lloh52:
	add	x2, x2, l_.str.7@PAGEOFF
	bl	_av_log
	mov	w0, #0
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #32
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh30, Lloh31
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpAdd	Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpAdd	Lloh46, Lloh47
	.loh AdrpAdd	Lloh44, Lloh45
	.loh AdrpLdrGot	Lloh42, Lloh43
	.loh AdrpLdrGot	Lloh40, Lloh41
	.loh AdrpAdd	Lloh51, Lloh52
	.loh AdrpLdrGotLdr	Lloh48, Lloh49, Lloh50
	.cfi_endproc
                                        ; -- End function
	.comm	_AV_CODEC_FLAG_QSCALE,4,2       ; @AV_CODEC_FLAG_QSCALE
	.comm	_QSV_HAVE_LA,4,2                ; @QSV_HAVE_LA
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Lookahead ratecontrol mode requested, but is not supported by this SDK version\n"

	.comm	_ENOSYS,4,2                     ; @ENOSYS
	.comm	_QSV_HAVE_VCM,4,2               ; @QSV_HAVE_VCM
l_.str.1:                               ; @.str.1
	.asciz	"VCM ratecontrol mode requested, but is not supported by this SDK version\n"

l_.str.2:                               ; @.str.2
	.asciz	"More than one of: { constant qscale, lookahead, VCM } requested, only one of them can be used at a time.\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_QSV_HAVE_ICQ,4,2               ; @QSV_HAVE_ICQ
l_.str.3:                               ; @.str.3
	.asciz	"ICQ ratecontrol mode requested, but is not supported by this SDK version\n"

	.comm	_MFX_RATECONTROL_CQP,4,2        ; @MFX_RATECONTROL_CQP
l_.str.4:                               ; @.str.4
	.asciz	"constant quantization parameter (CQP)"

	.comm	_MFX_RATECONTROL_CBR,4,2        ; @MFX_RATECONTROL_CBR
l_.str.5:                               ; @.str.5
	.asciz	"constant bitrate (CBR)"

	.comm	_MFX_RATECONTROL_VBR,4,2        ; @MFX_RATECONTROL_VBR
l_.str.6:                               ; @.str.6
	.asciz	"variable bitrate (VBR)"

	.comm	_AV_LOG_VERBOSE,4,2             ; @AV_LOG_VERBOSE
l_.str.7:                               ; @.str.7
	.asciz	"Using the %s ratecontrol method\n"

	.comm	_MFX_RATECONTROL_AVBR,4,2       ; @MFX_RATECONTROL_AVBR
	.comm	_MFX_RATECONTROL_ICQ,4,2        ; @MFX_RATECONTROL_ICQ
	.comm	_MFX_RATECONTROL_LA,4,2         ; @MFX_RATECONTROL_LA
	.comm	_MFX_RATECONTROL_LA_ICQ,4,2     ; @MFX_RATECONTROL_LA_ICQ
	.comm	_MFX_RATECONTROL_QVBR,4,2       ; @MFX_RATECONTROL_QVBR
	.comm	_MFX_RATECONTROL_VCM,4,2        ; @MFX_RATECONTROL_VCM
	.no_dead_strip	_select_rc_mode
.subsections_via_symbols
