	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bcm47xxnflash_ops_bcm4706_poll
_bcm47xxnflash_ops_bcm4706_poll:        ## @bcm47xxnflash_ops_bcm4706_poll
	.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, %r13
	movq	_NFLASH_READY_RETRIES@GOTPCREL(%rip), %r15
	leaq	L_.str.1(%rip), %rdi
	cmpl	$0, (%r15)
	jle	LBB0_7
## %bb.1:
	xorl	%ebx, %ebx
	movq	_BCMA_CC_NFLASH_CTL@GOTPCREL(%rip), %r12
	movq	_NCTL_READY@GOTPCREL(%rip), %r14
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r12), %esi
	movq	%r13, %rdi
	callq	_bcma_cc_read32
	testl	%eax, (%r14)
	jne	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	incl	%ebx
	cmpl	(%r15), %ebx
	jl	LBB0_2
## %bb.4:
	leaq	L_.str.1(%rip), %rdi
	jmp	LBB0_7
LBB0_5:
	movl	(%r12), %esi
	movq	%r13, %rdi
	callq	_bcma_cc_read32
	movq	_BCMA_CC_NFLASH_CTL_ERR@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_9
## %bb.6:
	leaq	L_.str(%rip), %rdi
LBB0_7:
	callq	_pr_err
	movq	_EBUSY@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	xorl	%eax, %eax
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_NFLASH_READY_RETRIES,4,2       ## @NFLASH_READY_RETRIES
	.comm	_BCMA_CC_NFLASH_CTL,4,2         ## @BCMA_CC_NFLASH_CTL
	.comm	_NCTL_READY,4,2                 ## @NCTL_READY
	.comm	_BCMA_CC_NFLASH_CTL_ERR,4,2     ## @BCMA_CC_NFLASH_CTL_ERR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Error on polling\n"

	.comm	_EBUSY,4,2                      ## @EBUSY
L_.str.1:                               ## @.str.1
	.asciz	"Polling timeout!\n"

	.no_dead_strip	_bcm47xxnflash_ops_bcm4706_poll
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bcm47xxnflash_ops_bcm4706_poll
_bcm47xxnflash_ops_bcm4706_poll:        ; @bcm47xxnflash_ops_bcm4706_poll
	.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
Lloh0:
	adrp	x21, _NFLASH_READY_RETRIES@GOTPAGE
Lloh1:
	ldr	x21, [x21, _NFLASH_READY_RETRIES@GOTPAGEOFF]
	ldr	w8, [x21]
	cmp	w8, #1
	b.lt	LBB0_4
; %bb.1:
	mov	x20, x0
	mov	w22, #0
Lloh2:
	adrp	x23, _BCMA_CC_NFLASH_CTL@GOTPAGE
Lloh3:
	ldr	x23, [x23, _BCMA_CC_NFLASH_CTL@GOTPAGEOFF]
Lloh4:
	adrp	x24, _NCTL_READY@GOTPAGE
Lloh5:
	ldr	x24, [x24, _NCTL_READY@GOTPAGEOFF]
Lloh6:
	adrp	x19, l_.str.1@PAGE
Lloh7:
	add	x19, x19, l_.str.1@PAGEOFF
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x23]
	mov	x0, x20
	bl	_bcma_cc_read32
	ldr	w8, [x24]
	tst	w8, w0
	b.ne	LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	w22, w22, #1
	ldr	w8, [x21]
	cmp	w22, w8
	b.lt	LBB0_2
	b	LBB0_7
LBB0_4:
Lloh8:
	adrp	x19, l_.str.1@PAGE
Lloh9:
	add	x19, x19, l_.str.1@PAGEOFF
	b	LBB0_7
LBB0_5:
	ldr	w1, [x23]
	mov	x0, x20
	bl	_bcma_cc_read32
Lloh10:
	adrp	x8, _BCMA_CC_NFLASH_CTL_ERR@GOTPAGE
Lloh11:
	ldr	x8, [x8, _BCMA_CC_NFLASH_CTL_ERR@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_9
; %bb.6:
Lloh13:
	adrp	x19, l_.str@PAGE
Lloh14:
	add	x19, x19, l_.str@PAGEOFF
LBB0_7:
	mov	x0, x19
	bl	_pr_err
Lloh15:
	adrp	x8, _EBUSY@GOTPAGE
Lloh16:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_8:
	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
LBB0_9:
	mov	w0, #0
	b	LBB0_8
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_NFLASH_READY_RETRIES,4,2       ; @NFLASH_READY_RETRIES
	.comm	_BCMA_CC_NFLASH_CTL,4,2         ; @BCMA_CC_NFLASH_CTL
	.comm	_NCTL_READY,4,2                 ; @NCTL_READY
	.comm	_BCMA_CC_NFLASH_CTL_ERR,4,2     ; @BCMA_CC_NFLASH_CTL_ERR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Error on polling\n"

	.comm	_EBUSY,4,2                      ; @EBUSY
l_.str.1:                               ; @.str.1
	.asciz	"Polling timeout!\n"

	.no_dead_strip	_bcm47xxnflash_ops_bcm4706_poll
.subsections_via_symbols
