	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function si_cp_enable
_si_cp_enable:                          ## @si_cp_enable
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	testl	%esi, %esi
	je	LBB0_2
## %bb.1:
	movq	_CP_ME_CNTL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%esi, %esi
	callq	_WREG32
	jmp	LBB0_5
LBB0_2:
	movq	%rdi, %rbx
	movq	16(%rdi), %rax
	movq	(%rax), %rax
	movq	_RADEON_RING_TYPE_GFX_INDEX@GOTPCREL(%rip), %r14
	cmpq	(%r14), %rax
	jne	LBB0_4
## %bb.3:
	movl	8(%rbx), %esi
	movq	%rbx, %rdi
	callq	_radeon_ttm_set_active_vram_size
LBB0_4:
	movq	_CP_ME_CNTL@GOTPCREL(%rip), %rax
	movq	_CP_ME_HALT@GOTPCREL(%rip), %rcx
	movq	_CP_PFP_HALT@GOTPCREL(%rip), %rdx
	movl	(%rdx), %esi
	orl	(%rcx), %esi
	movl	(%rax), %edi
	movq	_CP_CE_HALT@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	callq	_WREG32
	movq	_SCRATCH_UMSK@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%esi, %esi
	callq	_WREG32
	movq	(%rbx), %rax
	movq	(%r14), %rcx
	movl	$0, (%rax,%rcx,4)
	movq	_CAYMAN_RING_TYPE_CP1_INDEX@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	$0, (%rax,%rcx,4)
	movq	_CAYMAN_RING_TYPE_CP2_INDEX@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	$0, (%rax,%rcx,4)
LBB0_5:
	movl	$50, %edi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_udelay                         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_CP_ME_CNTL,4,2                 ## @CP_ME_CNTL
	.comm	_RADEON_RING_TYPE_GFX_INDEX,8,3 ## @RADEON_RING_TYPE_GFX_INDEX
	.comm	_CP_ME_HALT,4,2                 ## @CP_ME_HALT
	.comm	_CP_PFP_HALT,4,2                ## @CP_PFP_HALT
	.comm	_CP_CE_HALT,4,2                 ## @CP_CE_HALT
	.comm	_SCRATCH_UMSK,4,2               ## @SCRATCH_UMSK
	.comm	_CAYMAN_RING_TYPE_CP1_INDEX,8,3 ## @CAYMAN_RING_TYPE_CP1_INDEX
	.comm	_CAYMAN_RING_TYPE_CP2_INDEX,8,3 ## @CAYMAN_RING_TYPE_CP2_INDEX
	.no_dead_strip	_si_cp_enable
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function si_cp_enable
_si_cp_enable:                          ; @si_cp_enable
	.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
	cbz	w1, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _CP_ME_CNTL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CP_ME_CNTL@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	mov	w1, #0
	bl	_WREG32
	b	LBB0_5
LBB0_2:
	mov	x19, x0
	ldr	x8, [x0, #16]
	ldr	x8, [x8]
Lloh3:
	adrp	x20, _RADEON_RING_TYPE_GFX_INDEX@GOTPAGE
Lloh4:
	ldr	x20, [x20, _RADEON_RING_TYPE_GFX_INDEX@GOTPAGEOFF]
	ldr	x9, [x20]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.3:
	ldr	w1, [x19, #8]
	mov	x0, x19
	bl	_radeon_ttm_set_active_vram_size
LBB0_4:
Lloh5:
	adrp	x8, _CP_ME_CNTL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _CP_ME_CNTL@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
Lloh8:
	adrp	x8, _CP_ME_HALT@GOTPAGE
Lloh9:
	ldr	x8, [x8, _CP_ME_HALT@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
Lloh11:
	adrp	x9, _CP_PFP_HALT@GOTPAGE
Lloh12:
	ldr	x9, [x9, _CP_PFP_HALT@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh14:
	adrp	x9, _CP_CE_HALT@GOTPAGE
Lloh15:
	ldr	x9, [x9, _CP_CE_HALT@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	orr	w1, w8, w9
	bl	_WREG32
Lloh17:
	adrp	x8, _SCRATCH_UMSK@GOTPAGE
Lloh18:
	ldr	x8, [x8, _SCRATCH_UMSK@GOTPAGEOFF]
Lloh19:
	ldr	w0, [x8]
	mov	w1, #0
	bl	_WREG32
	ldr	x8, [x19]
	ldr	x9, [x20]
	str	wzr, [x8, x9, lsl #2]
Lloh20:
	adrp	x9, _CAYMAN_RING_TYPE_CP1_INDEX@GOTPAGE
Lloh21:
	ldr	x9, [x9, _CAYMAN_RING_TYPE_CP1_INDEX@GOTPAGEOFF]
Lloh22:
	ldr	x9, [x9]
	str	wzr, [x8, x9, lsl #2]
Lloh23:
	adrp	x9, _CAYMAN_RING_TYPE_CP2_INDEX@GOTPAGE
Lloh24:
	ldr	x9, [x9, _CAYMAN_RING_TYPE_CP2_INDEX@GOTPAGEOFF]
Lloh25:
	ldr	x9, [x9]
	str	wzr, [x8, x9, lsl #2]
LBB0_5:
	mov	w0, #50
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_udelay
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_CP_ME_CNTL,4,2                 ; @CP_ME_CNTL
	.comm	_RADEON_RING_TYPE_GFX_INDEX,8,3 ; @RADEON_RING_TYPE_GFX_INDEX
	.comm	_CP_ME_HALT,4,2                 ; @CP_ME_HALT
	.comm	_CP_PFP_HALT,4,2                ; @CP_PFP_HALT
	.comm	_CP_CE_HALT,4,2                 ; @CP_CE_HALT
	.comm	_SCRATCH_UMSK,4,2               ; @SCRATCH_UMSK
	.comm	_CAYMAN_RING_TYPE_CP1_INDEX,8,3 ; @CAYMAN_RING_TYPE_CP1_INDEX
	.comm	_CAYMAN_RING_TYPE_CP2_INDEX,8,3 ; @CAYMAN_RING_TYPE_CP2_INDEX
	.no_dead_strip	_si_cp_enable
.subsections_via_symbols
