	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_drm_dsc_compute_rc_parameters  ## -- Begin function drm_dsc_compute_rc_parameters
	.p2align	4, 0x90
_drm_dsc_compute_rc_parameters:         ## @drm_dsc_compute_rc_parameters
	.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	%rdi, %r15
	cmpq	$0, 144(%rdi)
	jne	LBB0_2
## %bb.1:
	cmpq	$0, 128(%r15)
	je	LBB0_3
LBB0_2:
	movl	(%r15), %eax
	movl	%eax, %ecx
	shrl	$31, %ecx
	addl	%eax, %ecx
	sarl	%ecx
	movslq	%ecx, %rdi
	movq	_DSC_RC_PIXELS_PER_GROUP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_DIV_ROUND_UP
	movq	%rax, %r14
	movl	(%r15), %ecx
	movl	%ecx, %eax
	shrl	$31, %eax
	addl	%ecx, %eax
	sarl	%eax
	leaq	16(%r15), %rcx
LBB0_4:
	movslq	(%rcx), %rcx
	movslq	%eax, %rdi
	imulq	%rcx, %rdi
	movl	$128, %esi
	callq	_DIV_ROUND_UP
	movq	%rax, %rcx
	movq	%rax, 8(%r15)
	cmpq	$0, 136(%r15)
	je	LBB0_6
## %bb.5:
	movl	20(%r15), %r8d
	movl	24(%r15), %eax
	leal	(%r8,%rax,4), %eax
	leal	(%rax,%rax,2), %eax
	addl	$6, %eax
LBB0_9:
	movslq	28(%r15), %rsi
	testl	%eax, %eax
	jne	LBB0_10
	jmp	LBB0_16
LBB0_6:
	cmpq	$0, 128(%r15)
	movl	20(%r15), %r8d
	je	LBB0_8
## %bb.7:
	movl	24(%r15), %eax
	shll	$4, %eax
	leal	(%rax,%r8,4), %eax
	addl	$2, %eax
	movslq	28(%r15), %rsi
LBB0_10:
	imulq	%rsi, %rcx
	shlq	$3, %rcx
	movslq	%eax, %rbx
	movslq	%r8d, %rdi
	subq	%rbx, %rcx
	.p2align	4, 0x90
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movq	%rcx, %rax
	orq	%rdi, %rax
	shrq	$32, %rax
	je	LBB0_12
## %bb.13:                              ##   in Loop: Header=BB0_11 Depth=1
	movq	%rcx, %rax
	xorl	%edx, %edx
	divq	%rdi
	testq	%rdx, %rdx
	jne	LBB0_15
	jmp	LBB0_17
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_11 Depth=1
	movl	%ecx, %eax
	xorl	%edx, %edx
	divl	%r8d
                                        ## kill: def $edx killed $edx def $rdx
	testq	%rdx, %rdx
	je	LBB0_17
LBB0_15:                                ##   in Loop: Header=BB0_11 Depth=1
	incq	%rcx
	decq	%rbx
	jne	LBB0_11
LBB0_16:
	xorl	%ebx, %ebx
LBB0_17:
	movslq	32(%r15), %rcx
	movq	%rcx, %rax
	addq	$-8, %rax
	cmpq	%rax, %r14
	jae	LBB0_19
## %bb.18:
	leal	8(%r14), %ecx
	movl	%ecx, 32(%r15)
LBB0_19:
	cmpl	$9, %ecx
	jl	LBB0_23
## %bb.20:
	addl	$-8, %ecx
	movq	%r14, %rax
	shrq	$32, %rax
	je	LBB0_21
## %bb.22:
	movq	%r14, %rax
	xorl	%edx, %edx
	divq	%rcx
	jmp	LBB0_24
LBB0_23:
	movq	_DSC_SCALE_DECREMENT_INTERVAL_MAX@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	jmp	LBB0_24
LBB0_21:
	movl	%r14d, %eax
	xorl	%edx, %edx
	divl	%ecx
                                        ## kill: def $eax killed $eax def $rax
LBB0_24:
	movq	%rax, 40(%r15)
	movl	16(%r15), %ecx
	imull	64(%r15), %ecx
	movq	56(%r15), %rax
	leal	8(%rcx), %edx
	addl	$23, %ecx
	testl	%edx, %edx
	cmovnsl	%edx, %ecx
	sarl	$4, %ecx
	movslq	%ecx, %rcx
	movq	%rax, %rdx
	subq	%rcx, %rdx
	addq	%rbx, %rdx
	movq	%rdx, 48(%r15)
	movq	%rax, %rcx
	subq	%rdx, %rcx
	jle	LBB0_25
## %bb.27:
	shlq	$3, %rax
	movq	%rax, %rdx
	orq	%rcx, %rdx
	shrq	$32, %rdx
	je	LBB0_28
## %bb.29:
	cqto
	idivq	%rcx
	movq	%rax, %r12
	cmpl	$1, %esi
	jle	LBB0_31
LBB0_36:
	movl	80(%r15), %eax
	shll	$11, %eax
	movslq	%eax, %rdi
	decl	%esi
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_DIV_ROUND_UP
	movq	%rax, 72(%r15)
	cmpq	$65536, %rax                    ## imm = 0x10000
	jb	LBB0_32
## %bb.37:
	leaq	L_.str.1(%rip), %rdi
	jmp	LBB0_26
LBB0_25:
	leaq	L_.str(%rip), %rdi
LBB0_26:
	callq	_DRM_DEBUG_KMS
	movq	_ERANGE@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_35
LBB0_28:
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%ecx
	movl	%eax, %r12d
	cmpl	$1, %esi
	jg	LBB0_36
LBB0_31:
	movq	$0, 72(%r15)
LBB0_32:
	addq	56(%r15), %rbx
	subq	96(%r15), %rbx
	shlq	$11, %rbx
	movl	28(%r15), %esi
	imull	%r14d, %esi
	movq	%rbx, %rdi
	callq	_DIV_ROUND_UP
	movq	%rax, 88(%r15)
	cmpq	$9, %r12
	jbe	LBB0_33
## %bb.38:
	movq	%rax, %rcx
	movq	48(%r15), %rax
	shlq	$11, %rax
	addq	72(%r15), %rcx
	addq	$-9, %r12
	imulq	%rcx, %r12
	movq	%rax, %rcx
	orq	%r12, %rcx
	shrq	$32, %rcx
	je	LBB0_39
## %bb.40:
	xorl	%edx, %edx
	divq	%r12
	jmp	LBB0_41
LBB0_33:
	movl	$0, 104(%r15)
	jmp	LBB0_34
LBB0_3:
	movslq	(%r15), %rdi
	movq	_DSC_RC_PIXELS_PER_GROUP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_DIV_ROUND_UP
	movq	%rax, %r14
	movl	16(%r15), %eax
	movq	%r15, %rcx
	jmp	LBB0_4
LBB0_8:
	leal	(%r8,%r8,2), %eax
	movl	24(%r15), %edx
	leal	(%rdx,%rdx,2), %edx
	leal	(%rax,%rdx,4), %eax
	addl	$2, %eax
	jmp	LBB0_9
LBB0_39:
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%r12d
                                        ## kill: def $eax killed $eax def $rax
LBB0_41:
	movl	%eax, 104(%r15)
	cmpl	$65536, %eax                    ## imm = 0x10000
	jl	LBB0_34
## %bb.42:
	leaq	L_.str.2(%rip), %rdi
	jmp	LBB0_26
LBB0_34:
	movq	56(%r15), %rbx
	subq	96(%r15), %rbx
	movslq	64(%r15), %rax
	movslq	16(%r15), %rdi
	imulq	%rax, %rdi
	movl	$16, %esi
	callq	_DIV_ROUND_UP
	addq	%rax, %rbx
	movslq	80(%r15), %rax
	imulq	%rax, %r14
	addq	%rbx, %r14
	shlq	$4, %r14
	movl	16(%r15), %esi
	movq	%r14, %rdi
	callq	_DIV_ROUND_UP
	movslq	16(%r15), %rcx
	imulq	%rax, %rcx
	shrq	$4, %rcx
	movq	%rcx, 112(%r15)
	movslq	64(%r15), %rcx
	subq	%rcx, %rax
	movq	%rax, 120(%r15)
	xorl	%eax, %eax
LBB0_35:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DSC_RC_PIXELS_PER_GROUP,4,2    ## @DSC_RC_PIXELS_PER_GROUP
	.comm	_DSC_SCALE_DECREMENT_INTERVAL_MAX,8,3 ## @DSC_SCALE_DECREMENT_INTERVAL_MAX
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"FinalOfs < RcModelSze for this InitialXmitDelay\n"

	.comm	_ERANGE,4,2                     ## @ERANGE
L_.str.1:                               ## @.str.1
	.asciz	"NflBpgOffset is too large for this slice height\n"

L_.str.2:                               ## @.str.2
	.asciz	"ScaleIncrementInterval is large for slice height\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_drm_dsc_compute_rc_parameters  ; -- Begin function drm_dsc_compute_rc_parameters
	.p2align	2
_drm_dsc_compute_rc_parameters:         ; @drm_dsc_compute_rc_parameters
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x19, x0
	ldr	x8, [x0, #144]
	cbnz	x8, LBB0_2
; %bb.1:
	ldr	x8, [x19, #128]
	cbz	x8, LBB0_11
LBB0_2:
	ldr	w8, [x19]
	cmp	w8, #0
	cinc	w8, w8, lt
	sbfx	x0, x8, #1, #31
Lloh0:
	adrp	x8, _DSC_RC_PIXELS_PER_GROUP@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DSC_RC_PIXELS_PER_GROUP@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_DIV_ROUND_UP
	mov	x20, x0
	mov	x9, x19
	ldr	w8, [x9], #16
	cmp	w8, #0
	cinc	w8, w8, lt
	asr	w8, w8, #1
LBB0_3:
	ldrsw	x9, [x9]
	sxtw	x8, w8
	mul	x0, x8, x9
	mov	w1, #128
	bl	_DIV_ROUND_UP
	str	x0, [x19, #8]
	ldr	x8, [x19, #136]
	cbz	x8, LBB0_6
; %bb.4:
	ldp	w9, w8, [x19, #20]
	add	w8, w9, w8, lsl #2
	add	w8, w8, w8, lsl #1
	add	w10, w8, #6
	ldrsw	x8, [x19, #28]
	cbz	w10, LBB0_13
LBB0_5:
	mul	x11, x0, x8
	lsl	x11, x11, #3
	b	LBB0_8
LBB0_6:
	ldr	x8, [x19, #128]
	ldr	w9, [x19, #20]
	cbz	x8, LBB0_12
; %bb.7:
	ldp	w8, w12, [x19, #24]
                                        ; kill: def $w12 killed $w12 def $x12
	sxtw	x12, w12
	lsl	w8, w8, #4
	add	w8, w8, w9, lsl #2
	orr	w10, w8, #0x2
	mul	x8, x0, x12
	lsl	x11, x8, #3
	mov	x8, x12
LBB0_8:
	sxtw	x21, w10
	sxtw	x9, w9
	sub	x10, x11, x21
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	udiv	x11, x10, x9
	msub	x11, x11, x9, x10
	cbz	x11, LBB0_14
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	add	x10, x10, #1
	subs	x21, x21, #1
	b.ne	LBB0_9
	b	LBB0_14
LBB0_11:
	ldrsw	x0, [x19]
Lloh3:
	adrp	x8, _DSC_RC_PIXELS_PER_GROUP@GOTPAGE
Lloh4:
	ldr	x8, [x8, _DSC_RC_PIXELS_PER_GROUP@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	bl	_DIV_ROUND_UP
	mov	x20, x0
	ldr	w8, [x19, #16]
	mov	x9, x19
	b	LBB0_3
LBB0_12:
	add	w8, w9, w9, lsl #1
	ldr	w10, [x19, #24]
	mov	w11, #12
	madd	w8, w10, w11, w8
	add	w10, w8, #2
	ldrsw	x8, [x19, #28]
	cbnz	w10, LBB0_5
LBB0_13:
	mov	x21, #0
LBB0_14:
	ldrsw	x9, [x19, #32]
	sub	x10, x9, #8
	cmp	x20, x10
	b.hs	LBB0_16
; %bb.15:
	add	w9, w20, #8
	str	w9, [x19, #32]
LBB0_16:
	cmp	w9, #9
	b.lt	LBB0_18
; %bb.17:
	sub	w9, w9, #8
	udiv	x9, x20, x9
	b	LBB0_19
LBB0_18:
Lloh6:
	adrp	x9, _DSC_SCALE_DECREMENT_INTERVAL_MAX@GOTPAGE
Lloh7:
	ldr	x9, [x9, _DSC_SCALE_DECREMENT_INTERVAL_MAX@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
LBB0_19:
	ldr	x22, [x19, #56]
	ldr	w10, [x19, #64]
	ldr	w11, [x19, #16]
	mul	w10, w11, w10
	add	w11, w10, #8
	add	w10, w10, #23
	cmp	w11, #0
	csel	w10, w10, w11, lt
	asr	w10, w10, #4
	sub	x10, x22, w10, sxtw
	add	x10, x10, x21
	subs	x23, x22, x10
	stp	x9, x10, [x19, #40]
	b.le	LBB0_23
; %bb.20:
	subs	w1, w8, #1
	b.le	LBB0_25
; %bb.21:
	ldr	w8, [x19, #80]
	lsl	w8, w8, #11
	sxtw	x0, w8
	bl	_DIV_ROUND_UP
	str	x0, [x19, #72]
	cmp	x0, #16, lsl #12                ; =65536
	b.lo	LBB0_26
; %bb.22:
Lloh9:
	adrp	x0, l_.str.1@PAGE
Lloh10:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_24
LBB0_23:
Lloh11:
	adrp	x0, l_.str@PAGE
Lloh12:
	add	x0, x0, l_.str@PAGEOFF
LBB0_24:
	bl	_DRM_DEBUG_KMS
Lloh13:
	adrp	x8, _ERANGE@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ERANGE@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_31
LBB0_25:
	str	xzr, [x19, #72]
LBB0_26:
	lsl	x8, x22, #3
	ldr	w9, [x19, #28]
	ldr	x10, [x19, #56]
	ldr	x11, [x19, #96]
	add	x10, x10, x21
	sub	x10, x10, x11
	lsl	x0, x10, #11
	mul	w1, w9, w20
	sdiv	x21, x8, x23
	bl	_DIV_ROUND_UP
	str	x0, [x19, #88]
	subs	x8, x21, #9
	b.ls	LBB0_29
; %bb.27:
	ldr	x9, [x19, #48]
	lsl	x9, x9, #11
	ldr	x10, [x19, #72]
	add	x10, x10, x0
	mul	x8, x10, x8
	udiv	x8, x9, x8
	str	w8, [x19, #104]
	cmp	w8, #16, lsl #12                ; =65536
	b.lt	LBB0_30
; %bb.28:
Lloh16:
	adrp	x0, l_.str.2@PAGE
Lloh17:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_24
LBB0_29:
	str	wzr, [x19, #104]
LBB0_30:
	ldr	x8, [x19, #56]
	ldr	x9, [x19, #96]
	sub	x21, x8, x9
	ldrsw	x8, [x19, #64]
	ldrsw	x9, [x19, #16]
	mul	x0, x9, x8
	mov	w1, #16
	bl	_DIV_ROUND_UP
	add	x8, x21, x0
	ldrsw	x9, [x19, #80]
	madd	x8, x20, x9, x8
	lsl	x0, x8, #4
	ldr	w1, [x19, #16]
	bl	_DIV_ROUND_UP
	mov	x8, x0
	mov	w0, #0
	ldrsw	x9, [x19, #16]
	mul	x9, x8, x9
	lsr	x9, x9, #4
	ldrsw	x10, [x19, #64]
	sub	x8, x8, x10
	stp	x9, x8, [x19, #112]
LBB0_31:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_DSC_RC_PIXELS_PER_GROUP,4,2    ; @DSC_RC_PIXELS_PER_GROUP
	.comm	_DSC_SCALE_DECREMENT_INTERVAL_MAX,8,3 ; @DSC_SCALE_DECREMENT_INTERVAL_MAX
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"FinalOfs < RcModelSze for this InitialXmitDelay\n"

	.comm	_ERANGE,4,2                     ; @ERANGE
l_.str.1:                               ; @.str.1
	.asciz	"NflBpgOffset is too large for this slice height\n"

l_.str.2:                               ; @.str.2
	.asciz	"ScaleIncrementInterval is large for slice height\n"

.subsections_via_symbols
