	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cik_cp_compute_load_microcode
_cik_cp_compute_load_microcode:         ## @cik_cp_compute_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
	cmpq	$0, 8(%rdi)
	je	LBB0_1
## %bb.2:
	movq	%rdi, %rbx
	xorl	%esi, %esi
	callq	_cik_cp_compute_enable
	cmpq	$0, 24(%rbx)
	movq	8(%rbx), %rax
	movq	(%rax), %r12
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	je	LBB0_11
## %bb.3:
	movq	%r12, %rdi
	callq	_radeon_ucode_print_gfx_hdr
	movq	8(%rbx), %rax
	movq	(%rax), %rbx
	movl	8(%r12), %edi
	callq	_le32_to_cpu
	movl	%eax, %r15d
	movl	4(%r12), %edi
	callq	_le32_to_cpu
	movl	%eax, %r13d
	leal	3(%r13), %r14d
	testl	%eax, %eax
	cmovnsl	%eax, %r14d
	movq	_CP_MEC_ME1_UCODE_ADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%esi, %esi
	callq	_WREG32
	cmpl	$4, %r13d
	jl	LBB0_6
## %bb.4:
	sarl	$2, %r14d
	addl	%r15d, %ebx
	movq	_CP_MEC_ME1_UCODE_DATA@GOTPCREL(%rip), %r15
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r15), %r13d
	movl	%ebx, %edi
	callq	_le32_to_cpup
	movl	%r13d, %edi
	movl	%eax, %esi
	callq	_WREG32
	addl	$4, %ebx
	decl	%r14d
	jne	LBB0_5
LBB0_6:
	movq	_CP_MEC_ME1_UCODE_ADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	(%r12), %edi
	callq	_le32_to_cpu
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_WREG32
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	movq	(%rdx), %rax
	movq	_CHIP_KAVERI@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	movl	$0, %eax
	jne	LBB0_20
## %bb.7:
	movq	16(%rdx), %rax
	movq	(%rax), %r12
	movl	8(%r12), %edi
	callq	_le32_to_cpu
	movl	%eax, %ebx
	movl	4(%r12), %edi
	callq	_le32_to_cpu
	movl	%eax, %r15d
	leal	3(%r15), %r14d
	testl	%eax, %eax
	cmovnsl	%eax, %r14d
	movq	_CP_MEC_ME2_UCODE_ADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%esi, %esi
	callq	_WREG32
	cmpl	$4, %r15d
	jl	LBB0_10
## %bb.8:
	sarl	$2, %r14d
	addl	%r12d, %ebx
	movq	_CP_MEC_ME2_UCODE_DATA@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r13), %r15d
	movl	%ebx, %edi
	callq	_le32_to_cpup
	movl	%r15d, %edi
	movl	%eax, %esi
	callq	_WREG32
	addl	$4, %ebx
	decl	%r14d
	jne	LBB0_9
LBB0_10:
	movq	_CP_MEC_ME2_UCODE_ADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	(%r12), %edi
	callq	_le32_to_cpu
	movl	%ebx, %edi
	movl	%eax, %esi
	jmp	LBB0_19
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_20
LBB0_11:
	movq	_CP_MEC_ME1_UCODE_ADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%esi, %esi
	callq	_WREG32
	movq	_CIK_MEC_UCODE_SIZE@GOTPCREL(%rip), %r13
	cmpl	$0, (%r13)
	jle	LBB0_14
## %bb.12:
	xorl	%r14d, %r14d
	movq	_CP_MEC_ME1_UCODE_DATA@GOTPCREL(%rip), %r15
	.p2align	4, 0x90
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	movl	(%r15), %ebx
	movl	%r12d, %edi
	callq	_be32_to_cpup
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_WREG32
	incl	%r14d
	addl	$4, %r12d
	cmpl	(%r13), %r14d
	jl	LBB0_13
LBB0_14:
	movq	_CP_MEC_ME1_UCODE_ADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%esi, %esi
	callq	_WREG32
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	movq	(%rdx), %rax
	movq	_CHIP_KAVERI@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	movl	$0, %eax
	jne	LBB0_20
## %bb.15:
	movq	8(%rdx), %rax
	movq	(%rax), %r12
	movq	_CP_MEC_ME2_UCODE_ADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%esi, %esi
	callq	_WREG32
	cmpl	$0, (%r13)
	jle	LBB0_18
## %bb.16:
	xorl	%ebx, %ebx
	movq	_CP_MEC_ME2_UCODE_DATA@GOTPCREL(%rip), %r14
	.p2align	4, 0x90
LBB0_17:                                ## =>This Inner Loop Header: Depth=1
	movl	(%r14), %r15d
	movl	%r12d, %edi
	callq	_be32_to_cpup
	movl	%r15d, %edi
	movl	%eax, %esi
	callq	_WREG32
	incl	%ebx
	addl	$4, %r12d
	cmpl	(%r13), %ebx
	jl	LBB0_17
LBB0_18:
	movq	_CP_MEC_ME2_UCODE_ADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%esi, %esi
LBB0_19:
	callq	_WREG32
	xorl	%eax, %eax
LBB0_20:
	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	_CP_MEC_ME1_UCODE_ADDR,4,2      ## @CP_MEC_ME1_UCODE_ADDR
	.comm	_CP_MEC_ME1_UCODE_DATA,4,2      ## @CP_MEC_ME1_UCODE_DATA
	.comm	_CHIP_KAVERI,8,3                ## @CHIP_KAVERI
	.comm	_CP_MEC_ME2_UCODE_ADDR,4,2      ## @CP_MEC_ME2_UCODE_ADDR
	.comm	_CP_MEC_ME2_UCODE_DATA,4,2      ## @CP_MEC_ME2_UCODE_DATA
	.comm	_CIK_MEC_UCODE_SIZE,4,2         ## @CIK_MEC_UCODE_SIZE
	.no_dead_strip	_cik_cp_compute_load_microcode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cik_cp_compute_load_microcode
_cik_cp_compute_load_microcode:         ; @cik_cp_compute_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_10
; %bb.1:
	mov	x19, x0
	mov	w1, #0
	bl	_cik_cp_compute_enable
	ldr	x8, [x19, #24]
	ldr	x9, [x19, #8]
	ldr	x20, [x9]
	cbz	x8, LBB0_11
; %bb.2:
	mov	x0, x20
	bl	_radeon_ucode_print_gfx_hdr
	ldr	x8, [x19, #8]
	ldr	x24, [x8]
	ldr	w0, [x20, #8]
	bl	_le32_to_cpu
	mov	x21, x0
	ldr	w0, [x20, #4]
	bl	_le32_to_cpu
	mov	x22, x0
	add	w8, w0, #3
	cmp	w0, #0
	csel	w25, w8, w0, lt
Lloh0:
	adrp	x23, _CP_MEC_ME1_UCODE_ADDR@GOTPAGE
Lloh1:
	ldr	x23, [x23, _CP_MEC_ME1_UCODE_ADDR@GOTPAGEOFF]
	ldr	w0, [x23]
	mov	w1, #0
	bl	_WREG32
	cmp	w22, #4
	b.lt	LBB0_5
; %bb.3:
	asr	w25, w25, #2
	add	w21, w24, w21
Lloh2:
	adrp	x24, _CP_MEC_ME1_UCODE_DATA@GOTPAGE
Lloh3:
	ldr	x24, [x24, _CP_MEC_ME1_UCODE_DATA@GOTPAGEOFF]
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w22, [x24]
	mov	x0, x21
	bl	_le32_to_cpup
	mov	x1, x0
	mov	x0, x22
	bl	_WREG32
	add	w21, w21, #4
	subs	w25, w25, #1
	b.ne	LBB0_4
LBB0_5:
	ldr	w21, [x23]
	ldr	w0, [x20]
	bl	_le32_to_cpu
	mov	x1, x0
	mov	x0, x21
	bl	_WREG32
	ldr	x8, [x19]
Lloh4:
	adrp	x9, _CHIP_KAVERI@GOTPAGE
Lloh5:
	ldr	x9, [x9, _CHIP_KAVERI@GOTPAGEOFF]
Lloh6:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_20
; %bb.6:
	ldr	x8, [x19, #16]
	ldr	x21, [x8]
	ldr	w0, [x21, #8]
	bl	_le32_to_cpu
	mov	x19, x0
	ldr	w0, [x21, #4]
	bl	_le32_to_cpu
	mov	x20, x0
	add	w8, w0, #3
	cmp	w0, #0
	csel	w23, w8, w0, lt
Lloh7:
	adrp	x22, _CP_MEC_ME2_UCODE_ADDR@GOTPAGE
Lloh8:
	ldr	x22, [x22, _CP_MEC_ME2_UCODE_ADDR@GOTPAGEOFF]
	ldr	w0, [x22]
	mov	w1, #0
	bl	_WREG32
	cmp	w20, #4
	b.lt	LBB0_9
; %bb.7:
	asr	w23, w23, #2
	add	w19, w21, w19
Lloh9:
	adrp	x24, _CP_MEC_ME2_UCODE_DATA@GOTPAGE
Lloh10:
	ldr	x24, [x24, _CP_MEC_ME2_UCODE_DATA@GOTPAGEOFF]
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w20, [x24]
	mov	x0, x19
	bl	_le32_to_cpup
	mov	x1, x0
	mov	x0, x20
	bl	_WREG32
	add	w19, w19, #4
	subs	w23, w23, #1
	b.ne	LBB0_8
LBB0_9:
	ldr	w19, [x22]
	ldr	w0, [x21]
	bl	_le32_to_cpu
	mov	x1, x0
	mov	x0, x19
	b	LBB0_19
LBB0_10:
Lloh11:
	adrp	x8, _EINVAL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_21
LBB0_11:
Lloh14:
	adrp	x23, _CP_MEC_ME1_UCODE_ADDR@GOTPAGE
Lloh15:
	ldr	x23, [x23, _CP_MEC_ME1_UCODE_ADDR@GOTPAGEOFF]
	ldr	w0, [x23]
	mov	w1, #0
	bl	_WREG32
Lloh16:
	adrp	x22, _CIK_MEC_UCODE_SIZE@GOTPAGE
Lloh17:
	ldr	x22, [x22, _CIK_MEC_UCODE_SIZE@GOTPAGEOFF]
	ldr	w8, [x22]
	cmp	w8, #1
	b.lt	LBB0_14
; %bb.12:
	mov	w24, #0
Lloh18:
	adrp	x25, _CP_MEC_ME1_UCODE_DATA@GOTPAGE
Lloh19:
	ldr	x25, [x25, _CP_MEC_ME1_UCODE_DATA@GOTPAGEOFF]
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	ldr	w21, [x25]
	mov	x0, x20
	bl	_be32_to_cpup
	mov	x1, x0
	mov	x0, x21
	bl	_WREG32
	add	w24, w24, #1
	ldr	w8, [x22]
	add	w20, w20, #4
	cmp	w24, w8
	b.lt	LBB0_13
LBB0_14:
	ldr	w0, [x23]
	mov	w1, #0
	bl	_WREG32
	mov	w0, #0
	ldr	x8, [x19]
Lloh20:
	adrp	x9, _CHIP_KAVERI@GOTPAGE
Lloh21:
	ldr	x9, [x9, _CHIP_KAVERI@GOTPAGEOFF]
Lloh22:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_21
; %bb.15:
	ldr	x8, [x19, #8]
	ldr	x19, [x8]
Lloh23:
	adrp	x21, _CP_MEC_ME2_UCODE_ADDR@GOTPAGE
Lloh24:
	ldr	x21, [x21, _CP_MEC_ME2_UCODE_ADDR@GOTPAGEOFF]
	ldr	w0, [x21]
	mov	w1, #0
	bl	_WREG32
	ldr	w8, [x22]
	cmp	w8, #1
	b.lt	LBB0_18
; %bb.16:
	mov	w23, #0
Lloh25:
	adrp	x24, _CP_MEC_ME2_UCODE_DATA@GOTPAGE
Lloh26:
	ldr	x24, [x24, _CP_MEC_ME2_UCODE_DATA@GOTPAGEOFF]
LBB0_17:                                ; =>This Inner Loop Header: Depth=1
	ldr	w20, [x24]
	mov	x0, x19
	bl	_be32_to_cpup
	mov	x1, x0
	mov	x0, x20
	bl	_WREG32
	add	w23, w23, #1
	ldr	w8, [x22]
	add	w19, w19, #4
	cmp	w23, w8
	b.lt	LBB0_17
LBB0_18:
	ldr	w0, [x21]
	mov	w1, #0
LBB0_19:
	bl	_WREG32
LBB0_20:
	mov	w0, #0
LBB0_21:
	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	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_CP_MEC_ME1_UCODE_ADDR,4,2      ; @CP_MEC_ME1_UCODE_ADDR
	.comm	_CP_MEC_ME1_UCODE_DATA,4,2      ; @CP_MEC_ME1_UCODE_DATA
	.comm	_CHIP_KAVERI,8,3                ; @CHIP_KAVERI
	.comm	_CP_MEC_ME2_UCODE_ADDR,4,2      ; @CP_MEC_ME2_UCODE_ADDR
	.comm	_CP_MEC_ME2_UCODE_DATA,4,2      ; @CP_MEC_ME2_UCODE_DATA
	.comm	_CIK_MEC_UCODE_SIZE,4,2         ; @CIK_MEC_UCODE_SIZE
	.no_dead_strip	_cik_cp_compute_load_microcode
.subsections_via_symbols
