	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function radeon_cp_load_microcode
_radeon_cp_load_microcode:              ## @radeon_cp_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	%rdi, %rbx
	callq	_radeon_do_wait_for_idle
	movq	(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_4
## %bb.1:
	movl	(%rax), %r15d
	movq	8(%rax), %r12
	movq	_RADEON_CP_ME_RAM_ADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%esi, %esi
	callq	_RADEON_WRITE
	cmpl	$4, %r15d
	jl	LBB0_4
## %bb.2:
	shrq	$2, %r15
	xorl	%ebx, %ebx
	movq	_RADEON_CP_ME_RAM_DATAL@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	_RADEON_CP_ME_RAM_DATAH@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	%r12, %rdi
	callq	_be32_to_cpup
	movl	%r14d, %edi
	movl	%eax, %esi
	callq	_RADEON_WRITE
	movl	(%r13), %r14d
	leaq	4(%r12), %rdi
	callq	_be32_to_cpup
	movl	%r14d, %edi
	movl	%eax, %esi
	callq	_RADEON_WRITE
	addq	$2, %rbx
	addq	$8, %r12
	cmpq	%r15, %rbx
	jb	LBB0_3
LBB0_4:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_RADEON_CP_ME_RAM_ADDR,4,2      ## @RADEON_CP_ME_RAM_ADDR
	.comm	_RADEON_CP_ME_RAM_DATAH,4,2     ## @RADEON_CP_ME_RAM_DATAH
	.comm	_RADEON_CP_ME_RAM_DATAL,4,2     ## @RADEON_CP_ME_RAM_DATAL
	.no_dead_strip	_radeon_cp_load_microcode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function radeon_cp_load_microcode
_radeon_cp_load_microcode:              ; @radeon_cp_load_microcode
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x0
	bl	_radeon_do_wait_for_idle
	ldr	x8, [x19]
	cbz	x8, LBB0_4
; %bb.1:
	ldr	w20, [x8]
	ldr	x19, [x8, #8]
Lloh0:
	adrp	x8, _RADEON_CP_ME_RAM_ADDR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _RADEON_CP_ME_RAM_ADDR@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	mov	w1, #0
	bl	_RADEON_WRITE
	cmp	w20, #4
	b.lt	LBB0_4
; %bb.2:
	mov	x21, #0
	lsr	x22, x20, #2
Lloh3:
	adrp	x23, _RADEON_CP_ME_RAM_DATAH@GOTPAGE
Lloh4:
	ldr	x23, [x23, _RADEON_CP_ME_RAM_DATAH@GOTPAGEOFF]
Lloh5:
	adrp	x24, _RADEON_CP_ME_RAM_DATAL@GOTPAGE
Lloh6:
	ldr	x24, [x24, _RADEON_CP_ME_RAM_DATAL@GOTPAGEOFF]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w20, [x23]
	mov	x0, x19
	bl	_be32_to_cpup
	mov	x1, x0
	mov	x0, x20
	bl	_RADEON_WRITE
	ldr	w20, [x24]
	add	x0, x19, #4
	bl	_be32_to_cpup
	mov	x1, x0
	mov	x0, x20
	bl	_RADEON_WRITE
	add	x21, x21, #2
	add	x19, x19, #8
	cmp	x21, x22
	b.lo	LBB0_3
LBB0_4:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_RADEON_CP_ME_RAM_ADDR,4,2      ; @RADEON_CP_ME_RAM_ADDR
	.comm	_RADEON_CP_ME_RAM_DATAH,4,2     ; @RADEON_CP_ME_RAM_DATAH
	.comm	_RADEON_CP_ME_RAM_DATAL,4,2     ; @RADEON_CP_ME_RAM_DATAL
	.no_dead_strip	_radeon_cp_load_microcode
.subsections_via_symbols
