	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gfx_v10_0_wait_for_rlc_autoload_complete
_gfx_v10_0_wait_for_rlc_autoload_complete: ## @gfx_v10_0_wait_for_rlc_autoload_complete
	.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, %r14
	movl	(%rdi), %eax
	xorl	%ebx, %ebx
	testl	%eax, %eax
	jle	LBB0_6
## %bb.1:
	movq	_GC@GOTPCREL(%rip), %r12
	movq	_mmRLC_RLCS_BOOTLOAD_STATUS@GOTPCREL(%rip), %r13
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	$1, %edi
	callq	_udelay
	incl	%ebx
	movl	(%r14), %eax
	cmpl	%eax, %ebx
	jge	LBB0_6
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r12), %edi
	movq	_mmCP_STAT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%esi, %esi
	callq	_RREG32_SOC15
	movq	%rax, %r15
	movl	(%r12), %edi
	movl	(%r13), %edx
	xorl	%esi, %esi
	callq	_RREG32_SOC15
	testq	%r15, %r15
	jne	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_RLC_RLCS_BOOTLOAD_STATUS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	_BOOTLOAD_COMPLETE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	%rax, %rdi
	callq	_REG_GET_FIELD
	cmpl	$1, %eax
	jne	LBB0_5
## %bb.4:
	movl	(%r14), %eax
LBB0_6:
	cmpl	%eax, %ebx
	jge	LBB0_7
## %bb.8:
	movq	8(%r14), %rax
	movq	_AMDGPU_FW_LOAD_RLC_BACKDOOR_AUTO@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_13
## %bb.9:
	movq	%r14, %rdi
	callq	_gfx_v10_0_rlc_backdoor_autoload_config_me_cache
	testl	%eax, %eax
	jne	LBB0_14
## %bb.10:
	movq	%r14, %rdi
	callq	_gfx_v10_0_rlc_backdoor_autoload_config_ce_cache
	testl	%eax, %eax
	jne	LBB0_14
## %bb.11:
	movq	%r14, %rdi
	callq	_gfx_v10_0_rlc_backdoor_autoload_config_pfp_cache
	testl	%eax, %eax
	jne	LBB0_14
## %bb.12:
	movq	%r14, %rdi
	callq	_gfx_v10_0_rlc_backdoor_autoload_config_mec_cache
	testl	%eax, %eax
	jne	LBB0_14
LBB0_13:
	xorl	%eax, %eax
	jmp	LBB0_14
LBB0_7:
	movl	16(%r14), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_14:
	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_STAT,4,2                  ## @mmCP_STAT
	.comm	_mmRLC_RLCS_BOOTLOAD_STATUS,4,2 ## @mmRLC_RLCS_BOOTLOAD_STATUS
	.comm	_RLC_RLCS_BOOTLOAD_STATUS,4,2   ## @RLC_RLCS_BOOTLOAD_STATUS
	.comm	_BOOTLOAD_COMPLETE,4,2          ## @BOOTLOAD_COMPLETE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"rlc autoload: gc ucode autoload timeout\n"

	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
	.comm	_AMDGPU_FW_LOAD_RLC_BACKDOOR_AUTO,8,3 ## @AMDGPU_FW_LOAD_RLC_BACKDOOR_AUTO
	.no_dead_strip	_gfx_v10_0_wait_for_rlc_autoload_complete
.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_wait_for_rlc_autoload_complete
_gfx_v10_0_wait_for_rlc_autoload_complete: ; @gfx_v10_0_wait_for_rlc_autoload_complete
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x0
	ldr	w8, [x0]
	cmp	w8, #1
	b.lt	LBB0_13
; %bb.1:
	mov	w21, #0
Lloh0:
	adrp	x22, _GC@GOTPAGE
Lloh1:
	ldr	x22, [x22, _GC@GOTPAGEOFF]
Lloh2:
	adrp	x23, _mmCP_STAT@GOTPAGE
Lloh3:
	ldr	x23, [x23, _mmCP_STAT@GOTPAGEOFF]
Lloh4:
	adrp	x24, _mmRLC_RLCS_BOOTLOAD_STATUS@GOTPAGE
Lloh5:
	ldr	x24, [x24, _mmRLC_RLCS_BOOTLOAD_STATUS@GOTPAGEOFF]
Lloh6:
	adrp	x25, _RLC_RLCS_BOOTLOAD_STATUS@GOTPAGE
Lloh7:
	ldr	x25, [x25, _RLC_RLCS_BOOTLOAD_STATUS@GOTPAGEOFF]
Lloh8:
	adrp	x26, _BOOTLOAD_COMPLETE@GOTPAGE
Lloh9:
	ldr	x26, [x26, _BOOTLOAD_COMPLETE@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	mov	w0, #1
	bl	_udelay
	add	w21, w21, #1
	ldr	w8, [x19]
	cmp	w21, w8
	b.ge	LBB0_6
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x22]
	ldr	w2, [x23]
	mov	w1, #0
	bl	_RREG32_SOC15
	mov	x20, x0
	ldr	w0, [x22]
	ldr	w2, [x24]
	mov	w1, #0
	bl	_RREG32_SOC15
	cbnz	x20, LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w1, [x25]
	ldr	w2, [x26]
	bl	_REG_GET_FIELD
	cmp	w0, #1
	b.ne	LBB0_2
; %bb.5:
	ldr	w8, [x19]
LBB0_6:
	cmp	w21, w8
	b.ge	LBB0_14
LBB0_7:
	ldr	x8, [x19, #8]
Lloh10:
	adrp	x9, _AMDGPU_FW_LOAD_RLC_BACKDOOR_AUTO@GOTPAGE
Lloh11:
	ldr	x9, [x9, _AMDGPU_FW_LOAD_RLC_BACKDOOR_AUTO@GOTPAGEOFF]
Lloh12:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_12
; %bb.8:
	mov	x0, x19
	bl	_gfx_v10_0_rlc_backdoor_autoload_config_me_cache
	cbnz	w0, LBB0_15
; %bb.9:
	mov	x0, x19
	bl	_gfx_v10_0_rlc_backdoor_autoload_config_ce_cache
	cbnz	w0, LBB0_15
; %bb.10:
	mov	x0, x19
	bl	_gfx_v10_0_rlc_backdoor_autoload_config_pfp_cache
	cbnz	w0, LBB0_15
; %bb.11:
	mov	x0, x19
	bl	_gfx_v10_0_rlc_backdoor_autoload_config_mec_cache
	cbnz	w0, LBB0_15
LBB0_12:
	mov	w0, #0
	b	LBB0_15
LBB0_13:
	mov	w21, #0
	cmp	w21, w8
	b.lt	LBB0_7
LBB0_14:
	ldr	w0, [x19, #16]
Lloh13:
	adrp	x1, l_.str@PAGE
Lloh14:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
Lloh15:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_15:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_GC,4,2                         ; @GC
	.comm	_mmCP_STAT,4,2                  ; @mmCP_STAT
	.comm	_mmRLC_RLCS_BOOTLOAD_STATUS,4,2 ; @mmRLC_RLCS_BOOTLOAD_STATUS
	.comm	_RLC_RLCS_BOOTLOAD_STATUS,4,2   ; @RLC_RLCS_BOOTLOAD_STATUS
	.comm	_BOOTLOAD_COMPLETE,4,2          ; @BOOTLOAD_COMPLETE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"rlc autoload: gc ucode autoload timeout\n"

	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
	.comm	_AMDGPU_FW_LOAD_RLC_BACKDOOR_AUTO,8,3 ; @AMDGPU_FW_LOAD_RLC_BACKDOOR_AUTO
	.no_dead_strip	_gfx_v10_0_wait_for_rlc_autoload_complete
.subsections_via_symbols
