	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bcmnand_ctrl_poll_status
_bcmnand_ctrl_poll_status:              ## @bcmnand_ctrl_poll_status
	.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
	movl	%edx, %r14d
	movl	%esi, %r15d
	movq	%rdi, %r13
	testq	%rcx, %rcx
	jne	LBB0_2
## %bb.1:
	movq	_NAND_POLL_STATUS_TIMEOUT_MS@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
LBB0_2:
	movq	_jiffies@GOTPCREL(%rip), %rax
	movq	(%rax), %r12
	movq	%rcx, %rdi
	callq	_msecs_to_jiffies
	movq	%rax, %rbx
	addq	%r12, %rbx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	_BRCMNAND_INTFC_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_brcmnand_read_reg
	movl	%eax, %r12d
	andl	%r15d, %r12d
	cmpl	%r14d, %r12d
	je	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	xorl	%eax, %eax
	callq	_cpu_relax
	movq	_jiffies@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	%rbx, %rdi
	callq	_time_after
	testq	%rax, %rax
	jne	LBB0_3
## %bb.6:
	movl	(%r13), %edi
	leaq	L_.str(%rip), %rsi
	movl	%r14d, %edx
	movl	%r12d, %ecx
	callq	_dev_warn
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_7
LBB0_4:
	xorl	%eax, %eax
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NAND_POLL_STATUS_TIMEOUT_MS,8,3 ## @NAND_POLL_STATUS_TIMEOUT_MS
	.comm	_jiffies,8,3                    ## @jiffies
	.comm	_BRCMNAND_INTFC_STATUS,4,2      ## @BRCMNAND_INTFC_STATUS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"timeout on status poll (expected %x got %x)\n"

	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
	.no_dead_strip	_bcmnand_ctrl_poll_status
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bcmnand_ctrl_poll_status
_bcmnand_ctrl_poll_status:              ; @bcmnand_ctrl_poll_status
	.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, x2
	mov	x21, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _NAND_POLL_STATUS_TIMEOUT_MS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _NAND_POLL_STATUS_TIMEOUT_MS@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x3, #0
	csel	x0, x8, x3, eq
Lloh3:
	adrp	x24, _jiffies@GOTPAGE
Lloh4:
	ldr	x24, [x24, _jiffies@GOTPAGEOFF]
	ldr	x22, [x24]
	bl	_msecs_to_jiffies
	add	x22, x0, x22
Lloh5:
	adrp	x25, _BRCMNAND_INTFC_STATUS@GOTPAGE
Lloh6:
	ldr	x25, [x25, _BRCMNAND_INTFC_STATUS@GOTPAGEOFF]
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x25]
	mov	x0, x20
	bl	_brcmnand_read_reg
	and	w23, w0, w21
	cmp	w23, w19
	b.eq	LBB0_4
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	bl	_cpu_relax
	ldr	x1, [x24]
	mov	x0, x22
	bl	_time_after
	cbnz	x0, LBB0_1
; %bb.3:
	ldr	w0, [x20]
Lloh7:
	adrp	x1, l_.str@PAGE
Lloh8:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x19
	mov	x3, x23
	bl	_dev_warn
Lloh9:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_5
LBB0_4:
	mov	w0, #0
LBB0_5:
	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	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_NAND_POLL_STATUS_TIMEOUT_MS,8,3 ; @NAND_POLL_STATUS_TIMEOUT_MS
	.comm	_jiffies,8,3                    ; @jiffies
	.comm	_BRCMNAND_INTFC_STATUS,4,2      ; @BRCMNAND_INTFC_STATUS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"timeout on status poll (expected %x got %x)\n"

	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
	.no_dead_strip	_bcmnand_ctrl_poll_status
.subsections_via_symbols
