	.file	"extr_cik.c_cik_rlc_resume.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	cik_rlc_resume, @function
cik_rlc_resume:
.LFB0:
	.cfi_startproc
	endbr64
	cmp	QWORD PTR 8[rdi], 0
	je	.L22
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	mov	r12, rdi
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	call	cik_rlc_stop@PLT
	mov	edi, DWORD PTR RLC_CGCG_CGLS_CTRL[rip]
	call	RREG32@PLT
	mov	edi, DWORD PTR RLC_CGCG_CGLS_CTRL[rip]
	and	eax, -4
	mov	esi, eax
	call	WREG32@PLT
	mov	rdi, r12
	call	si_rlc_reset@PLT
	mov	rdi, r12
	call	cik_init_pg@PLT
	mov	rdi, r12
	call	cik_init_cg@PLT
	mov	edi, DWORD PTR RLC_LB_CNTR_INIT[rip]
	xor	esi, esi
	call	WREG32@PLT
	mov	edi, DWORD PTR RLC_LB_CNTR_MAX[rip]
	mov	esi, 32768
	call	WREG32@PLT
	mov	edx, -1
	mov	esi, -1
	mov	rdi, r12
	call	cik_select_se_sh@PLT
	mov	edi, DWORD PTR RLC_LB_INIT_CU_MASK[rip]
	mov	esi, -1
	call	WREG32@PLT
	mov	edi, DWORD PTR RLC_LB_PARAMS[rip]
	mov	esi, 6292488
	call	WREG32@PLT
	mov	edi, DWORD PTR RLC_LB_CNTL[rip]
	mov	esi, -2147483644
	call	WREG32@PLT
	mov	edi, DWORD PTR RLC_MC_CNTL[rip]
	xor	esi, esi
	call	WREG32@PLT
	mov	edi, DWORD PTR RLC_UCODE_CNTL[rip]
	xor	esi, esi
	call	WREG32@PLT
	mov	rbx, QWORD PTR 16[r12]
	test	rbx, rbx
	jne	.L23
	mov	eax, DWORD PTR [r12]
	cmp	eax, 129
	je	.L8
	mov	r13, QWORD PTR KB_RLC_UCODE_SIZE[rip]
	cmp	eax, 130
	je	.L11
	mov	r13, QWORD PTR BONAIRE_RLC_UCODE_SIZE[rip]
	cmp	eax, 128
	cmove	r13, QWORD PTR ML_RLC_UCODE_SIZE[rip]
.L11:
	mov	rax, QWORD PTR 8[r12]
	mov	edi, DWORD PTR RLC_GPM_UCODE_ADDR[rip]
	xor	esi, esi
	mov	rbp, QWORD PTR [rax]
	call	WREG32@PLT
	test	r13, r13
	jle	.L12
	.p2align 4,,10
	.p2align 3
.L13:
	mov	edi, ebp
	add	rbx, 1
	add	rbp, 4
	call	be32_to_cpup@PLT
	mov	edi, DWORD PTR RLC_GPM_UCODE_DATA[rip]
	mov	esi, eax
	call	WREG32@PLT
	cmp	r13, rbx
	jne	.L13
.L12:
	mov	edi, DWORD PTR RLC_GPM_UCODE_ADDR[rip]
	xor	esi, esi
	call	WREG32@PLT
.L7:
	xor	esi, esi
	mov	rdi, r12
	call	cik_enable_lbpw@PLT
	cmp	DWORD PTR [r12], 132
	je	.L24
.L14:
	mov	rdi, r12
	call	cik_rlc_start@PLT
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xor	eax, eax
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L23:
	.cfi_restore_state
	mov	rax, QWORD PTR 8[r12]
	mov	rbp, QWORD PTR [rax]
	mov	edi, DWORD PTR 8[rbp]
	call	le32_to_cpu@PLT
	mov	rdi, rbp
	movsx	rbx, eax
	call	radeon_ucode_print_rlc_hdr@PLT
	mov	edi, DWORD PTR 4[rbp]
	add	rbx, rbp
	call	le32_to_cpu@PLT
	mov	edi, DWORD PTR RLC_GPM_UCODE_ADDR[rip]
	mov	r14d, eax
	lea	eax, 3[rax]
	test	r14d, r14d
	cmovns	eax, r14d
	xor	esi, esi
	sar	eax, 2
	mov	r13d, eax
	call	WREG32@PLT
	cmp	r14d, 3
	jle	.L5
	movsx	rax, r13d
	lea	r13, [rbx+rax*4]
	.p2align 4,,10
	.p2align 3
.L6:
	mov	edi, ebx
	add	rbx, 4
	call	le32_to_cpup@PLT
	mov	edi, DWORD PTR RLC_GPM_UCODE_DATA[rip]
	mov	esi, eax
	call	WREG32@PLT
	cmp	r13, rbx
	jne	.L6
.L5:
	mov	edi, DWORD PTR 0[rbp]
	call	le32_to_cpu@PLT
	mov	edi, DWORD PTR RLC_GPM_UCODE_ADDR[rip]
	mov	esi, eax
	call	WREG32@PLT
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L22:
	.cfi_def_cfa_offset 8
	.cfi_restore 3
	.cfi_restore 6
	.cfi_restore 12
	.cfi_restore 13
	.cfi_restore 14
	mov	eax, DWORD PTR EINVAL[rip]
	neg	eax
	ret
	.p2align 4,,10
	.p2align 3
.L24:
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	.cfi_offset 6, -40
	.cfi_offset 12, -32
	.cfi_offset 13, -24
	.cfi_offset 14, -16
	mov	edi, DWORD PTR RLC_DRIVER_DMA_STATUS[rip]
	xor	esi, esi
	call	WREG32@PLT
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L8:
	mov	r13, QWORD PTR KV_RLC_UCODE_SIZE[rip]
	jmp	.L11
	.cfi_endproc
.LFE0:
	.size	cik_rlc_resume, .-cik_rlc_resume
	.comm	RLC_UCODE_CNTL,4,4
	.comm	RLC_MC_CNTL,4,4
	.comm	RLC_LB_PARAMS,4,4
	.comm	RLC_LB_INIT_CU_MASK,4,4
	.comm	RLC_LB_CNTR_MAX,4,4
	.comm	RLC_LB_CNTR_INIT,4,4
	.comm	RLC_LB_CNTL,4,4
	.comm	RLC_GPM_UCODE_DATA,4,4
	.comm	RLC_GPM_UCODE_ADDR,4,4
	.comm	RLC_DRIVER_DMA_STATUS,4,4
	.comm	RLC_CGCG_CGLS_CTRL,4,4
	.comm	ML_RLC_UCODE_SIZE,8,8
	.comm	KV_RLC_UCODE_SIZE,8,8
	.comm	KB_RLC_UCODE_SIZE,8,8
	.comm	EINVAL,4,4
	.comm	BONAIRE_RLC_UCODE_SIZE,8,8
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_cik.c_cik_rlc_resume.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	cik_rlc_resume, %function
cik_rlc_resume:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r3, r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	r3, [r0, #4]
	cmp	r3, #0
	beq	.L19
	ldr	r4, .L22
	mov	r6, r0
	bl	cik_rlc_stop
	ldr	r0, [r4]
	bl	RREG32
	mov	r1, r0
	ldr	r0, [r4]
	bic	r1, r1, #3
	bl	WREG32
	mov	r0, r6
	bl	si_rlc_reset
	mov	r0, r6
	bl	cik_init_pg
	mov	r0, r6
	bl	cik_init_cg
	ldr	r3, .L22+4
	mov	r1, #0
	ldr	r0, [r3]
	bl	WREG32
	ldr	r3, .L22+8
	mov	r1, #32768
	ldr	r0, [r3]
	bl	WREG32
	mvn	r2, #0
	mov	r0, r6
	mov	r1, r2
	bl	cik_select_se_sh
	ldr	r3, .L22+12
	mvn	r1, #0
	ldr	r0, [r3]
	bl	WREG32
	ldr	r3, .L22+16
	ldr	r1, .L22+20
	ldr	r0, [r3]
	bl	WREG32
	ldr	r3, .L22+24
	mov	r1, #-2147483644
	ldr	r0, [r3]
	bl	WREG32
	ldr	r3, .L22+28
	mov	r1, #0
	ldr	r0, [r3]
	bl	WREG32
	ldr	r3, .L22+32
	mov	r1, #0
	ldr	r0, [r3]
	bl	WREG32
	ldr	r4, [r6, #8]
	cmp	r4, #0
	bne	.L20
	ldr	r3, [r6]
	cmp	r3, #129
	beq	.L8
	cmp	r3, #130
	beq	.L9
	cmp	r3, #128
	beq	.L10
	ldr	r3, .L22+36
	ldr	r8, [r3]
.L11:
	ldr	r9, .L22+40
	ldr	r3, [r6, #4]
	mov	r1, #0
	ldr	r0, [r9]
	ldr	r5, [r3]
	bl	WREG32
	cmp	r8, #0
	ble	.L12
	ldr	r10, .L22+44
.L13:
	mov	r0, r5
	ldr	r7, [r10]
	bl	be32_to_cpup
	add	r4, r4, #1
	mov	r1, r0
	mov	r0, r7
	bl	WREG32
	cmp	r8, r4
	add	r5, r5, #4
	bne	.L13
.L12:
	mov	r1, #0
	ldr	r0, [r9]
	bl	WREG32
	b	.L7
.L20:
	ldr	r3, [r6, #4]
	ldr	r9, .L22+40
	ldr	r8, [r3]
	ldr	r0, [r8, #8]
	bl	le32_to_cpu
	mov	r4, r0
	mov	r0, r8
	bl	radeon_ucode_print_rlc_hdr
	ldr	r0, [r8, #4]
	bl	le32_to_cpu
	cmp	r0, #0
	mov	r5, r0
	add	r7, r0, #3
	movge	r7, r0
	mov	r1, #0
	ldr	r0, [r9]
	bl	WREG32
	cmp	r5, #3
	add	r4, r8, r4
	asr	r7, r7, #2
	ble	.L5
	mov	r5, #0
	ldr	r10, .L22+44
.L6:
	mov	r0, r4
	ldr	fp, [r10]
	bl	le32_to_cpup
	add	r5, r5, #1
	mov	r1, r0
	mov	r0, fp
	bl	WREG32
	cmp	r7, r5
	add	r4, r4, #4
	bgt	.L6
.L5:
	ldr	r0, [r8]
	ldr	r4, [r9]
	bl	le32_to_cpu
	mov	r1, r0
	mov	r0, r4
	bl	WREG32
.L7:
	mov	r1, #0
	mov	r0, r6
	bl	cik_enable_lbpw
	ldr	r3, [r6]
	cmp	r3, #132
	beq	.L21
.L14:
	mov	r0, r6
	bl	cik_rlc_start
	mov	r0, #0
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L19:
	ldr	r3, .L22+48
	ldr	r0, [r3]
	rsb	r0, r0, #0
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L21:
	ldr	r3, .L22+52
	mov	r1, #0
	ldr	r0, [r3]
	bl	WREG32
	b	.L14
.L10:
	ldr	r3, .L22+56
	ldr	r8, [r3]
	b	.L11
.L9:
	ldr	r3, .L22+60
	ldr	r8, [r3]
	b	.L11
.L8:
	ldr	r3, .L22+64
	ldr	r8, [r3]
	b	.L11
.L23:
	.align	2
.L22:
	.word	RLC_CGCG_CGLS_CTRL
	.word	RLC_LB_CNTR_INIT
	.word	RLC_LB_CNTR_MAX
	.word	RLC_LB_INIT_CU_MASK
	.word	RLC_LB_PARAMS
	.word	6292488
	.word	RLC_LB_CNTL
	.word	RLC_MC_CNTL
	.word	RLC_UCODE_CNTL
	.word	BONAIRE_RLC_UCODE_SIZE
	.word	RLC_GPM_UCODE_ADDR
	.word	RLC_GPM_UCODE_DATA
	.word	EINVAL
	.word	RLC_DRIVER_DMA_STATUS
	.word	ML_RLC_UCODE_SIZE
	.word	KB_RLC_UCODE_SIZE
	.word	KV_RLC_UCODE_SIZE
	.size	cik_rlc_resume, .-cik_rlc_resume
	.comm	RLC_UCODE_CNTL,4,4
	.comm	RLC_MC_CNTL,4,4
	.comm	RLC_LB_PARAMS,4,4
	.comm	RLC_LB_INIT_CU_MASK,4,4
	.comm	RLC_LB_CNTR_MAX,4,4
	.comm	RLC_LB_CNTR_INIT,4,4
	.comm	RLC_LB_CNTL,4,4
	.comm	RLC_GPM_UCODE_DATA,4,4
	.comm	RLC_GPM_UCODE_ADDR,4,4
	.comm	RLC_DRIVER_DMA_STATUS,4,4
	.comm	RLC_CGCG_CGLS_CTRL,4,4
	.comm	ML_RLC_UCODE_SIZE,4,4
	.comm	KV_RLC_UCODE_SIZE,4,4
	.comm	KB_RLC_UCODE_SIZE,4,4
	.comm	EINVAL,4,4
	.comm	BONAIRE_RLC_UCODE_SIZE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
