	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gfx_v8_0_set_mec_doorbell_range
_gfx_v8_0_set_mec_doorbell_range:       ## @gfx_v8_0_set_mec_doorbell_range
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	(%rdi), %rax
	movq	_CHIP_TONGA@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jle	LBB0_2
## %bb.1:
	movq	%rdi, %rbx
	movq	_mmCP_MEC_DOORBELL_RANGE_LOWER@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	8(%rbx), %esi
	shll	$2, %esi
	callq	_WREG32
	movq	_mmCP_MEC_DOORBELL_RANGE_UPPER@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	12(%rbx), %esi
	shll	$2, %esi
	callq	_WREG32
LBB0_2:
	movq	_CP_PQ_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_DOORBELL_ENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$1, %edx
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_WREG32_FIELD                   ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_CHIP_TONGA,8,3                 ## @CHIP_TONGA
	.comm	_mmCP_MEC_DOORBELL_RANGE_LOWER,4,2 ## @mmCP_MEC_DOORBELL_RANGE_LOWER
	.comm	_mmCP_MEC_DOORBELL_RANGE_UPPER,4,2 ## @mmCP_MEC_DOORBELL_RANGE_UPPER
	.comm	_CP_PQ_STATUS,4,2               ## @CP_PQ_STATUS
	.comm	_DOORBELL_ENABLE,4,2            ## @DOORBELL_ENABLE
	.no_dead_strip	_gfx_v8_0_set_mec_doorbell_range
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gfx_v8_0_set_mec_doorbell_range
_gfx_v8_0_set_mec_doorbell_range:       ; @gfx_v8_0_set_mec_doorbell_range
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _CHIP_TONGA@GOTPAGE
Lloh1:
	ldr	x9, [x9, _CHIP_TONGA@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.le	LBB0_2
; %bb.1:
	mov	x19, x0
Lloh3:
	adrp	x8, _mmCP_MEC_DOORBELL_RANGE_LOWER@GOTPAGE
Lloh4:
	ldr	x8, [x8, _mmCP_MEC_DOORBELL_RANGE_LOWER@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	ldr	w8, [x19, #8]
	lsl	w1, w8, #2
	bl	_WREG32
Lloh6:
	adrp	x8, _mmCP_MEC_DOORBELL_RANGE_UPPER@GOTPAGE
Lloh7:
	ldr	x8, [x8, _mmCP_MEC_DOORBELL_RANGE_UPPER@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	ldr	w8, [x19, #12]
	lsl	w1, w8, #2
	bl	_WREG32
LBB0_2:
Lloh9:
	adrp	x8, _CP_PQ_STATUS@GOTPAGE
Lloh10:
	ldr	x8, [x8, _CP_PQ_STATUS@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
Lloh12:
	adrp	x8, _DOORBELL_ENABLE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _DOORBELL_ENABLE@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	mov	w2, #1
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_WREG32_FIELD
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_CHIP_TONGA,8,3                 ; @CHIP_TONGA
	.comm	_mmCP_MEC_DOORBELL_RANGE_LOWER,4,2 ; @mmCP_MEC_DOORBELL_RANGE_LOWER
	.comm	_mmCP_MEC_DOORBELL_RANGE_UPPER,4,2 ; @mmCP_MEC_DOORBELL_RANGE_UPPER
	.comm	_CP_PQ_STATUS,4,2               ; @CP_PQ_STATUS
	.comm	_DOORBELL_ENABLE,4,2            ; @DOORBELL_ENABLE
	.no_dead_strip	_gfx_v8_0_set_mec_doorbell_range
.subsections_via_symbols
