	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gfx_v9_0_rlc_load_microcode
_gfx_v9_0_rlc_load_microcode:           ## @gfx_v9_0_rlc_load_microcode
	.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	8(%rdi), %rax
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rdi, %rbx
	movq	(%rax), %r15
	movq	%r15, %rdi
	callq	_amdgpu_ucode_print_rlc_hdr
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movq	8(%rbx), %rax
	movq	(%rax), %rbx
	movl	4(%r15), %edi
	callq	_le32_to_cpu
	movl	%eax, %r12d
	movl	(%r15), %edi
	callq	_le32_to_cpu
	movl	%eax, %r13d
	movq	_GC@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_mmRLC_GPM_UCODE_ADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_RLCG_UCODE_LOADING_START_ADDRESS@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	xorl	%esi, %esi
	callq	_WREG32_SOC15
	leal	3(%r13), %eax
	cmpl	$7, %eax
	jb	LBB0_5
## %bb.3:
	testl	%r13d, %r13d
	cmovnsl	%r13d, %eax
	sarl	$2, %eax
	addl	%r12d, %ebx
	cmpl	$2, %eax
	movl	$1, %r14d
	cmovael	%eax, %r14d
	movq	_mmRLC_GPM_UCODE_DATA@GOTPCREL(%rip), %r15
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	_GC@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movl	(%r15), %r13d
	movl	%ebx, %edi
	callq	_le32_to_cpup
	movl	%r12d, %edi
	xorl	%esi, %esi
	movl	%r13d, %edx
	movl	%eax, %ecx
	callq	_WREG32_SOC15
	addl	$4, %ebx
	decl	%r14d
	jne	LBB0_4
LBB0_5:
	movq	_GC@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_mmRLC_GPM_UCODE_ADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %ecx
	xorl	%esi, %esi
	callq	_WREG32_SOC15
	xorl	%eax, %eax
	jmp	LBB0_6
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_GC,4,2                         ## @GC
	.comm	_mmRLC_GPM_UCODE_ADDR,4,2       ## @mmRLC_GPM_UCODE_ADDR
	.comm	_RLCG_UCODE_LOADING_START_ADDRESS,4,2 ## @RLCG_UCODE_LOADING_START_ADDRESS
	.comm	_mmRLC_GPM_UCODE_DATA,4,2       ## @mmRLC_GPM_UCODE_DATA
	.no_dead_strip	_gfx_v9_0_rlc_load_microcode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gfx_v9_0_rlc_load_microcode
_gfx_v9_0_rlc_load_microcode:           ; @gfx_v9_0_rlc_load_microcode
	.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
	ldr	x8, [x0, #8]
	cbz	x8, LBB0_5
; %bb.1:
	mov	x19, x0
	ldr	x21, [x8]
	mov	x0, x21
	bl	_amdgpu_ucode_print_rlc_hdr
	ldr	x8, [x19, #8]
	ldr	x22, [x8]
	ldr	w0, [x21, #4]
	bl	_le32_to_cpu
	mov	x20, x0
	ldr	w0, [x21]
	bl	_le32_to_cpu
	mov	x21, x0
Lloh0:
	adrp	x23, _GC@GOTPAGE
Lloh1:
	ldr	x23, [x23, _GC@GOTPAGEOFF]
	ldr	w0, [x23]
Lloh2:
	adrp	x24, _mmRLC_GPM_UCODE_ADDR@GOTPAGE
Lloh3:
	ldr	x24, [x24, _mmRLC_GPM_UCODE_ADDR@GOTPAGEOFF]
	ldr	w2, [x24]
Lloh4:
	adrp	x8, _RLCG_UCODE_LOADING_START_ADDRESS@GOTPAGE
Lloh5:
	ldr	x8, [x8, _RLCG_UCODE_LOADING_START_ADDRESS@GOTPAGEOFF]
Lloh6:
	ldr	w3, [x8]
	mov	w1, #0
	bl	_WREG32_SOC15
	add	w8, w21, #3
	cmp	w8, #7
	b.lo	LBB0_4
; %bb.2:
	cmp	w21, #0
	csel	w8, w8, w21, lt
	asr	w8, w8, #2
	add	w20, w22, w20
	cmp	w8, #1
	csinc	w25, w8, wzr, hi
Lloh7:
	adrp	x26, _mmRLC_GPM_UCODE_DATA@GOTPAGE
Lloh8:
	ldr	x26, [x26, _mmRLC_GPM_UCODE_DATA@GOTPAGEOFF]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w21, [x23]
	ldr	w22, [x26]
	mov	x0, x20
	bl	_le32_to_cpup
	mov	x3, x0
	mov	x0, x21
	mov	w1, #0
	mov	x2, x22
	bl	_WREG32_SOC15
	add	w20, w20, #4
	subs	w25, w25, #1
	b.ne	LBB0_3
LBB0_4:
	ldr	w0, [x23]
	ldr	w2, [x24]
	ldr	w3, [x19]
	mov	w1, #0
	bl	_WREG32_SOC15
	mov	w0, #0
	b	LBB0_6
LBB0_5:
Lloh9:
	adrp	x8, _EINVAL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_6:
	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 AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_GC,4,2                         ; @GC
	.comm	_mmRLC_GPM_UCODE_ADDR,4,2       ; @mmRLC_GPM_UCODE_ADDR
	.comm	_RLCG_UCODE_LOADING_START_ADDRESS,4,2 ; @RLCG_UCODE_LOADING_START_ADDRESS
	.comm	_mmRLC_GPM_UCODE_DATA,4,2       ; @mmRLC_GPM_UCODE_DATA
	.no_dead_strip	_gfx_v9_0_rlc_load_microcode
.subsections_via_symbols
