	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function soc15_read_bios_from_rom
_soc15_read_bios_from_rom:              ## @soc15_read_bios_from_rom
	.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
	xorl	%eax, %eax
	testq	%rsi, %rsi
	je	LBB0_7
## %bb.1:
	testq	%rdx, %rdx
	je	LBB0_7
## %bb.2:
	movq	_AMD_IS_APU@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rdi)
	jne	LBB0_7
## %bb.3:
	movq	%rsi, %r13
	movq	%rdx, %rdi
	movl	$4, %esi
	callq	_ALIGN
	movl	%eax, %r15d
	leal	3(%r15), %ebx
	testl	%eax, %eax
	cmovnsl	%eax, %ebx
	movq	_SMUIO@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	movq	_mmROM_INDEX@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%esi, %esi
	callq	_SOC15_REG_OFFSET
	movl	%eax, %edi
	xorl	%esi, %esi
	callq	_WREG32
	movl	$1, %eax
	cmpl	$4, %r15d
	jl	LBB0_7
## %bb.4:
	sarl	$2, %ebx
	movslq	%ebx, %r15
	xorl	%ebx, %ebx
	movq	_mmROM_DATA@GOTPCREL(%rip), %r12
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r14), %edi
	movl	(%r12), %edx
	xorl	%esi, %esi
	callq	_SOC15_REG_OFFSET
	movl	%eax, %edi
	callq	_RREG32
	movq	%rax, (%r13,%rbx,8)
	incq	%rbx
	cmpq	%rbx, %r15
	jne	LBB0_5
## %bb.6:
	movl	$1, %eax
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AMD_IS_APU,4,2                 ## @AMD_IS_APU
	.comm	_SMUIO,4,2                      ## @SMUIO
	.comm	_mmROM_INDEX,4,2                ## @mmROM_INDEX
	.comm	_mmROM_DATA,4,2                 ## @mmROM_DATA
	.no_dead_strip	_soc15_read_bios_from_rom
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function soc15_read_bios_from_rom
_soc15_read_bios_from_rom:              ; @soc15_read_bios_from_rom
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x8, x0
	mov	w0, #0
	cbz	x1, LBB0_8
; %bb.1:
	cbz	x2, LBB0_8
; %bb.2:
	ldr	w8, [x8]
Lloh0:
	adrp	x9, _AMD_IS_APU@GOTPAGE
Lloh1:
	ldr	x9, [x9, _AMD_IS_APU@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_4
; %bb.3:
	mov	w0, #0
	b	LBB0_8
LBB0_4:
	mov	x19, x1
	mov	x0, x2
	mov	w1, #4
	bl	_ALIGN
	mov	x20, x0
	add	w8, w0, #3
	cmp	w0, #0
	csel	w22, w8, w0, lt
Lloh3:
	adrp	x21, _SMUIO@GOTPAGE
Lloh4:
	ldr	x21, [x21, _SMUIO@GOTPAGEOFF]
	ldr	w0, [x21]
Lloh5:
	adrp	x8, _mmROM_INDEX@GOTPAGE
Lloh6:
	ldr	x8, [x8, _mmROM_INDEX@GOTPAGEOFF]
Lloh7:
	ldr	w2, [x8]
	mov	w1, #0
	bl	_SOC15_REG_OFFSET
	mov	w1, #0
	bl	_WREG32
	cmp	w20, #4
	b.lt	LBB0_7
; %bb.5:
	sbfx	x20, x22, #2, #30
Lloh8:
	adrp	x22, _mmROM_DATA@GOTPAGE
Lloh9:
	ldr	x22, [x22, _mmROM_DATA@GOTPAGEOFF]
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x21]
	ldr	w2, [x22]
	mov	w1, #0
	bl	_SOC15_REG_OFFSET
	bl	_RREG32
	str	x0, [x19], #8
	subs	x20, x20, #1
	b.ne	LBB0_6
LBB0_7:
	mov	w0, #1
LBB0_8:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_AMD_IS_APU,4,2                 ; @AMD_IS_APU
	.comm	_SMUIO,4,2                      ; @SMUIO
	.comm	_mmROM_INDEX,4,2                ; @mmROM_INDEX
	.comm	_mmROM_DATA,4,2                 ; @mmROM_DATA
	.no_dead_strip	_soc15_read_bios_from_rom
.subsections_via_symbols
