	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rv515_bandwidth_update         ## -- Begin function rv515_bandwidth_update
	.p2align	4, 0x90
_rv515_bandwidth_update:                ## @rv515_bandwidth_update
	.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
	cmpl	$0, 24(%rdi)
	je	LBB0_5
## %bb.1:
	movq	%rdi, %rbx
	callq	_radeon_update_display_priority
	cmpl	$2, (%rbx)
	jne	LBB0_4
## %bb.2:
	movq	8(%rbx), %rax
	movq	_CHIP_RV515@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_4
## %bb.3:
	movq	16(%rbx), %rax
	movq	(%rax), %rcx
	movq	8(%rax), %rax
	movq	8(%rcx), %r15
	movq	8(%rax), %r12
	movq	_MC_MISC_LAT_TIMER@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	callq	_RREG32_MC
	movq	_MC_DISP1R_INIT_LAT_MASK@GOTPCREL(%rip), %rcx
	movq	_MC_DISP0R_INIT_LAT_MASK@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	(%rcx), %edx
	notl	%edx
	andl	%eax, %edx
	movq	_MC_DISP1R_INIT_LAT_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	movl	$1, %eax
	shll	%cl, %eax
	xorl	%edi, %edi
	testq	%r12, %r12
	cmovel	%edi, %eax
	movl	$1, %esi
	orl	%edx, %eax
	movq	_MC_DISP0R_INIT_LAT_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %esi
	testq	%r15, %r15
	cmovel	%edi, %esi
	orl	%eax, %esi
	movl	(%r14), %edi
	callq	_WREG32_MC
LBB0_4:
	movq	%rbx, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_rv515_bandwidth_avivo_update   ## TAILCALL
LBB0_5:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CHIP_RV515,8,3                 ## @CHIP_RV515
	.comm	_MC_MISC_LAT_TIMER,4,2          ## @MC_MISC_LAT_TIMER
	.comm	_MC_DISP1R_INIT_LAT_MASK,4,2    ## @MC_DISP1R_INIT_LAT_MASK
	.comm	_MC_DISP0R_INIT_LAT_MASK,4,2    ## @MC_DISP0R_INIT_LAT_MASK
	.comm	_MC_DISP1R_INIT_LAT_SHIFT,4,2   ## @MC_DISP1R_INIT_LAT_SHIFT
	.comm	_MC_DISP0R_INIT_LAT_SHIFT,4,2   ## @MC_DISP0R_INIT_LAT_SHIFT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rv515_bandwidth_update         ; -- Begin function rv515_bandwidth_update
	.p2align	2
_rv515_bandwidth_update:                ; @rv515_bandwidth_update
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	ldr	w8, [x0, #24]
	cbz	w8, LBB0_5
; %bb.1:
	mov	x19, x0
	bl	_radeon_update_display_priority
	ldr	w8, [x19]
	cmp	w8, #2
	b.ne	LBB0_4
; %bb.2:
	ldr	x8, [x19, #8]
Lloh0:
	adrp	x9, _CHIP_RV515@GOTPAGE
Lloh1:
	ldr	x9, [x9, _CHIP_RV515@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.3:
	ldr	x8, [x19, #16]
	ldp	x9, x8, [x8]
	ldr	x20, [x9, #8]
	ldr	x21, [x8, #8]
Lloh3:
	adrp	x22, _MC_MISC_LAT_TIMER@GOTPAGE
Lloh4:
	ldr	x22, [x22, _MC_MISC_LAT_TIMER@GOTPAGEOFF]
	ldr	w0, [x22]
	bl	_RREG32_MC
Lloh5:
	adrp	x8, _MC_DISP1R_INIT_LAT_MASK@GOTPAGE
Lloh6:
	ldr	x8, [x8, _MC_DISP1R_INIT_LAT_MASK@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
Lloh8:
	adrp	x9, _MC_DISP0R_INIT_LAT_MASK@GOTPAGE
Lloh9:
	ldr	x9, [x9, _MC_DISP0R_INIT_LAT_MASK@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	orr	w8, w9, w8
	bic	w8, w0, w8
Lloh11:
	adrp	x9, _MC_DISP1R_INIT_LAT_SHIFT@GOTPAGE
Lloh12:
	ldr	x9, [x9, _MC_DISP1R_INIT_LAT_SHIFT@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	mov	w10, #1
	lsl	w9, w10, w9
	cmp	x21, #0
	csel	w9, wzr, w9, eq
	orr	w8, w9, w8
Lloh14:
	adrp	x9, _MC_DISP0R_INIT_LAT_SHIFT@GOTPAGE
Lloh15:
	ldr	x9, [x9, _MC_DISP0R_INIT_LAT_SHIFT@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	lsl	w9, w10, w9
	cmp	x20, #0
	csel	w9, wzr, w9, eq
	orr	w1, w8, w9
	ldr	w0, [x22]
	bl	_WREG32_MC
LBB0_4:
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_rv515_bandwidth_avivo_update
LBB0_5:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_CHIP_RV515,8,3                 ; @CHIP_RV515
	.comm	_MC_MISC_LAT_TIMER,4,2          ; @MC_MISC_LAT_TIMER
	.comm	_MC_DISP1R_INIT_LAT_MASK,4,2    ; @MC_DISP1R_INIT_LAT_MASK
	.comm	_MC_DISP0R_INIT_LAT_MASK,4,2    ; @MC_DISP0R_INIT_LAT_MASK
	.comm	_MC_DISP1R_INIT_LAT_SHIFT,4,2   ; @MC_DISP1R_INIT_LAT_SHIFT
	.comm	_MC_DISP0R_INIT_LAT_SHIFT,4,2   ; @MC_DISP0R_INIT_LAT_SHIFT
.subsections_via_symbols
