	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bcm47xxsflash_read
_bcm47xxsflash_read:                    ## @bcm47xxsflash_read
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	leaq	(%rdx,%rsi), %rax
	cmpq	(%rdi), %rax
	jbe	LBB0_2
## %bb.1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_9
LBB0_2:
	movq	%r8, %r12
	movq	%rdx, %r14
	movq	%rsi, %r13
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	movq	8(%rdi), %rbx
	movq	_BCM47XXSFLASH_WINDOW_SZ@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	subq	%r13, %rsi
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	jle	LBB0_3
## %bb.4:
	movq	%r14, %rdi
	callq	_min
	movq	%rax, %r15
	movq	(%rbx), %rsi
	addq	%r13, %rsi
	movq	%r12, %rdi
	movq	%rax, %rdx
	callq	_memcpy_fromio
	movq	%r15, %rax
	addq	%r15, %r13
	movq	%r14, %r15
	subq	%rax, %r15
	leaq	(%r12,%rax,4), %r12
	testq	%r15, %r15
	jne	LBB0_6
	jmp	LBB0_8
LBB0_3:
	movq	%r14, %r15
	testq	%r15, %r15
	je	LBB0_8
LBB0_6:
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	_BCMA_CC_FLASHADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leal	(%r14,%r13), %edx
	movq	%rbx, %rdi
	callq	*16(%rbx)
	movq	_OPCODE_ST_READ4B@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_bcm47xxsflash_cmd
	movq	_BCMA_CC_FLASHDATA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	*8(%rbx)
	movl	%eax, (%r12,%r14,4)
	incq	%r14
	cmpq	%r14, %r15
	jne	LBB0_7
LBB0_8:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movq	%rax, (%rcx)
LBB0_9:
                                        ## kill: def $eax killed $eax killed $rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_BCM47XXSFLASH_WINDOW_SZ,8,3    ## @BCM47XXSFLASH_WINDOW_SZ
	.comm	_BCMA_CC_FLASHADDR,4,2          ## @BCMA_CC_FLASHADDR
	.comm	_OPCODE_ST_READ4B,4,2           ## @OPCODE_ST_READ4B
	.comm	_BCMA_CC_FLASHDATA,4,2          ## @BCMA_CC_FLASHDATA
	.no_dead_strip	_bcm47xxsflash_read
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bcm47xxsflash_read
_bcm47xxsflash_read:                    ; @bcm47xxsflash_read
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	ldr	x8, [x0]
	add	x9, x2, x1
	cmp	x9, x8
	b.ls	LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w19, w8
	b	LBB0_8
LBB0_2:
	mov	x21, x4
	mov	x20, x3
	mov	x19, x2
	mov	x22, x1
	ldr	x23, [x0, #8]
Lloh3:
	adrp	x8, _BCM47XXSFLASH_WINDOW_SZ@GOTPAGE
Lloh4:
	ldr	x8, [x8, _BCM47XXSFLASH_WINDOW_SZ@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	subs	x1, x8, x1
	b.le	LBB0_4
; %bb.3:
	mov	x0, x19
	bl	_min
	mov	x24, x0
	ldr	x8, [x23]
	add	x1, x8, x22
	mov	x0, x21
	mov	x2, x24
	bl	_memcpy_fromio
	add	x22, x24, x22
	sub	x25, x19, x24
	add	x21, x21, x24, lsl #2
	cbnz	x25, LBB0_5
	b	LBB0_7
LBB0_4:
	mov	x25, x19
	cbz	x25, LBB0_7
LBB0_5:
Lloh6:
	adrp	x24, _BCMA_CC_FLASHADDR@GOTPAGE
Lloh7:
	ldr	x24, [x24, _BCMA_CC_FLASHADDR@GOTPAGEOFF]
Lloh8:
	adrp	x26, _OPCODE_ST_READ4B@GOTPAGE
Lloh9:
	ldr	x26, [x26, _OPCODE_ST_READ4B@GOTPAGEOFF]
Lloh10:
	adrp	x27, _BCMA_CC_FLASHDATA@GOTPAGE
Lloh11:
	ldr	x27, [x27, _BCMA_CC_FLASHDATA@GOTPAGEOFF]
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x23, #16]
	ldr	w1, [x24]
	mov	x0, x23
	mov	x2, x22
	blr	x8
	ldr	w1, [x26]
	mov	x0, x23
	bl	_bcm47xxsflash_cmd
	ldr	x8, [x23, #8]
	ldr	w1, [x27]
	mov	x0, x23
	blr	x8
	str	w0, [x21], #4
	add	w22, w22, #1
	subs	x25, x25, #1
	b.ne	LBB0_6
LBB0_7:
	str	x19, [x20]
LBB0_8:
	mov	x0, x19
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_BCM47XXSFLASH_WINDOW_SZ,8,3    ; @BCM47XXSFLASH_WINDOW_SZ
	.comm	_BCMA_CC_FLASHADDR,4,2          ; @BCMA_CC_FLASHADDR
	.comm	_OPCODE_ST_READ4B,4,2           ; @OPCODE_ST_READ4B
	.comm	_BCMA_CC_FLASHDATA,4,2          ; @BCMA_CC_FLASHDATA
	.no_dead_strip	_bcm47xxsflash_read
.subsections_via_symbols
