	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function radeon_dp_mst_set_vcp_size
_radeon_dp_mst_set_vcp_size:            ## @radeon_dp_mst_set_vcp_size
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movq	(%rdi), %r13
	movl	(%r13), %edi
	callq	_radeon_atom_set_enc_offset
	movl	%eax, %r12d
	movl	%r14d, %edi
	callq	_drm_fixp2int
	movl	%eax, %r15d
	subl	%eax, %r14d
	shll	$26, %r14d
	movl	%r14d, %edi
	callq	_drm_fixp2int_ceil
	movl	%eax, %r14d
	movl	%r15d, %edi
	callq	_NI_DP_MSE_RATE_X
	movl	%eax, %r15d
	movl	%r14d, %edi
	callq	_NI_DP_MSE_RATE_Y
	orl	%eax, %r15d
	movq	_NI_DP_MSE_RATE_CNTL@GOTPCREL(%rip), %rax
	movl	%r12d, %edi
	addl	(%rax), %edi
	movl	%r15d, %esi
	callq	_WREG32
	xorl	%ebx, %ebx
	movq	_NI_DP_MSE_RATE_UPDATE@GOTPCREL(%rip), %r15
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r15), %edi
	addl	%r12d, %edi
	callq	_RREG32
	movl	%eax, %r14d
	movl	$10, %edi
	callq	_udelay
	testb	$1, %r14b
	je	LBB0_3
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	incl	%ebx
	cmpl	$10001, %ebx                    ## imm = 0x2711
	jne	LBB0_1
	jmp	LBB0_4
LBB0_3:
	cmpl	$10000, %ebx                    ## imm = 0x2710
	jb	LBB0_5
LBB0_4:
	movl	(%r13), %esi
	leaq	L_.str(%rip), %rdi
	callq	_DRM_ERROR
LBB0_5:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NI_DP_MSE_RATE_CNTL,4,2        ## @NI_DP_MSE_RATE_CNTL
	.comm	_NI_DP_MSE_RATE_UPDATE,4,2      ## @NI_DP_MSE_RATE_UPDATE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"timed out wait for rate cntl %d\n"

	.no_dead_strip	_radeon_dp_mst_set_vcp_size
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function radeon_dp_mst_set_vcp_size
_radeon_dp_mst_set_vcp_size:            ; @radeon_dp_mst_set_vcp_size
	.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	x20, x1
	ldr	x22, [x0]
	ldr	w0, [x22]
	bl	_radeon_atom_set_enc_offset
	mov	x19, x0
	mov	x0, x20
	bl	_drm_fixp2int
	mov	x21, x0
	sub	w8, w20, w0
	lsl	w0, w8, #26
	bl	_drm_fixp2int_ceil
	mov	x20, x0
	mov	x0, x21
	bl	_NI_DP_MSE_RATE_X
	mov	x21, x0
	mov	x0, x20
	bl	_NI_DP_MSE_RATE_Y
	orr	w1, w0, w21
Lloh0:
	adrp	x8, _NI_DP_MSE_RATE_CNTL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _NI_DP_MSE_RATE_CNTL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	add	w0, w8, w19
	bl	_WREG32
	mov	w21, #0
Lloh3:
	adrp	x23, _NI_DP_MSE_RATE_UPDATE@GOTPAGE
Lloh4:
	ldr	x23, [x23, _NI_DP_MSE_RATE_UPDATE@GOTPAGEOFF]
	mov	w24, #10001
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x23]
	add	w0, w8, w19
	bl	_RREG32
	mov	x20, x0
	mov	w0, #10
	bl	_udelay
	tbz	w20, #0, LBB0_3
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	add	w21, w21, #1
	cmp	w21, w24
	b.ne	LBB0_1
	b	LBB0_4
LBB0_3:
	lsr	w8, w21, #4
	cmp	w8, #625
	b.lo	LBB0_5
LBB0_4:
	ldr	w1, [x22]
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_ERROR
LBB0_5:
	mov	w0, #0
	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 AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_NI_DP_MSE_RATE_CNTL,4,2        ; @NI_DP_MSE_RATE_CNTL
	.comm	_NI_DP_MSE_RATE_UPDATE,4,2      ; @NI_DP_MSE_RATE_UPDATE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"timed out wait for rate cntl %d\n"

	.no_dead_strip	_radeon_dp_mst_set_vcp_size
.subsections_via_symbols
