	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function read_rom
_read_rom:                              ## @read_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
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
                                        ## kill: def $edx killed $edx def $rdx
	movl	%esi, %r15d
	movq	%rdi, %r13
	movq	_CSR_REGISTER_BASE@GOTPCREL(%rip), %rax
	movq	_CSR_CONFIG_ROM@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	leal	(%rcx,%rdx,4), %r12d
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_smp_rmb
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movl	8(%r13), %edi
	movq	_TCODE_READ_QUADLET_REQUEST@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r13), %r8d
	movl	4(%r13), %edx
	movl	%r15d, %ecx
	movl	%r12d, %r9d
	pushq	$4
	pushq	-48(%rbp)                       ## 8-byte Folded Reload
	callq	_fw_run_transaction
	addq	$16, %rsp
	movl	%eax, %r14d
	movq	_RCODE_BUSY@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r14d
	jne	LBB0_3
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	addl	$10, %ebx
	movl	%ebx, %edi
	callq	_msleep
	cmpl	$90, %ebx
	jb	LBB0_1
LBB0_3:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_be32_to_cpus
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CSR_REGISTER_BASE,4,2          ## @CSR_REGISTER_BASE
	.comm	_CSR_CONFIG_ROM,4,2             ## @CSR_CONFIG_ROM
	.comm	_TCODE_READ_QUADLET_REQUEST,4,2 ## @TCODE_READ_QUADLET_REQUEST
	.comm	_RCODE_BUSY,4,2                 ## @RCODE_BUSY
	.no_dead_strip	_read_rom
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function read_rom
_read_rom:                              ; @read_rom
	.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
	mov	x19, x3
	mov	x20, x1
	mov	x21, x0
Lloh0:
	adrp	x8, _CSR_REGISTER_BASE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CSR_REGISTER_BASE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _CSR_CONFIG_ROM@GOTPAGE
Lloh4:
	ldr	x9, [x9, _CSR_CONFIG_ROM@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	orr	w8, w9, w8
	add	w22, w8, w2, lsl #2
	bl	_smp_rmb
	mov	w23, #0
Lloh6:
	adrp	x25, _TCODE_READ_QUADLET_REQUEST@GOTPAGE
Lloh7:
	ldr	x25, [x25, _TCODE_READ_QUADLET_REQUEST@GOTPAGEOFF]
Lloh8:
	adrp	x26, _RCODE_BUSY@GOTPAGE
Lloh9:
	ldr	x26, [x26, _RCODE_BUSY@GOTPAGEOFF]
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldp	w2, w0, [x21, #4]
	ldr	w1, [x25]
	ldr	w4, [x21]
	mov	x3, x20
	mov	x5, x22
	mov	x6, x19
	mov	w7, #4
	bl	_fw_run_transaction
	mov	x24, x0
	ldr	w8, [x26]
	cmp	w0, w8
	b.ne	LBB0_3
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	add	w23, w23, #10
	mov	x0, x23
	bl	_msleep
	cmp	w23, #90
	b.lo	LBB0_1
LBB0_3:
	mov	x0, x19
	bl	_be32_to_cpus
	mov	x0, x24
	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	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_CSR_REGISTER_BASE,4,2          ; @CSR_REGISTER_BASE
	.comm	_CSR_CONFIG_ROM,4,2             ; @CSR_CONFIG_ROM
	.comm	_TCODE_READ_QUADLET_REQUEST,4,2 ; @TCODE_READ_QUADLET_REQUEST
	.comm	_RCODE_BUSY,4,2                 ; @RCODE_BUSY
	.no_dead_strip	_read_rom
.subsections_via_symbols
