	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cik_rlc_resume
_cik_rlc_resume:                        ## @cik_rlc_resume
	.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
	cmpq	$0, 8(%rdi)
	je	LBB0_1
## %bb.2:
	movq	%rdi, %r15
	callq	_cik_rlc_stop
	movq	_RLC_CGCG_CGLS_CTRL@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	callq	_RREG32
	andl	$-4, %eax
	movl	(%rbx), %edi
	movl	%eax, %esi
	callq	_WREG32
	movq	%r15, %rdi
	callq	_si_rlc_reset
	movq	%r15, %rdi
	callq	_cik_init_pg
	movq	%r15, %rdi
	callq	_cik_init_cg
	movq	_RLC_LB_CNTR_INIT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%esi, %esi
	callq	_WREG32
	movq	_RLC_LB_CNTR_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	$32768, %esi                    ## imm = 0x8000
	callq	_WREG32
	movq	%r15, %rdi
	movl	$-1, %esi
	movl	$-1, %edx
	callq	_cik_select_se_sh
	movq	_RLC_LB_INIT_CU_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	$-1, %esi
	callq	_WREG32
	movq	_RLC_LB_PARAMS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	$6292488, %esi                  ## imm = 0x600408
	callq	_WREG32
	movq	_RLC_LB_CNTL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	$-2147483644, %esi              ## imm = 0x80000004
	callq	_WREG32
	movq	_RLC_MC_CNTL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%esi, %esi
	callq	_WREG32
	movq	_RLC_UCODE_CNTL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%esi, %esi
	callq	_WREG32
	cmpq	$0, 16(%r15)
	je	LBB0_7
## %bb.3:
	movq	8(%r15), %rax
	movq	(%rax), %r14
	movl	8(%r14), %edi
	callq	_le32_to_cpu
	movl	%eax, %ebx
	movq	%r14, %rdi
	callq	_radeon_ucode_print_rlc_hdr
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	movl	4(%r14), %edi
	callq	_le32_to_cpu
	movl	%eax, %r12d
	leal	3(%r12), %r14d
	testl	%eax, %eax
	cmovnsl	%eax, %r14d
	movq	_RLC_GPM_UCODE_ADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%esi, %esi
	callq	_WREG32
	cmpl	$4, %r12d
	jl	LBB0_6
## %bb.4:
	sarl	$2, %r14d
	movslq	%r14d, %r13
	addl	-48(%rbp), %ebx                 ## 4-byte Folded Reload
	movq	_RLC_GPM_UCODE_DATA@GOTPCREL(%rip), %r14
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r14), %r12d
	movl	%ebx, %edi
	callq	_le32_to_cpup
	movl	%r12d, %edi
	movl	%eax, %esi
	callq	_WREG32
	addl	$4, %ebx
	decq	%r13
	jne	LBB0_5
LBB0_6:
	movq	_RLC_GPM_UCODE_ADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edi
	callq	_le32_to_cpu
	movl	%ebx, %edi
	movl	%eax, %esi
	jmp	LBB0_14
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_17
LBB0_7:
	movl	(%r15), %eax
	addl	$-128, %eax
	cmpl	$2, %eax
	ja	LBB0_8
## %bb.9:
	cltq
	leaq	l_switch.table.cik_rlc_resume(%rip), %rcx
	movq	(%rcx,%rax,8), %rax
	jmp	LBB0_10
LBB0_8:
	movq	_BONAIRE_RLC_UCODE_SIZE@GOTPCREL(%rip), %rax
LBB0_10:
	movq	(%rax), %r12
	movq	8(%r15), %rax
	movq	(%rax), %rbx
	movq	_RLC_GPM_UCODE_ADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%esi, %esi
	callq	_WREG32
	testq	%r12, %r12
	jle	LBB0_13
## %bb.11:
	movq	_RLC_GPM_UCODE_DATA@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movl	(%r13), %r14d
	movl	%ebx, %edi
	callq	_be32_to_cpup
	movl	%r14d, %edi
	movl	%eax, %esi
	callq	_WREG32
	addl	$4, %ebx
	decq	%r12
	jne	LBB0_12
LBB0_13:
	movq	_RLC_GPM_UCODE_ADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%esi, %esi
LBB0_14:
	callq	_WREG32
	xorl	%ebx, %ebx
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_cik_enable_lbpw
	cmpl	$132, (%r15)
	jne	LBB0_16
## %bb.15:
	movq	_RLC_DRIVER_DMA_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%esi, %esi
	callq	_WREG32
LBB0_16:
	movq	%r15, %rdi
	callq	_cik_rlc_start
LBB0_17:
	movl	%ebx, %eax
	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	_RLC_CGCG_CGLS_CTRL,4,2         ## @RLC_CGCG_CGLS_CTRL
	.comm	_RLC_LB_CNTR_INIT,4,2           ## @RLC_LB_CNTR_INIT
	.comm	_RLC_LB_CNTR_MAX,4,2            ## @RLC_LB_CNTR_MAX
	.comm	_RLC_LB_INIT_CU_MASK,4,2        ## @RLC_LB_INIT_CU_MASK
	.comm	_RLC_LB_PARAMS,4,2              ## @RLC_LB_PARAMS
	.comm	_RLC_LB_CNTL,4,2                ## @RLC_LB_CNTL
	.comm	_RLC_MC_CNTL,4,2                ## @RLC_MC_CNTL
	.comm	_RLC_UCODE_CNTL,4,2             ## @RLC_UCODE_CNTL
	.comm	_RLC_GPM_UCODE_ADDR,4,2         ## @RLC_GPM_UCODE_ADDR
	.comm	_RLC_GPM_UCODE_DATA,4,2         ## @RLC_GPM_UCODE_DATA
	.comm	_BONAIRE_RLC_UCODE_SIZE,8,3     ## @BONAIRE_RLC_UCODE_SIZE
	.comm	_KV_RLC_UCODE_SIZE,8,3          ## @KV_RLC_UCODE_SIZE
	.comm	_KB_RLC_UCODE_SIZE,8,3          ## @KB_RLC_UCODE_SIZE
	.comm	_ML_RLC_UCODE_SIZE,8,3          ## @ML_RLC_UCODE_SIZE
	.comm	_RLC_DRIVER_DMA_STATUS,4,2      ## @RLC_DRIVER_DMA_STATUS
	.no_dead_strip	_cik_rlc_resume
	.section	__DATA,__const
	.p2align	3                               ## @switch.table.cik_rlc_resume
l_switch.table.cik_rlc_resume:
	.quad	_ML_RLC_UCODE_SIZE
	.quad	_KV_RLC_UCODE_SIZE
	.quad	_KB_RLC_UCODE_SIZE

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cik_rlc_resume
_cik_rlc_resume:                        ; @cik_rlc_resume
	.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_6
; %bb.1:
	mov	x19, x0
	bl	_cik_rlc_stop
Lloh0:
	adrp	x20, _RLC_CGCG_CGLS_CTRL@GOTPAGE
Lloh1:
	ldr	x20, [x20, _RLC_CGCG_CGLS_CTRL@GOTPAGEOFF]
	ldr	w0, [x20]
	bl	_RREG32
	and	w1, w0, #0xfffffffc
	ldr	w0, [x20]
	bl	_WREG32
	mov	x0, x19
	bl	_si_rlc_reset
	mov	x0, x19
	bl	_cik_init_pg
	mov	x0, x19
	bl	_cik_init_cg
Lloh2:
	adrp	x8, _RLC_LB_CNTR_INIT@GOTPAGE
Lloh3:
	ldr	x8, [x8, _RLC_LB_CNTR_INIT@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	mov	w1, #0
	bl	_WREG32
Lloh5:
	adrp	x8, _RLC_LB_CNTR_MAX@GOTPAGE
Lloh6:
	ldr	x8, [x8, _RLC_LB_CNTR_MAX@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	mov	w1, #32768
	bl	_WREG32
	mov	x0, x19
	mov	w1, #-1
	mov	w2, #-1
	bl	_cik_select_se_sh
Lloh8:
	adrp	x8, _RLC_LB_INIT_CU_MASK@GOTPAGE
Lloh9:
	ldr	x8, [x8, _RLC_LB_INIT_CU_MASK@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	mov	w1, #-1
	bl	_WREG32
Lloh11:
	adrp	x8, _RLC_LB_PARAMS@GOTPAGE
Lloh12:
	ldr	x8, [x8, _RLC_LB_PARAMS@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
	mov	w1, #1032
	movk	w1, #96, lsl #16
	bl	_WREG32
Lloh14:
	adrp	x8, _RLC_LB_CNTL@GOTPAGE
Lloh15:
	ldr	x8, [x8, _RLC_LB_CNTL@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
	mov	w1, #4
	movk	w1, #32768, lsl #16
	bl	_WREG32
Lloh17:
	adrp	x8, _RLC_MC_CNTL@GOTPAGE
Lloh18:
	ldr	x8, [x8, _RLC_MC_CNTL@GOTPAGEOFF]
Lloh19:
	ldr	w0, [x8]
	mov	w1, #0
	bl	_WREG32
Lloh20:
	adrp	x8, _RLC_UCODE_CNTL@GOTPAGE
Lloh21:
	ldr	x8, [x8, _RLC_UCODE_CNTL@GOTPAGEOFF]
Lloh22:
	ldr	w0, [x8]
	mov	w1, #0
	bl	_WREG32
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_7
; %bb.2:
	ldr	x8, [x19, #8]
	ldr	x20, [x8]
	ldr	w0, [x20, #8]
	bl	_le32_to_cpu
	mov	x21, x0
	mov	x0, x20
	bl	_radeon_ucode_print_rlc_hdr
	ldr	w0, [x20, #4]
	bl	_le32_to_cpu
	mov	x22, x0
	add	w8, w0, #3
	cmp	w0, #0
	csel	w24, w8, w0, lt
Lloh23:
	adrp	x23, _RLC_GPM_UCODE_ADDR@GOTPAGE
Lloh24:
	ldr	x23, [x23, _RLC_GPM_UCODE_ADDR@GOTPAGEOFF]
	ldr	w0, [x23]
	mov	w1, #0
	bl	_WREG32
	cmp	w22, #4
	b.lt	LBB0_5
; %bb.3:
	sbfx	x24, x24, #2, #30
	add	w21, w20, w21
Lloh25:
	adrp	x25, _RLC_GPM_UCODE_DATA@GOTPAGE
Lloh26:
	ldr	x25, [x25, _RLC_GPM_UCODE_DATA@GOTPAGEOFF]
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w22, [x25]
	mov	x0, x21
	bl	_le32_to_cpup
	mov	x1, x0
	mov	x0, x22
	bl	_WREG32
	add	w21, w21, #4
	subs	x24, x24, #1
	b.ne	LBB0_4
LBB0_5:
	ldr	w21, [x23]
	ldr	w0, [x20]
	bl	_le32_to_cpu
	mov	x1, x0
	mov	x0, x21
	b	LBB0_14
LBB0_6:
Lloh27:
	adrp	x8, _EINVAL@GOTPAGE
Lloh28:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh29:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_17
LBB0_7:
	ldr	w8, [x19]
	sub	w8, w8, #128
	cmp	w8, #2
	b.hi	LBB0_9
; %bb.8:
Lloh30:
	adrp	x9, l_switch.table.cik_rlc_resume@PAGE
Lloh31:
	add	x9, x9, l_switch.table.cik_rlc_resume@PAGEOFF
	ldr	x8, [x9, w8, sxtw #3]
	b	LBB0_10
LBB0_9:
Lloh32:
	adrp	x8, _BONAIRE_RLC_UCODE_SIZE@GOTPAGE
Lloh33:
	ldr	x8, [x8, _BONAIRE_RLC_UCODE_SIZE@GOTPAGEOFF]
LBB0_10:
	ldr	x22, [x8]
	ldr	x8, [x19, #8]
	ldr	x20, [x8]
Lloh34:
	adrp	x23, _RLC_GPM_UCODE_ADDR@GOTPAGE
Lloh35:
	ldr	x23, [x23, _RLC_GPM_UCODE_ADDR@GOTPAGEOFF]
	ldr	w0, [x23]
	mov	w1, #0
	bl	_WREG32
	cmp	x22, #1
	b.lt	LBB0_13
; %bb.11:
Lloh36:
	adrp	x24, _RLC_GPM_UCODE_DATA@GOTPAGE
Lloh37:
	ldr	x24, [x24, _RLC_GPM_UCODE_DATA@GOTPAGEOFF]
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	ldr	w21, [x24]
	mov	x0, x20
	bl	_be32_to_cpup
	mov	x1, x0
	mov	x0, x21
	bl	_WREG32
	add	w20, w20, #4
	subs	x22, x22, #1
	b.ne	LBB0_12
LBB0_13:
	ldr	w0, [x23]
	mov	w1, #0
LBB0_14:
	bl	_WREG32
	mov	x0, x19
	mov	w1, #0
	bl	_cik_enable_lbpw
	ldr	w8, [x19]
	cmp	w8, #132
	b.ne	LBB0_16
; %bb.15:
Lloh38:
	adrp	x8, _RLC_DRIVER_DMA_STATUS@GOTPAGE
Lloh39:
	ldr	x8, [x8, _RLC_DRIVER_DMA_STATUS@GOTPAGEOFF]
Lloh40:
	ldr	w0, [x8]
	mov	w1, #0
	bl	_WREG32
LBB0_16:
	mov	x0, x19
	bl	_cik_rlc_start
	mov	w0, #0
LBB0_17:
	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	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
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpLdrGot	Lloh32, Lloh33
	.loh AdrpLdrGot	Lloh34, Lloh35
	.loh AdrpLdrGot	Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_RLC_CGCG_CGLS_CTRL,4,2         ; @RLC_CGCG_CGLS_CTRL
	.comm	_RLC_LB_CNTR_INIT,4,2           ; @RLC_LB_CNTR_INIT
	.comm	_RLC_LB_CNTR_MAX,4,2            ; @RLC_LB_CNTR_MAX
	.comm	_RLC_LB_INIT_CU_MASK,4,2        ; @RLC_LB_INIT_CU_MASK
	.comm	_RLC_LB_PARAMS,4,2              ; @RLC_LB_PARAMS
	.comm	_RLC_LB_CNTL,4,2                ; @RLC_LB_CNTL
	.comm	_RLC_MC_CNTL,4,2                ; @RLC_MC_CNTL
	.comm	_RLC_UCODE_CNTL,4,2             ; @RLC_UCODE_CNTL
	.comm	_RLC_GPM_UCODE_ADDR,4,2         ; @RLC_GPM_UCODE_ADDR
	.comm	_RLC_GPM_UCODE_DATA,4,2         ; @RLC_GPM_UCODE_DATA
	.comm	_BONAIRE_RLC_UCODE_SIZE,8,3     ; @BONAIRE_RLC_UCODE_SIZE
	.comm	_KV_RLC_UCODE_SIZE,8,3          ; @KV_RLC_UCODE_SIZE
	.comm	_KB_RLC_UCODE_SIZE,8,3          ; @KB_RLC_UCODE_SIZE
	.comm	_ML_RLC_UCODE_SIZE,8,3          ; @ML_RLC_UCODE_SIZE
	.comm	_RLC_DRIVER_DMA_STATUS,4,2      ; @RLC_DRIVER_DMA_STATUS
	.no_dead_strip	_cik_rlc_resume
	.section	__DATA,__const
	.p2align	3                               ; @switch.table.cik_rlc_resume
l_switch.table.cik_rlc_resume:
	.quad	_ML_RLC_UCODE_SIZE
	.quad	_KV_RLC_UCODE_SIZE
	.quad	_KB_RLC_UCODE_SIZE

.subsections_via_symbols
