	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gfx_v10_0_rlc_backdoor_autoload_config_mec_cache
_gfx_v10_0_rlc_backdoor_autoload_config_mec_cache: ## @gfx_v10_0_rlc_backdoor_autoload_config_mec_cache
	.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
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	movq	_GC@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	movq	_mmCP_CPC_IC_OP_CNTL@GOTPCREL(%rip), %r14
	movl	(%r14), %edx
	xorl	%esi, %esi
	callq	_RREG32_SOC15
	movq	_CP_CPC_IC_OP_CNTL@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movq	_INVALIDATE_CACHE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	%eax, %edi
	movl	$1, %ecx
	callq	_REG_SET_FIELD
	movl	(%r15), %edi
	movl	(%r14), %edx
	xorl	%esi, %esi
	movl	%eax, %ecx
	callq	_WREG32_SOC15
	movl	$50000, %ebx                    ## imm = 0xC350
	movq	_INVALIDATE_CACHE_COMPLETE@GOTPCREL(%rip), %r12
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r15), %edi
	movl	(%r14), %edx
	xorl	%esi, %esi
	callq	_RREG32_SOC15
	movl	(%r13), %esi
	movl	(%r12), %edx
	movl	%eax, %edi
	callq	_REG_GET_FIELD
	cmpl	$1, %eax
	je	LBB0_4
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	$1, %edi
	callq	_udelay
	decl	%ebx
	jne	LBB0_1
## %bb.3:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	8(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r13d, %r13d
	subl	(%rax), %r13d
	jmp	LBB0_5
LBB0_4:
	movq	_rlc_autoload_info@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_FIRMWARE_ID_CP_MEC@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	(%rax,%rcx,8), %r14
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	addq	(%rax), %r14
	movl	(%r15), %ebx
	movq	_mmCP_CPC_IC_BASE_LO@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movq	%r14, %rdi
	callq	_lower_32_bits
	andl	$-4096, %eax                    ## imm = 0xF000
	xorl	%r13d, %r13d
	movl	%ebx, %edi
	xorl	%esi, %esi
	movl	%r12d, %edx
	movl	%eax, %ecx
	callq	_WREG32_SOC15
	movl	(%r15), %r15d
	movq	_mmCP_CPC_IC_BASE_HI@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movq	%r14, %rdi
	callq	_upper_32_bits
	movl	%r15d, %edi
	xorl	%esi, %esi
	movl	%r12d, %edx
	movl	%eax, %ecx
	callq	_WREG32_SOC15
LBB0_5:
	movl	%r13d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GC,4,2                         ## @GC
	.comm	_mmCP_CPC_IC_OP_CNTL,4,2        ## @mmCP_CPC_IC_OP_CNTL
	.comm	_CP_CPC_IC_OP_CNTL,4,2          ## @CP_CPC_IC_OP_CNTL
	.comm	_INVALIDATE_CACHE,4,2           ## @INVALIDATE_CACHE
	.comm	_INVALIDATE_CACHE_COMPLETE,4,2  ## @INVALIDATE_CACHE_COMPLETE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to invalidate instruction cache\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_rlc_autoload_info,8,3          ## @rlc_autoload_info
	.comm	_FIRMWARE_ID_CP_MEC,8,3         ## @FIRMWARE_ID_CP_MEC
	.comm	_mmCP_CPC_IC_BASE_LO,4,2        ## @mmCP_CPC_IC_BASE_LO
	.comm	_mmCP_CPC_IC_BASE_HI,4,2        ## @mmCP_CPC_IC_BASE_HI
	.no_dead_strip	_gfx_v10_0_rlc_backdoor_autoload_config_mec_cache
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gfx_v10_0_rlc_backdoor_autoload_config_mec_cache
_gfx_v10_0_rlc_backdoor_autoload_config_mec_cache: ; @gfx_v10_0_rlc_backdoor_autoload_config_mec_cache
	.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
Lloh0:
	adrp	x22, _GC@GOTPAGE
Lloh1:
	ldr	x22, [x22, _GC@GOTPAGEOFF]
	ldr	w0, [x22]
Lloh2:
	adrp	x20, _mmCP_CPC_IC_OP_CNTL@GOTPAGE
Lloh3:
	ldr	x20, [x20, _mmCP_CPC_IC_OP_CNTL@GOTPAGEOFF]
	ldr	w2, [x20]
	mov	w1, #0
	bl	_RREG32_SOC15
Lloh4:
	adrp	x21, _CP_CPC_IC_OP_CNTL@GOTPAGE
Lloh5:
	ldr	x21, [x21, _CP_CPC_IC_OP_CNTL@GOTPAGEOFF]
	ldr	w1, [x21]
Lloh6:
	adrp	x8, _INVALIDATE_CACHE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _INVALIDATE_CACHE@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
	mov	w3, #1
	bl	_REG_SET_FIELD
	mov	x3, x0
	ldr	w0, [x22]
	ldr	w2, [x20]
	mov	w1, #0
	bl	_WREG32_SOC15
	mov	w23, #50000
Lloh9:
	adrp	x24, _INVALIDATE_CACHE_COMPLETE@GOTPAGE
Lloh10:
	ldr	x24, [x24, _INVALIDATE_CACHE_COMPLETE@GOTPAGEOFF]
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x22]
	ldr	w2, [x20]
	mov	w1, #0
	bl	_RREG32_SOC15
	ldr	w1, [x21]
	ldr	w2, [x24]
	bl	_REG_GET_FIELD
	cmp	w0, #1
	b.eq	LBB0_4
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	w0, #1
	bl	_udelay
	subs	w23, w23, #1
	b.ne	LBB0_1
; %bb.3:
	ldr	w0, [x19, #8]
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
Lloh13:
	adrp	x8, _EINVAL@GOTPAGE
Lloh14:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_5
LBB0_4:
Lloh16:
	adrp	x8, _rlc_autoload_info@GOTPAGE
Lloh17:
	ldr	x8, [x8, _rlc_autoload_info@GOTPAGEOFF]
Lloh18:
	ldr	x8, [x8]
Lloh19:
	adrp	x9, _FIRMWARE_ID_CP_MEC@GOTPAGE
Lloh20:
	ldr	x9, [x9, _FIRMWARE_ID_CP_MEC@GOTPAGEOFF]
Lloh21:
	ldr	x9, [x9]
	ldr	x8, [x8, x9, lsl #3]
	ldr	x9, [x19]
	add	x19, x8, x9
	ldr	w20, [x22]
Lloh22:
	adrp	x8, _mmCP_CPC_IC_BASE_LO@GOTPAGE
Lloh23:
	ldr	x8, [x8, _mmCP_CPC_IC_BASE_LO@GOTPAGEOFF]
Lloh24:
	ldr	w21, [x8]
	mov	x0, x19
	bl	_lower_32_bits
	and	w3, w0, #0xfffff000
	mov	x0, x20
	mov	w1, #0
	mov	x2, x21
	bl	_WREG32_SOC15
	ldr	w20, [x22]
Lloh25:
	adrp	x8, _mmCP_CPC_IC_BASE_HI@GOTPAGE
Lloh26:
	ldr	x8, [x8, _mmCP_CPC_IC_BASE_HI@GOTPAGEOFF]
Lloh27:
	ldr	w21, [x8]
	mov	x0, x19
	bl	_upper_32_bits
	mov	x3, x0
	mov	x0, x20
	mov	w1, #0
	mov	x2, x21
	bl	_WREG32_SOC15
	mov	w0, #0
LBB0_5:
	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	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_GC,4,2                         ; @GC
	.comm	_mmCP_CPC_IC_OP_CNTL,4,2        ; @mmCP_CPC_IC_OP_CNTL
	.comm	_CP_CPC_IC_OP_CNTL,4,2          ; @CP_CPC_IC_OP_CNTL
	.comm	_INVALIDATE_CACHE,4,2           ; @INVALIDATE_CACHE
	.comm	_INVALIDATE_CACHE_COMPLETE,4,2  ; @INVALIDATE_CACHE_COMPLETE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to invalidate instruction cache\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_rlc_autoload_info,8,3          ; @rlc_autoload_info
	.comm	_FIRMWARE_ID_CP_MEC,8,3         ; @FIRMWARE_ID_CP_MEC
	.comm	_mmCP_CPC_IC_BASE_LO,4,2        ; @mmCP_CPC_IC_BASE_LO
	.comm	_mmCP_CPC_IC_BASE_HI,4,2        ; @mmCP_CPC_IC_BASE_HI
	.no_dead_strip	_gfx_v10_0_rlc_backdoor_autoload_config_mec_cache
.subsections_via_symbols
